CN103885825B - Rate monotonic real-time scheduling method based on dynamic time piece - Google Patents

Rate monotonic real-time scheduling method based on dynamic time piece Download PDF

Info

Publication number
CN103885825B
CN103885825B CN201410079766.3A CN201410079766A CN103885825B CN 103885825 B CN103885825 B CN 103885825B CN 201410079766 A CN201410079766 A CN 201410079766A CN 103885825 B CN103885825 B CN 103885825B
Authority
CN
China
Prior art keywords
task
queue
time
real
piece
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.)
Active
Application number
CN201410079766.3A
Other languages
Chinese (zh)
Other versions
CN103885825A (en
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.)
Nanjing Post and Telecommunication University
Original Assignee
Nanjing Post and Telecommunication University
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 Nanjing Post and Telecommunication University filed Critical Nanjing Post and Telecommunication University
Priority to CN201410079766.3A priority Critical patent/CN103885825B/en
Publication of CN103885825A publication Critical patent/CN103885825A/en
Application granted granted Critical
Publication of CN103885825B publication Critical patent/CN103885825B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Mobile Radio Communication Systems (AREA)

Abstract

The present invention proposes a kind of rate monotonic real-time scheduling method based on dynamic time piece, and the system of this method sets the ready queue of multiple isolation first, according to different priority, real-time task is assigned in the queue of several different stages;Each queue successively enters processor according to rank, the queue of high priority, shorter, the queue of low priority that the initial time piece of task is set, the initial time piece setting of task it is longer;First task time piece is initial time piece, and the initial time piece T of each queue and the relation of the priority P of the sequence are T=kP(K is constant), the timeslice dynamic of remaining each task adjusts in queue.If some real-time task in queue runs more than distribution run time, if continuing to run with down, it is possible to causes the delay of whole queue, then abandons the task, and records its ID;The system can make system be adapted to different types of wireless traffic by adjusting parameter k values, have certain flexibility.

Description

Rate monotonic real-time scheduling method based on dynamic time piece
Technical field
The present invention relates to Computer Wireless Communication technical field, more particularly to a kind of rate monotonic based on dynamic time piece Real-time scheduling method.
Background technology
With the horizontal raising of urban planning and construction and the sharp increase of urban population quantity, high-rise and high-rise building number Measure more and more, this proposes higher requirement to home intelligence.As the part in home intelligence industrial chain --- Intelligent meter data recording system is also flourished simultaneously.Wireless kilowatt meter reading-out system is as serving combustion gas, electric power, water supply industry Instrument, its appearance greatly reduce the amount of labour of meter reading personnel, improve enterprise efficiency, and bring conveniently to resident family.But It is the shortcomings such as more data retransmission times existing for traditional wireless kilowatt meter reading-out system, poor real, efficiency of transmission be low, if will adjust in real time Degree method is applied in wireless kilowatt meter reading-out system, can improve disadvantages mentioned above.
Real-time scheduling method is the core of real time operating system, and classical real-time scheduling method mainly has earliest deadline Two kinds of the mode of priority and rate monotonic priority scheduling method.
RM scheduling method is a kind of typical static priority scheduling method, and it is according to the length in tasks carrying cycle Short to determine dispatching priority, performing cycle small task has higher priority.This scheduling mode is mainly suitable for the cycle Property task, for sudden task, can not pre-estimate and perform the time, thus the execution efficiency of system can be caused very low
Earliest Deadline First dispatching method is a kind of typical dynamic priority scheduling method, and it is according to ready queue In the deadline of each task distribute priority, the task priority highest with nearest deadline.Major defect is Once the instantaneous task overload of generation, system action are unpredictable, it may occur however that domino phenomenon, meeting when a task is lost A series of task is caused to be lost in succession.And the present invention can solve the problems, such as above well.
The content of the invention
Present invention aims at the deficiency applied for most of real-time scheduling methods in wireless data transmission, it is proposed that A kind of new real-time scheduling method for taking into account response time and transmission rate, this method on the basis of priority method for pre-emptively, Each transmission node is regarded as and appointed in real time by the advantages of combining RM scheduling method and round-robin method, this method Business, sets the ready queue of multiple isolation, task is assigned in the queue of several different stages, each queue is according to different Priority, sequentially enter processor.The timeslice of each task adjusts according to signal to noise ratio dynamic in task queue.
The technical scheme adopted by the invention to solve the technical problem is that:The present invention provides a kind of based on dynamic time piece Rate monotonic real-time scheduling method, this method comprise the following steps:
Step 1:The ready queue of multiple isolation is set, according to different priority, by real-time task be assigned to it is several not In the queue of same level;
Step 2:Each queue successively enters processor, the queue of high priority, the initial time piece of task according to rank Shorter, the queue of low priority set, the initial time piece of task are set longer;
Step 3:First task time piece is initial time piece, and the initial time piece T of each queue is excellent with the sequence First level P relation is T=kP, and wherein k is constant;The timeslice dynamic of remaining each task adjusts in queue;If in timeslice Interior, previous task is completed, then the timeslice of following task is reduced into 0.05s, by that analogy, reduced gradually;If once meet It can not be completed in timeslice to some task, the setting of timeslice starts to increase 0.05s every time, by that analogy, reduces gradually; If once running into some task can not complete in timeslice, the setting of timeslice starts to increase 0.05s every time, until task energy It is enough to complete;
Step 4:If some real-time task in queue runs more than distribution run time, if continuing to run with down, have The delay of whole queue may be caused, then abandons the task, and records its ID;
Step 5:After all queues are performed both by, the performing failure of the task is held successively according to the ID of record OK.
Beneficial effect:
1st, the present invention, which realizes, is applied to real-time scheduling method in wireless kilowatt meter reading-out system.
2nd, task priority of the invention can dynamically change as needed, preferably solve the problems, such as system suitability.
Brief description of the drawings
Fig. 1 is the inventive method flow chart.
Fig. 2 is that schematic diagram is set dynamically in timeslice of the present invention.
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 debugging circuit schematic diagram of the embodiment of the present invention.
Embodiment
The invention is described in further detail below in conjunction with Figure of description.
As shown in Figures 3 to 6, plateform system framework of the invention is to use μ C/OS-II kernels, and the kernel is to increase income, rob Formula is accounted for, it comprises the task scheduling of operating system, task management, time management, memory management, time control and task Communication and the basic characteristic such as synchronous.Its priority preemptive policy, the real-time of system can be ensured.In μ C/OS-II kernels, It is general only to need to transplant os_cpu.h, os_cpu_a.asm and os_cpu_c.c files.
In the dispatching method of the present invention, a queue corresponds to multiple tasks, and system will construct a structure OS_ Line, for controlling queue, referred to as queue control block (QCB), as shown in table 1, mainly comprising following elements:
(1)OSPrio:The priority of queue, accounts for 3bits.
(2)line_Stat:The state of queue, if the queue is in ready state, then this variable is just set to just Thread, account for 2bits.
(3)Count:The number of tasks contained under current priority, accounts for 9bits.
(4)Tcount:The initial time piece size of current queue, accounts for 3bits.
OSPrio(3bits) line_Stat(2bits) Count(9bits) Tcount(3bits)
The control of queue block structure of table 1
When a queue is dispatched, after being performed into CPU, task is according to Time Slice Circular Scheduling, while timeslice is done Dynamic adjusts.Therefore also need in system add a structure OS_task, for control task, referred to as task control block, such as Shown in table 2, mainly comprising following elements:
(1)task_ID:The ID of current task, accounts for 10bits.
(2)task_Stat:The state of current task, if the state is in ready state, then this variable is just set to It is ready, account for 2bits.
(3)task_Tcount:The timeslice size of current task, accounts for 3bits.
The task control block structure of table 2
As depicted in figs. 1 and 2, the present invention provides a kind of rate monotonic real-time scheduling method party based on dynamic time piece Method is on the basis of priority method for pre-emptively, the advantages of combining RM scheduling method and round-robin method, the party Method regards each transmission node as real-time task, sets the ready queue of multiple isolation, and task is assigned into several different stages Queue in, each queue sequentially enters processor according to different priority.In task queue the timeslice of each task according to Adjusted according to signal to noise ratio dynamic.
The method of the invention comprises the following steps:
Step 1:The ready queue of multiple isolation is set, according to different priority, by real-time task be assigned to it is several not In the queue of same level.
Step 2:Each queue successively enters processor, the queue of high priority, the initial time piece of task according to rank Shorter, the queue of low priority set, the initial time piece of task are set longer.
Step 3:First task time piece is initial time piece, and the initial time piece T of each queue is excellent with the sequence First level P relation is T=kP(K is constant).The timeslice dynamic of remaining each task adjusts in queue.If in timeslice, Previous task is completed, then the timeslice of following task is reduced into 0.05s, by that analogy, reduced gradually.If once run into certain Individual task can not be completed in timeslice, and the setting of timeslice starts to increase 0.05s every time, until task can be completed.
Step 4:If some real-time task in queue runs more than distribution run time, if continuing to run with down, have The delay of whole queue may be caused, then abandons the task, and records its ID.
Step 5:After all queues are performed both by, the performing failure of the task is held successively according to the ID of record OK.

Claims (4)

1. the rate monotonic real-time scheduling method based on dynamic time piece, it is characterised in that methods described comprises the following steps:
Step 1:The ready queue of multiple isolation is set, according to different priority, real-time task is assigned to several not at the same level In other queue;
Step 2:Each queue successively enters processor, the queue of high priority according to rank, and the initial time piece of task is set Shorter, the queue of low priority, the initial time piece of task sets longer;
Step 3:First task time piece is initial time piece, and the initial time piece T of each queue is excellent with the task sequence First level P relation is T=kP, and wherein k is constant;The timeslice dynamic of remaining each task adjusts in queue;If in the time In piece, previous task is completed, then the timeslice of following task is reduced into 0.05s, by that analogy, reduced gradually;If once Running into some task can not complete in timeslice, and the setting of timeslice starts to increase 0.05s every time, until task can be complete Into;
Step 4:If some real-time task in queue runs more than distribution run time, if continuing to run with down, it is possible to The delay of whole queue is caused, then abandons the task, and records its ID;
Step 5:After all queues are performed both by, the performing failure of the task is performed successively according to the ID of record.
A kind of 2. rate monotonic real-time scheduling method based on dynamic time piece according to claim 1, it is characterised in that: The plateform system framework of methods described is to use μ C/OS-II kernels.
A kind of 3. rate monotonic real-time scheduling method based on dynamic time piece according to claim 1, it is characterised in that: The plateform system framework kernel of methods described be increase income, preemptive type, contain the task scheduling of operating system, task management, Time management, memory management, time control and task communication with it is synchronous.
A kind of 4. rate monotonic real-time scheduling method based on dynamic time piece according to claim 3, it is characterised in that: Methods described is that a queue corresponds to multiple tasks;The plateform system is configured to a structure.
CN201410079766.3A 2014-03-05 2014-03-05 Rate monotonic real-time scheduling method based on dynamic time piece Active CN103885825B (en)

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 CN103885825A (en) 2014-06-25
CN103885825B true 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)

Families Citing this family (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106470228B (en) * 2015-08-19 2020-12-15 研祥智能科技股份有限公司 Network communication method and system
CN105824769B (en) * 2016-03-14 2018-08-28 合肥工业大学 A kind of configurable dynamic time piece robin scheduling method
CN106707781B (en) * 2016-12-19 2020-08-04 常宸 Intelligent housekeeper task scheduling method and device
US10638367B2 (en) * 2017-03-17 2020-04-28 Qualcomm Incorporated Prioritizing incompatible 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
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
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

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442495A (en) * 2008-12-26 2009-05-27 南京邮电大学 Quantum hash scheduling method based on service gradation protocol

Family Cites Families (1)

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

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101442495A (en) * 2008-12-26 2009-05-27 南京邮电大学 Quantum hash scheduling method based on service gradation protocol

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
嵌入式Linux实时化及其应用;王宇英;《中国优秀硕士学位论文全文数据库》;20030315(第01期);第36-43页 *
嵌入式操作系统μC/OS-Ⅱ的实时性研究;马德新;《中国优秀硕士学位论文全文数据库》;20061215(第12期);第25-38页 *

Also Published As

Publication number Publication date
CN103885825A (en) 2014-06-25

Similar Documents

Publication Publication Date Title
CN103885825B (en) Rate monotonic real-time scheduling method based on dynamic time piece
CN104572307B (en) The method that a kind of pair of virtual resource carries out flexible scheduling
Chen et al. Electric demand response management for distributed large-scale internet data centers
CN104901989B (en) A kind of Site Service offer system and method
PH12019501499A1 (en) Blockchain consensus method and device
CN107566910B (en) The customized distribution monitoring method of resource, storage medium, electronic equipment and system is broadcast live
Fernandes et al. Order release in a workload controlled flow-shop with sequence-dependent set-up times
Raycroft et al. Performance bounded energy efficient virtual machine allocation in the global cloud
CN103944917A (en) Video distribution optimization method applied to microblog social network
Zhou et al. Scheduling workflow in cloud computing based on ant colony optimization algorithm
CN107220360A (en) A kind of Unified Modeling storage cut-in method based on magnanimity electric power monitoring data
CN103023802B (en) A kind of low energy consumption dispatching patcher towards web cluster and method
CN101819459B (en) Heterogeneous object memory system-based power consumption control method
Liao et al. Auto-scaling strategy for amazon web services in cloud computing
Wang et al. An optimal task placement strategy in geo-distributed data centers involving renewable energy
CN202261410U (en) High performance cluster for render farm
CN103516792A (en) Data deploying method based on network delay, network transmission energy consumption and server energy consumption
CN106789853A (en) The dynamic dispatching method and device of a kind of transcoder
CN104519082B (en) A kind of expansion method and device of cloud computing
CN104268726A (en) Method and system for generating electricity consumption scheme
CN104753964B (en) Networking products methods of exhibiting, apparatus and system
Biran et al. Enabling green content distribution network by cloud orchestration
CN105049365A (en) Adaptive frequency modulation energy-saving method for multi-core multi-thread intrusion detection device
CN111209109B (en) Docker-based home decoration industry cloud rendering cluster scheduling system and scheduling method
CN113382424B (en) LTE base station hardware resource scheduling processing method and device

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