CN104570915B - A kind of method suitable for digital control system Real-Time Scheduling - Google Patents
A kind of method suitable for digital control system Real-Time Scheduling Download PDFInfo
- Publication number
- CN104570915B CN104570915B CN201310470415.0A CN201310470415A CN104570915B CN 104570915 B CN104570915 B CN 104570915B CN 201310470415 A CN201310470415 A CN 201310470415A CN 104570915 B CN104570915 B CN 104570915B
- Authority
- CN
- China
- Prior art keywords
- subedition
- key plate
- time
- task
- scheduling
- 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
Links
Classifications
-
- G—PHYSICS
- G05—CONTROLLING; REGULATING
- G05B—CONTROL OR REGULATING SYSTEMS IN GENERAL; FUNCTIONAL ELEMENTS OF SUCH SYSTEMS; MONITORING OR TESTING ARRANGEMENTS FOR SUCH SYSTEMS OR ELEMENTS
- G05B19/00—Programme-control systems
- G05B19/02—Programme-control systems electric
- G05B19/18—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form
- G05B19/408—Numerical control [NC], i.e. automatically operating machines, in particular machine tools, e.g. in a manufacturing environment, so as to execute positioning, movement or co-ordinated operations by means of programme data in numerical form characterised by data handling or data format, e.g. reading, buffering or conversion of data
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Manufacturing & Machinery (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Automation & Control Theory (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The present invention relates to a kind of method suitable for digital control system Real-Time Scheduling.Its step is to include:Two kinds of separate executable versions are defined for each real-time task in digital control system:Key plate sheet and subedition;Before task scheduling, use InvSeq_Preallocation to pre-allocate subalgorithm for the subedition reservation process device time, determine the notice moment of subedition;Key plate is originally scheduled using Fixed Priority Schedule Algorithm, in each scheduling instance, predicts that subalgorithm detects the enforceability of the ready task key plate sheet in current ready queue one by one using PPA, and dispatch the key plate sheet that performs and can perform after testing;When key plate is originally successfully completed, its correspondence subedition is cancelled, and be released to the processor time of subedition predistribution;When going to the notice moment of subedition, subedition seizes current this execution of key plate, and terminates correspondence key plate sheet.The present invention can provide more accurate this enforceability of key plate prediction, so as to be prevented effectively from processor waste of time, improve the success rate of key plate sheet.
Description
Technical field
It is specifically that one kind is applied to digital control system the present invention relates to the task fault-tolerance Real-Time Scheduling technology in real-time system field
Real-time scheduling.
Background technology
Digital control system not only needs to ensure that its real-time task is correctly completed within the regulation time limit, in addition it is also necessary to which guarantee system is going out
Standard or degraded service can be provided during existing mistake.If system can not export correct result within the regulation time limit, it will have a strong impact on
The crudy of workpiece, or even cause hidden danger of keeping the safety in production.Fault-toleranr technique shields failure by increasing the method for redundant resource
Influence to systemic-function, for the running software failure in uniprocessor real-time system, Ching-Chih Han et al. are delivered
's《A Fault-Tolerant Scheduling Algorithm for Real-Time Periodic Tasks with
Possible Software Faults》(Publication《IEEE Transactions on Computers》2003,52(3):362-
372)Master/slave version fault-toleranr technique is studied, it is proposed that the BCE algorithms based on deadline mechanism.BCE is adopted before scheduling
It is the subedition pre-allocation process device time with Fixed-priority Scheduling Strategy strategy, and is predicted in scheduling process using CAT subalgorithms
The enforceability of key plate sheet, selects feasible this executions of key plate, while selecting subedition in the system free time using EIT subalgorithms
Perform in advance, to avoid processor waste of time, obtain preferable scheduling performance.When processor utilization is higher, CAT is calculated
The precision of prediction of method is relatively low, it is impossible to be effectively prevented from processor waste of time.Han Jianjun et al. exists《It is dynamic based on software fault-tolerant
State real-time scheduling》(Periodical《Journal of Computer Research and Development》2005,42(2):315-321)In prediction to CAT subalgorithms
Accuracy is improved, it is proposed that PKSA(EBPA)With CUBA algorithms, it can be obtained and be calculated compared with CAT by exploratory detection several times
The more excellent forecasting accuracy of method, its determination for souning out number of times and limited number of time sound out operation and make it that the online expense of algorithm is too big.
In addition, the predistribution subalgorithm institute that the existing real-time scheduling based on master/slave version fault-toleranr technique is used is really
The fixed subedition reservation process device time needs dynamic adjustment in task scheduling process, and this will increase the scheduling overhead of system,
And reduce precision of prediction of the algorithm to this enforceability of key plate.
The content of the invention
For real-time scheduling's scheduling performance in the prior art is not good and scheduling overhead too big situation, the present invention will be solved
Technical problem certainly be to provide it is a kind of improve algorithmic dispatching performance and reduce processing time one kind be applied to digital control system it is real-time
The method of scheduling.
In order to solve the above technical problems, the technical solution adopted by the present invention is:One kind is applied to digital control system Real-Time Scheduling
Method, comprise the following steps:
Two kinds of separate executable versions are defined for each real-time task in digital control system:Key plate sheet and subedition;
Use predistribution algorithm for the subedition reservation process device time, determine the notice moment of subedition;
When digital control system is run, key plate is originally scheduled using RM algorithms, in each scheduling instance, using prediction algorithm
The enforceability of the key plate sheet of ready task in current ready queue is detected one by one, and dispatches the predicted executable master of execution
Version;
If key plate originally successfully completes scheduling before the notice moment of subedition, its correspondence subedition is cancelled, and discharge
The processor time pre-allocated for subedition;If the notice moment correspondence key plate for going to subedition is originally not yet completed, secondary version
Originally current this execution of key plate is seized, and terminates correspondence key plate sheet.
The subedition of the task for main version function simple realization there is provided acceptable low precision result is applied, it is secondary
The execution time of version is less than or equal to the execution time of key plate sheet.
It is described to use predistribution algorithm for the subedition reservation process device time, the notice moment of subedition is determined, is specially:
The reservation process device time when time interval that subedition takes in pre-allocation process is run for it, subedition
The initial time of reservation process device period is the notice moment of subedition.
The prediction algorithm is by calculating key plate this Pi,jIn [t, STi,j] in the available processors timeTo detect master
Version Pi,jWhether can perform;Calculation formula be:
Wherein, set A_Seti,j={Ax,y|t≤STx,y≤STi,j, represent that the reservation process device time is located at [t, STi,j] in
Subedition set, STi,jFor the notice moment of subedition, set hp (i)={ τj∈Γ|prioj>prioiRepresent that priority is high
In τiSet of tasks,(Provide the implication of each parameter in formula);
In scheduling instance t, this P of key platei,jThe remaining execution time be remaini,j, then prediction algorithm judge Pi,jIt is executable
Adequate condition be
The inventive method can be reduced on the basis of the real-time scheduling based on master/slave version fault-toleranr technique
System call expense, and processor waste of time is efficiently reduced, improve the completion rate of task key plate sheet.
Brief description of the drawings
Fig. 1 is task-set Γ1={τ1,τ2,τ3}={<5,2,1>,<9,3,2>,<14,3,2>Scheduling under BCE algorithms
Situation;
Fig. 2 is task-set Γ1The processor time series for using predistribution algorithm to be reserved for subedition;
Fig. 3 is task-set Γ1Dispatch situation under IBP algorithms.
Embodiment
Below in conjunction with the accompanying drawings and embodiment the present invention is described in further detail.
According to master/slave version Fault-tolerant Model, present invention determine that in digital control system real-time task computation model:In system
Scheduling real-time periodic task set expression is Γ={ τ1,τ2,...,τn, each task τiThe cycle of (1≤i≤n) is designated as Ti, task
Relative deadline it is equal with the cycle.Task τiInclude two separate executable versions:This P of key plateiAnd subedition
Ai.This P of key plateiIt is τiThe complicated of function realizes that there is provided high-quality implementing result its execution time uses piRepresent, subedition Ai
It is τiThe simple realization of function, only provides and applies acceptable low precision result, its execution time uses aiRepresent, and have pi≥ai。
Task τiIt is expressed as triple<Ti,pi,ai>。
The least common multiple of all duty cycles of Γ is designated as TΓ=LCM(T1,T2,...,Tn), often by a TΓ, task-set
Scheduling process repeat, by TΓReferred to as Γ planning cycle.Without loss of generality, only consider task-set first plan week herein
Phase [0, TΓ] in dispatch situation.In a TΓInterior τiPerform TΓ/TiIt is secondary, τiJth time perform and be designated as operation Ji,j, then Ji,j's
Ready time is ri,j=(j-1)·Ti, d is limited to during cut-offi,j=j·Ti。Ji,jKey plate sheet and subedition be expressed as Pi,jWith
Ai,j.Predistribution algorithm is Ai,jThe reserved processor period is expressed as [STi,j,ETi,j], wherein Ai,jStartup time STi,j
Referred to as notify the time.Pi,jWith STi,jAs the cut-off time limit, in STi,jMoment, if Pi,jIt has been completed that, then cancel Ai,jAnd it is pre- to withdraw its
Stay the processor time;Otherwise P is cancelledi,j, start to perform Ai,j, now Ai,jWith limit priority, seize any key plate and originally hold
OK.
Computation model only considers single processor system, and delivered with Liu and Layland《Scheduling
algorithms for multiprogramming in a hard real-time environment》(Publication《Journal
of the ACM》1973,20(1):46-61)The RM algorithms of proposition, as basic scheduling strategy, are τiDistribute priority prioi∈
{ 1,2 ..., n }, then priority is higher than τ in ΓiSet of tasks be expressed as hp (i)={ τj∈Γ|prioj>prioi}.Due to
This realization of key plate is complicated, resource requirement is big, and its implementation procedure is more error-prone, and subedition realizes that simply, its implementation procedure is difficult
Error.System software error probability is expressed as EP.
Given task collection Γ1={τ1,τ2,τ3}={<5,2,1>,<9,3,2>,<14,3,2>, prio1>prio2>prio3,
TΓ=630。Γ1Scheduling result fragment under BCE algorithms is as shown in figure 1, the wherein running situation of key plate sheet such as shadow-free part
It is shown, subedition set aside some time section distribution and its dynamically adjust situation as shown by the shaded portion during system call.In advance
Allocation algorithm is InvSeq_Preallocation, and prediction algorithm is PPA.In pre-allocation process, A23、A15Seize A32Perform,
A17Seize A24Perform.After scheduling starts, P11、P21、P12、P13Successfully complete, A11、A21、A12、A13It is revoked.During t=9, P22Through
The prediction of CAT algorithms is executable, seizes P31By P when going to t=1013Seize;During t=12, P31Because of ST31Reach and stop, A31Rob
Account for P22Perform;During t=16, P22Because of ST22Reach and stop.During t=22, P15A is cancelled after successfully completing15, and adjust ST32;t=28
When, P16It not can perform through CAT predictions, P24Prediction is executable.During t=32, P17A is cancelled after successfully completing17, and adjust ST24。[0,
36] occur 13 operations in altogether, be correctly completed 7 key plate sheets.Wherein, subedition notifies the dynamic of time during task scheduling
Adjustment introduces extra scheduling overhead.
IBP algorithms are before task scheduling, when using InvSeq_Preallocation algorithms for subedition reservation process device
Between, in task scheduling process, the enforceability of key plate sheet is predicted using PPA subalgorithms, coordinates Basic subalgorithms to task-set
Carry out fault-tolerant real-time scheduling.
InvSeq_Preallocation subalgorithms are when for the subedition pre-allocation process device time, according to task priority
Order from low to high carries out back scheduling, when subedition run time conflicts, the secondary version of high-priority task to subedition
Originally it is preempted.InvSeq_Preallocation is used for Γ1Middle subedition reservation process device time, the predistribution in [0,36]
As a result it is as shown in Figure 2.Comparison diagram 1,2 understands that InvSeq_Preallocation only changes the subedition of existence time conflict
The notice time.
PPA algorithms are in prediction Pi,jP need to be only calculated during enforceabilityi,jIn [t, STi,j] in the available processors time.In advance
The processor time is stayed to be located at [t, STi,j] in subedition set expression be A_Seti,j={Ax,y|t≤STx,y≤STi,j, then Pi,j
In [t, STi,j] in the available processors timeCalculation formula be:
In scheduling instance t, ready this P of key platei,jThe remaining execution time be remaini,j, then Pi,jPrediction is executable to fill
Slitting part is
In scheduling instance t, ready key plate originally according to priority queued up by order, and PPA algorithms are detected since head of the queue, if currently treating
It is P to detect key plate sheeti,jIf,Then perform Pi,j, otherwise remaining ready this progress of key plate is detected.If current
Executable key plate sheet is predicted in ready queue without PPA, then selects ready this execution of key plate of head of the queue.If t=STi,j, and Pi,jIt is not complete
Into then Ai,jCurrent this execution of key plate is seized, and terminates Pi,j。
Using IBP algorithms to task-set Γ1It is scheduled, its scheduling result is as shown in Figure 3.P in figure11、P21、P12、P31、
P13、P22、P15、P23、P16、P17、P24It is correctly completed, corresponding each subedition is revoked.During t=9, P22Predicted through PPA algorithms
It not can perform, P31It is executable through the prediction of PPA algorithms, thus seize P22Perform and be correctly completed when t=10.During t=12, P22Through
The prediction of PPA algorithms is executable, and is correctly completed when by t=15.During t=18, P23With P32It not can perform through the prediction of PPA algorithms,
Perform the P of head of the queue23, P during t=2423It is correctly completed, cancels A23.ST during t=2632Reach, stop P32.[0,36] 13 works in
There are 11 key plates to be originally correctly completed in industry.
Comparison diagram 1,3 understands that subedition is notified during InvSeq_Preallocation algorithms can avoid task scheduling
The dynamic adjustment of time, reduces the scheduling overhead of algorithm;PPA algorithms can provide executable compared with the more accurate key plate sheet of CAT algorithms
Property prediction, thus effectively reduce processor waste of time, improve key plate this success rate.It can be seen that, IBP algorithms are not increasing
On the basis of adding system scheduling overhead, it is possible to provide the scheduling performance more excellent compared with BCE algorithms.
Claims (2)
1. a kind of method suitable for digital control system Real-Time Scheduling, it is characterised in that comprise the following steps:
Two kinds of separate executable versions are defined for each real-time task in digital control system:Key plate sheet and subedition;
Use predistribution algorithm for the subedition reservation process device time, determine the notice moment of subedition;
When digital control system is run, key plate is originally scheduled using RM algorithms, in each scheduling instance, using prediction algorithm one by one
The enforceability of the key plate sheet of ready task in current ready queue is detected, and dispatches the predicted executable key plate of execution
This;
If key plate originally successfully completes scheduling before the notice moment of subedition, its correspondence subedition is cancelled, and be released to pair
The processor time of version predistribution;If the notice moment correspondence key plate for going to subedition is originally not yet completed, subedition is robbed
Current this execution of key plate is accounted for, and terminates correspondence key plate sheet;
It is described to use predistribution algorithm for the subedition reservation process device time, the notice moment of subedition is determined, is specially:
The reservation process device time when time interval that subedition takes in pre-allocation process is run for it, subedition it is reserved
The initial time of processor period is the notice moment of subedition;
The prediction algorithm is by calculating key plate this Pi,jIn [t, STi,j] in the available processors timeTo detect key plate sheet
Pi,jWhether can perform;Calculation formula be:
Wherein, set A_Seti,j={ Ax,y|t≤STx,y≤STi,j, represent that the reservation process device time is located at [t, STi,j] in
Subedition set, STi,jFor the notice moment of subedition, set hp (i)={ τj∈Γ|prioj> prioiRepresent that priority is high
In τiSet of tasks;Γ represents periodic task set, TmFor Γ duty cycle, Ax,yFor subedition, A_Seti,jFor secondary version
This set, pmFor key plate this execution time of m-th of task, axTime, prio are performed for the subedition of x-th of taskjFor τj's
Distribute priority;I, j, x, y represent task number or operation sequence number;
In scheduling instance t, this P of key platei,jThe remaining execution time be remaini,j, then prediction algorithm judge Pi,jExecutable fills
Slitting part is
2. a kind of method suitable for digital control system Real-Time Scheduling according to claim 1, it is characterised in that the task
Subedition for main version function simple realization there is provided acceptable low precision result is applied, the execution time of subedition is small
In the execution time equal to key plate sheet.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310470415.0A CN104570915B (en) | 2013-10-09 | 2013-10-09 | A kind of method suitable for digital control system Real-Time Scheduling |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310470415.0A CN104570915B (en) | 2013-10-09 | 2013-10-09 | A kind of method suitable for digital control system Real-Time Scheduling |
Publications (2)
Publication Number | Publication Date |
---|---|
CN104570915A CN104570915A (en) | 2015-04-29 |
CN104570915B true CN104570915B (en) | 2017-10-31 |
Family
ID=53087267
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310470415.0A Active CN104570915B (en) | 2013-10-09 | 2013-10-09 | A kind of method suitable for digital control system Real-Time Scheduling |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN104570915B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104951367B (en) * | 2015-07-17 | 2018-02-16 | 中国人民解放军国防科学技术大学 | Fault-tolerant method for scheduling task in one kind virtualization cloud |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102655685A (en) * | 2012-05-29 | 2012-09-05 | 福州大学 | Task fault-tolerance allocation method for wireless sensor networks |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130318535A1 (en) * | 2010-08-11 | 2013-11-28 | Nec Corporation | Primary-backup based fault tolerant method for multiprocessor systems |
-
2013
- 2013-10-09 CN CN201310470415.0A patent/CN104570915B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102655685A (en) * | 2012-05-29 | 2012-09-05 | 福州大学 | Task fault-tolerance allocation method for wireless sensor networks |
Non-Patent Citations (5)
Title |
---|
基于延迟主动副版本的分布式实时容错调度算法;罗威 等;;《计算机研究与发展》;20070330;第44卷(第3期);全文 * |
实时多处理机系统BEST-FIT启发式容错调度;阳春华 等;;《计算机工程与科学》;20031030;第25卷(第5期);全文 * |
硬实时系统中基于软件容错模型的容错调度算法;丁万夫 等;;《计算机研究与发展》;20110415;第48卷(第4期);全文 * |
面向多处理器的实时周期任务容错调度算法研究;李杰 等;;《小型微型计算机系统》;20130615;第34卷(第6期);全文 * |
面向数控系统的容错实时调度算法研究;丁万夫 等;;《中国机械工程》;20100810;第21卷(第15期);正文第1-4页 * |
Also Published As
Publication number | Publication date |
---|---|
CN104570915A (en) | 2015-04-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106445673B (en) | Fault tolerance task scheduling method for hybrid critical real-time system | |
US9286127B2 (en) | Method for allocating processor resources precisely by means of predictive scheduling based on current credits | |
CN103823714B (en) | Virtualization-based method and device for adjusting QoS (quality of service) of node memory of NUMA (non uniform memory access architecture) | |
Mottaghi et al. | DFTS: A dynamic fault-tolerant scheduling for real-time tasks in multicore processors | |
Gujarati et al. | Outstanding paper award: Schedulability analysis of the linux push and pull scheduler with arbitrary processor affinities | |
CN104951367B (en) | Fault-tolerant method for scheduling task in one kind virtualization cloud | |
Chahar et al. | Deadlock resolution techniques: an overview | |
CN107316124B (en) | Extensive affairs type job scheduling and processing general-purpose system under big data environment | |
US8612991B2 (en) | Dynamic critical-path recalculation facility | |
CN104570915B (en) | A kind of method suitable for digital control system Real-Time Scheduling | |
Bhat et al. | Recovery time considerations in real-time systems employing software fault tolerance | |
CN104063282B (en) | Management method, device and server for IaaS cloud variable scale resource pool | |
CN105912383A (en) | High-reliability dependent task scheduling and resource configuration method | |
Li et al. | Fault-aware runtime strategies for high-performance computing | |
Luo et al. | Exploiting redundancies to enhance schedulability in fault-tolerant and real-time distributed systems | |
CN106354555B (en) | A kind of operating system process scheduling algorithm | |
CN103777995B (en) | Synchronization optimized dispatching system and dispatching method based on group dispatching in virtualization environment | |
CN116302423A (en) | Distributed task scheduling method and system for cloud management platform | |
KR102003721B1 (en) | GPU Kernel transactionization method and computing device | |
JP2654612B2 (en) | Exclusive weight reduction control method | |
US9152451B2 (en) | Method of distributing processor loading between real-time processor threads | |
Park | Task-I/O Co-scheduling for pfair real-time scheduler in embedded multi-core systems | |
CN116795603B (en) | Efficient release time distribution method for backup transaction in database system | |
Sun et al. | Towards a fault-aware computing environment | |
CN103810025B (en) | A kind of method being applicable to digital control system fault-tolerant scheduling |
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 |