CN103019857A - Multi-task priority scheduling method for attendance machine of internet of things - Google Patents

Multi-task priority scheduling method for attendance machine of internet of things Download PDF

Info

Publication number
CN103019857A
CN103019857A CN2012104856623A CN201210485662A CN103019857A CN 103019857 A CN103019857 A CN 103019857A CN 2012104856623 A CN2012104856623 A CN 2012104856623A CN 201210485662 A CN201210485662 A CN 201210485662A CN 103019857 A CN103019857 A CN 103019857A
Authority
CN
China
Prior art keywords
task
priority
new
importance
fifo
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
CN2012104856623A
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 of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN2012104856623A priority Critical patent/CN103019857A/en
Publication of CN103019857A publication Critical patent/CN103019857A/en
Pending legal-status Critical Current

Links

Abstract

The invention relates to a multi-task priority scheduling method for an attendance machine of the internet of things. The method comprises the following steps: setting Priority as a task importance factor for each task of the attendance machine, wherein Urgency represents emergency; when a new task arrives, judging whether the sum of the central processing unit (CPU) total occupation ratio of the new task and the original multiple tasks exceeds the upper bound by 1.0 by using a task admittance control module; if the sum of the CPU total occupation ratio of the new task and the original multiple tasks does not exceed the upper bound by 1.0, admitting the work; if the sum of the CPU total occupation ratio of the new task and the original multiple tasks exceeds the upper bound by 1.0, comparing the importance priority of the task with the highest priority between the new task and the original multiple tasks of the system; if the importance priority of the new task is low, refusing the new task; if the importance priority of the new task is high, removing the task at the tail of Priority_first in first out (FIFO) queue and supplementing a new task; and realizing task scheduling. The invention provides the multi-task priority scheduling method for the attendance machine of the internet of things, which takes importance and urgency into consideration and has high scheduling efficiency.

Description

The multitask priority dispatching method of Internet of Things attendance recorder
Technical field
The present invention relates to the attendance recorder field, especially a kind of multi-task scheduling method of Internet of Things attendance recorder.
Background technology
Linux follows POSIX.1003.1b real-time extension standard, has realized the concept of real-time process, supports SCHED_FIFO and two kinds of Real-Time Scheduling Polices of SCHED_RR.Do not consider the execution time of task but SCHED_FIFO is tactful just simply according to the principle scheduler task of serving first first, so that promptly the type task can't preferentially be carried out, thereby miss its execution time, cause operation result to be made mistakes or service quality decline.The SCHED_RR strategy has embodied the thought of resource sharing, and it can guarantee that each real-time task obtains impartial execution chance, but same owing to do not consider the execution time of task, thereby causes urgent type task not finish on schedule.When system overloaded, this strategy was incited somebody to action so that most of execution time of task can't be met.This shows that linux kernel can not provide the efficient scheduling support for real-time task.
For attendance recorder, there is following subject matter in present priority dispatching method:
(1) can not directly will be mapped on the priority of scheduling in the constraint condition aspect other importance for task, fairly simple and unilateral for definite priority institute accepted standard in the existing algorithm of realizing, only determine priority with the cycle of task such as the RM algorithm, the EDF algorithm is only determined priority with the execution time of task;
(2) not necessarily hot job of vital task, and hot job vital task not necessarily, and the realization of present priority scheduling algorithm generally with these two task attributes separately, thereby cause easily the execution performance of vital task to be guaranteed, as determining according to task execution time in the dispatching algorithm of priority; Or cause easily the execution time of urgent type task not to be satisfied, as determining according to build-in attributes such as cycles in the dispatching algorithm of priority that the task of importance cannot be carried out;
(3) not refer to allow task more early carry out better for " in real time " in the real-time task, and refer to that the time limit that only need satisfy task gets final product.
Summary of the invention
For overcome existing attendance recorder priority scheduling mode merely by cycle or Time dependent priority, deficiency that dispatching efficiency is lower, the invention provides a kind of multitask priority dispatching method of having considered importance and emergency, Internet of Things attendance recorder that dispatching efficiency is higher.
The technical solution adopted for the present invention to solve the technical problems is:
A kind of multitask priority dispatching method of Internet of Things attendance recorder, for each task of attendance recorder, setting Prioriy is the task significance factor, the significance level of reflection task in finishing determined by the user; Urgency represents emergency, is dynamically determined by task execution time; If task A has the priority higher than task B, if satisfy one of following condition:
(1) little than task B of the Priority of task A;
(2) task A has identical Priority with task B, but the former Urgency is less;
When new task arrived, task access control module judged that at first whether the total occupancy sum of the CPU of the original multitask of new task and system surpasses the upper bound 1.0, if be no more than, then admits this work; Otherwise relatively the importance priority of the task of Prioriy maximum in new task and the original multitask of system if the importance priority of new task is lower, is then refused it, otherwise is removed the task of Prioriy_FIFO tail of the queue, replenishes upper new task; Realize task scheduling.
Further, two task management formations are set, Prioriy_FIFO and Urgency_FIFO, Prioriy_FIFO task queue medium priority is determined by importance factor, Urgency_FIFO task queue medium priority is determined that by the execution time each task in the system is present in these two formations simultaneously.
Beneficial effect of the present invention is mainly manifested in: the priority of (1) task is not merely to be determined by cycle or execution time, but considered importance and these two basic real-time task features of emergency of task, comprehensively determine the priority orders of task;
(2) under light condition, the SABPU dispatching algorithm not only can guarantee the execution of vital task, and execution that can the urgent type task of As soon as possible Promising Policy;
(3) under overload condition, the SABPU algorithm will guarantee that the importance task carries out smoothly;
(4) if the arrival of new task so that system overload, and this task has higher significant, can't directly refuse so this task, but removes the task lower than its importance, until admit or refuse it;
(5) under the prerequisite that guarantees the vital task execution performance, carry out task as much as possible, make the system resource utilization maximization.
Embodiment
Below the invention will be further described.
A kind of multitask priority dispatching method of Internet of Things attendance recorder, the dispatching priority of task are not merely to be decided by duty cycle or task execution time, but come collaborative the decision by importance (Priority) and emergency (Urgency).Wherein, Prioriy represents the task significance factor, and it does not represent duty cycle equal time attribute, but the significance level of reflection task in finishing determined by the user; Urgency represents emergency, is dynamically determined by task execution time.We claim task A to have the priority higher than task B, if satisfy one of following condition:
(1) little than task B of the Priority of task A, the less expression priority of Priority value is higher here, and task is more important to the user;
(2) task A has identical Priority with task B, but the former Urgency is less, and namely task is more urgent.
Two task management formations are set, Prioriy_FIFO and Urgency_FIFO in the SABPU algorithm.Prioriy_FIFO task queue medium priority is determined that by importance factor the less expression task of this factor is more important, and priority is higher; Urgency_FIFO task queue medium priority is determined that by the execution time execution time, less expression task was more urgent, and priority is higher.
Most crucial in the SABPU algorithm is the ability with each task priority in the dynamic adjustment task queue.The SABPU algorithm mainly comprises two parts: task admission control mechanism and on-line scheduling device.Wherein, access control does not design for the execution of original vital task in the assurance system is not affected by new task, when having new task to arrive, access control will according to importance and the emergency of current system CPU usage and new task, determine to admit or refuse this task to enter system.The on-line scheduling device is the ability with task priority on-line scheduling.Each task in the system is present in these two formations simultaneously.When new task arrives, the task access control of SABPU algorithm judges at first whether the total occupancy of CPU of the original multitask of new work and system surpasses the upper bound 1.0, if be no more than, then admit this work, and it is added in Prioriy_FIFO and these two formations of Urgency_FIFO simultaneously.Otherwise, the importance priority of comparison new task and Prioriy_FIFO tail of the queue task, the minimum task of new task and system's medium priority that is about to compares, if the importance priority of new task is lower, then refuse it, otherwise remove the task of Prioriy_FIFO tail of the queue, replenish upper new task; Upgrade simultaneously the task priority in the Urgency_FIFO formation, and then judge whether total CPU usage of residue task in new task and the system overloads, and iterates, until accept or refuse this task.
The CPU usage here is like this definition, for periodic task:
Figure GDA0000245436921
For the aperiodicity task:
Figure GDA0000245436922
Task attribute definition: task (duty cycle/s, maximum execution time/s, execution time/s, importance factor).
In the multi-task scheduling of Internet of Things attendance recorder built-in Linux operating system, specific descriptions and the step of dispatching algorithm are as follows:
1, as follows to Internet of Things attendance checking system mission requirements:
(1) all tasks, comprise the cycle and non-periodic real-time task have hard time limit requirement, namely must the regulation time limit in finish;
(2) for periodic duty, the execution time of task is less than the cycle of task;
(3) mutually oppose between the task, the request of each task does not rely on the beginning of other task requests or finishes;
(4) for periodic duty, remain unchanged the working time of each task, and be finger processor in without the interruption situation for the treatment of the time of this task the working time here;
The time of (5) interrupting processing, scheduling and task switching ignores;
2, multitask kind and the attribute of Internet of Things attendance checking system have:
Upstream data has:
Aperiodicity task 1:CPU uploads attendance record flowing water packet (0,60S, 5S, 2), and CPU usage is 8.3%
Aperiodicity task 2:CPU uploads attendance recorder on-line parameter packet (0,7200S, 3S, 2), and CPU usage is 0.041%
Aperiodicity task 3:CPU uploads attendance recorder machine parameter packet (0,7200S, 5S, 3), and CPU usage is 0.069%
Periodic task 4:CPU uploads the attendance recorder heartbeat and keeps packet (2.5S, 2S, 0.5S, 1), and CPU usage is 20%
Periodic task 5: attendance recorder CPU is to outside liquid crystal display and Refresh Data (1S, 0.5S, 0.2S, 1), and CPU usage is 20%
Periodic task 6: attendance recorder CPU external connection keyboard scanner uni operation (1S, 0.5S, 0.2S, 1), CPU usage is 20%
Aperiodicity task 7: attendance recorder CPU is to the storage of FLASH data and read (0,5S, 1S, 1), and CPU usage is 20%
Periodic task 8: attendance recorder CPU outsourcing real-time clock reads (5S, 2S, 1S, 1), and CPU usage is 20%
Downlink data has:
Aperiodicity task 9:CPU receives the descending work attendance regular data bag (0,60S, 5S, 1) of arranging an order according to class and grade, and CPU usage is 8.3%
Aperiodicity task 10:CPU receives descending attendance recorder blacklist packet (0,60S, 4S, 1), and CPU usage is 6.7%
Aperiodicity task 11:CPU receives descending attendance recorder white list packet (0,60S, 4S, 2), and CPU usage is 6.7%
Pass more new data packets (0,7200S, 5S, 3) of parameter under the aperiodicity task 12:M2M platform, CPU usage is 0.069%
Pass firmware upgrade packet (0,43200S, 100S, 4) under the aperiodicity task 13:M2M platform, CPU usage is 0.023%
3, five kinds of typical scheduling mechanism processes are as follows:
If the task queue of 1 a certain period Internet of Things attendance recorder is arranged as 4-5-6-7-10-11 according to priority orders, this moment, total CPU usage was 93.4%, did not reach the upper limit of CPU usage; When new task 9 arrives, importance factor by task 9 and task 11 compares, the important ratio task 11 of finding new task 9 is important, use task 9 replacement tasks 11 this moment, ask for simultaneously the total CPU usage of task in the new task priority, be calculated as 95.0%, do not reach the upper limit, so accept new task and be aligned in the last priority, new task priority is arranged as 4-5-6-7-10-9
If the task queue of 2 a certain period Internet of Things attendance recorders is arranged as 4-5-6-7-10-11 according to priority orders, this moment, total CPU usage was 93.4%, did not reach the upper limit of CPU usage; When new task 8 arrives, importance factor by task 8 and task 11 compares, the important ratio task 11 of finding new task 8 is important, use task 8 replacement tasks 11 this moment, ask for simultaneously the total CPU usage of task in the new task priority, find to have reached the upper limit, so do not accept new task, it still is 4-5-6-7-10-11 that task priority is arranged
If the task queue of 3 a certain period Internet of Things attendance recorders is arranged as 4-5-6-7-10-11 according to priority orders, this moment, total CPU usage was 93.4%, did not reach the upper limit of CPU usage; When new task 12 arrived, the importance factor by task 12 and task 11 was relatively found the importance of new task 12 less than task 11, does not accept new task this moment, and it still is 4-5-6-7-10-11 that task priority is arranged
If the task queue of 4 a certain period Internet of Things attendance recorders is arranged as 4-5-6-7-10-11 according to priority orders, this moment, total CPU usage was 93.4%, did not reach the upper limit of CPU usage; When new task 1 arrives, importance factor by task 1 and task 11 compares, the importance and mission 11 of finding new task 1 is of equal importance, ask for simultaneously the total CPU usage of task in the new task priority, find that the total occupation rate of CPU rises, so do not accept new task, it still is 4-5-6-7-10-11 that task priority is arranged
If the task queue of 5 a certain period Internet of Things attendance recorders is arranged as 4-5-6-7-10-11 according to priority orders, this moment, total CPU usage was 93.4%, did not reach the upper limit of CPU usage; When new task 2 arrives, importance factor by task 2 and task 11 compares, the importance and mission 11 of finding new task 2 is of equal importance, ask for simultaneously the total CPU usage of each task in the new task priority, find that the total occupation rate of CPU descends, so accept new task, it still is 4-5-6-7-10-2 that task priority is arranged.

Claims (2)

1. the multitask priority dispatching method of an Internet of Things attendance recorder is characterized in that: for each task of attendance recorder, setting Prioriy is the task significance factor, and the significance level of reflection task in finishing determined by the user; Urgency represents emergency, is dynamically determined by task execution time; If task A has the priority higher than task B, if satisfy one of following condition:
(1) little than task B of the Priority of task A;
(2) task A has identical Priority with task B, but the former Urgency is less;
When new task arrived, task access control module judged that at first whether the total occupancy sum of the CPU of the original multitask of new task and system surpasses upper bound 1.O, if be no more than, then admits this work; Otherwise relatively the importance priority of the task of Prioriy maximum in new task and the original multitask of system if the importance priority of new task is lower, is then refused it, otherwise is removed the task of Prioriy_FIFO tail of the queue, replenishes upper new task; Realize task scheduling.
2. the multitask priority dispatching method of networking attendance recorder as claimed in claim 1, it is characterized in that: two task management formations are set, Prioriy_FIFO and Urgency_FIFO, Prioriy_FIFO task queue medium priority is determined by importance factor, Urgency_FIFO task queue medium priority is determined that by the execution time each task in the system is present in these two formations simultaneously.
CN2012104856623A 2012-11-23 2012-11-23 Multi-task priority scheduling method for attendance machine of internet of things Pending CN103019857A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012104856623A CN103019857A (en) 2012-11-23 2012-11-23 Multi-task priority scheduling method for attendance machine of internet of things

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012104856623A CN103019857A (en) 2012-11-23 2012-11-23 Multi-task priority scheduling method for attendance machine of internet of things

Publications (1)

Publication Number Publication Date
CN103019857A true CN103019857A (en) 2013-04-03

Family

ID=47968487

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012104856623A Pending CN103019857A (en) 2012-11-23 2012-11-23 Multi-task priority scheduling method for attendance machine of internet of things

Country Status (1)

Country Link
CN (1) CN103019857A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365711A (en) * 2013-07-03 2013-10-23 南京邮电大学 Task scheduling mechanism and method applied to business platform of internet of Things
CN108427602A (en) * 2017-02-14 2018-08-21 全球能源互联网研究院 A kind of coordinated dispatching method and device of distributed computing task
CN112328386A (en) * 2021-01-05 2021-02-05 北京国科环宇科技股份有限公司 Operating system process scheduling method, device, medium and electronic equipment
CN114090208A (en) * 2021-11-22 2022-02-25 南方电网电力科技股份有限公司 Task scheduling method and device for electric energy meter operating system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509671B1 (en) * 2001-06-20 2009-03-24 Microstrategy Incorporated Systems and methods for assigning priority to jobs in a reporting system
CN101694631A (en) * 2009-09-30 2010-04-14 曙光信息产业(北京)有限公司 Real-time operation dispatching system and method thereof
CN102033782A (en) * 2009-09-30 2011-04-27 英业达集团(天津)电子技术有限公司 Scheduling method for dynamically adjusting priority value of process

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7509671B1 (en) * 2001-06-20 2009-03-24 Microstrategy Incorporated Systems and methods for assigning priority to jobs in a reporting system
CN101694631A (en) * 2009-09-30 2010-04-14 曙光信息产业(北京)有限公司 Real-time operation dispatching system and method thereof
CN102033782A (en) * 2009-09-30 2011-04-27 英业达集团(天津)电子技术有限公司 Scheduling method for dynamically adjusting priority value of process

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
巴巍: "实时系统动态优先级任务调度算法的研究", 《中国优秀博士学位论文全文数据库(信息科技辑)》 *
谭朋柳等: "用于开放式系统的二维优先级实时调度", 《电子学报》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103365711A (en) * 2013-07-03 2013-10-23 南京邮电大学 Task scheduling mechanism and method applied to business platform of internet of Things
CN103365711B (en) * 2013-07-03 2017-06-30 南京邮电大学 It is applied to the task scheduling system and method for internet of things service platform
CN108427602A (en) * 2017-02-14 2018-08-21 全球能源互联网研究院 A kind of coordinated dispatching method and device of distributed computing task
CN108427602B (en) * 2017-02-14 2021-10-29 全球能源互联网研究院有限公司 Distributed computing task cooperative scheduling method and device
CN112328386A (en) * 2021-01-05 2021-02-05 北京国科环宇科技股份有限公司 Operating system process scheduling method, device, medium and electronic equipment
CN114090208A (en) * 2021-11-22 2022-02-25 南方电网电力科技股份有限公司 Task scheduling method and device for electric energy meter operating system
CN114090208B (en) * 2021-11-22 2023-10-13 南方电网电力科技股份有限公司 Task scheduling method and device for electric energy meter operating system

Similar Documents

Publication Publication Date Title
US11720403B2 (en) System for commitment-aware workload scheduling based on anticipated resource consumption levels
Baccarelli et al. Energy-efficient dynamic traffic offloading and reconfiguration of networked data centers for big data stream mobile computing: review, challenges, and a case study
US10445850B2 (en) Technologies for offloading network packet processing to a GPU
US10541939B2 (en) Systems and methods for provision of a guaranteed batch
US20160378570A1 (en) Techniques for Offloading Computational Tasks between Nodes
CN106445675B (en) B2B platform distributed application scheduling and resource allocation method
WO2023011157A1 (en) Service processing method and apparatus, server, storage medium, and computer program product
CN111767134A (en) Multitask dynamic resource scheduling method
Sun et al. Rose: Cluster resource scheduling via speculative over-subscription
US20230229495A1 (en) Task scheduling method and apparatus
US20130061233A1 (en) Efficient method for the scheduling of work loads in a multi-core computing environment
El Khoury et al. Energy-aware placement and scheduling of network traffic flows with deadlines on virtual network functions
CN103019857A (en) Multi-task priority scheduling method for attendance machine of internet of things
US20180329750A1 (en) Resource management method and system, and computer storage medium
CN111026519A (en) Distributed task priority scheduling method and system and storage medium
US20220342719A1 (en) Autonomous virtual radio access network control
Xu et al. Prophet: Scheduling executors with time-varying resource demands on data-parallel computation frameworks
Singh et al. A comparative study of various scheduling algorithms in cloud computing
CN112817726A (en) Virtual machine grouping resource scheduling method based on priority under cloud environment
Sharma et al. A credits based scheduling algorithm with K-means clustering
Kettimuthu et al. Differentiated scheduling of response-critical and best-effort wide-area data transfers
Atiewi et al. A power saver scheduling algorithm using DVFS and DNS techniques in cloud computing data centres
Kundan et al. Priority-aware scheduling under shared-resource contention on chip multicore processors
Lu et al. Graduated QoS by decomposing bursts: Don't let the tail wag your server
Naik A deadline-based elastic approach for balanced task scheduling in computing cloud environment

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

Application publication date: 20130403