CN101196816B - Operating system and operating system management method - Google Patents

Operating system and operating system management method Download PDF

Info

Publication number
CN101196816B
CN101196816B CN2007103085533A CN200710308553A CN101196816B CN 101196816 B CN101196816 B CN 101196816B CN 2007103085533 A CN2007103085533 A CN 2007103085533A CN 200710308553 A CN200710308553 A CN 200710308553A CN 101196816 B CN101196816 B CN 101196816B
Authority
CN
China
Prior art keywords
processor
module
management
processor core
kernel services
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.)
Expired - Fee Related
Application number
CN2007103085533A
Other languages
Chinese (zh)
Other versions
CN101196816A (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.)
Institute of Computing Technology of CAS
Original Assignee
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 Institute of Computing Technology of CAS filed Critical Institute of Computing Technology of CAS
Priority to CN2007103085533A priority Critical patent/CN101196816B/en
Publication of CN101196816A publication Critical patent/CN101196816A/en
Application granted granted Critical
Publication of CN101196816B publication Critical patent/CN101196816B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Computer And Data Communications (AREA)

Abstract

The invention discloses an operating system and a management method. The operating system comprises: a plurality of kernel service modules operated in kernel state corresponding to the system calling type, which are distributed on at least one processor and/or processor kernel; a plurality of application managing modules used for managing application procedure and application progress are distributed on different processor and/or processor kernel from the kernel service modules, which are used for managing application procedure and application progress; the kernel service modules are communicated with the application procedure through a system calling information. The management method comprises: step S1, the application system sends the system calling information, and then executes codes without dependent relation with the system calling result after sending the information; step S2, the kernel service module receives the system calling information and sends the system calling result back to the application procedure; step S3, the application procedure receives the system calling result and executes codes with dependent relation with the system calling result.

Description

A kind of operating system and operating system management method
Technical field
The present invention relates to computer operating system, particularly based on the operating system and the management method of multiprocessor and/or polycaryon processor (Multicore Processor) computing environment.
Background technology
The processor of prior art or processor core can move under two kinds of patterns, i.e. kernel state and user's attitude.As shown in Figure 1, when operating system by system call (Syscall) when entering kernel state, processor is carried out kernel code, some functions of complete operation system.When operating system enters kernel state, the context of application program (Context) will switch away from the processor or the processor core of current execution, and promptly existing operating system has adopted " context switches (Context Switch) " to support the switching of kernel state and user's attitude.This context handover mechanism has brought many expenses, as refreshing of cache memory (Cache), page table buffer memory (TLB) etc.Use for certain operations system intensity (OS-intensive), frequent context switches has bigger influence to performance, influences the travelling speed of operating system.
Polycaryon processor and/or multi-processor environment can be supported shared resource and support to carry out simultaneously a plurality of application programs.Yet, the existing operating system that operates on multiprocessor and/or the polycaryon processor, except the operating system performance that exists above-mentioned " context switching " to cause descends, also exist a deficiency to be: when needs call operation systemic-function, different processor or processor cores are wanted exclusive reference for shared resource.In order to realize exclusive reference, existing operating system uses lock (Lock) mechanism to support, promptly as shown in Figure 2, the shared resource " lock " that processor or processor core 1 will visited is lived, and just discharges lock and allow other processor or processor core 0 is visited identical shared resource after current processor or processor core 1 visit finish.Lock is divided into different granularities, and big lock (Big Kernel Lock) is the mode of the simplest support multiprocessor, but performance and extendability are very poor; Fine granularity lock (Fine Grained Lock) is realized more complicated, but performance and extendability are better.Yet along with the development of polycaryon processor, processor processor inside nuclear is more and more, makes the frequency of utilization of lock increase greatly.By some problems that lock causes, the chance that occurs as problems such as competition, deadlocks has also improved, thereby influences the performance and the extendability of operating system.
Summary of the invention
The purpose of this invention is to provide a kind of operating system that operates on multiprocessor and/or the polycaryon processor, the deficiency that can overcome available technology adopting " context switching " and " lock mechanism " and produce makes operating system have more performance and extendability under multiprocessor and/or polycaryon processor environment.
In order to achieve the above object, the invention provides following technical scheme:
A kind of operating system management device is used to manage application program, comprising:
A plurality of kernel services modules corresponding with the operating system call type in the kernel state operation are distributed at least one processor and/or the processor core, are used for the executive operating system function;
A plurality of application management modules that are used to manage application program and application process are distributed on the processor and/or processor core different with described kernel services module, are used for application program and the application process of management operating on these processors and/or processor core;
Described kernel services module and described application program are bound with described processor or processor core respectively;
Described kernel services module and described application management module are by the system call message communicating.
Preferably, described kernel services module comprises:
System call reception and sending module are used to receive system call message that the application management module under the described application program sends and the execution result that calls to described application program transmitting system;
Intercept module,, notify described system call reception and sending module to receive described system call message when listening to described application program when sending system call message.
Preferably, described application management module also comprises system call transmission and receiver module, is used for the system call result who sends to described kernel services module transmitting system message call and the described kernel services module of reception.
Preferably, described application management module also comprises the system call routing table; Described application management module is converted to message according to system call type with the system call request of application program and sends to the corresponding kernel services module that writes down in the described system call routing table.
Preferably, described kernel services module is meant management of process service module, memory management service module, equipment control service module, file operation service module or its combination.
Preferably, described memory management service module comprises following system call: application or releasing memory space, set up the mapping of page-map, freeing of page, protect memory headroom, set up page-map; Described file operation service module comprises following system call: open file, read file, written document, navigate to certain position of file; Described management of process service module comprises following system call: obtain process number, be finished and withdraw from; Described equipment control service module comprises following system call: opertaing device.
Preferably, described management of process service module also comprises the processor vector table, be used to write down the current state of each processor or processor core: the processor or the processor core of operation kernel services module are labeled as interior nuclear state, processor that runs application or nuclear are User Status, and the processor or the nuclear that are in idle condition are idle condition.
Preferably, described kernel services module also comprises the load balance submodule, is used to add up the frequency of receiving system call message, and when this frequency is worth greater than first of setting, sends the load balance request to described management of process service module.
Preferably, described management of process service module is inquired about described processor vector table after receiving described load balance request, if processor or the processor core that is in idle condition arranged in the described processor vector table, then described management of process service module makes to be created and the identical kernel services module of described kernel services module of sending the load balance request on this idle condition processor or the processor core; If do not have idle processor or processor core in the described processor vector table, then send the message of inquiry system message call frequency to other kernel services modules, when receiving the system call message frequency information that other kernel services modules return, described management of process service module selection processor or processor core, make and create and the identical kernel services module of described kernel services module of sending the load balance request on this processor or the processor core, simultaneously described management of process service module is revised this processor or processor core state in the processor vector table, and sends the message that update system is called routing table to described application management module.
Preferably, described management of process service module selection processor or processor core are meant if the system call frequency on processor or the processor core is lower than second value of setting then selects this processor or processor core; If can not select suitable processor or processor core, the load balance operation does not then take place.
Preferably, described load balance submodule also is used to add up the frequency of receiving system call message, when this frequency is worth less than the 3rd of setting, sends the load balance request to described management of process service module.
Preferably, when described management of process service module receives described load balance request, inquire about described processor vector table, then carry out the load balance operation if meet the following conditions: first condition exists at least one User Status processor or the processor core and has carried out two or more application programs; Second condition exists the processor of nuclear state in another is at least or processor core and its system call message frequency also less than the 3rd value of setting;
The operation of described load balance comprises: with current inner service module and the described at least kernel services module of moving on the processor of nuclear state or the processor core in another is in, merge on one of them processor or the processor core and move, and cancel kernel services module on merged processor or the processor core, send the message that update system is called routing table to described application management module simultaneously; Preservation is satisfied the context of the User Status processor of first condition or the certain applications program on the processor core and they is suspended, and notice has just been cancelled the processor or the processor core of kernel services module and carried out these application programs.
A kind of operating system management method is used to operate on multiprocessor and/or the polycaryon processor and manages application program, comprises the steps:
Step S1, application program transmitting system message call give the kernel services module, and context does not take place after sending described message switch and continue to carry out the code that does not have dependence with this system call result;
Step S2, the kernel services module receives described system call message on processor of binding or processor core, and the system call result is sent back to application program;
Step S3, application program receives described system call result, carries out the code that dependence is arranged with this system call result in needs;
Wherein, described kernel services module distribution is at least one processor and/or processor core, and described application program is distributed on the processor and/or processor core different with described kernel services module; Described kernel services module and described application program are bound with described processor or processor core respectively.
Preferably, kernel services module described in the described step S2 also adopts balancing method of loads to realize the processor at kernel services module place or the load balance of processor core, and described balancing method of loads specifically comprises the steps:
Step S201, the load balance submodule statistics in the described kernel services module is received the quantity of system call message;
Step S202 when the quantity of system call message is worth greater than first of setting, sends the load balance request to the management of process service module;
Step S203, described management of process service module inquire about the current state of each processor or processor core after receiving described load balance request;
Step S204, if the processor or the processor core that are in idle condition are arranged, then described management of process service module makes to be created and the identical kernel services module of described kernel services module of sending the load balance request on this idle condition processor or the processor core;
Step S205, if do not have idle processor or processor core, then send the message of inquiry system message call frequency to other kernel services modules, when receiving the system call message frequency information that other kernel services modules return, described management of process service module selection processor or processor core;
Step S206 creates and the identical kernel services module of described kernel services module of sending the load balance request on feasible processor of selecting or the processor core;
Step S207, described management of process service module is revised processor or processor core state;
Step S208, the system call routing table in the application management module sends updating message;
Described management of process service module and application management module are respectively the kernel processes modules corresponding with system call type.
Preferably, among the described step S205, described management of process service module selection processor or processor core are meant if the system call frequency on this processor or the processor core is lower than second of setting to be worth then selection processor or processor core; If can not select suitable processor or processor core, the load balance operation does not then take place.
Preferably, described management method also comprises:
Step S4, the processor at application programs place or processor core are realized load balance.
Preferably, described step S4 specifically comprises the steps:
Step S401, the load balance submodule in the described kernel services module, statistics is received the quantity of system call message;
Step S402 when the quantity of system call message is worth less than the 3rd of setting, sends the load balance request to described management of process service module;
Step S403, when described management of process service module receives described load balance request, inquire about the current state of each processor or processor core, if meet the following conditions then execution in step S404, otherwise stop: first condition exists at least one User Status processor or the processor core and has carried out two or more application programs; Second condition exists the processor of nuclear state in another is at least or processor core and its system call message frequency also less than the 3rd value of setting;
Step S404, with current inner service module and the described at least kernel services module of moving on the processor of nuclear state or the processor core in another is in, merge on one of them processor or the processor core and move, and cancel kernel services module on merged processor or the processor core;
Condition S405, the system call routing table in the application management module sends updating message;
Step S406 preserves the context of the User Status processor satisfy first condition or the certain applications program on the processor core and they is suspended;
Step S407, management of process service module notice has just been cancelled the processor or the processor core of kernel services module and has been carried out described certain applications program;
Step S408, the management of process service module upgrades the current state of each processor or processor core;
Described management of process service module and application management module are respectively the kernel processes modules corresponding with system call type.
Compared with prior art, useful technique effect of the present invention is:
(1) because the present invention is divided into a plurality of kernel services modules with the operating system nucleus of prior art, and these kernel services modules are deployed on the processor or processor core different with application program, thereby significantly reduced the context switching, improved operating system performance; Simultaneously, be to use the function call mode to carry out, thereby improved the operational efficiency of operating system in the kernel services inside modules.
(2) operating system of the present invention concentrates on shared resource as far as possible in the single kernel services module and manages, and adopts the message transmission to send request when user program needs access shared resources, and corresponding kernel services module adopts message queue mechanism to handle request in order.This method does not need lock mechanism, is equivalent to cut apart the lock of having eliminated in the big kernel ((Big Kernel Lock)), thereby improves the extendability of operating system.
(3) the present invention adopts the asynchronous system method of calling, be that application program is after the request of sending system call, can continue to carry out other code that does not rely on the system call result, when receive system call as a result the time carry out the code relevant again with this result, thereby remedy the expense of IPC (Inter-Process Communication), improved the performance of operating system.
Therefore, operating system provided by the invention has preferable performance and extendability on a fairly large number of multiprocessor and/or multi-core processor platform.
Description of drawings
Fig. 1 is operating system user's attitude and the kernel state and the context switching synoptic diagram of prior art;
Fig. 2 is two the processor exclusive reference shared resource synoptic diagram of the operating system of prior art based on lock mechanism;
Fig. 3 is according to the synoptic diagram of system call type fractured operation system kernel among the present invention;
Fig. 4 is according to the synoptic diagram of operating position fractured operation system kernel of lock among the present invention;
Fig. 5 is the execution synoptic diagram of kernel services module and application among the present invention;
Fig. 6 is the asynchronous system call flow synoptic diagram of application program among the present invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer,, operating system and the operation method based on multiprocessor and/or polycaryon processor of the present invention further described below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
The development of polycaryon processor is more and more faster, makes multi processor platform more and more, and the number of processor or processor core is also more and more.Owing to use context to switch and lock mechanism, existing operating system performance and extendability under multiprocessor or processor core (especially more than 8) environment all have certain limitation.
As a kind of embodiment, the invention provides a kind of operating system, this operating system is used to manage application program on multiprocessor and/or polycaryon processor, comprising:
A plurality of kernel services modules corresponding with system call type in the kernel state operation are distributed at least one processor and/or the processor core;
A plurality of application management modules that are used to manage application program and application process are distributed on the processor and/or processor core different with described kernel services module, are used for application program and the application process of management operating on these processors and/or processor core.
Described kernel services module and described application management module are by the system call message communicating.
The present invention is deployed in a plurality of kernel services module asymmetric distribution formula ground in kernel state operation at least one processor or the nuclear, as a kind of enforceable mode, such as a kernel services module being deployed in a processor or examining.It is technology well known to those skilled in the art that the operating system nucleus of prior art is split as a plurality of kernel services modules, such as shown in Figure 3, split according to system call (Syscall): system call is categorized as management of process, memory management, equipment control, file system etc., relevant system call is aggregated in the kernel services module; For another example as shown in Figure 4, operating position according to lock splits: the operating system nucleus of prior art is divided into two parts, a part is the kernel services module that can not rely on lock, and these modules can be called by a plurality of application programs and can not influence each other simultaneously; Another part is the kernel services module that relies on lock, and these modules have a lot of critical resources, need exclusive reference.
As shown in Figure 5, described distribution is exactly that the kernel services module of operating system is deployed on each processor or the processor core, is to be deployed on each processor or the processor core according to the mode of setting when initial.Under multiprocessor or nuclear environment, for convenience, can processor or nuclear be divided into primary processor with from processor.The kernel services that distributed on primary processor module, the executive operating system function; From the processor application program that distributed, executive utility.The benefit of doing like this is that operating system nucleus service module and application program are bound with processor or nuclear respectively in the process of implementation, and the context switching does not take place, thereby improve the performance of operating system.As shown in Figure 6, owing to do not need context to switch, so operating system of the present invention can realize asynchronous system and call, promptly when the kernel services module of application program on being in another processor or nuclear sent system call message, application program can continue to carry out the code that does not have dependence with the system call result, when receiving system call as a result the time, carry out the code that dependence is arranged with the system call result again.The operation method that this asynchronous system is called will be described in detail later.
Preferably, described kernel services module comprises: system call reception and sending module are used to receive the execution result that system call message that described application program sends and the application management module transmitting system under described application program are called; With intercept module, when listening to described application program when sending system call message, notify described system call reception and sending module to receive described system call message.
Preferably, described application management module also comprises system call transmission and receiver module, is used for the system call result who sends to described kernel services module transmitting system message call and the described kernel services module of reception.
Preferably, described application management module also comprises the system call routing table, according to system call type the system call request of application program is converted to message and sends to corresponding service module.Described application management module receives the system call request of application program, is converted to system call message then, sends to corresponding kernel services module according to the system call routing table; It also can receive the system call result that the kernel services module is sent, and is transmitted to application program.
Preferably, described kernel services module is meant management of process service module, memory management service module, equipment control service module, file operation service module or its combination.Such as, with application relevant in the prior art operating system nucleus or releasing memory space (brk), set up page-map (mmap), freeing of page mapping (munmap), protection memory headroom (mprotect), set up page-map system calls such as (mmap2) and be divided into the memory management service module with memory management; To open file (open), read file (read), written document (write), navigate to the system calls such as (lseek) of certain position of file and be divided into the file operation service module; To obtain process number (getpid), the system calls such as withdrawing from (exit) that is finished is divided into the management of process service module; Opertaing device system calls such as (ioctl) is divided into the equipment control service module.
In the present invention, if processor or processor core need load balance, then master/slave processor number can be according to load and dynamic change: under the not high situation of application call operating system nucleus service module frequency, a plurality of kernel services modules can be operated on the primary processor; When application is the operating system intensity, then can move the kernel services module with a plurality of primary processors.To describe this balancing method of loads in detail below.
Preferably, described management of process service module also comprises the processor vector table, be used to write down the current state of each processor or processor core: the processor or the processor core of operation kernel services module are labeled as kernel (Kernel) state, processor that runs application or nuclear are user (User) state, and the processor or the nuclear that are in idle condition are idle (Idle) state.
Preferably, described kernel services module also comprises the load balance submodule, is used to add up the frequency of receiving system call message, and when this frequency is worth greater than first of setting, sends the load balance request to described management of process service module; Described management of process service module is created and the identical kernel services module of described kernel services module of sending described load balance request on the processor of other kernel state or processor core, with the realization load balance.Specifically, described management of process service module is inquired about described processor vector table after receiving described load balance request, if processor or the processor core that is in free time (Idle) state arranged in the described processor vector table, then described management of process service module makes to be created and the identical kernel services module of described kernel services module of sending the load balance request on this idle condition processor; If there is not the processor of free time (Idle) in the described processor vector table, then send the message of inquiry system message call frequency to other kernel services modules, when receiving the system call message frequency information that other kernel services modules return, described management of process service module selection processor, make and create and the identical kernel services module of described kernel services module of sending the load balance request on this processor, simultaneously described management of process service module is revised this processor state in the processor vector table, and sends the message that update system is called routing table to described application management module.Definite method of described first value is: if this kernel services module is T to the average handling time of a system call request, if the frequency of system call request message is greater than k 1/ T then can send the load balance request, and promptly described first value is set at k 1/ T, wherein k 1Be the coefficient that is determined by experiment, can adjust according to different situations.
Preferably, described management of process service module selection processor is meant if the system call frequency on this processor or the processor core is lower than second of setting to be worth then selection processor, if can not select suitable processor, the load balance operation does not take place then.Definite method of described second value is: described second value equals k 2/ T, wherein T is the average handling time of this kernel services module to a system call request, k 2Be the coefficient that is determined by experiment, can adjust according to different situations.
Preferably, described load balance submodule also is used to add up the frequency of receiving system call message, when system call quantity is worth less than the 3rd of setting, sends the load balance request to described management of process service module; Described management of process service module is with current inner service module and other kernel services module, merge on one of them processor or the processor core and move, and cancel kernel services module on merged processor or the processor core, and on merged processor or processor core, run application, to realize load balance.Specifically, when described management of process service module receives described load balance request, inquire about described processor vector table, then carry out the load balance operation: (a) exist at least one user (User) condition handler or the processor core and carried out two or more application programs if meet the following conditions; (b) exist at least another processor that is in kernel (Kernel) state and its system call message frequency also less than the 3rd value of setting; The operation of described load balance comprises: with current inner service module and the described at least kernel services module of moving on the processor of nuclear state in another is in, merge on one of them processor or the processor core and move, and cancel kernel services module on merged processor or the processor core, send the message that update system is called routing table to described application management module simultaneously; Satisfy condition user (User) condition handler of a of selection is preserved the context of the certain applications program on this processor and they is suspended, and notice has just been cancelled the processor of kernel services module and carried out these application programs; Described management of process service module is new processor vector table more again.Definite method of described the 3rd value is: described the 3rd value equals k 3/ T, wherein T is the average handling time of this kernel services module to a system call request, k 3Be the coefficient that is determined by experiment, can adjust according to different situations.
A kind of operating system management method is used to operate on multiprocessor and/or the polycaryon processor and manages application program, comprises the steps:
Step S1, application program transmitting system message call, and after sending described message, continue to carry out the code that does not have dependence with this system call result;
Step S2, the kernel services module receives described system call message, and the system call result is sent back to application program;
Step S3, application program receives described system call result, continues to carry out and the relevant code of this system call result.
By said method as can be seen, operation method of the present invention comprises two key characters: message communicating and asynchronous process, these two features can be called asynchronous system and call.Specifically:
Message communicating is meant when application program is carried out system call, the parameter that system call is needed, space, return address etc. send to the operating system nucleus service module with the form of message bag (Message), after finishing etc. the kernel services resume module, also result is sent to application program with the form of message bag.
As shown in Figure 6, after asynchronous process refers to that application program transmitting system message call is given the operating system nucleus service module, can continue to carry out the code of back and context needn't take place as existing operating system and switch, be converted to kernel state and carry out kernel code.The kernel services module is carried out on the processor of special use, context can not take place yet switch, and when receiving the message bag, then handles, and the back that disposes sends to application with message packet format.Application program can obtain a sign prompting after receiving the message bag, directly extracts data from the message bag when needing and gets final product.So in the whole process primary processor with from processor context can not to take place all switch.And operating system nucleus service module and application program can be concurrent execution.
Preferably, kernel services module described in the described step S2 also adopts balancing method of loads to realize the processor at kernel services module place or the load balance of processor core, and described balancing method of loads specifically comprises the steps:
Step S201, load balance submodule statistics is received the frequency of system call message.
Step S202 when system call quantity is worth greater than first of setting, sends the load balance request to described management of process service module.
Step S203, described management of process service module inquire about described processor vector table after receiving described load balance request.
Step S204, if processor or the processor core that is in free time (Idle) state arranged in the described processor vector table, then described management of process service module makes to be created and the identical kernel services module of described kernel services module of sending the load balance request on this idle condition processor;
Step S205, if there is not the processor of free time (Idle) in the described processor vector table, then send the message of inquiry system message call frequency to other kernel services modules, when receiving the system call message frequency information that other kernel services modules return, described management of process service module selection processor.
Step S206 creates and the identical kernel services module of described kernel services module of sending the load balance request on the feasible processor of selecting, and.
Step S207, described management of process service module is revised this processor state in the processor vector table.
Step S208 sends the message that update system is called routing table to described application management module.
Preferably, in the described step 205, described management of process service module selection processor is meant if the system call frequency on this processor or the processor core is lower than second of setting to be worth then selection processor, if can not select suitable processor, the load balance operation does not then take place.Definite method of described second value is: described second value equals k 2/ T, wherein T is that this kernel services module is to a system call request processing time, k 2Be the coefficient that is determined by experiment, can adjust according to different situations.
Preferably, the operating system method also comprises:
Step S4, the processor load balance at application programs place.
Preferably.Described step S4 specifically comprises the steps:
Step S401, the load balance submodule of kernel services module, statistics is received the frequency of system call message.
Step S402 when system call quantity is worth less than the 3rd of setting, sends the load balance request to described management of process service module.
Step S403, when described management of process service module receives described load balance request, inquire about described processor vector table, if meet the following conditions then execution in step S404, otherwise stop: (a) existing at least one user (User) condition handler or the processor core and carried out two or more application programs; (b) exist at least another processor that is in kernel (Kernel) state and its system call message frequency also less than the 3rd value of setting;
Step S404, with current inner service module and the described at least kernel services module of moving on the processor of nuclear state in another is in, merge on one of them processor or the processor core and move, and cancel kernel services module on merged processor or the processor core;
Step S405 sends the message that update system is called routing table to described application management module.
Step S406, user (User) condition handler of a that selects to satisfy condition is preserved the context of the certain applications program on this processor and they is suspended.
Step S407, management of process service module notice has just been cancelled the processor of kernel services module and has been carried out described certain applications program.
Step S408, management of process service module be new processor vector table more again.
Can know from top embodiment and to find out that advantage of the present invention comprises:
Operating system of the present invention and operation method adopt a plurality of kernel services modules asymmetricly are distributed on a plurality of processors or the nuclear, and adopting the asynchronous system call method, the operating system that has solved prior art preferably is owing to the limitation that adopts context switching and lock mechanism to produce.Specifically:
The operating system nucleus of prior art of the present invention is split as different kernel services modules (Service), reduces the dependence to critical section/lock mechanism; The kernel services module asymmetricly is deployed on part or all processors or the nuclear, and makes the kernel services module have load balance ability, make operating system have good extended capability.
The present invention adopts asynchronous system to call, and the Syscall request is defined as message, is forwarded to corresponding kernel services resume module, avoids context to switch; By Syscall request Asynchronous Invocation, make each kernel services module of operating system and the concurrent execution of application program, improved operating system performance.
Above said content; only for the concrete embodiment of the present invention, but protection scope of the present invention is not limited thereto, and anyly is familiar with those skilled in the art in the technical scope that the present invention discloses; the variation that can expect easily or replacement all should be encompassed in protection scope of the present invention.

Claims (17)

1. an operating system management device is used to manage application program, it is characterized in that, comprising:
A plurality of kernel services modules corresponding with the operating system call type in the kernel state operation are distributed at least one processor and/or the processor core, are used for the executive operating system function;
A plurality of application management modules that are used to manage application program and application process are distributed on the processor and/or processor core different with described kernel services module, are used for application program and the application process of management operating on these processors and/or processor core;
Described kernel services module and described application program are bound with described processor or processor core respectively;
Described kernel services module and described application management module are by the system call message communicating.
2. operating system management device according to claim 1 is characterized in that, described kernel services module comprises:
System call reception and sending module are used to receive system call message that the application management module under the described application program sends and the execution result that calls to described application program transmitting system;
Intercept module, when listening to system call message, notify described system call reception and sending module to receive described system call message.
3. operating system management device according to claim 1, it is characterized in that, described application management module also comprises system call transmission and receiver module, is used for the system call result who sends to described kernel services module transmitting system message call and the described kernel services module of reception.
4. operating system management device according to claim 1 is characterized in that, described application management module also comprises the system call routing table; Described application management module is converted to message according to system call type with the system call request of application program and sends to the corresponding kernel services module that writes down in the described system call routing table.
5. operating system management device according to claim 4 is characterized in that, described kernel services module is meant management of process service module, memory management service module, equipment control service module, file operation service module or its combination.
6. operating system management device according to claim 5, it is characterized in that described memory management service module comprises following system call: application or releasing memory space, set up the mapping of page-map, freeing of page, protect memory headroom, set up page-map; Described file operation service module comprises following system call: open file, read file, written document, navigate to certain position of file; Described management of process service module comprises following system call: obtain process number, be finished and withdraw from; Described equipment control service module comprises following system call: opertaing device.
7. operating system management device according to claim 5, it is characterized in that, described management of process service module also comprises the processor vector table, be used to write down the current state of each processor or processor core: the processor or the processor core of operation kernel services module are labeled as interior nuclear state, processor that runs application or processor core are User Status, and the processor or the processor core that are in idle condition are idle condition.
8. operating system management device according to claim 7, it is characterized in that, described kernel services module also comprises the load balance submodule, be used to add up the frequency of receiving system call message, and when this frequency is worth greater than first of setting, send the load balance request to described management of process service module.
9. operating system management device according to claim 8, it is characterized in that, described management of process service module is inquired about described processor vector table after receiving described load balance request, if processor or the processor core that is in idle condition arranged in the described processor vector table, then described management of process service module makes to be created and the identical kernel services module of described kernel services module of sending the load balance request on this idle condition processor or the processor core; If do not have idle processor or processor core in the described processor vector table, then send the message of inquiry system message call frequency to other kernel services modules, when receiving the system call message frequency information that other kernel services modules return, described management of process service module selection processor or processor core, make and create and the identical kernel services module of described kernel services module of sending the load balance request on this processor or the processor core, described management of process service module is revised this processor or processor core state in the described processor vector table simultaneously, and sends the message that update system is called routing table to described application management module.
10. operating system management device according to claim 9, it is characterized in that, described management of process service module selection processor or processor core are meant if the system call frequency on processor or the processor core is lower than second value of setting then selects this processor or processor core; If can not select suitable processor or processor core, the load balance operation does not then take place.
11. operating system management device according to claim 8, it is characterized in that described load balance submodule also is used to add up the frequency of receiving system call message, when this frequency is worth less than the 3rd of setting, send the load balance request to described management of process service module.
12. operating system management device according to claim 11, it is characterized in that, when described management of process service module receives described load balance request, inquire about described processor vector table, then carry out the load balance operation if meet the following conditions: first condition exists at least one User Status processor or the processor core and has carried out two or more application programs; Second condition exists the processor of nuclear state in another is at least or processor core and its system call message frequency also less than the 3rd value of setting;
The operation of described load balance comprises: with current inner service module and the described at least kernel services module of moving on the processor of nuclear state or the processor core in another is in, merge on one of them processor or the processor core and move, and cancel kernel services module on merged processor or the processor core, send the message that update system is called routing table to described application management module simultaneously; Preservation is satisfied the context of the User Status processor of first condition or the certain applications program on the processor core and they is suspended, and notice has just been cancelled the processor or the processor core of kernel services module and carried out these application programs.
13. an operating system management method is used to operate on multiprocessor and/or the polycaryon processor and manages application program, comprises the steps:
Step S1, application program transmitting system message call give the kernel services module, and context does not take place after sending described message switch and continue to carry out the code that does not have dependence with this system call result;
Step S2, the kernel services module receives described system call message on processor of binding or processor core, and the system call result is sent back to application program;
Step S3, application program receives described system call result, carries out the code that dependence is arranged with this system call result in needs;
Wherein, described kernel services module distribution is at least one processor and/or processor core, and described application program is distributed on the processor and/or processor core different with described kernel services module; Described kernel services module and described application program are bound with described processor or processor core respectively.
14. operating system management method according to claim 13, it is characterized in that, kernel services module described in the described step S2 also adopts balancing method of loads to realize the processor at kernel services module place or the load balance of processor core, and described balancing method of loads specifically comprises the steps:
Step S201, the load balance submodule statistics in the described kernel services module is received the quantity of system call message;
Step S202 when the quantity of system call message is worth greater than first of setting, sends the load balance request to the management of process service module;
Step S203, described management of process service module inquire about the current state of each processor or processor core after receiving described load balance request;
Step S204, if the processor or the processor core that are in idle condition are arranged, then described management of process service module makes to be created and the identical kernel services module of described kernel services module of sending the load balance request on this idle condition processor or the processor core;
Step S205, if do not have idle processor or processor core, then send the message of inquiry system message call frequency to other kernel services modules, when receiving the system call message frequency information that other kernel services modules return, described management of process service module selection processor or processor core;
Step S206 creates and the identical kernel services module of described kernel services module of sending the load balance request on feasible processor of selecting or the processor core;
Step S207, described management of process service module is revised described processor or processor core state;
Step S208, the system call routing table in the application management module sends updating message;
Described management of process service module and application management module are respectively the kernel processes modules corresponding with system call type.
15. operating system management method according to claim 14, it is characterized in that, among the described step S205, described management of process service module selection processor or processor core are meant if the system call frequency on this processor or the processor core is lower than second of setting to be worth then selection processor or processor core; If can not select suitable processor or processor core, the load balance operation does not then take place.
16. operating system management method according to claim 13 is characterized in that, also comprises:
Step S4, the processor at application programs place or processor core are realized load balance.
17. operating system management method according to claim 16 is characterized in that described step S4 specifically comprises the steps:
Step S401, the load balance submodule in the described kernel services module, statistics is received the quantity of system call message;
Step S402 when the quantity of system call message is worth less than the 3rd of setting, sends the load balance request to described management of process service module;
Step S403, when described management of process service module receives described load balance request, inquire about the current state of each processor or processor core, if meet the following conditions then execution in step S404, otherwise stop: first condition exists at least one User Status processor or the processor core and has carried out two or more application programs; Second condition exists the processor of nuclear state in another is at least or processor core and its system call message frequency also less than the 3rd value of setting;
Step S404, with current inner service module and the described at least kernel services module of moving on the processor of nuclear state or the processor core in another is in, merge on one of them processor or the processor core and move, and cancel kernel services module on merged processor or the processor core;
Step S405, the system call routing table in the application management module sends updating message;
Step S406 preserves the context of the User Status processor satisfy first condition or the certain applications program on the processor core and they is suspended;
Step S407, management of process service module notice has just been cancelled the processor or the processor core of kernel services module and has been carried out described certain applications program;
Step S408, the management of process service module upgrades the current state of each processor or processor core;
Described management of process service module and application management module are respectively the kernel processes modules corresponding with system call type.
CN2007103085533A 2007-12-29 2007-12-29 Operating system and operating system management method Expired - Fee Related CN101196816B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2007103085533A CN101196816B (en) 2007-12-29 2007-12-29 Operating system and operating system management method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2007103085533A CN101196816B (en) 2007-12-29 2007-12-29 Operating system and operating system management method

Publications (2)

Publication Number Publication Date
CN101196816A CN101196816A (en) 2008-06-11
CN101196816B true CN101196816B (en) 2010-12-08

Family

ID=39547250

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2007103085533A Expired - Fee Related CN101196816B (en) 2007-12-29 2007-12-29 Operating system and operating system management method

Country Status (1)

Country Link
CN (1) CN101196816B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016074130A1 (en) * 2014-11-10 2016-05-19 华为技术有限公司 Batch processing method and device for system invocation commands

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2014153635A1 (en) * 2013-03-26 2014-10-02 Irdeto Canada Corporation Method and system for platform and user application security on a device
US9558000B2 (en) * 2014-02-06 2017-01-31 Optimum Semiconductor Technologies, Inc. Multithreading using an ordered list of hardware contexts
TWI710899B (en) * 2015-10-14 2020-11-21 南韓商三星電子股份有限公司 Computing system and operation method thereof
CN105204928A (en) * 2015-10-30 2015-12-30 上海斐讯数据通信技术有限公司 Shared resource access method and system
CN108334420B (en) * 2017-01-19 2021-06-08 中国科学院声学研究所 Data recovery method based on multi-core network processor system
AU2019256257B2 (en) 2018-04-20 2022-02-10 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Processor core scheduling method and apparatus, terminal, and storage medium
CN111159714B (en) * 2019-12-23 2022-03-11 北京工业大学 Method and system for verifying credibility of main body in operation in access control
CN113127069B (en) * 2019-12-31 2023-08-22 成都鼎桥通信技术有限公司 Dual-system-based location service management method and device and terminal equipment

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2016074130A1 (en) * 2014-11-10 2016-05-19 华为技术有限公司 Batch processing method and device for system invocation commands

Also Published As

Publication number Publication date
CN101196816A (en) 2008-06-11

Similar Documents

Publication Publication Date Title
CN101196816B (en) Operating system and operating system management method
JP6006230B2 (en) Device discovery and topology reporting in combined CPU / GPU architecture systems
CN101727351B (en) Multicore platform-orientated asymmetrical dispatcher for monitor of virtual machine and dispatching method thereof
Dysart et al. Highly scalable near memory processing with migrating threads on the Emu system architecture
US8494833B2 (en) Emulating a computer run time environment
CN103262002A (en) Optimizing communication of system call requests
US20060259606A1 (en) Method and system for executing a container managed application on a processing device
CN103368848A (en) Information processing apparatus, arithmetic device, and information transferring method
CN107783913A (en) A kind of resource access method and computer applied to computer
CN102375761A (en) Business management method, device and equipment
KR101900436B1 (en) Device discovery and topology reporting in a combined cpu/gpu architecture system
CN102521015B (en) Equipment virtualization method under embedded platform
US11900153B2 (en) Data structure execution framework using virtual computing domains
CN103646006A (en) Scheduling method, device and system for processor
JP2013546099A (en) Graphics processing dispatch from user mode
CN111090823B (en) Page application integration system, application access method, device and equipment
US7962926B2 (en) Method, system, and program storage device for generating a retry message when a thread in a real-time application is unavailable to process a request to utilize the real-time application
CN102667714A (en) method and system for enabling access to functionality provided by resources outside of an operating system environment
CA3173088A1 (en) Utilizing coherently attached interfaces in a network stack framework
CN100365583C (en) Package realizing method and system
WO2014142498A1 (en) Method and system for scheduling computing
US9189400B2 (en) Hybrid active memory processor system
US8656114B2 (en) Multi-core active memory processor system
Yerraballi Real-time operating systems: An ongoing review
JP2017107382A (en) Program execution system, program execution method, and program

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20101208

Termination date: 20191229

CF01 Termination of patent right due to non-payment of annual fee