CN103136045A - Dispatching method and device of virtualization operating system - Google Patents

Dispatching method and device of virtualization operating system Download PDF

Info

Publication number
CN103136045A
CN103136045A CN2011103780711A CN201110378071A CN103136045A CN 103136045 A CN103136045 A CN 103136045A CN 2011103780711 A CN2011103780711 A CN 2011103780711A CN 201110378071 A CN201110378071 A CN 201110378071A CN 103136045 A CN103136045 A CN 103136045A
Authority
CN
China
Prior art keywords
event
emergency
scheduling
child
operation system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2011103780711A
Other languages
Chinese (zh)
Inventor
党茂昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
ZTE Corp
Original Assignee
ZTE Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by ZTE Corp filed Critical ZTE Corp
Priority to CN2011103780711A priority Critical patent/CN103136045A/en
Priority to PCT/CN2012/073602 priority patent/WO2012152159A1/en
Publication of CN103136045A publication Critical patent/CN103136045A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention discloses a dispatching method and a device of a virtualization operating system. The method thereof comprises that whether an emergency exists in to-be-dispatched events or not can be confirmed. When the emergency is confirmed to exist in the to-be-dispatched events, an event driven strategy can be initiated. Sub operating systems which correspond to the emergency event can be confirmed according to the event driven strategy. The corresponding sub operating systems can be dispatched to execute the emergency event. When the emergency cannot be confirmed to exist in the to-be-dispatched events, a time slice driven strategy can be initiated. Each sub operating system can be dispatched to execute the to-be- dispatched events according to the time slice driven strategy. According to the dispatching method and the device of the virtualization operating system, whether the emergency exists in the to-be-dispatched events or not can be confirmed, and the event driven strategy can be applied for the emergency. When the emergency is not existed, the time slice driven strategy can be applied. And then, the emergency can be in priority processing to solve the problem that dispatching strategies of the virtualization operating system is difficult to meet the demands of a real-time system. Usable range of the system can be enhanced.

Description

Dispatching method in virtualizing operating systems and device
Technical field
The present invention relates to the communications field, dispatching method and device in a kind of virtualizing operating systems.
Background technology
In computer operating system, often can use the virtualization software technology, for example, virtualizing operating systems.The structural representation of virtualizing operating systems as shown in Figure 1, it runs on single hardware central processing unit (Central Processing Unit, referred to as CPU) on CPU, 2 of Domain scheduler schedules or a plurality of Domain (GuestOS) move simultaneously.This virtualizing operating systems (hypervisor, also referred to as total virtualizing operating systems) can realize the upper a plurality of operating systems of single CPU (GuestOS also claims child-operation system or task operating system) operation simultaneously in the internal memory territory (Domain) of isolation mutually; Its system call adopts the second-level dispatching strategy, and GuestOS has the task dispatcher of oneself, and GuestOS is in task run (task run) and idle (free time) state.Domain is in run (operation) and ready (preparation) two states.Virtualizing operating systems carries out first order scheduling to GuestOS (domain), GuestOS carries out second level scheduling to the task of self, wherein, adopt first order scheduler, i.e. Domain scheduler in Fig. 1 (internal memory domain scheduling device) in first order scheduling process; Adopt second level scheduler, i.e. task dispatcher in Fig. 1 in the scheduling process of the second level.
Scheduling strategy on above-mentioned first order scheduler and second level scheduler is the dispatching method of time-based sheet normally, for example, the earliest closing time preferential (Simply Earlist Deadline First, referred to as SEDF), BVT (Borrowed Virtual Time), ARR, Credit scheduler etc., the polling mode that adopts the dispatching method of this timeslice realizes the scheduling to each child-operation system, so it is applied to the lower occasion of requirement of real-time (as the webserver etc.) usually.For the higher occasion of requirement of real-time (as mobile phone etc.), the real-time of this scheduling strategy is difficult to satisfy system requirements.
Scheduling strategy for virtualizing operating systems in correlation technique is difficult to satisfy the problem that real-time system requires, and not yet proposes at present effective solution.
Summary of the invention
Scheduling strategy for virtualizing operating systems is difficult to satisfy the problem that real-time system requires, and the invention provides dispatching method and device in a kind of virtualizing operating systems, to address the above problem at least.
According to an aspect of the present invention, provide the dispatching method in a kind of virtualizing operating systems, the method comprises: determine to treat whether emergency is arranged in scheduling events; If so, start the event-driven strategy, determine according to the event-driven strategy child-operation system that emergency is corresponding; Child-operation system corresponding to scheduling carries out this emergency; If not, start-up time, sheet drove strategy, drove each child-operation of strategy scheduling system according to timeslice and carried out and treat scheduling events.
Whether preferably, determining above-mentionedly has emergency to comprise in scheduling events: when having event to arrive, the flag of this event in internal memory carried out set; Wherein, event corresponding to the difference of the flag in this internal memory; Determine whether the flag after set belongs to flag corresponding to emergency, if so, determining to treat has emergency in scheduling events; After this event is finished, the flag of this event is carried out clear operation.
Preferably, above-mentioned emergency is the real-time response event in virtualizing operating systems.
Preferably, above-mentioned real-time response event comprises following three classes: 0 class event, and described 0 class event refers to that bottom hardware needs the interrupt event of upper strata specified memory domain response; 1 class event, described 1 class event need between the child-operation system to refer to the communication event processed by another internal memory territory; When 2 class events, described 2 class events referred to that the task in the internal memory territory is idle, notice first order scheduler discharged the event of central processor CPU.
Preferably, the priority of above-mentioned 0 class event is greater than above-mentioned 1 class event, and the priority of above-mentioned 1 class event is greater than above-mentioned 2 class events; The child-operation system of dispatching above-mentioned correspondence carries out emergency and comprises: according to the child-operation system corresponding to priority orders scheduling of this emergency.
Preferably, before starting the event-driven strategy, state according to the state of child-operation system and internal memory territory arranges the scheduling question blank, wherein, this scheduling question blank is bivariate table, one of them dimension by the scheduling trigger event represent, priority is arranged from high to low, another dimension is represented by the combinations of states of child-operation system; Determine that according to above-mentioned event-driven strategy child-operation system corresponding to emergency comprises: determine corresponding scheduling sublayer operating system according to the state of this emergency and current each child-operation system.
According to a further aspect in the invention, provide the dispatching device in a kind of virtualizing operating systems, this device comprises: the event determination module is used for determining to treat whether scheduling events has emergency; The first driver module is used for determining when scheduling events has emergency when the event determination module, starts the event-driven strategy; The first scheduler module is used for determining according to the above-mentioned event-driven strategy that the first driver module starts the child-operation system that above-mentioned emergency is corresponding, and child-operation system corresponding to scheduling carries out emergency; The second driver module is used for determining when scheduling events does not have emergency when the event determination module that start-up time, sheet drove strategy; The second scheduler module, the timeslice that is used for starting according to the second driver module drive each child-operation of strategy scheduling system and carry out and treat scheduling events.
Preferably, the event determination module comprises: the set unit, with when having event to arrive, carry out set to the flag of this event in internal memory; Wherein, event corresponding to the difference of the flag in this internal memory; Determining unit is used for determining whether the flag after set belongs to flag corresponding to emergency, and if so, determining to treat has emergency in scheduling events; This device also comprises: remove module, be used for after described event is finished, the flag of described event being carried out clear operation.
Preferably, this device also comprises: event arranges module, is emergency for the real-time response event that virtualizing operating systems is set.
Preferably, this device also comprises: the event sort module is used for above-mentioned real-time response event is divided into following three classes: 0 class event, and this 0 class event refers to that bottom hardware needs the interrupt event of upper strata specified memory domain response; 1 class event, this 1 class event need between the child-operation system to refer to the communication event processed by another internal memory territory; When 2 class events, this 2 class event referred to that the task in the internal memory territory is idle, notice first order scheduler discharged the event of CPU.
Preferably, this device also comprises: priority arranges module, is used for arranging the priority of 0 class event of event sort module greater than 1 class event, and the priority of 1 class event is greater than 2 class events; The first scheduler module comprises: child-operation system determining unit is used for determining according to the above-mentioned event-driven strategy that the first driver module starts the child-operation system that above-mentioned emergency is corresponding; Child-operation system call unit is used for according to priority, child-operation system corresponding to the priority orders scheduling of module setting being set and carries out above-mentioned emergency.
Preferably, this device also comprises: the scheduling question blank arranges module, be used for according to the state in the state of child-operation system and internal memory territory, the scheduling question blank being set, wherein, this scheduling question blank is bivariate table, one of them dimension represents by the scheduling trigger event, and priority is arranged from high to low, and another dimension is represented by the combinations of states of above-mentioned child-operation system; Child-operation system determining unit comprises: determine subelement, be used for determining corresponding scheduling sublayer operating system according to the state of above-mentioned emergency and current each child-operation system.
By the present invention, employing determines to treat whether have emergency in scheduling events, and application affairs drives strategy when having emergency, the Applicative time sheet drives strategy when not having emergency, and then can the priority processing emergency, the scheduling strategy that has solved virtualizing operating systems is difficult to satisfy the problem that real-time system requires, and has strengthened the usable range of system.
Description of drawings
Accompanying drawing described herein is used to provide a further understanding of the present invention, consists of the application's a part, and illustrative examples of the present invention and explanation thereof are used for explaining the present invention, do not consist of improper restriction of the present invention.In the accompanying drawings:
Fig. 1 is the structural representation according to the virtualizing operating systems of correlation technique;
Fig. 2 is according to the dispatching method process flow diagram in the virtualizing operating systems of the embodiment of the present invention;
Fig. 3 is the schematic diagram based on the dispatching method of event-driven strategy according to the embodiment of the present invention;
Fig. 4 is according to the scheduling events set of the embodiment of the present invention and removes regular schematic diagram;
Fig. 5 is according to the scheduling events set of the embodiment of the present invention and the sequential schematic diagram of reset procedure;
Fig. 6 is the method flow diagram of enabling the event-driven strategy according to the embodiment of the present invention;
Fig. 7 drives the method flow diagram of strategy according to the enabling time sheet of the embodiment of the present invention;
Fig. 8 is the structured flowchart according to the dispatching device in the virtualizing operating systems of the embodiment of the present invention;
Fig. 9 is the concrete structure block diagram according to the dispatching device in the virtualizing operating systems of the embodiment of the present invention.
Embodiment
Hereinafter also describe in conjunction with the embodiments the present invention in detail with reference to accompanying drawing.Need to prove, in the situation that do not conflict, embodiment and the feature in embodiment in the application can make up mutually.
The embodiment of the present invention considers that time type of drive simple in correlation technique is not suitable with the higher scene of requirement of real-time, dispatching method and device in a kind of virtualizing operating systems are provided, the method and device can be applied in embedded real time system, for example, the fields such as mobile phone virtual operating system, real-time network server, cloud computing.This technology can also be used to improve general non real-time property operating system, enables to be applied to simultaneously the higher occasion of requirement of real-time.Be elaborated below by specific embodiment.
Fig. 2 shows according to the dispatching method process flow diagram in the virtualizing operating systems of the embodiment of the present invention, comprises the following steps:
Step S202 determines to treat whether emergency is arranged in scheduling events, if so, and execution in step S204; If not, execution in step S208.
Step S204 starts the event-driven strategy, then execution in step S206.
Step S206 determines that according to this event-driven strategy (that is, GusetOS), child-operation system corresponding to scheduling carries out this emergency for child-operation system corresponding to above-mentioned emergency.
Step S208, start-up time, sheet drove strategy, then execution in step S210.
Step S210 drives each child-operation of strategy scheduling system according to timeslice and carries out and treat scheduling events.
The present embodiment is by determining to treat whether there is emergency in scheduling events, and application affairs drives strategy when having emergency, the Applicative time sheet drives strategy when not having emergency, and then can the priority processing emergency, the scheduling strategy that has solved virtualizing operating systems is difficult to satisfy the problem that real-time system requires, and has strengthened the usable range of system.
The dispatching method of the present embodiment can be by the realization of first order scheduler, i.e. Domain scheduler.Under this mode, when having the urgent or critical event that needs real-time response to occur in system, these events are had an opportunity to drive the domain scheduler and are produced the scheduling behavior, make it (urgent or critical event) and obtain fast processing.When not urgent or critical event occured, the domain scheduler adopted the dispatching algorithm of time-based sheet (weight).This mode had both guaranteed the requirement of real-time of system, and the compatible again implementation of original virtualizing operating systems makes the virtualizing operating systems in the embodiment of the present invention can be applied in any scene, has strengthened the range of application of system.
For above-mentioned definite mode for the treatment of scheduling events, the present embodiment provides a kind of mode of bit fixing in internal memory that adopts to represent, with the flag of these bits as event, makes these flags different event of correspondence respectively; For the ease of realizing, these flags can be divided according to the type of event, a part is flag corresponding to emergency, a part is flag corresponding to non-emergent event.Based on this, when having event to arrive, the flag of this event in internal memory carried out set, the flag after set represents that its corresponding event arrives, and need to carry out scheduling operation; Then, determine whether the flag after set belongs to flag corresponding to emergency, if so, determining to treat has emergency in scheduling events.After event is finished, the flag of event is carried out clear operation, in order to indicate event handling corresponding to this flag complete.
The speed that above-mentioned emergency can respond is as requested set, for example, can be with the real-time response event in virtualizing operating systems as emergency, the practical application request of comparison operators assembly system like this.Usually, the real-time response event comprises following three classes:
(1) 0 class event, this 0 class event refers to that bottom hardware needs the interrupt event of upper strata specified memory domain response, namely bottom hardware interrupts obtaining the quick response processing of certain domain of upper strata;
(2) 1 class events, this 1 class event need between the child-operation system to refer to the communication event processed by another internal memory territory, and namely the communication event between operating system need to be by another domain fast processing;
When (3) 2 class events, this 2 class event referred to that the task in the internal memory territory is idle, notice first order scheduler discharged the event of CPU; When being the task idle in Doamin (GuetOS), initiatively abandon CPU, notice Doamin scheduler.
Certainly, for above-mentioned three class events, preferably adopt the mode of priority sequencing to dispatch, in the present embodiment, the order of its priority is: the priority of 0 class event is greater than 1 class event, and the priority of 1 class event is greater than 2 class events; Based on this priority orders, when child-operation system corresponding to scheduling carries out emergency, can be according to the child-operation system corresponding to priority orders scheduling of each emergency, for each the concrete event in above-mentioned three class events, can also further set priority, preferentially be scheduled to reach the high event of urgency level, make system can embody more fully real-time, simultaneously during the task idle of above-mentioned 2 class events in Doamin (GuetOS), initiatively discharge CPU, thereby improve the utilization factor of CPU, improve the real-time of system.
In order to determine more easily the child-operation system that emergency is used, the present embodiment is before starting the event-driven strategy, said method also comprises: the state according to the state of child-operation system and internal memory territory arranges the scheduling question blank, wherein, scheduling question blank in the present embodiment is bivariate table, one of them dimension by the scheduling trigger event represent, priority is arranged from high to low, another dimension is represented by the combinations of states of child-operation system; So can determine the child-operation system that emergency is corresponding based on the scheduling question blank, for example, determine corresponding scheduling sublayer operating system according to the state of emergency and current each child-operation system.
Be emergency for 3 above-mentioned class events, therefore can drive the domain scheduler with the form that trigger event is set, the domain scheduler can produce scheduling decision according to these composition of matter, current GuestOS combinations of states, current domain dispatch state.
During specific implementation, according to the concrete applicable cases of real-time system, first define urgent/critical event (need to cause scheduling and could satisfy the event that real-time response requires), and according to 3 above-mentioned class real-time event classification, and according to prioritization.In the present embodiment, 0 class Event Priority is the highest, 1 class Event Priority placed in the middle, 2 class Event Priorities are minimum, and every class event self also can be according to prioritization.Then list domain combinations of states, GuestOS combinations of states according to system and ruuning situation, the below is respectively RTOS and Linux take the child-operation system (GuestOS) in virtualizing operating systems and describes as example, as the GuestOS combinations of states of table 1, the Domain combinations of states as shown in table 2.
Table 1
RTOS Linux Status indicator ENUM Remarks
Idle Run RI_LR 0
Idle Idle RI_LI 1
Run Run RR_LR 2
Run Idle RR_LI 3
Table 2
Then, according to system's service requirement, design and drive the event scheduling question blank, as shown in table 3.
Table 3
Figure BDA0000111854090000062
Above-mentioned table 1 has represented the GuestOS combinations of states, and each GuestOS is in run or two states of idle, and the combinations of states of a plurality of GuestOS is got up (it is example that the present embodiment adopts 2 GuestOS), just can produce the combinations of states table of GuestOS.
Above-mentioned table 2 has represented the Domain combinations of states.Each Domain is in run or two states of ready, and the combinations of states of a plurality of Domain is got up (it is that example describes that the present embodiment adopts 2 Domain), just can produce the combinations of states table of Doamin.
Above-mentioned table 3 has represented the scheduling question blank, and it is the table of a two dimension, one of them dimension by the scheduling trigger event represent, priority is arranged from high to low, another dimension is represented by the GuestOS combinations of states.By the input of these two dimensions, can inquire the GuestOS (Domain) that the needs of expection are scheduled, as the scheduler input of scheduling decision next time.
Wherein, the setting up procedure of above-mentioned table 3 is as follows:
1, predefined scheduling trigger event contains the attribute that need to be processed by which GuestOS, determine the needs of the expection GuestOS that is scheduled according to this attribute, the one group of high-priority interrupt that needs the RTOS processing such as the representative of the RTOS_HIGHT_PRI_INT in above-mentioned table 3, one group of low priority interrupt that the LINUX_LOW_PRI_INT representative needs LINUX to process, concrete condition also has a lot, such as physical layer frame interruption etc., herein for simplified diagram, various situations are not listed one by one;
2, R represents move RTOS, L and represents move linux;
3, because high priority event is first processed, when processing the low priority event, high priority event is disposed, will not exist in event to be scheduled.
The below describes as an example of the schematic diagram of dispatching method based on the event-driven strategy shown in Figure 3 example, wherein, when the Idle event of the interruption bottom layer treatment event of hardware, emergency communication event (for example the transmission event in the linux system, the reception ﹠ disposal event in RTOS), GuestOS arrives, with interrupt event flag corresponding in virtualizing operating systems (hypervisor), send event identifier position and position, OS status indicator position; After these flag set, can drive the Domain scheduler and remove query scheduling Object Query table, the Domain scheduler produces scheduling decision according to current GuestOS state and Domain state.
As shown in Figure 4 scheduling events set and the regular schematic diagram of removing according to the embodiment of the present invention.Wherein, solid arrow represents above-mentioned communication event and interrupt event; Reveal dotted arrow and represent to arrange scheduling events, line is drawn dotted arrow and is represented to remove scheduling events.As seen from Figure 4, the setting of the scheduling trigger event of above-mentioned 3 types and the process of removing.The concrete sequential chart of this process as shown in Figure 5, this figure has provided setting and removing opportunity of the scheduling trigger event of above-mentioned 3 types, and the switching time of event-driven strategy and timeslice driving strategy, wherein the close/open of S_timer represents respectively to begin the sheet driving scheduling of event-driven scheduling/start time.6 kinds of event set/clear operations are arranged in figure, wherein, 5 kinds of operations that arranging in figure send the event identifier position, GuestOS status indicator position is set, remove GuestOS status indicator position, remove the interrupt event flag, remove the event identifier bit representation are carried out in GuestOS, need to adopt hypercalls (hypercall) to realize, hardware interrupts event set operation is wherein carried out in the virtualizing operating systems privilege space, can direct control.This mode comprises the following steps when specific implementation:
Step S502-step S506, for 0 class event, bottom layer treatment checks this interruption attribute when finishing; For 1 class event, check event attribute when distributing event; For 2 class events, the task in Domain enters idle (free time) state;
Step S508-step S512 arranges respectively flag break period, arranges and send the event identifier position and GuestOS status indicator position is set;
Step S514 when scheduling events is arranged, closes the scheduling of S_timer event-driven;
Step S516-step S518 when above-mentioned task enters run (operation) state, removes GuestOS status indicator position;
Step S520-step S524 interrupts high level and interrupts processing; After interruption is disposed, remove above-mentioned interruption flag;
Step S526-step S530, other GuestOS processes event, after event handling is complete, removes above-mentioned time marking position;
Step S532 when not having event to need priority scheduling, opens the S_timer time to drive scheduling.
The method flow diagram of enabling event-driven strategy (event-driven scheduling) as shown in Figure 6 comprises the following steps:
Step S602 when the scheduling trigger event arrives, at first arranges the event identifier position;
Step S604 checks the flag in all kinds of event group, judges whether that the trigger event of higher priority exists, and if so, illustrates that scheduler is with the event of this higher priority of priority scheduling, execution in step S614; If no, execution in step S606;
Step S606 checks whether oneself (trigger event in above-mentioned steps S602) is first trigger event, if so, and execution in step S608; If not, execution in step S610;
Step S608, the shut-in time sheet drives scheduling strategy, beginning event-driven scheduling strategy (namely closing S_timer); Then execution in step S610;
Step S610, query event drives dispatch list;
Step S612, whether the internal memory territory (domain) that the judgement inquiry draws is current domain, if so, execution in step S614, if not, execution in step S616;
Step S614 carries out return; For example, no longer carry out next step operation, withdraw from this operation;
Step S616 produces scheduling and switches, and the child-operation system in the scheduling inquiry draws internal memory territory processes above-mentioned trigger event.
Enabling time sheet as shown in Figure 7 drives the strategy method flow diagram of (or claiming time slice scheduling), comprises the following steps:
Step S702 calls hypercall (senior call instruction) and removes the scheduling trigger event;
Step S704 removes the trigger event flag;
Step S706 judges whether that the trigger event of low priority exists, if so, and execution in step S708; If not, execution in step S710;
Step S708 processes the trigger event of this low priority, then execution in step S712;
Step S710, start-up time the sheet scheduling strategy, start time sheet scheduling;
After the response of scheduling trigger event is finished dealing with, need to call hypercall (senior call instruction) and remove, whether after removing the flag of this event, first will go to check has the event lower than own priority to exist, if having, just to go to process it; If not low than own priority event, there is no other event in the presentation of events group, start-up time the sheet scheduling strategy, End Event drives scheduling strategy (that is, opening S_timer).
Step S712, query event drives dispatch list;
Step S714, whether the internal memory territory (domain) that the judgement inquiry draws is current domain, if so, execution in step S716, if not, execution in step S718;
Drive dispatch list by query event, judge whether to need to produce new scheduling;
Step S716 carries out return; For example, no longer carry out next step operation, withdraw from this operation;
Step S718 produces scheduling and switches, and the child-operation system in the scheduling inquiry draws internal memory territory processes above-mentioned trigger event.
When the specific implementation said method, can adopt following step to complete:
Step 1: according to the concrete applicable cases of real-time system, define urgent/critical event (need to cause scheduling and could satisfy the event that real-time response requires), and according to the division principle of aforesaid 3 class real-time events, classification and according to prioritization.0 class Event Priority is the highest, 1 class Event Priority placed in the middle, 2 class Event Priorities are minimum, and every class event self also sorts according to processing priority.
Step 2: according to the concrete applicable cases of real-time system, the scheduling trigger event in predefined step 1 need to be processed by that GuestOS.
Step 3: list domain combinations of states, GuestOS combinations of states according to system and ruuning situation, as shown in table 1, table 2.
Step 4: according to system's service requirement, the definition of step 1, step 2, step 3 is designed and driven the event scheduling question blank, and is as shown in table 3.
Step 5: dispatch the relevant program code design of trigger event setting/removing with reference to accompanying drawing 4 and accompanying drawing 5, add scheduling trigger event set and remove correlative code in system code.
Step 6: the 6 and 7 relevant program codes that carry out the event-driven scheduling design with reference to the accompanying drawings, add the code of scheduling trigger event driven scheduler in Domain scheduler schedules algorithm.The driving event scheduling question blank of the GuestOS state of the Event Priority of integrating step 1 definition, step 3 definition and Doamin state, step 4 definition comes realization event to drive scheduling.
Step 7: system debug, test, stable operation.
Corresponding to said method, the embodiment of the present invention also provides the dispatching device in a kind of virtualizing operating systems, this device can be arranged in virtualizing operating systems, and the structured flowchart of the dispatching device in virtualizing operating systems as shown in Figure 8, this device comprise with lower module:
Event determination module 80 is used for determining to treat whether scheduling events has emergency;
The first driver module 82 is connected with event determination module 80, is used for determining when scheduling events has emergency when event determination module 80, starts the event-driven strategy;
The first scheduler module 84 is connected with the first driver module 82, is used for determining according to the event-driven strategy that the first driver module 82 starts the child-operation system that emergency is corresponding, and child-operation system corresponding to scheduling carries out emergency;
The second driver module 86 is connected with event determination module 80, is used for determining when scheduling events does not have emergency when event determination module 80, and start-up time, sheet drove strategy;
The second scheduler module 88 is connected with the second driver module 86, is used for driving each child-operation of strategy scheduling system according to the timeslice that the second driver module 86 starts and carries out and treat scheduling events.
The present embodiment is by determining to treat whether there is emergency in scheduling events, and application affairs drives strategy when having emergency, the Applicative time sheet drives strategy when not having emergency, and then can the priority processing emergency, the scheduling strategy that has solved virtualizing operating systems is difficult to satisfy the problem that real-time system requires, and has strengthened the usable range of system.
Treat for the ease of determining whether emergency is arranged in scheduling events, the present embodiment is distinguished by the flag of each event, based on this, the structured flowchart of the dispatching device in virtualizing operating systems as shown in Figure 9, on the basis of Fig. 8, above-mentioned event determination module 80 in this device comprises: set unit 802, and with when having event to arrive, the flag to event in internal memory is carried out set; Wherein, event corresponding to the difference of the flag in this internal memory; Determining unit 804 is connected with set unit 802, is used for determining whether the flag after set belongs to flag corresponding to emergency, and if so, determining to treat has emergency in scheduling events; Correspondingly, this device also comprises: remove module 92, be used for after above-mentioned event is finished, the flag of this event being carried out clear operation.
The emergency of the present embodiment can be for the real-time response event, and based on this, said apparatus also comprises: event arranges module, be connected with event determination module 80, and be emergency for the real-time response event that virtualizing operating systems is set.
Because different events requires the timely degree of response different, the present embodiment can be classified to above-mentioned response events, therefore, and can be in the said apparatus setting: the event sort module, with above-mentioned event, module is set and is connected, be used for the real-time response event is divided into following three classes:
0 class event, this 0 class event refers to that bottom hardware needs the interrupt event of upper strata specified memory domain response;
1 class event, this 1 class event need between the child-operation system to refer to the communication event processed by another internal memory territory;
When 2 class events, this 2 class event referred to that the task in the internal memory territory is idle, notice first order scheduler discharged the event of CPU.
The urgency level of considering above-mentioned three class events is different, can corresponding priority be set for this three classes event, namely also comprise in said apparatus: priority arranges module, be connected with above-mentioned event sort module, be used for arranging the priority of 0 class event of event sort module greater than 1 class event, the priority of 1 class event is greater than 2 class events; Correspondingly, above-mentioned the first scheduler module comprises:
Child-operation system determining unit is used for determining according to the event-driven strategy that the first driver module starts the child-operation system that emergency is corresponding;
Child-operation system call unit arranges module with priority and is connected with child-operation system determining unit, is used for according to priority, child-operation system corresponding to priority orders scheduling that module arranges being set and carries out emergency.
Based on table 1, table 2 and the table 3 in said method embodiment, said apparatus also comprises: the scheduling question blank arranges module, be used for according to the state in the state of child-operation system and internal memory territory, the scheduling question blank being set, wherein, the scheduling question blank is bivariate table, one of them dimension by the scheduling trigger event represent, priority is arranged from high to low, another dimension is represented by the combinations of states of child-operation system; Correspondingly, above-mentioned child-operation system determining unit comprises: determine subelement, be used for determining corresponding scheduling sublayer operating system according to the state of emergency and current each child-operation system.
As can be seen from the above description, the embodiment of the present invention is mainly improved is first order scheduling strategy (domain scheduling), show through application in practice, said method has solved effectively that the cpu busy percentage that virtualizing operating systems traditional scheduler method brings is low, interrupt response slowly, communication performance low inferior problem between operating system.Can be applied in some emerging applications, as the field to requirement of real-time higher (as mobile phone).
obviously, those skilled in the art should be understood that, above-mentioned each module of the present invention or each step can realize with general calculation element, they can concentrate on single calculation element, perhaps be distributed on the network that a plurality of calculation elements form, alternatively, they can be realized with the executable program code of calculation element, thereby, they can be stored in memory storage and be carried out by calculation element, and in some cases, can carry out step shown or that describe with the order that is different from herein, perhaps they are made into respectively each integrated circuit modules, perhaps a plurality of modules in them or step being made into the single integrated circuit module realizes.Like this, the present invention is not restricted to any specific hardware and software combination.
The above is only the preferred embodiments of the present invention, is not limited to the present invention, and for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any modification of doing, be equal to replacement, improvement etc., within all should being included in protection scope of the present invention.

Claims (12)

1. the dispatching method in a virtualizing operating systems is characterized in that comprising:
Determine to treat whether emergency is arranged in scheduling events;
If so, start the event-driven strategy, determine according to described event-driven strategy the child-operation system that described emergency is corresponding; The child-operation system of dispatching described correspondence carries out described emergency;
If not, sheet driving start-up time strategy drives the described scheduling events for the treatment of of each child-operation system's execution of strategy scheduling according to described timeslice.
2. method according to claim 1, is characterized in that,
Whether described until scheduling events in have described emergency comprise: when having event to arrive, the flag of described event in internal memory carried out set if determining; Wherein, event corresponding to the difference of the flag in described internal memory; Determine whether the described flag after set belongs to flag corresponding to emergency, if so, determining to treat has emergency in scheduling events;
Described method also comprises: after described event is finished, the flag of described event is carried out clear operation.
3. method according to claim 1 and 2, is characterized in that, described emergency is the real-time response event in virtualizing operating systems.
4. method according to claim 3, is characterized in that, described real-time response event comprises following three classes:
0 class event, described 0 class event refers to that bottom hardware needs the interrupt event of upper strata specified memory domain response;
1 class event, described 1 class event need between the child-operation system to refer to the communication event processed by another internal memory territory;
When 2 class events, described 2 class events referred to that the task in the internal memory territory is idle, notice first order scheduler discharged the event of central processor CPU.
5. method according to claim 4, is characterized in that, the priority of described 0 class event is greater than described 1 class event, and the priority of described 1 class event is greater than described 2 class events;
The described emergency of child-operation system's execution of dispatching described correspondence comprises: the child-operation system of dispatching described correspondence according to the priority orders of described emergency.
6. method according to claim 5, is characterized in that,
Before starting the event-driven strategy, described method also comprises: the state according to the state of child-operation system and internal memory territory arranges the scheduling question blank, wherein, described scheduling question blank is bivariate table, one of them dimension is represented by the scheduling trigger event, priority is arranged from high to low, and another dimension is represented by the combinations of states of described child-operation system;
Determine that according to described event-driven strategy child-operation system corresponding to described emergency comprises: determine corresponding scheduling sublayer operating system according to the state of described emergency and current each child-operation system.
7. the dispatching device in a virtualizing operating systems is characterized in that comprising:
The event determination module is used for determining to treat whether scheduling events has emergency;
The first driver module, described when scheduling events has emergency for determining when described event determination module, start the event-driven strategy;
The first scheduler module is used for determining according to the described event-driven strategy that described the first driver module starts the child-operation system that described emergency is corresponding, and the child-operation system of the described correspondence of scheduling carries out described emergency;
The second driver module, described when scheduling events does not have emergency for determining when described event determination module, start-up time, sheet drove strategy;
The second scheduler module drives the described scheduling events for the treatment of of each child-operation system's execution of strategy scheduling for the described timeslice that starts according to described the second driver module.
8. device according to claim 7, is characterized in that,
Described event determination module comprises: the set unit, with when having event to arrive, carry out set to the flag of described event in internal memory; Wherein, event corresponding to the difference of the flag in described internal memory; Determining unit is used for determining whether the described flag after set belongs to flag corresponding to emergency, and if so, determining to treat has emergency in scheduling events;
Described device also comprises: remove module, be used for after described event is finished, the flag of described event being carried out clear operation.
9. according to claim 7 or 8 described devices, is characterized in that, described device also comprises: event arranges module, is emergency for the real-time response event that virtualizing operating systems is set.
10. device according to claim 9, is characterized in that, described device also comprises: the event sort module is used for described real-time response event is divided into following three classes:
0 class event, described 0 class event refers to that bottom hardware needs the interrupt event of upper strata specified memory domain response;
1 class event, described 1 class event need between the child-operation system to refer to the communication event processed by another internal memory territory;
When 2 class events, described 2 class events referred to that the task in the internal memory territory is idle, notice first order scheduler discharged the event of CPU.
11. device according to claim 10, it is characterized in that, described device also comprises: priority arranges module, is used for arranging the priority of described 0 class event of described event sort module greater than described 1 class event, and the priority of described 1 class event is greater than described 2 class events;
The first scheduler module comprises:
Child-operation system determining unit is used for determining according to the described event-driven strategy that described the first driver module starts the child-operation system that described emergency is corresponding;
Child-operation system call unit, the child-operation system that is used for arranging according to described priority the described correspondence of priority orders scheduling of module setting carries out described emergency.
12. device according to claim 11 is characterized in that,
Described device also comprises: the scheduling question blank arranges module, be used for according to the state in the state of child-operation system and internal memory territory, the scheduling question blank being set, wherein, described scheduling question blank is bivariate table, one of them dimension is represented by the scheduling trigger event, priority is arranged from high to low, and another dimension is represented by the combinations of states of described child-operation system;
Described child-operation system determining unit comprises: determine subelement, be used for determining corresponding scheduling sublayer operating system according to the state of described emergency and current each child-operation system.
CN2011103780711A 2011-11-24 2011-11-24 Dispatching method and device of virtualization operating system Pending CN103136045A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2011103780711A CN103136045A (en) 2011-11-24 2011-11-24 Dispatching method and device of virtualization operating system
PCT/CN2012/073602 WO2012152159A1 (en) 2011-11-24 2012-04-06 Scheduling method and device in virtual operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2011103780711A CN103136045A (en) 2011-11-24 2011-11-24 Dispatching method and device of virtualization operating system

Publications (1)

Publication Number Publication Date
CN103136045A true CN103136045A (en) 2013-06-05

Family

ID=47138777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2011103780711A Pending CN103136045A (en) 2011-11-24 2011-11-24 Dispatching method and device of virtualization operating system

Country Status (2)

Country Link
CN (1) CN103136045A (en)
WO (1) WO2012152159A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108052614A (en) * 2017-12-14 2018-05-18 太原理工大学 A kind of dispatching method of Database Systems load
CN109426562A (en) * 2017-08-30 2019-03-05 北京忆恒创源科技有限公司 Priority weighted robin scheduling device
CN109783202A (en) * 2017-11-15 2019-05-21 阿里巴巴集团控股有限公司 Event-handling method, system, equipment and storage medium
CN110519855A (en) * 2019-05-08 2019-11-29 深圳芯之联科技有限公司 Wireless telecommunication system and dispatching method, integrated chip, electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499021A (en) * 2008-01-31 2009-08-05 国际商业机器公司 Method and apparatus for dynamically distributing resources on a plurality of virtual machines
CN102012835A (en) * 2010-12-22 2011-04-13 北京航空航天大学 Virtual central processing unit (CPU) scheduling method capable of supporting software real-time application
US20110113180A1 (en) * 2009-11-06 2011-05-12 Samsung Electronics Co., Ltd. Virtual system and method of analyzing operation of virtual system
CN102135903A (en) * 2011-03-09 2011-07-27 上海交通大学 Hardware virtualization-based Xen real-time performance improving system and method thereof
CN102193853A (en) * 2010-03-12 2011-09-21 三星电子株式会社 Virtual machine monitor and scheduling method thereof
JP2011192130A (en) * 2010-03-16 2011-09-29 Fuji Xerox Co Ltd Control device, image forming apparatus, and control program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101499021A (en) * 2008-01-31 2009-08-05 国际商业机器公司 Method and apparatus for dynamically distributing resources on a plurality of virtual machines
US20110113180A1 (en) * 2009-11-06 2011-05-12 Samsung Electronics Co., Ltd. Virtual system and method of analyzing operation of virtual system
CN102193853A (en) * 2010-03-12 2011-09-21 三星电子株式会社 Virtual machine monitor and scheduling method thereof
JP2011192130A (en) * 2010-03-16 2011-09-29 Fuji Xerox Co Ltd Control device, image forming apparatus, and control program
CN102012835A (en) * 2010-12-22 2011-04-13 北京航空航天大学 Virtual central processing unit (CPU) scheduling method capable of supporting software real-time application
CN102135903A (en) * 2011-03-09 2011-07-27 上海交通大学 Hardware virtualization-based Xen real-time performance improving system and method thereof

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
党茂昌: "《一种虚拟化操作***基于事件驱动的实时调度方法》", 《单片机与嵌入式***应用》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109426562A (en) * 2017-08-30 2019-03-05 北京忆恒创源科技有限公司 Priority weighted robin scheduling device
CN109426562B (en) * 2017-08-30 2023-10-13 北京忆恒创源科技股份有限公司 priority weighted round robin scheduler
CN109783202A (en) * 2017-11-15 2019-05-21 阿里巴巴集团控股有限公司 Event-handling method, system, equipment and storage medium
CN108052614A (en) * 2017-12-14 2018-05-18 太原理工大学 A kind of dispatching method of Database Systems load
CN108052614B (en) * 2017-12-14 2021-12-03 太原理工大学 Scheduling method for database system load
CN110519855A (en) * 2019-05-08 2019-11-29 深圳芯之联科技有限公司 Wireless telecommunication system and dispatching method, integrated chip, electronic equipment
CN110519855B (en) * 2019-05-08 2022-12-20 深圳全志在线有限公司 Wireless communication system, scheduling method, integrated chip and electronic equipment

Also Published As

Publication number Publication date
WO2012152159A1 (en) 2012-11-15

Similar Documents

Publication Publication Date Title
US9075671B2 (en) Operating system and architecture for embedded system
WO2020181813A1 (en) Task scheduling method based on data processing and related device
CN100517236C (en) Intelligent card embedded operation system and its control method
EP2696284B1 (en) Virtualized management method for hardware resources of communication device and relevant apparatus
CN109684060B (en) Mixed scheduling method for multiple types of time-critical tasks
US20060010446A1 (en) Method and system for concurrent execution of multiple kernels
CN101459605B (en) Method and device for flow control
CN109766172B (en) Asynchronous task scheduling method and device
CN104102548A (en) Task resource scheduling processing method and task resource scheduling processing system
CN103577267A (en) Resource distribution method and resource distribution device of vehicle-mounted device
CN107577539B (en) Shared memory structure for communication between kernel mode and user mode and application thereof
US9600318B2 (en) Method and system for closing application programs of an application system
CN105589751A (en) Physical resource scheduling method and device
CN103365726A (en) Resource management method and system facing GPU (Graphic Processing Unit) cluster
CN103136045A (en) Dispatching method and device of virtualization operating system
CN104598298A (en) Virtual machine dispatching algorithm based on task load and current work property of virtual machine
CN109582436B (en) Fine-grained preemptive resource scheduling system and method based on container cluster platform
CN108028806B (en) Method and device for allocating virtual resources in Network Function Virtualization (NFV) network
CN105808346A (en) Task scheduling method and device
CN103049311A (en) Integration scheduling algorithm of subregion operation system
CN107155403A (en) The processing method and VNFM of a kind of life cycle events
CN103677959A (en) Virtual machine cluster migration method and system based on multicast
CN112231053B (en) Load balancing service distribution method and device
CN101937465A (en) Access method of distributed file system and upper file system thereof
CN104090746A (en) Android system based application management method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20130605