CN103885825A - Real-time speed monotony scheduling method based on dynamic time slices - Google Patents
Real-time speed monotony scheduling method based on dynamic time slices Download PDFInfo
- Publication number
- CN103885825A CN103885825A CN201410079766.3A CN201410079766A CN103885825A CN 103885825 A CN103885825 A CN 103885825A CN 201410079766 A CN201410079766 A CN 201410079766A CN 103885825 A CN103885825 A CN 103885825A
- Authority
- CN
- China
- Prior art keywords
- task
- time
- queue
- real
- timeslice
- 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.)
- Granted
Links
Images
Landscapes
- Mobile Radio Communication Systems (AREA)
Abstract
The invention provides a real-time speed monotony scheduling method based on dynamic time slices. The method includes the steps that a plurality of isolated ready queues are firstly set through a system of the method, and real-time tasks are allocated to the queues at different levels according to different priorities; all the queues enter a processor in sequence according to the levels, the task initial time slice is set to be short for the queues with the high priorities, and the task initial time slice is set to be long for the queues with the low priorities; the first task time slices are the initial time slices, the relation between the initial time slice T of each queue and the high priority P is as follow: T=kP (k is a constant), and the time slices of all the remaining tasks in the queues are adjusted dynamically. If the operating time of a certain real-time task in one queue exceeds allocated operating time, if the real-time task continues to operate, delay of the whole queue is possibly caused, so that the task is discarded, and ID of the task is recorded; the system can be suitable for wireless services of different types by adjusting the parameter k, and has certain flexibility.
Description
Technical field
The present invention relates to Computer Wireless Communication technical field, particularly the dull real-time scheduling method of a kind of speed based on dynamic time sheet.
Background technology
Along with the raising of urban planning and construction level and the sharp increase of urban population quantity, the quantity of high level and high-rise building is more and more, and this has higher requirement to home intelligence.As the part in home intelligence industrial chain---intelligent meter data recording system has also obtained flourish simultaneously.Wireless kilowatt meter reading-out system is as the instrument of serving combustion gas, electric power, water supply industry, and its appearance has greatly reduced meter reading personnel's labor capacity, has improved enterprise efficiency, and has brought convenience to resident family.The shortcomings such as but the data re-transmission that traditional wireless kilowatt meter reading-out system exists often, real-time is poor, transfer efficiency is low, if real-time scheduling method is applied in wireless kilowatt meter reading-out system, can improve above-mentioned shortcoming.
Real-time scheduling method is the core of real time operating system, and classical real-time scheduling method mainly contains the earliest two kinds of the dull priority scheduling methods of the closing time mode of priority and speed.
Rate monotonic dispatching method is a kind of typical static priority scheduling method, and it decides dispatching priority according to the length in tasks carrying cycle, and the performance period, little task had higher priority.This scheduling mode is mainly applicable to periodic task, for sudden task, cannot pre-estimate the execution time, thereby can cause the execution efficiency of system very low
Closing time, priority scheduling method was a kind of typical dynamic priority scheduling method the earliest, and it distributes priority according to the deadline of each task in ready queue, and the task priority with nearest deadline is the highest.Once major defect is that instantaneous task overload occurs, system action is unpredictable, and dominoes phenomenon may occur, and a task can cause while loss that a series of task loses in succession.And the present invention can solve problem above well.
Summary of the invention
The object of the invention is the deficiency of applying in Wireless Data Transmission for most of real-time scheduling methods, a kind of novel real-time scheduling method of taking into account response time and transfer rate has been proposed, the method is on the basis of preemptive priority method, combine the advantage of rate monotonic dispatching method and round-robin method, the method is regarded each transmission node as real-time task, the ready queue of multiple isolation is set, task is assigned in the queue of several different stages, each queue, according to different priority, enters processor successively.In task queue, the timeslice of each task is dynamically adjusted according to signal to noise ratio (S/N ratio).
The present invention solves the technical scheme that its technical matters takes: the invention provides the dull real-time scheduling method of a kind of speed based on dynamic time sheet, the method comprises the steps:
Step 1: the ready queue of multiple isolation is set, according to different priority, real-time task is assigned in the queue of several different stages;
Step 2: each queue successively enters processor according to rank, the queue of high priority, it is shorter that the initial time sheet of task arranges, the queue of low priority, it is longer that the initial time sheet of task arranges;
Step 3: first, sheet was initial time sheet task time, and the pass of the initial time sheet T of each queue and the priority P of this sequence is T=kP, and wherein k is constant; In queue, the timeslice of remaining each task is dynamically adjusted; If in timeslice, previous task completes, and the timeslice of task is next reduced to 0.05s, by that analogy, gradually reduces; Once cannot complete in timeslice if run into certain task, arranging of timeslice starts each 0.05s of increase, by that analogy, gradually reduces; Once cannot complete in timeslice if run into certain task, arranging of timeslice starts each 0.05s of increase, until task can complete;
Step 4: if certain the real-time task operation in queue exceedes distribute working time, go down if continue operation, likely cause the time delay of whole queue, abandon this task, and record its ID;
Step 5: after all queues are all finished, carry out successively according to the ID of record carrying out failed task.
Beneficial effect:
1, the present invention has realized real-time scheduling method has been applied in wireless kilowatt meter reading-out system.
2, task priority of the present invention can dynamically change as required, has solved better system flexibility problem.
Accompanying drawing explanation
Fig. 1 is the inventive method process flow diagram.
Fig. 2 is that timeslice of the present invention dynamically arranges schematic diagram.
Fig. 3 is the system schematic of the embodiment of the present invention.
Fig. 4 is the clock circuit schematic diagram of the embodiment of the present invention.
Fig. 5 is the reset circuit schematic diagram of the embodiment of the present invention.
Fig. 6 is the JTAG debug circuit schematic diagram of the embodiment of the present invention.
Embodiment
Below in conjunction with Figure of description, the invention is described in further detail.
As shown in Figures 3 to 6, plateform system framework of the present invention is to adopt μ C/OS-II kernel, this kernel is increased income, preemptive type, its task scheduling that has comprised operating system, task management, time management, memory management, time control and task communication with the basic characteristic such as synchronize.Its preemptive priority strategy, can guarantee the real-time of system.In μ C/OS-II kernel, need to transplant os_cpu.h, os_cpu_a.asm and os_cpu_c.c file for general.
In dispatching method of the present invention, the corresponding multiple tasks of queue, system will be constructed a structure OS_line, is used for controlling queue, is called queue control block (QCB), as shown in table 1, mainly comprises lower column element:
(1) OSPrio: the priority of queue, accounts for 3bits.
(2) line_Stat: the state of queue, if this queue in ready state, this variable is just set to readyly so, accounts for 2bits.
(3) Count: the number of tasks containing under current priority, accounts for 9bits.
(4) Tcount: the initial time sheet size of current queue, accounts for 3bits.
OSPrio(3bits) | line_Stat(2bits) | Count(9bits) | Tcount(3bits) |
Table 1 control of queue block structure
Dispatched when a queue, enter after CPU execution, task is according to Time Slice Circular Scheduling, and timeslice is done dynamic adjustment simultaneously.Therefore in system, also need to add a structure OS_task, be used for control task, be called task control block (TCB), as shown in table 2, mainly comprise lower column element:
(1) task_ID: the ID of current task, accounts for 10bits.
(2) task_Stat: the state of current task, if this state in ready state, this variable is just set to readyly so, accounts for 2bits.
(3) task_Tcount: the timeslice size of current task, accounts for 3bits.
Table 2 task control block structure
As depicted in figs. 1 and 2, the invention provides the dull real-time scheduling method the method for a kind of speed based on dynamic time sheet on the basis of preemptive priority method, combine the advantage of rate monotonic dispatching method and round-robin method, the method is regarded each transmission node as real-time task, the ready queue of multiple isolation is set, task is assigned in the queue of several different stages, each queue, according to different priority, enters processor successively.In task queue, the timeslice of each task is dynamically adjusted according to signal to noise ratio (S/N ratio).
The method of the invention comprises the steps:
Step 1: the ready queue of multiple isolation is set, according to different priority, real-time task is assigned in the queue of several different stages.
Step 2: each queue successively enters processor according to rank, the queue of high priority, it is shorter that the initial time sheet of task arranges, the queue of low priority, it is longer that the initial time sheet of task arranges.
Step 3: first, sheet was initial time sheet task time, and the pass of the initial time sheet T of each queue and the priority P of this sequence is that T=kP(k is constant).In queue, the timeslice of remaining each task is dynamically adjusted.If in timeslice, previous task completes, and the timeslice of task is next reduced to 0.05s, by that analogy, gradually reduces.Once cannot complete in timeslice if run into certain task, arranging of timeslice starts each 0.05s of increase, until task can complete.
Step 4: if certain the real-time task operation in queue exceedes distribute working time, go down if continue operation, likely cause the time delay of whole queue, abandon this task, and record its ID.
Step 5: after all queues are all finished, carry out successively according to the ID of record carrying out failed task.
Claims (6)
1. the dull real-time scheduling method of the speed based on dynamic time sheet, is characterized in that, described method comprises the steps:
Step 1: the ready queue of multiple isolation is set, according to different priority, real-time task is assigned in the queue of several different stages;
Step 2: each queue successively enters processor according to rank, the queue of high priority, it is shorter that the initial time sheet of task arranges, the queue of low priority, it is longer that the initial time sheet of task arranges;
Step 3: first, sheet was initial time sheet task time, and the pass of the initial time sheet T of each queue and the priority P of this sequence is T=kP, and wherein k is constant; In queue, the timeslice of remaining each task is dynamically adjusted; If in timeslice, previous task completes, and the timeslice of task is next reduced to 0.05s, by that analogy, gradually reduces; Once cannot complete in timeslice if run into certain task, arranging of timeslice starts each 0.05s of increase, until task can complete;
Step 4: if certain the real-time task operation in queue exceedes distribute working time, go down if continue operation, likely cause the time delay of whole queue, abandon this task, and record its ID;
Step 5: after all queues are all finished, carry out successively according to the ID of record carrying out failed task.
2. the dull real-time scheduling method of a kind of speed based on dynamic time sheet according to claim 1, is characterized in that: described method is on the basis of preemptive priority method, combines rate monotonic dispatching method and round-robin method.
3. the dull real-time scheduling method of a kind of speed based on dynamic time sheet according to claim 1 and 2, it is characterized in that: described method is regarded each transmission node as real-time task, the ready queue of multiple isolation is set, task is assigned in the queue of several different stages, each queue, according to different priority, enters processor successively; In task queue, the timeslice of each task is dynamically adjusted according to signal to noise ratio (S/N ratio).
4. the dull real-time scheduling method of a kind of speed based on dynamic time sheet according to claim 1, is characterized in that: the plateform system framework of described method is to adopt μ C/OS-II kernel.
5. according to the dull real-time scheduling method of a kind of speed based on dynamic time sheet described in claim 1 or 4, it is characterized in that: the plateform system framework kernel of described method be increase income, preemptive type, the task scheduling, task management, time management, memory management, time control and the task communication that have comprised operating system with synchronize.
6. the dull real-time scheduling method of a kind of speed based on dynamic time sheet according to claim 5, is characterized in that: described method is the corresponding multiple tasks of a queue; Described plateform system is configured to a structure.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410079766.3A CN103885825B (en) | 2014-03-05 | 2014-03-05 | Rate monotonic real-time scheduling method based on dynamic time piece |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410079766.3A CN103885825B (en) | 2014-03-05 | 2014-03-05 | Rate monotonic real-time scheduling method based on dynamic time piece |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103885825A true CN103885825A (en) | 2014-06-25 |
CN103885825B CN103885825B (en) | 2018-01-05 |
Family
ID=50954734
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410079766.3A Active CN103885825B (en) | 2014-03-05 | 2014-03-05 | Rate monotonic real-time scheduling method based on dynamic time piece |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103885825B (en) |
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105824769A (en) * | 2016-03-14 | 2016-08-03 | 合肥工业大学 | Configurable dynamical time slice round-robin scheduling algorithm |
CN106470228A (en) * | 2015-08-19 | 2017-03-01 | 研祥智能科技股份有限公司 | Network communication method and system |
CN106707781A (en) * | 2016-12-19 | 2017-05-24 | 常宸 | Intelligent housekeeper task scheduling method and device thereof |
CN107870812A (en) * | 2017-11-17 | 2018-04-03 | 南京国电南自轨道交通工程有限公司 | One kind is based on single thread concurrently more timer application management methods |
CN109213578A (en) * | 2017-07-05 | 2019-01-15 | 武汉安天信息技术有限责任公司 | A kind of dispatching method of task and scheduling system |
CN109558227A (en) * | 2018-11-12 | 2019-04-02 | 中国航空工业集团公司西安飞行自动控制研究所 | A kind of task based access control executes the rate monotonic tasks dispatching method of budget |
CN109947548A (en) * | 2019-03-15 | 2019-06-28 | 美智光电科技有限公司 | The method and apparatus that the method and apparatus and control task for distributing timeslice execute |
CN110431888A (en) * | 2017-03-17 | 2019-11-08 | 高通股份有限公司 | Non-compatible network is sliced and carries out priority ranking |
CN111309496A (en) * | 2020-02-10 | 2020-06-19 | 北京无限光场科技有限公司 | Method, system, device, equipment and storage medium for realizing delay task |
CN112379983A (en) * | 2020-11-13 | 2021-02-19 | 天合光能股份有限公司 | Embedded real-time system load balancing task scheduling algorithm based on time slices |
CN112799793A (en) * | 2019-11-13 | 2021-05-14 | 上海商汤智能科技有限公司 | Scheduling method and device, electronic equipment and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090052608A1 (en) * | 2007-08-21 | 2009-02-26 | International Business Machines Corporation | Method for dynamically adjusting hardware event counting time-slice windows |
CN101442495A (en) * | 2008-12-26 | 2009-05-27 | 南京邮电大学 | Quantum hash scheduling method based on service gradation protocol |
-
2014
- 2014-03-05 CN CN201410079766.3A patent/CN103885825B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090052608A1 (en) * | 2007-08-21 | 2009-02-26 | International Business Machines Corporation | Method for dynamically adjusting hardware event counting time-slice windows |
CN101442495A (en) * | 2008-12-26 | 2009-05-27 | 南京邮电大学 | Quantum hash scheduling method based on service gradation protocol |
Non-Patent Citations (2)
Title |
---|
王宇英: "嵌入式Linux实时化及其应用", 《中国优秀硕士学位论文全文数据库》 * |
马德新: "嵌入式操作系统μC/OS-Ⅱ的实时性研究", 《中国优秀硕士学位论文全文数据库》 * |
Cited By (19)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106470228A (en) * | 2015-08-19 | 2017-03-01 | 研祥智能科技股份有限公司 | Network communication method and system |
CN105824769B (en) * | 2016-03-14 | 2018-08-28 | 合肥工业大学 | A kind of configurable dynamic time piece robin scheduling method |
CN105824769A (en) * | 2016-03-14 | 2016-08-03 | 合肥工业大学 | Configurable dynamical time slice round-robin scheduling algorithm |
CN106707781A (en) * | 2016-12-19 | 2017-05-24 | 常宸 | Intelligent housekeeper task scheduling method and device thereof |
CN110431888A (en) * | 2017-03-17 | 2019-11-08 | 高通股份有限公司 | Non-compatible network is sliced and carries out priority ranking |
CN110431888B (en) * | 2017-03-17 | 2021-12-10 | 高通股份有限公司 | Prioritizing non-compatible network slices |
CN109213578A (en) * | 2017-07-05 | 2019-01-15 | 武汉安天信息技术有限责任公司 | A kind of dispatching method of task and scheduling system |
CN107870812B (en) * | 2017-11-17 | 2021-06-15 | 南京国电南自轨道交通工程有限公司 | Application management method based on single thread concurrent multi-timer |
CN107870812A (en) * | 2017-11-17 | 2018-04-03 | 南京国电南自轨道交通工程有限公司 | One kind is based on single thread concurrently more timer application management methods |
CN109558227A (en) * | 2018-11-12 | 2019-04-02 | 中国航空工业集团公司西安飞行自动控制研究所 | A kind of task based access control executes the rate monotonic tasks dispatching method of budget |
CN109558227B (en) * | 2018-11-12 | 2023-03-31 | 中国航空工业集团公司西安飞行自动控制研究所 | Monotonic rate task scheduling method based on task execution budget |
CN109947548B (en) * | 2019-03-15 | 2020-11-20 | 美智光电科技股份有限公司 | Method and device for distributing time slices and method and device for controlling task execution |
CN109947548A (en) * | 2019-03-15 | 2019-06-28 | 美智光电科技有限公司 | The method and apparatus that the method and apparatus and control task for distributing timeslice execute |
CN112799793A (en) * | 2019-11-13 | 2021-05-14 | 上海商汤智能科技有限公司 | Scheduling method and device, electronic equipment and storage medium |
WO2021093248A1 (en) * | 2019-11-13 | 2021-05-20 | 上海商汤智能科技有限公司 | Scheduling method and apparatus, electronic device, and storage medium |
JP2022515255A (en) * | 2019-11-13 | 2022-02-17 | 上▲海▼商▲湯▼智能科技有限公司 | Scheduling method and equipment, electronic devices and recording media |
CN112799793B (en) * | 2019-11-13 | 2022-03-15 | 上海商汤智能科技有限公司 | Scheduling method and device, electronic equipment and storage medium |
CN111309496A (en) * | 2020-02-10 | 2020-06-19 | 北京无限光场科技有限公司 | Method, system, device, equipment and storage medium for realizing delay task |
CN112379983A (en) * | 2020-11-13 | 2021-02-19 | 天合光能股份有限公司 | Embedded real-time system load balancing task scheduling algorithm based on time slices |
Also Published As
Publication number | Publication date |
---|---|
CN103885825B (en) | 2018-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103885825A (en) | Real-time speed monotony scheduling method based on dynamic time slices | |
CN106648904B (en) | Adaptive rate control method for streaming data processing | |
PH12019501499A1 (en) | Blockchain consensus method and device | |
CN104298550B (en) | A kind of dynamic dispatching method towards Hadoop | |
US20150295970A1 (en) | Method and device for augmenting and releasing capacity of computing resources in real-time stream computing system | |
CN107566910B (en) | The customized distribution monitoring method of resource, storage medium, electronic equipment and system is broadcast live | |
CN104572307A (en) | Method for flexibly scheduling virtual resources | |
CN105610899B (en) | A kind of parallel method for uploading of text file and device | |
CN101819459B (en) | Heterogeneous object memory system-based power consumption control method | |
CN103618658A (en) | Automobile FlexRay bus design method based on time fragment minimization | |
Zhou et al. | Scheduling workflow in cloud computing based on ant colony optimization algorithm | |
CN103942108A (en) | Resource parameter optimization method under Hadoop homogenous cluster | |
CN103023802A (en) | Web-cluster-oriented low energy consumption scheduling system and method | |
Niu et al. | JouleMR: Towards cost-effective and green-aware data processing frameworks | |
Syzdykova et al. | Analysis of the relationship between renewable energy and economic growth in selected developing countries | |
CN104102532A (en) | Low-energy-consumption-based scientific workflow scheduling method in heterogeneous cluster | |
CN104519082B (en) | A kind of expansion method and device of cloud computing | |
CN106209683B (en) | Data transmission method and system based on data center's wide area network | |
Zhu et al. | Green scheduling: A scheduling policy for improving the energy efficiency of fair scheduler | |
KR20140133295A (en) | Apparatus for parallel processing data with multi-processor, and method thereof | |
CN113382424B (en) | LTE base station hardware resource scheduling processing method and device | |
CN111209109B (en) | Docker-based home decoration industry cloud rendering cluster scheduling system and scheduling method | |
CN104182180B (en) | Low-energy EDF (earliest deadline first) real-time task scheduling method for mixed main memory embedded system | |
CN106506655A (en) | A kind of container group scheduling method suitable for cloud platform | |
CN109656697A (en) | A kind of resource-constrained periodic duty energy consumption optimization method of double mode |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant | ||
EE01 | Entry into force of recordation of patent licensing contract |
Application publication date: 20140625 Assignee: NANJING UNIVERSITY OF POSTS AND TELECOMMUNICATIONS INSTITUTE AT NANTONG Co.,Ltd. Assignor: NANJING University OF POSTS AND TELECOMMUNICATIONS Contract record no.: X2020980006914 Denomination of invention: Rate monotonic real time scheduling method based on dynamic time slice Granted publication date: 20180105 License type: Common License Record date: 20201021 |
|
EE01 | Entry into force of recordation of patent licensing contract |