CN104991816A - Process scheduling method and apparatus - Google Patents

Process scheduling method and apparatus Download PDF

Info

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
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
CN201510358596.7A
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.)
Inspur Beijing Electronic Information Industry Co Ltd
Original Assignee
Inspur Beijing Electronic Information Industry Co Ltd
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 Inspur Beijing Electronic Information Industry Co Ltd filed Critical Inspur Beijing Electronic Information Industry Co Ltd
Priority to CN201510358596.7A priority Critical patent/CN104991816A/en
Publication of CN104991816A publication Critical patent/CN104991816A/en
Pending legal-status Critical Current

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

A kind of process scheduling method and device
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.
CN201510358596.7A 2015-06-25 2015-06-25 Process scheduling method and apparatus Pending CN104991816A (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

Patent Citations (3)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
Title
陈磊: "嵌入式实时操作系统ARTs_OS的EDF调度算法改进", 《中国优秀硕士学位论文全文数据库信息科技辑》 *

Cited By (12)

* Cited by examiner, † Cited by third party
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) Process scheduling method and apparatus
CN105814543B (en) Power balancing for increased load density and improved energy efficiency
CN105320571A (en) Process scheduling method
CN105786605A (en) Task management method and system in robot
US10467054B2 (en) Resource management method and system, and computer storage medium
CN108268012B (en) Machine tool system transformation method for parametric drive production
CN104794005A (en) Method and device for optimizing CPU running frequencies
CN111240935B (en) Automatic intelligent operation and maintenance system and operation and maintenance method
CN113032152A (en) Scheduling method, scheduling apparatus, electronic device, storage medium, and program product for deep learning framework
CN104239130B (en) Control method and terminal for responding to operation instruction by human-computer interaction interface
CN108806679A (en) voice awakening method and device
CN110708197B (en) Monitoring device, method for setting monitoring policy of monitoring device, and storage medium
CN111580949A (en) Automatic network packet receiving mode adjusting method
CN106897147A (en) A kind of application container engine container resource regulating method and device
CN105094945A (en) Method, equipment and system for virtualization platform thread control
CN107122285A (en) A kind of multithread process control Dynamic Announce and intelligence change System and method for
CN107908463B (en) Task decomposition and parallel processing method
Ramanathan et al. MC-Fluid: rate assignment strategies
CN107341060B (en) Virtual machine memory allocation method and device
CN107291143B (en) Electrical equipment progress control method and system
CN107809323B (en) Resource control method, device and system
CN112838592B (en) Load-source coordinated day-ahead scheduling method, device and system
CN202956785U (en) Production plan execution and control system
CN112462644A (en) Information control cabinet, control method and device
CN105302280A (en) Power consumption optimization system and method

Legal Events

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

Application publication date: 20151021