CN104991816A - Process scheduling method and apparatus - Google Patents
- ️Wed Oct 21 2015
CN104991816A - Process scheduling method and apparatus - Google Patents
Process scheduling method and apparatus Download PDFInfo
-
Publication number
- CN104991816A CN104991816A CN201510358596.7A CN201510358596A CN104991816A CN 104991816 A CN104991816 A CN 104991816A CN 201510358596 A CN201510358596 A CN 201510358596A CN 104991816 A CN104991816 A CN 104991816A Authority
- CN
- China Prior art keywords
- real
- time
- time process
- work queue
- excess Prior art date
- 2015-06-25 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
Links
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention provides a process scheduling method and apparatus. The method comprises the following steps of: presetting real-time process priority and putting real-time processes different in priority into a corresponding working queue; according to real-time process closing time and real-time process running time in the working queue and a preset process sequence regulation policy, regulating each real-time process execution sequence in the working queue. The real-time process priority is combined with the remaining real-time process closing time, and the real-time process execution sequence is arranged, so that the real-time process execution efficiency is greatly improved.
Description
Technical field
The invention belongs to process scheduling field, particularly relate to a kind of process scheduling method and device.
Background technology
Along with computer technology high speed development, every profession and trade smart machine and automatic control equipment have been applied in daily life, as the industries such as communication, medical treatment, automobile, information appliance have been seen everywhere, these smart machines all carry out based on operation system technology.Therefore, the research and development of operating system occupy critical role, manufacturer now and enterprise are all carrying out operating system research and development, main based on Linux, Linux has that code is increased income, the feature such as high stability, abundant device drives, have a lot of volunteers and guardian simultaneously, enjoy liking of manufacturer and enterprise.
Process scheduling is the nucleus of operating system, and whether dispatching algorithm design quality, directly has influence on running efficiency of system, should consider that the factors such as response time, the amount of swallowing, justice are to reach system cloud gray model target in dispatching algorithm; In Linux, process is divided into common process and real-time process two kinds, and real-time process requires fast response time and reliability is high, than common process priority scheduling.Therefore, the demand meeting real-time process is designed and the process scheduling algorithm with very strong dispatching is vital.
Prior art discloses a kind of process real-time scheduling method, comprise: steps A, pre-set the value value of process task, the value value of task should get a value according to the value of task itself between the priority value and current all process greatest priority values of process; Step B, when the priority of process task is close or equal, compare the value value of process task, the task that preferential operation value is large; Or the value value of also more current all tasks when the system is overloaded, what operation value value was maximum enters task, ensures journey entire system value maximization and is maintained on an acceptable level.
But such scheme only only discloses the scheme that real-time process value value and priority are dispatched real-time process, but the program do not consider real-time process priority and working time factor, real-time process execution efficiency is under some influence.
Summary of the invention
The invention provides a kind of process scheduling method and device, to solve the problem.
The invention provides a kind of process scheduling method.Said method comprises the following steps: preset real-time process priority and the real-time process of different priorities put into corresponding work queue;
According to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjust each real-time process execution sequence in described work queue.
The present invention also provides a kind of process scheduling device, comprises presetting module, procedural sequences adjusting module; Wherein, described presetting module is connected with described procedural sequences adjusting module;
Described presetting module, for arranging real-time process priority and the real-time process of different priorities being put into corresponding work queue and work queue information is sent to described procedural sequences adjusting module;
Described procedural sequences adjusting module, for according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjusts each real-time process execution sequence in described work queue.
By following scheme: preset real-time process priority and the real-time process of different priorities put into corresponding work queue; According to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjust each real-time process execution sequence in described work queue; Achieve and real-time process priority is ended excess time with real-time process combine, arrange real-time process execution sequence, greatly improve the execution efficiency of carrying out in real time.
By following scheme: according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, to adjust in described work queue before each real-time process execution sequence, also comprise: judge in current C PU, do not have process to be in running status; Ensure that real-time process execution sequence adjustable strategies performs smoothly, ensure that system data security.
Accompanying drawing explanation
Accompanying drawing described herein is used to provide a further understanding of the present invention, and form a application's part, schematic description and description of the present invention, for explaining the present invention, does not form inappropriate limitation of the present invention.In the accompanying drawings:
Figure 1 shows that the process scheduling method processing flow chart of the embodiment of the present invention 1;
Figure 2 shows that the process scheduling structure drawing of device of the embodiment of the present invention 2;
Figure 3 shows that the another structural drawing of process scheduling device of the embodiment of the present invention 3.
Embodiment
Hereinafter also describe the present invention in detail with reference to accompanying drawing in conjunction with the embodiments.It should be noted that, when not conflicting, the embodiment in the application and the feature in embodiment can combine mutually.
Figure 1 shows that the process scheduling method processing flow chart of the embodiment of the present invention 1, comprise the following steps:
Step 101: preset real-time process priority and the real-time process of different priorities put into corresponding work queue;
Such as: the priority of process A, process B, process C is high, corresponding work queue M; During the priority of process D, process E is, corresponding work queue N; The priority of process F, process G is low, corresponding work queue P.
Step 102: according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjust each real-time process execution sequence in described work queue.
Further, according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, to adjust in described work queue before each real-time process execution sequence, also comprise:
Judge in current C PU, do not have process to be in running status.
Further, according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, the process adjusting each real-time process execution sequence in described work queue is:
According to the real-time process closing time in work queue, real-time process working time, obtain real-time process cut-off excess time;
Obtain each real-time process cut-off sum excess time in described work queue and end sum excess time according to each real-time process in described work queue, and then obtaining accounting excess time of each real-time process;
According to accounting size excess time of each real-time process described, determine the execution sequence in described work queue.
When specific implementation, two relevant informations, i.e. deadline and resttime can be added in the task_struct structure in kernel data structure; Wherein, deadline represents and represents real-time process closing time, resttime real-time process cut-off excess time.
Further, obtain in described work queue each real-time process cut-off excess time sum and according in described work queue each real-time process cut-off excess time sum, and then obtain each real-time process excess time accounting process be:
Accounting excess time of each real-time process=each real-time process cut-off excess time/each real-time process cut-off sum excess time.
Further, according to accounting size excess time of each real-time process described, determine that the process of the execution sequence in described work queue is:
According to accounting descending order excess time of each real-time process, successively described real-time process is placed on from the queue head described work queue to queue tail;
Perform according to being in the real-time process sequence of positions of queue head to queue tail.
Further, adopt enqueue_rt_task function, obtain the maximum real-time process of accounting excess time and described real-time process be placed on the queue head of described work queue.
Further, by list_add function, each real-time process is put into work queue correspondence position.
Further, if work queue is empty, then idle_task process is run.
Figure 2 shows that the process scheduling structure drawing of device of the embodiment of the present invention 2, comprise presetting module 201, procedural sequences adjusting module 202; Wherein, described presetting module 201 is connected with described procedural sequences adjusting module 202;
Described presetting module 201, for arranging real-time process priority and the real-time process of different priorities being put into corresponding work queue and work queue information is sent to described procedural sequences adjusting module 202;
Described procedural sequences adjusting module 202, for according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjusts each real-time process execution sequence in described work queue.
Figure 3 shows that the another structural drawing of process scheduling device of the embodiment of the present invention 3, the basis of Fig. 2 adds judge module 200; Wherein, described judge module 200 is connected with described procedural sequences adjusting module 202;
Described judge module 200, for judging not have process to be in running status in current C PU and judged result being sent to described procedural sequences adjusting module 202.
By following scheme: preset real-time process priority and the real-time process of different priorities put into corresponding work queue; According to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjust each real-time process execution sequence in described work queue; Achieve and real-time process priority is ended excess time with real-time process combine, arrange real-time process execution sequence, greatly improve the execution efficiency of carrying out in real time.
By following scheme: according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, to adjust in described work queue before each real-time process execution sequence, also comprise: judge in current C PU, do not have process to be in running status; Ensure that real-time process execution sequence adjustable strategies performs smoothly, ensure that system data security.
The foregoing is only the preferred embodiments of the present invention, be not limited to the present invention, for a person skilled in the art, the present invention can have various modifications and variations.Within the spirit and principles in the present invention all, any amendment done, equivalent replacement, improvement etc., all should be included within protection scope of the present invention.
Claims (10)
1. a process scheduling method, is characterized in that, comprises the following steps: preset real-time process priority and the real-time process of different priorities put into corresponding work queue;
According to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjust each real-time process execution sequence in described work queue.
2. process scheduling method according to claim 1, is characterized in that, according to the real-time process closing time in work queue, real-time process working time, obtains real-time process cut-off excess time;
Obtain each real-time process cut-off sum excess time in described work queue and end sum excess time according to each real-time process in described work queue, and then obtaining accounting excess time of each real-time process;
According to accounting size excess time of each real-time process described, determine the execution sequence in described work queue.
3. process scheduling method according to claim 2, it is characterized in that, obtain in described work queue each real-time process cut-off excess time sum and according in described work queue each real-time process cut-off excess time sum, and then obtain each real-time process excess time accounting process be:
Accounting excess time of each real-time process=each real-time process cut-off excess time/each real-time process cut-off sum excess time.
4. process scheduling method according to claim 2, is characterized in that, according to accounting size excess time of each real-time process described, determines that the process of the execution sequence in described work queue is:
According to accounting descending order excess time of each real-time process, successively described real-time process is placed on from the queue head described work queue to queue tail;
Perform according to being in the real-time process sequence of positions of queue head to queue tail.
5. process scheduling method according to claim 2, is characterized in that, adopts enqueue_rt_task function, obtains the maximum real-time process of accounting excess time and described real-time process is placed on the queue head of described work queue.
6. process scheduling method according to claim 2, is characterized in that, by list_add function, each real-time process is put into work queue correspondence position.
7. process scheduling method according to claim 2, is characterized in that, if work queue is empty, then runs idle_task process.
8. process scheduling method according to claim 1, it is characterized in that, according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, to adjust in described work queue before each real-time process execution sequence, also comprise:
Judge in current C PU, do not have process to be in running status.
9. a process scheduling device, is characterized in that, comprising: presetting module, procedural sequences adjusting module; Wherein, described presetting module is connected with described procedural sequences adjusting module;
Described presetting module, for arranging real-time process priority and the real-time process of different priorities being put into corresponding work queue and work queue information is sent to described procedural sequences adjusting module;
Described procedural sequences adjusting module, for according to the real-time process closing time in described work queue, real-time process working time, according to default procedural sequences adjustable strategies, adjusts each real-time process execution sequence in described work queue.
10. process scheduling device according to claim 9, is characterized in that, also comprise judge module; Wherein, described judge module is connected with described procedural sequences adjusting module;
Described judge module, for judging not have process to be in running status in current C PU and judged result being sent to described procedural sequences adjusting module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510358596.7A CN104991816A (en) | 2015-06-25 | 2015-06-25 | Process scheduling method and apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510358596.7A CN104991816A (en) | 2015-06-25 | 2015-06-25 | Process scheduling method and apparatus |
Publications (1)
Publication Number | Publication Date |
---|---|
CN104991816A true CN104991816A (en) | 2015-10-21 |
Family
ID=54303632
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510358596.7A Pending CN104991816A (en) | 2015-06-25 | 2015-06-25 | Process scheduling method and apparatus |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104991816A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105204938A (en) * | 2015-11-02 | 2015-12-30 | 重庆大学 | Data-intensive process scheduling method of memory access |
CN106250219A (en) * | 2016-07-27 | 2016-12-21 | 南京国电南自美卓控制系统有限公司 | The protecting platform Optimization Scheduling of degree of allowing technology when surveying based on intellectuality |
CN106293918A (en) * | 2016-08-11 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | A kind of dispatch the method for process, system and computer |
CN106708618A (en) * | 2017-01-20 | 2017-05-24 | 郑州云海信息技术有限公司 | Process scheduling method and device |
CN107423123A (en) * | 2017-07-25 | 2017-12-01 | 广东欧珀移动通信有限公司 | Method for scheduling task, device, storage medium and electronic equipment |
CN107480013A (en) * | 2017-08-11 | 2017-12-15 | 网宿科技股份有限公司 | A kind of method and apparatus of calculation procedure redundancy |
CN108563494A (en) * | 2018-04-04 | 2018-09-21 | 吉林省星途科技有限公司 | A kind of thread scheduling system and method for adaptive dynamic adjustment |
WO2019006938A1 (en) * | 2017-07-03 | 2019-01-10 | 深圳市沃特沃德股份有限公司 | Vehicle-mounted control system and data processing method therefor |
WO2019024640A1 (en) * | 2017-07-31 | 2019-02-07 | Oppo广东移动通信有限公司 | Process control method, apparatus, storage medium, and electronic device |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1356639A (en) * | 2000-09-28 | 2002-07-03 | 松下电器产业株式会社 | Providing QoS for disk I/O sub-system with both expiration date and priority |
CN103685053A (en) * | 2013-11-26 | 2014-03-26 | 北京航空航天大学 | Network processor load balancing and scheduling method based on residual task processing time compensation |
CN103870327A (en) * | 2012-12-18 | 2014-06-18 | 华为技术有限公司 | Real-time multitask scheduling method and device |
-
2015
- 2015-06-25 CN CN201510358596.7A patent/CN104991816A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1356639A (en) * | 2000-09-28 | 2002-07-03 | 松下电器产业株式会社 | Providing QoS for disk I/O sub-system with both expiration date and priority |
CN103870327A (en) * | 2012-12-18 | 2014-06-18 | 华为技术有限公司 | Real-time multitask scheduling method and device |
CN103685053A (en) * | 2013-11-26 | 2014-03-26 | 北京航空航天大学 | Network processor load balancing and scheduling method based on residual task processing time compensation |
Non-Patent Citations (1)
Title |
---|
陈磊: "嵌入式实时操作系统ARTs_OS的EDF调度算法改进", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105204938A (en) * | 2015-11-02 | 2015-12-30 | 重庆大学 | Data-intensive process scheduling method of memory access |
CN105204938B (en) * | 2015-11-02 | 2019-01-11 | 重庆大学 | A kind of data-intensive process scheduling method of internal storage access |
CN106250219A (en) * | 2016-07-27 | 2016-12-21 | 南京国电南自美卓控制系统有限公司 | The protecting platform Optimization Scheduling of degree of allowing technology when surveying based on intellectuality |
CN106250219B (en) * | 2016-07-27 | 2019-04-30 | 南京国电南自维美德自动化有限公司 | Based on the intelligent protecting platform Optimization Scheduling for surveying Shi Rangdu technology |
CN106293918A (en) * | 2016-08-11 | 2017-01-04 | 浪潮(北京)电子信息产业有限公司 | A kind of dispatch the method for process, system and computer |
CN106708618A (en) * | 2017-01-20 | 2017-05-24 | 郑州云海信息技术有限公司 | Process scheduling method and device |
WO2019006938A1 (en) * | 2017-07-03 | 2019-01-10 | 深圳市沃特沃德股份有限公司 | Vehicle-mounted control system and data processing method therefor |
CN107423123A (en) * | 2017-07-25 | 2017-12-01 | 广东欧珀移动通信有限公司 | Method for scheduling task, device, storage medium and electronic equipment |
WO2019024640A1 (en) * | 2017-07-31 | 2019-02-07 | Oppo广东移动通信有限公司 | Process control method, apparatus, storage medium, and electronic device |
CN107480013A (en) * | 2017-08-11 | 2017-12-15 | 网宿科技股份有限公司 | A kind of method and apparatus of calculation procedure redundancy |
CN107480013B (en) * | 2017-08-11 | 2020-12-29 | 网宿科技股份有限公司 | Method and device for calculating process redundancy |
CN108563494A (en) * | 2018-04-04 | 2018-09-21 | 吉林省星途科技有限公司 | A kind of thread scheduling system and method for adaptive dynamic adjustment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN104991816A (en) | 2015-10-21 | Process scheduling method and apparatus |
CN105814543B (en) | 2020-03-03 | Power balancing for increased load density and improved energy efficiency |
CN105320571A (en) | 2016-02-10 | Process scheduling method |
CN105786605A (en) | 2016-07-20 | Task management method and system in robot |
CN103873587B (en) | 2017-12-22 | A kind of method and device that scheduling is realized based on cloud platform |
CN111240935B (en) | 2024-03-15 | Automatic intelligent operation and maintenance system and operation and maintenance method |
CN104794005A (en) | 2015-07-22 | Method and device for optimizing CPU running frequencies |
CN103179048A (en) | 2013-06-26 | Method and system for changing main machine quality of service (QoS) strategies of cloud data center |
CN112904811A (en) | 2021-06-04 | Multi-device cooperative operation system and method based on digital twin technology |
CN113032152A (en) | 2021-06-25 | Scheduling method, scheduling apparatus, electronic device, storage medium, and program product for deep learning framework |
US20180329750A1 (en) | 2018-11-15 | Resource management method and system, and computer storage medium |
CN108268012B (en) | 2021-01-01 | A Machine Tool System Transformation Method for Parameterized Driven Production |
CN104239130B (en) | 2020-09-11 | Control method and terminal for responding to operation instruction by human-computer interaction interface |
CN105242917A (en) | 2016-01-13 | Method and apparatus for Android device to use WiFi module compatibly |
CN111580949A (en) | 2020-08-25 | Automatic network packet receiving mode adjusting method |
CN110708197A (en) | 2020-01-17 | Monitoring device, method for setting monitoring policy of monitoring device, and storage medium |
CN111240864A (en) | 2020-06-05 | Asynchronous task processing method, device, equipment and computer readable storage medium |
CN112083932A (en) | 2020-12-15 | Function warm-up system and method on virtualized network device |
CN103440159B (en) | 2017-04-19 | Method and system for scheduling processes |
CN105407059A (en) | 2016-03-16 | QoS scheduler and scheduling method for SCSI target device |
CN112462644A (en) | 2021-03-09 | Information control cabinet, control method and device |
Ramanathan et al. | 2015 | MC-Fluid: rate assignment strategies |
CN107122285A (en) | 2017-09-01 | A kind of multithread process control Dynamic Announce and intelligence change System and method for |
CN107220113A (en) | 2017-09-29 | Based on parallel adaptive decision-making efficiency optimization method |
AU2023285822A1 (en) | 2024-07-18 | Method, electronic device, and storage media for task scheduling |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
2015-10-21 | C06 | Publication | |
2015-10-21 | PB01 | Publication | |
2015-11-18 | C10 | Entry into substantive examination | |
2015-11-18 | SE01 | Entry into force of request for substantive examination | |
2019-10-15 | RJ01 | Rejection of invention patent application after publication | |
2019-10-15 | RJ01 | Rejection of invention patent application after publication |
Application publication date: 20151021 |