CN104714844B - Lightweight allocating operating system method and device - Google Patents

Lightweight allocating operating system method and device Download PDF

Info

Publication number
CN104714844B
CN104714844B CN201310694866.2A CN201310694866A CN104714844B CN 104714844 B CN104714844 B CN 104714844B CN 201310694866 A CN201310694866 A CN 201310694866A CN 104714844 B CN104714844 B CN 104714844B
Authority
CN
China
Prior art keywords
light
examples
stage
queues
asynchronous
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.)
Active
Application number
CN201310694866.2A
Other languages
Chinese (zh)
Other versions
CN104714844A (en
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.)
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
Original Assignee
Huawei Technologies Co Ltd
Institute of Computing Technology of CAS
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 Huawei Technologies Co Ltd, Institute of Computing Technology of CAS filed Critical Huawei Technologies Co Ltd
Priority to CN201310694866.2A priority Critical patent/CN104714844B/en
Publication of CN104714844A publication Critical patent/CN104714844A/en
Application granted granted Critical
Publication of CN104714844B publication Critical patent/CN104714844B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A kind of lightweight allocating operating system method and device of offer of the embodiment of the present invention, the method for the present invention, including:Heavy OS create corresponding at least two Light OS examples;Each Light OS examples of establishment are input in the more queues of asynchronous process by the Heavy OS, and asynchronous resource allocation stage by stage is carried out to the attribute of each Light OS examples;The attribute information of each Light OS examples after completing asynchronous resource allocation stage by stage is stored in management list item by the Heavy OS;Multiple Light OS examples startup after asynchronous resource allocation stage by stage is completed in the Heavy OS triggerings.The embodiment of the present invention, by carrying out asynchronous process and parallel starting stage by stage to each Light OS examples, efficiency is slow during solving the problems, such as deployment multiple Light OS examples.

Description

Lightweight allocating operating system method and device
Technical field
The present embodiments relate to computer technology more particularly to a kind of lightweight allocating operating system method and devices.
Background technology
With the rapid development of computer technology, new technology continues to bring out, from earliest electronic computer system only Finally there is the computer system for including multiple single core processor chips, then finally more in one single core processor chip A processor core is integrated on chip piece, i.e. multi-core processor chip, and present multi-core processor has obtained more and more extensive Application.
At present, the prior art can accomplish to start multiple operations on computer one or more processors/kernel System, such as more kernel operating systems of Xen, Barrelfish etc..The operating system started first in more core systems becomes weight Magnitude(Heavy OS)Operating system, what is subsequently started is known as lightweight(Light OS)Operating system.Heavy OS, which are removed, to be had General-purpose operating system function also has the ability for creating and cancelling Light OS, can occupy computer whole hardware resource, Some resource allocations can be discharged according to demand to use to the Light OS for needing to create, Light OS are applied for special type The operating system of lightweight.
But in existing more kernel operating systems, there is the problem of inefficient when disposing multiple operating systems, such as When Heavy OS create multiple Light OS or multiple Light OS and start simultaneously, more kernel operating systems cannot be rung in time The deployment of multiple Light OS should be quickly finished.
Invention content
The embodiment of the present invention provides a kind of lightweight allocating operating system method and device, is to realize to operate in more kernels In system, multiple Light OS examples are quickly disposed.
In a first aspect, the embodiment of the present invention provides a kind of Light OS dispositions methods, including:
Heavyweight operating system Heavy OS create application according at least two Light OS examples that user sends, and create Corresponding at least two Light OS examples;
Each Light OS examples of establishment are input in the more queues of asynchronous process by the Heavy OS, to described each The attribute of Light OS examples carries out asynchronous resource allocation stage by stage;
The Heavy OS store the attribute information of each Light OS examples after completing asynchronous resource allocation stage by stage In list item is managed;
Multiple Light OS examples startup after asynchronous resource allocation stage by stage is completed in the Heavy OS triggerings, so that institute It states and list item is managed described in multiple Light OS Query By Examples and parallel starting is carried out according to query result.
In first aspect in the first possible realization method, the attribute of the Light OS examples includes at least following letters Breath:
The type of the Light OS examples, the kernel identification for distributing to the Light OS examples, distribute to it is described The memory address of Light OS examples, the kernel code mirror image addresses of the Light OS examples, the Light OS examples The mark of state and the Light OS examples.
The first possible realization method according to first aspect, in second of possible realization method, the Heavy Each Light OS examples of establishment are input in the more queues of asynchronous process by OS, and the attribute of each Light OS examples is carried out Asynchronous resource allocation stage by stage, including:
In the first queue of the more queues of the asynchronous process, the Heavy OS are to the class of each Light OS examples Type carries out assignment, and each Light OS examples after assignment success are input to the second queue of the more queues of the asynchronous process;
In the second queue of the more queues of the asynchronous process, the Heavy OS are according to each Light OS examples Type is allocated the kernel and memory source of each Light OS examples, and each Light by resource allocation after successful OS examples are input to the third queue of the more queues of the asynchronous process;
In the third queue of the more queues of the asynchronous process, the Heavy OS correspond to each Light OS examples The mirror image address of kernel code distribute to each Light OS examples.
According to second of possible realization method of first aspect, in the third possible realization method, in the Heavy After OS triggers multiple Light OS examples startup after completing asynchronous resource allocation stage by stage, further include:
The Heavy OS will complete the distribution of kernel code mirror image address in the third queue of the more queues of the asynchronous process Each Light OS examples, be input in the 4th queue of the more queues of the asynchronous process, and to each Light OS examples State and each Light OS examples mark carry out assignment.
In the 4th kind of possible realization method of first aspect, asynchronous resource point stage by stage is completed in the Heavy OS triggerings Multiple Light OS examples after matching start, so as to manage list item described in the multiple Light OS Query By Examples and according to inquiry As a result parallel starting is carried out, including:
The Heavy OS interrupt IPI so that described between the processor transmission processor of the multiple Light OS examples Multiple Light OS examples according to the mark inquiry management list item of itself come parallel starting from real pattern to protected mode Conversion;Alternatively,
The processor of the Heavy OS one Light OS example into the multiple Light OS examples send IPI with Make one Light OS examples according to the mark of itself inquiry it is described management list item come parallel starting from real pattern to protection After the conversion of pattern, then the processor of other Light OS examples sends IPI into the multiple Light OS examples.
According to the 4th kind of possible realization method of first aspect, in the 5th kind of possible realization method, the Light OS examples inquire conversion of the management list item come parallel starting from real pattern to protected mode according to the mark of itself, including:
The Light OS examples distribute to the Light according to corresponding in the mark of itself the inquiry management list item The kernel code mirror image address of the kernel identification of OS examples and the Light OS examples so that it is described distribute to it is described The kernel of Light OS examples jumps in the kernel code mirror image address of the Light OS examples and performs the Light OS Example kernel code, to complete the startup of the Light OS examples parallel.
Second aspect, the embodiment of the present invention provide a kind of lightweight operating system Light OS deployment device, including:
Example module is created, at least two Light OS examples for being sent according to user create application, create and correspond to At least two Light OS examples;
Asynchronous process module stage by stage, for each Light OS examples created to be input in the more queues of asynchronous process, Asynchronous resource allocation stage by stage is carried out to the attribute of each Light OS examples;
Memory module, for the information of each Light OS examples after completion stage by stage asynchronous resource allocation to be stored in pipe It manages in list item;
Starting module is triggered, is started for triggering multiple Light OS examples after completing asynchronous resource allocation stage by stage, So as to list item is managed described in the multiple Light OS Query By Examples and parallel starting is carried out according to query result.
In second aspect in the first possible realization method, the module of asynchronous process stage by stage is to the Light OS The attribute that example carries out resource allocation includes at least following information:
The type of the Light OS examples, the kernel identification for distributing to the Light OS examples, distribute to it is described The memory address of Light OS examples, the kernel code mirror image addresses of the Light OS examples, the Light OS examples The mark of state and the Light OS examples.
The first possible realization method according to second aspect, in second of possible realization method, it is described stage by stage Distribution module is handled, is specifically included:
First queue processing unit, in the first queue of the more queues of the asynchronous process, to each Light The type of OS examples carries out assignment, and each Light OS examples after assignment success are input to the more queues of the asynchronous process Second queue;
Second queue processing unit, in the second queue of the more queues of the asynchronous process, according to each Light The type of OS examples is allocated the kernel and memory source of each Light OS examples, and will be after resource allocation success Each Light OS examples are input to the third queue of the more queues of the asynchronous process;
Third queue processing unit, in the third queue of the more queues of the asynchronous process, by each Light Distribute to each Light OS examples in the mirror image address of the corresponding kernel code of OS examples.
According to second of possible realization method of second aspect, in the third possible realization method, further include:
4th queue processing unit, for after asynchronous resource allocation stage by stage is completed in the triggering starting module triggering After multiple Light OS examples start, kernel code mirror image address point will be completed in the third queue of the more queues of the asynchronous process Each Light OS examples matched, are input in the 4th queue of the more queues of the asynchronous process, and real to each Light OS The state of example and the mark of each Light OS examples carry out assignment.
In the 4th kind of possible realization method of second aspect, the triggering starting module is specifically used for:
IPI is interrupted so that the multiple Light OS between the processor transmission processor of the multiple Light OS examples Example is according to conversion of the mark inquiry management list item of itself come parallel starting from real pattern to protected mode;Alternatively,
Into the multiple Light OS examples, the processor of one Light OS example sends IPI so that one Light OS examples are according to conversion of the mark inquiry management list item of itself come parallel starting from real pattern to protected mode Afterwards, then into the multiple Light OS examples the processor of other Light OS examples sends IPI.
According to the 4th kind of possible realization method of second aspect, in the 5th kind of possible realization method, the Light OS examples inquire conversion of the management list item come parallel starting from real pattern to protected mode according to the mark of itself, including:
The Light OS examples distribute to the Light according to corresponding in the mark of itself the inquiry management list item The kernel code mirror image address of the kernel identification of OS examples and the Light OS examples so that it is described distribute to it is described The kernel of Light OS examples jumps in the kernel code mirror image address of the Light OS examples and performs the Light OS Example kernel code, to complete the startup of the Light OS examples parallel.
Each Light OS examples of establishment are input to the more teams of asynchronous process by the embodiment of the present invention by the Heavy OS In row, carry out that asynchronous resource allocation and each Light OS examples are looked into stage by stage to the attributes of each Light OS examples It askes the management list item and parallel starting is carried out according to query result, it can be asynchronous, simultaneously in more kernel operating systems to realize Row disposes multiple Light OS, solve more kernel operating systems in the prior art cannot timely respond to quickly finish it is multiple The problem of deployment of Light OS.
Description of the drawings
In order to illustrate more clearly about the embodiment of the present invention or technical scheme of the prior art, to embodiment or will show below There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Some bright embodiments, for those of ordinary skill in the art, without having to pay creative labor, can be with Other attached drawings are obtained according to these attached drawings.
Fig. 1 is the flow chart of Light OS dispositions methods embodiment one of the present invention;
Fig. 2 is the flow chart of Light OS dispositions methods embodiment two of the present invention;
Fig. 3 is the execution flow diagram of Light OS dispositions methods embodiment three of the present invention;
Fig. 4 is the stage schematic diagram of the startup of Light OS in Fig. 3;
Fig. 5 is the structure chart that Light OS of the present invention dispose device embodiment one;
Fig. 6 is the structure chart that Light OS of the present invention dispose device embodiment two.
Specific embodiment
Purpose, technical scheme and advantage to make the embodiment of the present invention are clearer, below in conjunction with the embodiment of the present invention In attached drawing, the technical solution in the embodiment of the present invention is clearly and completely described, it is clear that described embodiment is Part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art All other embodiments obtained without creative efforts shall fall within the protection scope of the present invention.
Fig. 1 is the flow chart of operation system example creation method embodiment one of the present invention, and the executive agent of this method is light Magnitude operating system Light OS dispose device, which can be placed in the heavyweight operating system in more kernel operating systems In Heavy OS.As shown in Figure 1, this method specifically includes:
Step 101, Heavy OS create application according at least two Light OS examples that user sends, and create corresponding At least two Light OS examples;
Heavy OS refer in more kernel operating systems, and first startup has whole computer hardware resource management With the operating system of access rights, also referred to as master operating system(Primary OS).It is and follow-up again according to different demands and application The operating system of startup becomes lightweight operating system Light OS, generally also becomes from operating system(Secondary OS). Wherein, Heavy OS can create and cancel Light OS, and system hardware resources are distributed and managed to Light OS.
In this step, user can apply for establishment Light OS according to some specific applications to Heavy OS, optionally, Heavy OS can also judge whether to need to create new Light OS, for example can set cpu busy percentage according to predetermined policy Threshold value, when the cpu busy percentage run now is more than the threshold value of setting, Heavy OS start to start the stream for creating Light OS Journey.
Each Light OS examples of establishment are input in the more queues of asynchronous process by step 102, the Heavy OS, to institute The attribute for stating each Light OS examples carries out asynchronous resource allocation stage by stage;
Optionally, the attribute of Light OS examples created in step 101 can include at least following information:
The type of the Light OS examples, the kernel identification for distributing to the Light OS examples, distribute to it is described The memory address of Light OS examples, the kernel code mirror image addresses of the Light OS examples, the Light OS examples The mark of state and the Light OS examples.
In this step, multiple Light OS examples with above-mentioned attribute are input in the more queues of asynchronous process, it is right Each attribute of Light OS examples carries out asynchronous resource allocation stage by stage.Relative in the prior art, it is real to create Light OS During example, the serial synchronous operation of implementation, that is, complete Light OS example all restart after initialization create it is subsequent Light OS examples, multistage asynchronous resource allocation by resource allocation because be divided into multistage processing, therefore can be simultaneously to more A Light OS examples parallel asynchronous processing is avoided because of a Light OS because waiting less than corresponding resource, and influence it The establishment of his follow-up Light OS examples realizes the asynchronous multiple Light OS examples of establishment simultaneously, improves and create Light The efficiency of OS.
The attribute that step 103, the Heavy OS will complete each Light OS examples after asynchronous resource allocation stage by stage Information is stored in management list item;
In this step, Heavy OS are in one fixed position of memory, according to the ID of fixed structure storage Light OS and right The attribute informations such as kernel code mirror image address are answered, for multiple Light OS that the same management of Heavy OS creates, are also used for Light OS carry out parallel starting in corresponding kernel code mirror image address in being showed in subsequent startup according to management.
Multiple Light OS examples that step 104, the Heavy OS are triggered after completing asynchronous resource allocation stage by stage open It is dynamic, so as to manage list item described in the multiple Light OS Query By Examples and carry out parallel starting according to query result.
Since in step 103, the essential attribute of each Light OS examples is stored in management list item, therefore Light OS are connected to processor interruption(Inter-Processor Interrupt, abbreviation IPI)When kernel is initialized after IPI, jump It goes to corresponding kernel code mirror image address in management list item and carries out kernel initialization, start Light OS.Due to multiple Light OS have corresponding independent memory space to store corresponding kernel code mirror image address, thus multiple Light OS it Between initialize kernel start when, be not exposed to the influence of mutual startup progress, therefore can realize parallel starting, improve The efficiency of startup.
Each Light OS examples of establishment are input to the more teams of asynchronous process by the embodiment of the present invention by the Heavy OS In row, carry out that asynchronous resource allocation and each Light OS examples are looked into stage by stage to the attributes of each Light OS examples It askes the management list item and parallel starting is carried out according to query result, it can be asynchronous, simultaneously in more kernel operating systems to realize Row disposes multiple Light OS, solve more kernel operating systems in the prior art cannot timely respond to quickly finish it is multiple The problem of deployment of Light OS.
Fig. 2 is the flow chart of Light OS dispositions methods embodiment two of the present invention, and the present embodiment is in the base of a upper embodiment On plinth, the embodiment of the method realized and asynchronous assignment stage by stage is carried out to the attribute of each Light OS examples is shown in particular. Assuming that the Light OS instance properties in the present embodiment include at least the Light OS instance properties described in a upper embodiment, such as scheme Shown in 2, this method specifically includes:
Step 201, Heavy OS create application according at least two Light OS examples that user sends, and create corresponding At least two Light OS examples;
Step 202, in the first queue of the more queues of the asynchronous process, the Heavy OS are to each Light OS The type of example carries out assignment, and each Light OS examples after assignment success are input to the of the more queues of the asynchronous process Two queues;
In this step, the more queues of asynchronous process are divided into the multistage, including first queue and follow-up described second, third With the 4th queue.It should be noted that above-mentioned stage definitions do not indicate that the embodiment of the present invention is only limitted to queue defined above, As long as in other undefined multistage segmented modes of the thought of multistage resource allocation, the application protection domain is each fallen within.
Step 203, in the second queue of the more queues of the asynchronous process, the Heavy OS are according to each Light The type of OS examples is allocated the kernel and memory source of each Light OS examples, and will be after resource allocation success Each Light OS examples are input to the third queue of the more queues of the asynchronous process;
Step 204, in the third queue of the more queues of the asynchronous process, the Heavy OS are by each Light OS Distribute to each Light OS examples in the mirror image address of the corresponding kernel code of example;
The attribute that step 205, the Heavy OS will complete each Light OS examples after asynchronous resource allocation stage by stage Information is stored in management list item;
Step 206, the Heavy OS interrupt IPI between the processor transmission processor of the multiple Light OS examples So that the multiple Light OS examples according to the mark of itself inquiry it is described management list item come parallel starting from real pattern to guarantor The conversion of shield pattern;
Optionally, in this step, when it is implemented, the Heavy OS can also be included to the multiple Light OS realities The processor of a Light OS example sends IPI so that one Light OS examples are inquired according to the mark of itself in example It is described management list item carry out conversion of the parallel starting from real pattern to protected mode after, then into the multiple Light OS examples its The processor of his a Light OS example sends IPI, and each Light OS examples subsequent so once receive upper one The conversion for the IPI implementation patterns that Light OS examples are sent.
Specifically, the Light OS examples according to the mark of itself the inquiry management list item come parallel starting from real mould Formula to protected mode conversion, including:
The Light OS examples distribute to the Light according to corresponding in the mark of itself the inquiry management list item The kernel code mirror image address of the kernel identification of OS examples and the Light OS examples so that it is described distribute to it is described The kernel of Light OS examples jumps in the kernel code mirror image address of the Light OS examples and performs the Light OS Example kernel code, to complete the startup of the Light OS examples parallel.
Step 207, the Heavy OS will complete kernel code mirror in the third queue of the more queues of the asynchronous process It as each Light OS examples of address assignment, is input in the 4th queue of the more queues of the asynchronous process, and to described each The state of Light OS examples and the mark of each Light OS examples carry out assignment.
In this step, the state of each Light OS examples of kernel initialization and the mark of each Light OS examples will be completed Know and carry out assignment, for transmitting these information to Heavy OS so that Heavy OS can be managed collectively these establishments Light OS, for example can be deleted according to mark, redistribute the management such as hardware resource operation.
It should be noted that in addition to the 4th queue, " first ", " second ", " third " in the embodiment of the present invention etc. are only used In distinguishing individual queue, do not represent order, i.e. first queue, second queue and third queue in the specific implementation, Ke Yijin The adjustment of row order.
The present embodiment by the way that each Light OS examples are carried out multistage asynchronous resource allocation, realizes that Heavy OS can be with Multiple Light OS examples are handled simultaneously, improve deployment efficiency.
Fig. 3 is the execution schematic diagram of Light OS dispositions methods embodiment three of the present invention, and the present embodiment is in Examples 1 and 2 On the basis of, Light OS dispositions methods are explained by taking Linux as an example, it is assumed that the Light OS in the present embodiment are real Example attribute includes at least the Light OS instance properties described in above-mentioned any embodiment, and idiographic flow is as shown in figure 3, wherein respectively hold Row step and queue are explained as follows:
The data structure for defining Light OS examples first is as follows:
struct light_kernel{
unsigned short type;/ * types */
unsigned char core_id[max_num_core];The array * of/* storage core ID/
unsigned long memory[2];/ * memory physical address start, end*/
unsigned long img_address;/ * mirror image initial addresses */
unsigned short stats;/ * states */
unsigned short kernel_id;/*ID*/
};
Queue 1:Light OS types are assigned in queue.
Distribute resource:Light OS can be there are many class, according to the demand of Light OS types, according to Current resource condition Carry out resource adjustment.For example adjust cpu resource:Kernel module calls linux kernel source code, checks CPU bitmaps and Light OS The CPU of occupancy is discharged using cpu_down (), cpu_up () function and recycles the cpu resource of Heavy OS.Discharging resource is Refer to the resource used originally by system, be shifted out from system resource queue.According to the core of release, discharged in local memory The continuous memory of physics.Whether the memory that the module is currently distributed according to page table acquisition of information has the page having been used, if any then Move to other positions.
Queue 2:Light OS types in queue, core_id, memory are assigned.
Load images:From Light OS image sources(Hard disk file system catalogue)Select corresponding A P/Light OS second-orders Section mirror image is loaded into the initial address of assigned memory.Example mirror image load address is filled, and core_id and second stage Initial address, which is licked, to be added in jump list.
Queue 3:Light OS types, core_id, memory, mirror image initial address in queue are assigned.
Triggering starts:The core and memory information of distribution are transmitted, changes example state(Such as 1 represent start, 0 represent not Start), ID is generated for Light OS examples, IPI is sent to the core of distribution.
Queue 4:Light OS types in queue, core_id, memory, mirror image initial address, example state, kernel_ Id is assigned.
Confirm and start:Obtain the currently Light OS that are starting from input rank, if judge to start as a result, start into Work(then changes the state of Light OS, does not start and successfully then sends resource information to resource adjustment module and eliminate Light OS Information records.
It should be noted that during entire asynchronous process, it is independent between each step operation.
After triggering starting step wherein in figure 3, before starting step is confirmed, the startup of Light OS is divided to two ranks Section, Fig. 4 are the stage schematic diagram of the startup of Light OS in Fig. 3, as shown in figure 4, including:
First stage, each Light OS application processors(Application Processor, abbreviation AP)In protected mode Before, i.e., under real pattern, Heavy OS in one section of fixed position of memory, according to fixed structure storage Light OS ID and Corresponding mirror image address, as shown in figure 4, by Light OS1AP, the attribute information of Light OS2AP, Light OS3AP are stored in On a fixed position in memory.AP adds table lookup function, such as in trampoline(trampoline)Work(of tabling look-up is added in code Energy.
Second stage after each Light OS AP switch to protected mode, is found with the mode tabled look-up in respective Light OS Core boot image address.Each Light OS AP jump to execution at mirror image address after finding mirror image address.Than as shown in Figure 4, Light OS1AP, Light OS2AP, Light OS3AP find corresponding mirror image address Address1 in table, After Address2, Address3, ELF file elf1, elf2, elf3 and the elf4 for performing corresponding mirror image address storage are redirected, from And realize the startup of Light OS.
The present embodiment realizes Heavy OS on linux and disposes multiple Light OS simultaneously, relative to the prior art In, it needs to use based on virtual machine monitor(Hypervisor)The multiple lightweight operating systems of establishment that technology is realized, this reality It applies example and improves deployment efficiency, save the cost that system needs virtualize.
Fig. 5 is the structure chart that Light OS of the present invention dispose device embodiment one, which is arranged on more kernel operation systems On Heavy OS in system, as shown in figure 5, the device specifically includes:
Example module 51 is created, at least two Light OS examples for being sent according to user create application, establishment pair At least two Light OS examples answered;
Asynchronous process module 52 stage by stage, for each Light OS examples created to be input to the more queues of asynchronous process In, asynchronous resource allocation stage by stage is carried out to the attribute of each Light OS examples;
Memory module 53, for the attribute information of each Light OS examples after completion stage by stage asynchronous resource allocation to be deposited Storage is in list item is managed;
Starting module 54 is triggered, is opened for triggering multiple Light OS examples after completing asynchronous resource allocation stage by stage It is dynamic, so as to manage list item described in the multiple Light OS Query By Examples and carry out parallel starting according to query result.
The device of the present embodiment, for performing the technical solution of embodiment of the method shown in Fig. 1, realization principle and technology effect Seemingly, details are not described herein again for fruit.
Fig. 6 is the structure chart that Light OS of the present invention dispose device embodiment two, and the present embodiment is in the base of a upper embodiment On plinth, further, the attribute that the treatment by stages module 52 carries out the Light OS examples assignment includes at least down State information:
The type of the Light OS examples, the kernel identification for distributing to the Light OS examples, distribute to it is described The memory address of Light OS examples, the kernel code mirror image addresses of the Light OS examples, the Light OS examples The mark of state and the Light OS examples.
Specific address, the treatment by stages module 52, specifically includes:
First queue processing unit 61, in the first queue of the more queues of the asynchronous process, to each Light The type of OS examples carries out assignment, and each Light OS examples after assignment success are input to the more queues of the asynchronous process Second queue;
Second queue processing unit 62, in the second queue of the more queues of the asynchronous process, according to described each The type of Light OS examples is allocated the kernel and memory source of each Light OS examples, and by resource allocation into Each Light OS examples after work(are input to the third queue of the more queues of the asynchronous process;
Third queue processing unit 63, in the third queue of the more queues of the asynchronous process, by each Light Distribute to each Light OS examples in the mirror image address of the corresponding kernel code of OS examples.
The device, further includes:
4th queue processing unit 64, for completing asynchronous resource allocation stage by stage in triggering starting module 54 triggering It, will kernel code mirror image be completed in the third queue of the more queues of the asynchronous process after multiple Light OS examples afterwards start Each Light OS examples of location distribution, are input in the 4th queue of the more queues of the asynchronous process, and to each Light The state of OS examples and the mark of each Light OS examples carry out assignment.
Specifically, the triggering starting module 54, is specifically used for:
IPI is interrupted so that the multiple Light OS between the processor transmission processor of the multiple Light OS examples Example is according to conversion of the mark inquiry management list item of itself come parallel starting from real pattern to protected mode;Alternatively,
Into the multiple Light OS examples, the processor of one Light OS example sends IPI so that one Light OS examples are according to conversion of the mark inquiry management list item of itself come parallel starting from real pattern to protected mode Afterwards, then into the multiple Light OS examples the processor of other Light OS examples sends IPI.
Further, the Light OS examples according to the mark of itself the inquiry management list item come parallel starting from reality Pattern to protected mode conversion, including:
The Light OS examples distribute to the Light according to corresponding in the mark of itself the inquiry management list item The kernel code mirror image address of the kernel identification of OS examples and the Light OS examples so that it is described distribute to it is described The kernel of Light OS examples jumps in the kernel code mirror image address of the Light OS examples and performs the Light OS Example kernel code, to complete the startup of the Light OS examples parallel.
The device of the present embodiment, for perform Fig. 1-3 it is arbitrary shown in embodiment of the method technical solution, realization principle and Technique effect is similar, and details are not described herein again.
Finally it should be noted that:The above embodiments are only used to illustrate the technical solution of the present invention., rather than its limitations;To the greatest extent Pipe is described in detail the present invention with reference to foregoing embodiments, it will be understood by those of ordinary skill in the art that:Its according to Can so modify to the technical solution recorded in foregoing embodiments either to which part or all technical features into Row equivalent replacement;And these modifications or replacement, various embodiments of the present invention technology that it does not separate the essence of the corresponding technical solution The range of scheme.

Claims (12)

1. a kind of lightweight operating system Light OS dispositions methods, which is characterized in that including:
Heavyweight operating system Heavy OS create application according at least two Light OS examples that user sends, and create and correspond to At least two Light OS examples;
Each Light OS examples of establishment are input in the more queues of asynchronous process by the Heavy OS, to each Light OS The attribute of example carries out asynchronous resource allocation stage by stage;
The attribute information of each Light OS examples after completing asynchronous resource allocation stage by stage is stored in pipe by the Heavy OS It manages in list item;
Multiple Light OS examples startup after asynchronous resource allocation stage by stage is completed in the Heavy OS triggerings, so that described more List item is managed described in a Light OS Query By Examples and parallel starting is carried out according to query result.
2. according to the method described in claim 1, it is characterized in that, the attribute of the Light OS examples includes at least following letters Breath:
The type of the Light OS examples, distributes to the Light at the kernel identification for distributing to the Light OS examples The memory address of OS examples, the kernel code mirror image address of the Light OS examples, the Light OS examples state with And the mark of the Light OS examples.
3. according to the method described in claim 2, it is characterized in that, the Heavy OS are defeated by each Light OS examples of establishment Enter into the more queues of asynchronous process, asynchronous resource allocation stage by stage is carried out to the attribute of each Light OS examples, including:
In the first queue of the more queues of the asynchronous process, the Heavy OS to the types of each Light OS examples into Row assignment, and each Light OS examples after assignment success are input to the second queues of the more queues of the asynchronous process;
In the second queue of the more queues of the asynchronous process, the Heavy OS are according to the types of each Light OS examples The kernel and memory source of each Light OS examples are allocated, and each Light OS after resource allocation success is real Example is input to the third queue of the more queues of the asynchronous process;
In the third queue of the more queues of the asynchronous process, the Heavy OS are corresponding interior by each Light OS examples Distribute to each Light OS examples in the mirror image address of core code.
4. according to the method described in claim 3, it is characterized in that, complete asynchronous resource stage by stage in Heavy OS triggerings After multiple Light OS examples after distribution start, further include:
The Heavy OS will complete each of kernel code mirror image address distribution in the third queue of the more queues of the asynchronous process Light OS examples are input in the 4th queue of the more queues of the asynchronous process, and to the shape of each Light OS examples State and the mark of each Light OS examples carry out assignment.
5. according to the method described in claim 1, it is characterized in that, asynchronous resource point stage by stage is completed in Heavy OS triggerings Multiple Light OS examples after matching start, so as to manage list item described in the multiple Light OS Query By Examples and according to inquiry As a result parallel starting is carried out, including:
The Heavy OS interrupt IPI so that the multiple between the processor transmission processor of the multiple Light OS examples Light OS examples are according to conversion of the mark inquiry management list item of itself come parallel starting from real pattern to protected mode; Alternatively,
The processor of the Heavy OS one Light OS example into the multiple Light OS examples sends IPI so that institute State a Light OS example according to the mark of itself inquiry it is described management list item come parallel starting from real pattern to protected mode Conversion after, then the processor of other Light OS examples sends IPI into the multiple Light OS examples.
6. according to the method described in claim 5, it is characterized in that, the Light OS examples inquire institute according to the mark of itself It states management list item and carrys out conversion of the parallel starting from real pattern to protected mode, including:
The Light OS examples distribute to the Light OS according to corresponding in the mark of itself the inquiry management list item The kernel code mirror image address of the kernel identification of example and the Light OS examples, so that described distribute to the Light The kernel of OS examples is jumped in the kernel code mirror image address of the Light OS examples and is performed in the Light OS examples Core code, to complete the startup of the Light OS examples parallel.
7. a kind of lightweight operating system Light OS dispose device, which is characterized in that the Light OS deployment device setting In heavyweight operating system Heavy OS in more kernel operating systems, the Light OS deployment device includes:
Example module is created, at least two Light OS examples for being sent according to user create application, and establishment is corresponding extremely Few two Light OS examples;
Asynchronous process module stage by stage, for each Light OS examples created to be input in the more queues of asynchronous process, to institute The attribute for stating each Light OS examples carries out asynchronous resource allocation stage by stage;
Memory module, for the information of each Light OS examples after completion stage by stage asynchronous resource allocation to be stored in management table Xiang Zhong;
Starting module is triggered, is started for triggering multiple Light OS examples after completing asynchronous resource allocation stage by stage, so that List item is managed described in the multiple Light OS Query By Examples and parallel starting is carried out according to query result.
8. device according to claim 7, which is characterized in that the module of asynchronous process stage by stage is to the Light OS The attribute that example carries out resource allocation includes at least following information:
The type of the Light OS examples, distributes to the Light at the kernel identification for distributing to the Light OS examples The memory address of OS examples, the kernel code mirror image address of the Light OS examples, the Light OS examples state with And the mark of the Light OS examples.
9. device according to claim 8, which is characterized in that the treatment by stages distribution module specifically includes:
First queue processing unit, it is real to each Light OS in the first queue of the more queues of the asynchronous process The type of example carries out assignment, and each Light OS examples after assignment success are input to the second of the more queues of the asynchronous process Queue;
Second queue processing unit, in the second queue of the more queues of the asynchronous process, according to each Light OS The type of example is allocated the kernel and memory source of each Light OS examples, and will be each after resource allocation success Light OS examples are input to the third queue of the more queues of the asynchronous process;
Third queue processing unit, it is in the third queue of the more queues of the asynchronous process, each Light OS is real Distribute to each Light OS examples in the mirror image address of the corresponding kernel code of example.
10. device according to claim 9, which is characterized in that further include:
4th queue processing unit, for multiple after asynchronous resource allocation stage by stage is completed in the triggering starting module triggering After Light OS examples start, the distribution of kernel code mirror image address will be completed in the third queue of the more queues of the asynchronous process Each Light OS examples are input in the 4th queue of the more queues of the asynchronous process, and to each Light OS examples State and the mark of each Light OS examples carry out assignment.
11. device according to claim 7, which is characterized in that the triggering starting module is specifically used for:
IPI is interrupted so that the multiple Light OS examples between the processor transmission processor of the multiple Light OS examples According to conversion of the mark inquiry management list item of itself come parallel starting from real pattern to protected mode;Alternatively,
Into the multiple Light OS examples, the processor of one Light OS example sends IPI so that one Light OS examples according to the mark inquiry management list item of itself come after conversion of the parallel starting from real pattern to protected mode, then to The processor of other Light OS examples sends IPI in the multiple Light OS examples.
12. according to the devices described in claim 11, which is characterized in that the Light OS examples are inquired according to the mark of itself The management list item carrys out conversion of the parallel starting from real pattern to protected mode, including:
The Light OS examples distribute to the Light OS according to corresponding in the mark of itself the inquiry management list item The kernel code mirror image address of the kernel identification of example and the Light OS examples, so that described distribute to the Light The kernel of OS examples is jumped in the kernel code mirror image address of the Light OS examples and is performed in the Light OS examples Core code, to complete the startup of the Light OS examples parallel.
CN201310694866.2A 2013-12-17 2013-12-17 Lightweight allocating operating system method and device Active CN104714844B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310694866.2A CN104714844B (en) 2013-12-17 2013-12-17 Lightweight allocating operating system method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310694866.2A CN104714844B (en) 2013-12-17 2013-12-17 Lightweight allocating operating system method and device

Publications (2)

Publication Number Publication Date
CN104714844A CN104714844A (en) 2015-06-17
CN104714844B true CN104714844B (en) 2018-06-26

Family

ID=53414213

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310694866.2A Active CN104714844B (en) 2013-12-17 2013-12-17 Lightweight allocating operating system method and device

Country Status (1)

Country Link
CN (1) CN104714844B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114339353B (en) * 2021-12-31 2023-09-29 晶晨半导体科技(北京)有限公司 Audio/video synchronization method and device, electronic equipment and computer readable storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101149728A (en) * 2007-10-29 2008-03-26 中国科学院计算技术研究所 Multiple core processing system and its management method
CN102053869A (en) * 2009-10-29 2011-05-11 杭州华三通信技术有限公司 Resource allocation method and device for multi-operation system
CN102929719A (en) * 2012-09-18 2013-02-13 中标软件有限公司 Control method for multiple operating systems of multi-core computer and multi-core computer

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7610481B2 (en) * 2006-04-19 2009-10-27 Intel Corporation Method and apparatus to support independent systems in partitions of a processing system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101149728A (en) * 2007-10-29 2008-03-26 中国科学院计算技术研究所 Multiple core processing system and its management method
CN102053869A (en) * 2009-10-29 2011-05-11 杭州华三通信技术有限公司 Resource allocation method and device for multi-operation system
CN102929719A (en) * 2012-09-18 2013-02-13 中标软件有限公司 Control method for multiple operating systems of multi-core computer and multi-core computer

Also Published As

Publication number Publication date
CN104714844A (en) 2015-06-17

Similar Documents

Publication Publication Date Title
US11146498B2 (en) Distributed resource scheduling based on network utilization
CN104508634B (en) The dynamic resource allocation of virtual machine
EP2519877B1 (en) Hypervisor-based isolation of processor cores
US9081612B2 (en) Virtual machine control method and virtual machine
US9971623B2 (en) Isolation method for management virtual machine and apparatus
US20160259665A1 (en) Methods and apparatus to select virtualization environments for migration
US9626221B2 (en) Dynamic guest virtual machine identifier allocation
US10740148B2 (en) Accelerated data operations in virtual environments
US10169075B2 (en) Method for processing interrupt by virtualization platform, and related device
WO2014032882A1 (en) Optimizing virtual machine deployment time
CN102262557A (en) Method for constructing virtual machine monitor by bus architecture and performance service framework
JP2022516486A (en) Resource management methods and equipment, electronic devices, and recording media
EP2375324A2 (en) Virtualization apparatus for providing a transactional input/output interface
US20190377612A1 (en) VCPU Thread Scheduling Method and Apparatus
US9575791B2 (en) Unified extensible firmware interface system management mode initialization protections with system management interrupt transfer monitor sandboxing
CN112130960A (en) Lightweight mobile edge computing node and construction method
CN109656675B (en) Bus equipment, computer equipment and method for realizing physical host cloud storage
WO2018040845A1 (en) Method and apparatus for scheduling computing resource
JP2008107966A (en) Computer system
CN105677481B (en) A kind of data processing method, system and electronic equipment
CN104714844B (en) Lightweight allocating operating system method and device
Gao et al. Building a virtual machine-based network storage system for transparent computing
US11057263B2 (en) Methods and subsystems that efficiently distribute VM images in distributed computing systems
US20220164241A1 (en) Methods and Apparatus for Selection of a Virtualisation Engine
US10430233B1 (en) Scheduling computational tasks among multiple classes of storage resources based on job classification

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant