CN1851651A - Method for realizing process priority scheduling for embedded SRAM operating system - Google Patents

Method for realizing process priority scheduling for embedded SRAM operating system Download PDF

Info

Publication number
CN1851651A
CN1851651A CN 200610050880 CN200610050880A CN1851651A CN 1851651 A CN1851651 A CN 1851651A CN 200610050880 CN200610050880 CN 200610050880 CN 200610050880 A CN200610050880 A CN 200610050880A CN 1851651 A CN1851651 A CN 1851651A
Authority
CN
China
Prior art keywords
sram
processor
information
priority
operating system
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN 200610050880
Other languages
Chinese (zh)
Inventor
陈天洲
胡威
谢斌
赵懿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN 200610050880 priority Critical patent/CN1851651A/en
Publication of CN1851651A publication Critical patent/CN1851651A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present invention relates to embedded system process scheduling field for providing an embedded type SRAM operation system process priority scheduling implementation method. Said method includes recording state of a process, dividing process priority, progress select, processor distribution and retrieve processor. Said method easy realizes, is in favor of respectively processing to different progress, at the same time said method has high response speed process scheduling to SRAM when progress has higher cpu use rate.

Description

The implementation method of process priority scheduling for embedded SRAM operating system
Technical field
The present invention relates to embedded system process scheduling field, particularly relate to a kind of implementation method of process priority scheduling for embedded SRAM operating system.
Background technology
In computer system, may there be hundreds of batch processing jobs to leave in the job queue of disk simultaneously, perhaps there are hundreds of terminals to be connected with main frame.How from these operations, to select operation and enter main memory operation, how distribution processor time, a major issue in the operating-system resources management beyond doubt between process.This relates to the problem that processor distributes, and is referred to as processor scheduling.
We often run into the situation that two or more processes logically all can be moved.When a plurality of processes were ready, which operating system must determine to move earlier.The part of making this decision in the operating system is called scheduler program (Scheduler).
In early days very simple as the dispatching algorithm in the batch processing system epoch of input: as to move the next operation on the tape successively with the card image on the tape.For time-sharing system, though then dispatching algorithm want more complicated on PC, also have the process competition CPU that some users start, let alone background job in addition, for example the network or the smart process of sending and receiving e-mail.
A good processor scheduling should be considered a lot of aspects, wherein has:
Fair: as to guarantee that each process obtains rational CPU share.
Effectively: make CPU absolutely busy.
Response time: make the response time of interactive user short as far as possible.
Turnaround time: make the batch processing user wait for that the time of output is short as far as possible.
Handling capacity: make the operation number of per hour handling maximum.
These targets are thought deeply a little just can find wherein contradictory part.Can prove that any one dispatching algorithm of being partial to some type of operation will damage other operations.Available after all CPU time is limited.
Another trouble that scheduler program must be faced is that each process is all different, and unpredictable.The expensive time waiting I/O of some process, and other processes will use CPU to reach several hrs under the condition that allows continuously.In order to guarantee not allow process move too for a long time, all built-in electronic timer of nearly all computing machine or clock, it will send interruption termly.On many computing machines, operating system can be arranged to arbitrary value with clock frequency as required.Clock of every generation interrupts, and operating system all will be moved, and determines whether current process should continue operation, or it has taken sufficiently long CPU time, should suspend to allow other processes move.
The strategy of the process temporary suspension that permission will can move in logic is called can deprive scheduling (PreemptiveScheduling).Operation is called the non-scheduling (NonpreemptiveScheduling) of depriving up to the scheduling mode that finishes.Process can not added warning ground at any time to be hung up, so that allow another process operation.This has caused race condition and has prevented the semaphore of race condition, tube side, message or other complicated methods.On the other hand, allow a desirable time of process bootup window to mean that a process of calculating circular constant radix point back billibit will make other processes can not get service forever.
Although so realization is dispatched simply and be easy to non-depriving, it is unsuitable for having a plurality of competition users' general-purpose system usually.On the other hand, for dedicated system, as a database server, host process starts a subprocess and allows it move up to finishing or blocking when receiving request then be quite reasonable.
Therefore usually for different task process, can adopt different dispatching methods.As embedded SRAM operating system, be characterized in that operating system is arranged in SRAM, therefore also need to adopt the dispatching method that is based upon the SRAM basis.
The common performance parameter of more various medium memory obtains various Memeory contrast properties as showing:
Memory Idle (mA) Active (mA) Read (16bit) Write (16bit) Erase (16bit)
Mobile?SDRAM 0.5 75 90ns 90ns N/A
Low?Power?SRAM 0.005 3 55ns 55ns N/A
Fash?SRAM 5 65 10ns 10ns N/A
NOR 0.03 32 200ns 210.5us 1.2sec
NAND 0.01 10 10.1us 200.5us 2ms
Analytically show data, the SDRAM power consumption is used the unique main memory of the very big SDRAM of power consumption as embedded system more than the power consumption height of SRAM and flash so conventional embedded OS is actually.We find if can allow kernel code at SRAM or the flash that supports XIP as the instruction internal memory, will improve the speed of system greatly so, reduce the power consumption of system.
Compare under the situation based at present common desktop computer hardware configuration and ordinary desktop operating system, embedded SRAM operating system is based on a kind of special application (the specific performance contrast sees also table) of the embedded SRAM storer of mobile terminal device, the embedded SRAM storer mainly shows the restriction of operation operation or its singularity: under the situation of SRAM, its response time will be more than fast under the SDRAM situation, operation by the operation of the SRAM of hardware supported and SDRAM is also also inconsistent, like this, the scheduling mode of embedded SRAM operating system must adopt the implementation method different with common system owing to face different conditions.
Because at present in non-embedded field, its CPU arithmetic speed is enough to satisfy the demand, but embedded system often requires higher response speed.Therefore, only there is the CPU of embedded system to have the exercisable characteristic of SRAM, and can in mobile terminal device, have obtained application.The present invention is based on the needs of embedded mobile device and is that embedded SRAM operating system has been realized its process scheduling method.
Summary of the invention
The object of the present invention is to provide a kind of implementation method of process priority scheduling for embedded SRAM operating system.
The technical scheme that the present invention solves its technical matters employing is as follows:
The invention provides a kind of implementation method of process priority scheduling for embedded SRAM operating system, comprise
1) state of record the process
To be added in the process control block (PCB) of this process of progress information typing of ready queue, and be loaded among the SRAM, because the capacity of SRAM is less, if the off-capacity of SRAM is then added the information of process status for hanging up that the SRAM off-capacity causes in process control block (PCB);
(2) process priority is divided
Each process is carried out priority level divide, the process of identical priority number is divided into same preferential group;
(3) process selection
Read the process that writes down in the process process control block (PCB) and arrive the order clauses and subclauses, processor distribution is given have high priority in the ready queue and be present in process among the SRAM; For the process in same preferential group, will carry out first process earlier;
(4) processor distribution
Relevant on-the-spot information, the especially information of SRAM capacity in the SPCB that chooses process, send in the processor relevant register, make it take the processor operation;
(5) regain processor
When course allocation to timeslice when using up, interrupt, the relevant content of registers of processor is sent into the corresponding units in the SPCB of this process, thereby is made this process abdicate processor.
As a kind of improvement of the present invention, the progress information in the described typing process control block (PCB) comprises:
Identification information is used for identifying uniquely a process;
Field data, be used for the reservation process operation the time leave in the processor scene various information and
Control information is used for management and dispatches a process.
Useful effect of the present invention is: this method realizes easily, and for the higher process of priority, its time that takies CPU is also longer, help handling respectively for different processes, this method is effectively utilized when process is arranged in SRAM simultaneously, when process was higher for the utilization rate of CPU, SRAM was for the fast characteristics of process scheduling response speed.
Description of drawings
Fig. 1 is the synoptic diagram of process of the present invention;
Fig. 2 is the synoptic diagram of process control block (PCB);
Fig. 3 is the synoptic diagram of process status formation.
Embodiment
The present invention is further illustrated below in conjunction with accompanying drawing.
A kind of implementation method of process priority scheduling for embedded SRAM operating system, accompanying drawing 1 are the overall schematic of the invention process process, and its specific implementation method is as follows:
1) remembers state of a process
Be created in process and enter ready attitude, perhaps enter into ready state from other states, they can be added into a ready queue, for each, remember state of a process, and this information general record is in the process control block (PCB) of a process;
Each process all has one also to have only a SRAM process control block (PCB) Process ControlBlock, be called for short SPCB, be that embedded SRAM operating system is used to write down and delineate process status and data structure for information about, it also is unique data structure that operating system is grasped process, it has comprised the situation when process is carried out, and process is abdicated information such as residing state behind the processor, breakpoint.In general, SPCB comprises three category informations:
Identification information, be used for identifying uniquely a process, the internal indicator that usually divides the foreign identifiers used by the user and used by system number, process all is endowed a process number unique, the inner numeric type that uses in nearly all operating system, and other control tables of operating system can come the control table of cross reference process by process number.Identification information commonly used comprises the identifier, consumer process name of Process identifier, parent process etc.;
Field data, be used for keeping a process leaves the processor scene in when operation various information, any one process must be saved in the processor field data of this moment in the process control block (PCB) when abdicating processor, and when resuming operation again, this process also answer restore processor scene, field data commonly used to comprise content, user stack pointer, system stack pointer of the content of general-purpose register, control register (as the PSW register) etc.;
Control information is used for management and dispatches a process.Control information commonly used comprises: the scheduling relevant information of process, guide unit etc. as state, waiting event or wait reason, priority, the process scheduling algorithm of employing, formation; The interprocess communication relevant information is as message queue pointer, semaphore; The address of process in second-level storage; Taking and use information of resource takies the executed temporal summation of time, process of CPU as process; Process privilege information is as in the privilege aspect internal storage access and the processor state; Resource inventory comprises the required whole resources of process, the resource of having got; In addition, for at SRAM capacity features of smaller, the process that is arranged in SRAM can not be too much, therefore, need in the SPCB of process, note the capacity of current SRAM, hang up reason, especially because some process that the SRAM off-capacity causes is suspended or the SRAM that swaps out enters SDRAM;
SPCB is an of paramount importance data structure in the embedded SRAM operating system, each SPCB has comprised all required progress informations of operating system management, the set of SPCB has in fact defined the current state of an operating system, process control block (PCB) uses or the power of amendment only belongs to operating system program, comprise scheduler program, resource allocator, interrupt handling routine, performance monitoring and routine analyzer etc., the process that has had SPCB the to be arranged in SRAM execution that just can be scheduled is as Fig. 2.
2) process priority is divided
Each process provides a priority number, and the process of identical priority number is divided into same preferential group, for having high priority and being present in process among the SRAM, will at first be assigned with execution;
Do you how to determine priority number? following several consideration can be arranged, use the frequent person's priority number of peripherals big, help like this raising the efficiency; The process priority number of important arithmetic problem program is big, and this is auspicious to help the user; The process priority number that enters length computer time is big, helps like this shortening the time that operation is finished; The process priority number of oolhiu interactive user is big, helps response time of terminal user or the like like this.
In order to prevent that high priority process from ceaselessly moving down, scheduler program may reduce the priority of current process at each clock ticktack.If this action causes its priority to be lower than time high priority, then will carry out process switching.Perhaps give each process set one section it can use the timeslice of CPU continuously, in case use up the process of operation time high priority then during this period of time.Priority can be for static or dynamic.
3) process selection
Enter into the process of ready queue for each, the details of this process have all been write down among its SPCB, processor is before scheduling, read the clauses and subclauses of the process priority that writes down among the process SPCB, at first processor will judge whether this process is arranged in SRAM among the SPCB according to SPCB, and perhaps whether the capacity of SRAM can be dispatched, if satisfy condition, CPU is distributed to first process in the process that priority valve is identical in the ready queue;
In general, be in same state, for example all process control block (PCB)s of ready attitude link together, such data structure is called process queue, be called for short formation, can further segment for the process queue of waiting state, each process enters corresponding formation by the reason of waiting for;
When certain incident that takes place changes a state of a process, this process will withdraw from certain formation at place and be drained into and go in another formation; The work that process withdraws from from the formation at a place is called team, and on the contrary, process is drained into work in the formation of an appointment and is called and joins the team; The functional module of being responsible in the processor scheduling joining the team and going out team's work is called queue management module, is called for short queue management, as Fig. 3.
4) processor distribution
Relevant on-the-spot information in the SPCB that chooses process, send in the processor relevant register, thereby allow it take the processor operation;
5) regain processor
When course allocation to timeslice when using up, interrupt, the relevant content of registers of processor is sent into the corresponding units in the SPCB of this process, thereby is made this process abdicate processor.
At last, it is also to be noted that what more than enumerate only is specific embodiments of the invention.Obviously, the invention is not restricted to above examples of implementation, many distortion can also be arranged.All distortion that those of ordinary skill in the art can directly derive or associate from content disclosed by the invention all should be thought protection scope of the present invention.

Claims (2)

1, a kind of implementation method of process priority scheduling for embedded SRAM operating system comprises
(1) state of record the process
To be added in the process control block (PCB) of this process of progress information typing of ready queue, and be loaded among the SRAM, because the capacity of SRAM is less, if the off-capacity of SRAM is then added the information of process status for hanging up that the SRAM off-capacity causes in process control block (PCB);
(2) process priority is divided
Each process is carried out priority level divide, the process of identical priority number is divided into same preferential group;
(3) process selection
Read the process that writes down in the process process control block (PCB) and arrive the order clauses and subclauses, processor distribution is given have high priority in the ready queue and be present in process among the SRAM; For the process in same preferential group, will carry out first process earlier;
(4) processor distribution
Relevant on-the-spot information, the especially information of SRAM capacity in the SPCB that chooses process, send in the processor relevant register, make it take the processor operation;
(5) regain processor
When course allocation to timeslice when using up, interrupt, the relevant content of registers of processor is sent into the corresponding units in the SPCB of this process, thereby is made this process abdicate processor.
2, the implementation method of process priority scheduling for embedded SRAM operating system according to claim 1 is characterized in that, the progress information in the described typing process control block (PCB) comprises:
Identification information is used for identifying uniquely a process;
Field data, be used for the reservation process operation the time leave in the processor scene various information and
Control information is used for management and dispatches a process.
CN 200610050880 2006-05-23 2006-05-23 Method for realizing process priority scheduling for embedded SRAM operating system Pending CN1851651A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN 200610050880 CN1851651A (en) 2006-05-23 2006-05-23 Method for realizing process priority scheduling for embedded SRAM operating system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN 200610050880 CN1851651A (en) 2006-05-23 2006-05-23 Method for realizing process priority scheduling for embedded SRAM operating system

Publications (1)

Publication Number Publication Date
CN1851651A true CN1851651A (en) 2006-10-25

Family

ID=37133130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN 200610050880 Pending CN1851651A (en) 2006-05-23 2006-05-23 Method for realizing process priority scheduling for embedded SRAM operating system

Country Status (1)

Country Link
CN (1) CN1851651A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604259B (en) * 2009-06-10 2011-12-21 深圳市共进电子有限公司 Method for synchronously scheduling a plurality of processes based on embedded system
CN102693156A (en) * 2012-05-07 2012-09-26 清华大学 Process scheduling method based on configurable strategy
CN103176842A (en) * 2013-03-15 2013-06-26 广东欧珀移动通信有限公司 Background process management method and mobile terminal thereof
CN106095558A (en) * 2016-06-16 2016-11-09 广东欧珀移动通信有限公司 A kind of method of audio effect processing and terminal
CN112368679A (en) * 2018-07-06 2021-02-12 苹果公司 System for scheduling threads for execution

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101604259B (en) * 2009-06-10 2011-12-21 深圳市共进电子有限公司 Method for synchronously scheduling a plurality of processes based on embedded system
CN102693156A (en) * 2012-05-07 2012-09-26 清华大学 Process scheduling method based on configurable strategy
CN103176842A (en) * 2013-03-15 2013-06-26 广东欧珀移动通信有限公司 Background process management method and mobile terminal thereof
CN103176842B (en) * 2013-03-15 2016-04-27 广东欧珀移动通信有限公司 background process management method and mobile terminal thereof
CN106095558A (en) * 2016-06-16 2016-11-09 广东欧珀移动通信有限公司 A kind of method of audio effect processing and terminal
CN106095558B (en) * 2016-06-16 2019-05-10 Oppo广东移动通信有限公司 A kind of method and terminal of audio effect processing
US10853092B2 (en) 2016-06-16 2020-12-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and device for sound effect processing
US11023254B2 (en) 2016-06-16 2021-06-01 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Method and device for sound effect processing and storage medium
CN112368679A (en) * 2018-07-06 2021-02-12 苹果公司 System for scheduling threads for execution

Similar Documents

Publication Publication Date Title
US8321614B2 (en) Dynamic scheduling interrupt controller for multiprocessors
US8914805B2 (en) Rescheduling workload in a hybrid computing environment
US9858115B2 (en) Task scheduling method for dispatching tasks based on computing power of different processor cores in heterogeneous multi-core processor system and related non-transitory computer readable medium
US20130061018A1 (en) Memory access method for parallel computing
US20120054770A1 (en) High throughput computing in a hybrid computing environment
US7853928B2 (en) Creating a physical trace from a virtual trace
US20140331235A1 (en) Resource allocation apparatus and method
US8627325B2 (en) Scheduling memory usage of a workload
WO2015130262A1 (en) Multiple pools in a multi-core system
JP7039631B2 (en) Methods, devices, devices, and storage media for managing access requests
US20080172670A1 (en) Method and Apparatus for Reducing Contention for Computer System Resources Using Soft Locks
US20140237151A1 (en) Determining a virtual interrupt source number from a physical interrupt source number
CN1851652A (en) Method for realizing process priority-level round robin scheduling for embedded SRAM operating system
US20190235902A1 (en) Bully vm detection in a hyperconverged system
US10545890B2 (en) Information processing device, information processing method, and program
CN1851651A (en) Method for realizing process priority scheduling for embedded SRAM operating system
EP1393175A2 (en) A resource management method
CN111984402A (en) Unified scheduling monitoring method and system for thread pool
CN1825288A (en) Method for implementing process multi-queue dispatching of embedded SRAM operating system
CN114461365A (en) Process scheduling processing method, device, equipment and storage medium
CN111459648B (en) Heterogeneous multi-core platform resource optimization method and device for application program
US20210089482A1 (en) Processor and interrupt controller therein
CN1851654A (en) Method for realizing process equal timeslice round robin scheduling for embedded SRAM operating system
US11360702B2 (en) Controller event queues
CN106227739B (en) Method for realizing data request based on multiple tasks

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication