Summary of the invention
For the problems referred to above, the present invention aims to provide a kind of multisystem start up system based on mobile terminal and method, it arranges heavy burden proxy module in main system subregion, like this when starting main system, after nucleus module performs the operation (comprising high input-output operation and not high input-output operation) being over all, control heavy burden proxy module and only perform high input-output operation, to reduce the start-up time of system to be launched in net system switching process.
Technical scheme provided by the invention is as follows:
A kind of multisystem starting method system based on mobile terminal, described multisystem start up system comprises: memory module, scheduler module, nucleus module and heavy burden proxy module, wherein, described memory module comprises multiple system partitioning, and prestores corresponding system data in each described system partitioning; Described multiple system partitioning comprises a main system subregion, and described scheduler module, nucleus module and heavy burden proxy module are all arranged in described main system subregion;
Described scheduler module, obtains after user instruction and generates steering order, and according to the operation of described steering order control core module and heavy burden proxy module;
Nucleus module, is connected with described scheduler module, and when starting the main system in main system subregion, the steering order that described nucleus module receiving scheduling module sends, performs high input-output operation and not high input-output operation, and then start described main system; When being switched to system to be launched from described main system, the steering order that described nucleus module receiving scheduling module sends, terminate high input-output operation and not high input-output operation and exit described main system, and after described system to be launched starts, described nucleus module is restarted under the steering order of described scheduler module, suspends the steering order of products for further after performing described high input-output operation;
Heavy burden proxy module, is connected with described scheduler module, and when starting the main system in main system subregion, the steering order that described heavy burden proxy module receiving scheduling module sends, suspends the steering order of products for further after performing described high input-output operation; When being switched to system to be launched from described main system, the steering order that described heavy burden proxy module receiving scheduling module sends performs not high input-output operation, and described system to be launched starts.
In the technical program, when main system starts, nucleus module performs all operations (comprising high input-output operation and not high input-output operation) under the control of scheduler module, to start main system; Meanwhile, scheduler module controls heavy burden proxy module and suspends after executing corresponding high input-output operation, like this, when needs carry out systematic evaluation, Control and Schedule module is only needed to perform not high input-output operation in system to be launched, the startup of system to be launched can be realized, saved system to be launched in start-up course, performed time required for high input-output operation, thus accelerated the toggle speed of system to be launched.
Preferably, described steering order comprises: enabled instruction, pause instruction, instruction of restarting and END instruction; Wherein, described enabled instruction comprises the enabled instruction of nucleus module height input-output operation, the enabled instruction of heavy burden proxy module height input-output operation, the not high input-output operation enabled instruction of nucleus module and the not high input-output operation enabled instruction of heavy burden proxy module; Described pause instruction comprises nucleus module pause instruction and the pause instruction of heavy burden proxy module; Described instruction of restarting comprises nucleus module instruction of restarting and heavy burden proxy module instruction of restarting; Described END instruction comprises nucleus module END instruction and the END instruction of heavy burden proxy module.
In the technical program, here the high input-output operation mentioned is in system (main system, system to be launched) those time-consuming operations in start-up course, as high input-output operation as described in performing comprises the loading system information, software information etc. that load in main system; Performing described not high input-output operation is those less operations consuming time relative to high input-output operation, as the personal data etc. in system to be launched as described in loading.
A kind of multisystem starting method, described multisystem starting method is applied to the multisystem start up system as described in claim 1-3 any one, specifically comprises the following steps:
Scheduler module control core module performs high input-output operation and not high input-output operation starts main system;
Scheduler module controls to suspend the further steering order waiting for scheduler module after heavy burden proxy module performs high input-output operation;
Triggering system handover event;
Scheduler module control core module terminates high input-output operation and not high input-output operation and exits main system;
Scheduler module controls heavy burden proxy module and performs not high input-output operation;
System to be launched starts.
Preferably, after the system needing to be switched to starts, dispatching control module restarts nucleus module, and described nucleus module is restarted and after performing high input-output operation, suspended the further steering order waiting for scheduler module.
In the technical program, can find out, it is identical that nucleus module and heavy burden proxy module in fact act in whole process, all by performing corresponding high input-output operation and not high input-output operation, to start the system needing to start, no matter be the startup of aforementioned main system and the startup of system to be launched be all like this.In the process of whole startup, after nucleus module performs all operation starts main system, allow again heavy burden proxy module perform corresponding high input-output operation simultaneously, like this, when system needs to switch, heavy burden proxy module only needs to perform the not high input-output operation in corresponding system, can start system to be launched.And after system to be launched starts, the nucleus module exited before allowing again performs high input-output operation, like this, when system needs further switched system, only need heavy burden proxy module above to be terminated exit system to be launched allows nucleus module execution need not high input-output operation corresponding in the startup be switched to simultaneously, so just achieves the further switching of system.
Preferably, triggering system handover event, specifically comprises: the system to be launched selecting needs to be switched to according to the configuration information in main system.
In the technical program, in general, main system accepts systematic evaluation and performs, and the scheduler module controlling its inside performs corresponding operation, realizes the switching of system.
Whether preferably, occurred by scheduler module monitoring system handover event, if systematic evaluation event occurs, then scheduler module sending controling instruction is to nucleus module and heavy burden proxy module, control to be switched to system to be launched.
Multisystem start up system based on mobile terminal provided by the invention and method, it can bring following beneficial effect:
In the present invention, in the start-up course of main system, nucleus module performs all operations, performs and only execute high input-output operation after heavy burden proxy module; The switching action of system is controlled by scheduler module, and responsible coordination nucleus module exits main system and acts on behalf of with heavy burden the step starting system to be launched; Like this, when needs start system to be launched, heavy burden proxy module only needs to perform not high input-output operation, avoids high input-output operation and to be greatly improved the toggle speed of system to be launched, namely substantially increase the switch speed of the multisystem based on multi partition design.
Embodiment
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, contrast accompanying drawing is illustrated the specific embodiment of the present invention below.Apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings, and obtain other embodiment.
Be illustrated in figure 1 the structural representation of the multisystem start up system based on mobile terminal provided by the invention, as can be seen from the figure, this system comprises: memory module 100, scheduler module 111, nucleus module 112 and heavy burden proxy module 113.Wherein:
Memory module 100 comprises multiple system partitioning, and prestores corresponding system data in each system partitioning.In the present invention, multiple system partitioning comprises a main system subregion 110, multiple system partitioning, as the first system subregion 120, second system subregion 130 etc., and scheduler module 111, nucleus module 112 and heavy burden proxy module 113 are all arranged in main system subregion 110.When mobile terminal-opening, in general, system default starts main system, is switched in the subsystem comprised in corresponding system partitioning more subsequently according to user instruction.Specifically, system data information, software data information and configuration information etc. are comprised in main system; System partitioning comprises personal data etc., as data such as configuration information, user file photo such as installation third-party application, wallpaper and themes in systems in which.When mobile terminal-opening, the various data of executive system inside are to start corresponding system, in addition, we know, in the process that system starts, have some comparatively time-consuming operations and some time-consuming relative less operations, i.e. high input-output operation and not high input-output operation, in actual applications, concrete how to distinguish high input-output operation mentioned here and not high input-output operation will be determined according to actual conditions, system information settings as loaded in main system is high input-output operation, subsystem third-party application in loading system subregion is set as not high input-output operation, we are not construed as limiting this.As can be seen from description above, some personal data have been only included in subsystem in system partitioning, and in general these operations are all not high input-output operations, subsystem in start up system subregion needs the contour input-output operation of system file loaded all to be included in main system, like this, nucleus module 112 and heavy burden proxy module 113 alternately load this high input-output operation mutually, realize object of the present invention.
Scheduler module 111, obtains after user instruction and generates steering order, and according to the operation of steering order control core module 112 and heavy burden proxy module 113.Specifically, the systematic evaluation instruction that the user instruction said here and user send, and in system work process, system monitors by this scheduler module 111 instruction whether having switched system.Steering order specifically comprises: enabled instruction, pause instruction, instruction of restarting and END instruction; Wherein, enabled instruction comprises the enabled instruction of nucleus module height input-output operation, the enabled instruction of heavy burden proxy module height input-output operation, the input-output operation enabled instruction of nucleus module not high and the enabled instruction of heavy burden proxy module not high input-output operation; Pause instruction comprises nucleus module pause instruction and the pause instruction of heavy burden proxy module; Instruction of restarting comprises nucleus module instruction of restarting and heavy burden proxy module instruction of restarting; END instruction comprises nucleus module END instruction and the END instruction of heavy burden proxy module.
Nucleus module 112, is connected with scheduler module 111, and it is mainly used in the steering order that receiving scheduling module 111 sends, and performs and operates accordingly, starts the system needing to start.Specifically, when needing to start the main system in main system subregion 110, the nucleus module height input-output operation enabled instruction that nucleus module 112 receiving scheduling module 111 sends and the enabled instruction of nucleus module not high input-output operation, perform the high input-output operation in main system and not high input-output operation, to realize the startup of main system, when be switched to from main system system to be launched (as, be switched to the subsystem comprised in the first system subregion 120, the subsystem etc. comprised in second system subregion 130) time, system to be launched is entered owing to now needing to exit main system, thus the nucleus module END instruction of nucleus module 112 receiving scheduling module 111 transmission, terminate high input-output operation and exit main system, and after system to be launched starts, restart under the control of the nucleus module instruction of restarting that nucleus module 112 sends in scheduler module 111, and after the high input-output operation of execution, scheduler module 111 sends nucleus module pause instruction and suspends nucleus module 112 current operation and the steering order of products for further.
Heavy burden proxy module 113, be connected with scheduler module 111, when starting the main system in main system subregion 110, the heavy burden proxy module height input-output operation enabled instruction that heavy burden proxy module 113 receiving scheduling module 111 sends, the heavy burden proxy module pause instruction that after performing high input-output operation, receiving scheduling module 111 sends suspends the steering order of current products for further; When being switched to system to be launched from main system, heavy burden proxy module 113 receiving scheduling module 111 sends the enabled instruction of heavy burden proxy module not high input-output operation and performs not high input-output operation, and system to be launched starts.
State on the invention in embodiment, in the start-up course of main system, nucleus module performs all operations, performs and only execute high input-output operation after heavy burden proxy module; The switching action of system is controlled by scheduler module, and responsible coordination nucleus module exits main system and acts on behalf of with heavy burden the step starting system to be launched; Like this, when needs start system to be launched, heavy burden proxy module only needs to perform not high input-output operation, avoids high input-output operation and to be greatly improved the toggle speed of system to be launched, namely substantially increase the switch speed of the multisystem based on multi partition design.
Above, we describe the function of each module respectively, and we make introduction to the flow process during multisystem start up system must work below, as shown in Figure 2, be the schematic flow sheet of multisystem starting method provided by the invention, be applied to above-mentioned multisystem start up system, specifically comprise the following steps:
S1 scheduler module 111 control core module 112 performs high input-output operation and not high input-output operation starts main system.Here, because whether this multisystem start up system is occurred by scheduler module 111 monitoring system handover event, if systematic evaluation event occurs, namely need to be switched to system to be launched, then scheduler module 111 sending controling instruction is to nucleus module 112 and heavy burden proxy module 113, starts to perform step S1.
S2 scheduler module 111 controls to suspend the further steering order waiting for scheduler module 111 after heavy burden proxy module 113 performs high input-output operation.Here, after nucleus module 112 performs the high input-output operation that is in main system and not high input-output operation starts main system, scheduler module 111 control immediately heavy burden proxy module 113 perform corresponding high input-output operation and after executing high input-output operation the steering order of pausing operation products for further.
S3 triggering system handover event.Here, specifically select the system to be launched needing to be switched to according to the configuration information in main system, configuration information here comprises the user instruction that user sends.
S4 scheduler module 111 control core module 112 terminates high input-output operation and exits main system;
S5 scheduler module 111 controls heavy burden proxy module 113 and performs not high input-output operation;
S6 system to be launched starts.
In addition, after step S6 executes, dispatching control module restarts nucleus module 112, and nucleus module 112 is restarted and after performing high input-output operation, suspended the further steering order waiting for scheduler module 111, exchanges with this nucleus module 112 and heavy burden proxy module 113.
As a complete embodiment, we are switched to the first system subregion 120 for system from main system subregion 110 below, introduce said process in detail:
Mobile terminal-opening, main partition starts, start the scheduler module 111 in main partition, scheduler module 111 sends the input-output operation enabled instruction of nucleus module height and the enabled instruction of nucleus module not high input-output operation to nucleus module 112, control core module 112 performs high input-output operation and not high input-output operation, load system file, software document and the configuration information etc. in main partition, complete the startup of main system; Meanwhile, scheduler module 111 sends the enabled instruction of heavy burden proxy module height input-output operation to heavy burden proxy module 113, after heavy burden proxy module 113 executes high input-output operation, scheduler module 111 and then the pause instruction of transmission heavy burden proxy module suspend heavy burden proxy module 113, wait for the further instruction of scheduler module 111.
Subsequently, subregion to be launched is selected according to the configuration information in main partition, if selected is the first system subregion the first system subregion 120 here, then scheduler module 111 sends nucleus module END instruction and terminates current operation to nucleus module 112 and exit main system, scheduler module 111 sends the enabled instruction of heavy burden proxy module not high input-output operation to heavy burden proxy module 113 simultaneously, such heavy burden proxy module 113 performs the not high input-output operation in the first system subregion 120, starts the subsystem in the first system subregion the first system subregion 120.
Afterwards, scheduler module 111 sends nucleus module instruction of restarting to nucleus module 112, restart nucleus module 112, send the enabled instruction of nucleus module height input-output operation to nucleus module 112 simultaneously, nucleus module 112 perform high input and output instruction after scheduler module 111 send again nucleus module pause instruction to nucleus module 112 and suspend next step steering order of current wait, now, nucleus module 112 and heavy burden proxy module 113 exchange POF.
Now, if scheduler module 111 receives further systematic evaluation instruction, need by systematic evaluation to second system subregion 130, then scheduler module 111 sends heavy burden proxy module END instruction to heavy burden proxy module 113 and terminates current operation and exit the subsystem in the first system subregion 120; Scheduler module 111 sends the enabled instruction of nucleus module not high input-output operation to nucleus module 112 simultaneously, and nucleus module 112 starts the subsystem in second system subregion 130 after performing the not high input and output instruction in second system subregion 130.After starting the subsystem in second system subregion 130, scheduler module 111 sends again the enabled instruction of heavy burden proxy module height input-output operation to heavy burden proxy module 113, heavy burden proxy module 113 perform high input and output instruction after scheduler module 111 send again heavy burden proxy module pause instruction to heavy burden proxy module 113 and suspend next step steering order of current wait.
Subsystem in the first partition system is switched to again in the process of the subsystem in the second partition system as can be seen from the main system in above main partition, in whole process, nucleus module 112 and heavy burden proxy module 113 function are identical, difference is only that the opportunity performed is different, two modules alternately perform mutually, accelerate the mutual switching between mobile terminal multisystem, reduce the start-up time of switched system.
In a particular embodiment, communicated by methods such as command line parameter, environmental variance, system file, socket (socket) device file, property (attribute) between scheduler module 111, nucleus module 112 and heavy burden proxy module 113, below elaborate:
Mobile terminal-opening, scheduler module 111 uses fork (establishment) operation start nucleus module 112 be correlated with and record its number (pid); Subsequently, scheduler module 111 performs execute (execute file), start high input-output operation and the not high input-output operation of nucleus module 112, nucleus module 112 starts main system after executing high input-output operation and not high input-output operation; Meanwhile, scheduler module 111 starts heavy burden proxy module 113, and heavy burden proxy module 113 suspends after performing high input-output operation and products for further ground dispatch command.
When scheduler module 111 receives switched system order, kill (end) operation is used to terminate nucleus module 112 and exit current system, scheduler module 111 uses the method such as socket (socket) and property (attribute) simultaneously, notice heavy burden proxy module 113 jumps out the not high input-output operation in the system suspended and perform and need to be switched to, to start new system.
After needing the system startup be switched to, scheduler module 111 restarts nucleus module 112, makes its wait command after making it perform high input-output operation, and now nucleus module 112 and heavy burden proxy module 113 identity are exchanged.
Be noted that the system that above said needs are switched to is the subsystem in the first partition system be described to or the wait of the subsystem in the second partition system above.
State on the invention in embodiment, in the start-up course of main system, the switching action of system is controlled by scheduler module, and responsible coordination nucleus module exits main system and acts on behalf of with heavy burden the step starting system to be launched; Like this, when needs start system to be launched, heavy burden proxy module only needs to perform not high input-output operation, avoids high input-output operation and to be greatly improved the toggle speed of system to be launched, namely substantially increase the switch speed of the multisystem based on multi partition design.
It should be noted that above-described embodiment all can independent assortment as required.The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.