CN105260497B - Semi-direct simulation method for real-time task schedulability test based on linear linked list - Google Patents
Semi-direct simulation method for real-time task schedulability test based on linear linked list Download PDFInfo
- Publication number
- CN105260497B CN105260497B CN201510481348.1A CN201510481348A CN105260497B CN 105260497 B CN105260497 B CN 105260497B CN 201510481348 A CN201510481348 A CN 201510481348A CN 105260497 B CN105260497 B CN 105260497B
- Authority
- CN
- China
- Prior art keywords
- task
- time
- linked list
- scheduling
- lcm
- 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.)
- Expired - Fee Related
Links
- 238000012360 testing method Methods 0.000 title claims abstract description 98
- 238000000034 method Methods 0.000 title claims abstract description 83
- 238000004088 simulation Methods 0.000 title claims abstract description 61
- 230000008569 process Effects 0.000 claims abstract description 26
- 239000013256 coordination polymer Substances 0.000 claims description 18
- 230000004044 response Effects 0.000 claims description 17
- 230000006870 function Effects 0.000 description 12
- 238000001514 detection method Methods 0.000 description 6
- 238000010998 test method Methods 0.000 description 4
- 230000000737 periodic effect Effects 0.000 description 3
- 101100208473 Neurospora crassa (strain ATCC 24698 / 74-OR23-1A / CBS 708.71 / DSM 1257 / FGSC 987) lcm-2 gene Proteins 0.000 description 2
- 230000008859 change Effects 0.000 description 2
- 235000013399 edible fruits Nutrition 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000007796 conventional method Methods 0.000 description 1
- 230000008439 repair process Effects 0.000 description 1
- 230000035922 thirst Effects 0.000 description 1
Landscapes
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
Real-time task schedulability based on linear linked list tests semi-direct analogy method.The method of the present invention includes: to remember task τ to each i, 1≤i≤niRelease time of first task instances for being no earlier than scheduling stable point S release be that new release deviates, also use ΦiIt indicates;According to given scheduling model, using the simulation of linear linked list recording dispatching and test process, first to task τ1,τ2,...,τn‑1, in time range Φmin (n‑1)To Φmin (n‑1)+LCMn‑1Each task τ is inside according to priority simulated in descending orderiScheduling execute, then to task τ on current chained listnIt is tested.The present invention is used for it needs to be determined that whether one group of given real-time task is in schedulable simulation or real application systems.
Description
Technical field:
The present invention relates to a kind of, and the real-time task schedulability based on linear linked list tests semi-direct analogy method.
Background technique:
In real-time system design and application process, appoint in real time for what n given periodicity or not timing occurred
Business determines whether this group of real-time task schedulable in real scheduling and before executing, i.e., each task be released later whether
Can be at it with respect to being finished in the deadline date, this is a particularly significant problem, for guaranteeing real-time system safe operation
With particularly important meaning.
Classical preferentially seizes scheduling model, referred to as CP model, wherein CP, that is, classic preemptive, CP model
Scheduling mode are as follows: when low priority task has high-priority task arrival in the process of running, low priority task will
Right of execution is deprived of and high-priority task starts to execute, when high-priority task is finished and appoints without other high priorities
When business etc. is pending, which continues to execute from bereft position;Transactional manner preferentially seizes tune
Model, referred to as TP model are spent, wherein TP, that is, transactional preemptive, for example, TP model has based on priority
Functional response formula programming model, referred to as P-FRP model, wherein P-FRP bepriority-based functional reactive programming;Or stop and restart model, and referred to as AR model, wherein AR, that is, abort-and-
restart;Or software transactional memory model, referred to as STM model, STM, that is, software transactional
Memory, STM model include thirsting for collision detection strategy and lazy collision detection strategy, thirst for collision detection strategy and are referred to as
ECD strategy, wherein ECD, that is, eager conflict detection, lazy collision detection strategy are referred to as LCD strategy, wherein
LCD, that is, lazy conflict detection;The scheduling mode of TP model are as follows: whenever low priority task in the process of running
When having high-priority task arrival, low priority task will be deprived of right of execution and high-priority task starts to execute, this is low excellent
The result that first grade task has executed all is discarded, when high-priority task is finished and waits without other high-priority tasks
When execution, from it, most starting position re-executes the low priority task;Symbol string r ← s indicates the value of variable s being assigned to change
Measure r;Min (a, b) takes the minimum value in a and b, and max (a, b) takes the maximum value in a and b;After mod (a, b) i.e. a mould b
Remainder;The least common multiple of lcm (a, b) i.e. a and b;Task it is primary release be known as the task a task instances (job) or
Person calls (invoke) or task instances (instance);[and] between, between "and", between "and", [and], between "and"
Respectively indicate a statement body;Task instances, which execute, to be stopped to include executing to interrupt and execute completion by high-priority task.
Given scheduling model is CP model or TP model;In the schedulability (or feasibility) of one group of n real-time task
The schedulability of section test (or examine or check or detect) this group task.If the group task be it is schedulable,
After one time point S, every time span LCMn, the dispatch situation of this group task occurs as soon as repetition, i.e., subsequent scheduling process
Actually one section is LCM in lengthnTime interval [S, S+LCMn) in scheduling repetition.
System Startup time is the time 0, when actual test schedulability, due to this group task section [0, S) in tune
Degree includes first arrival situation and does not often have repeatability, therefore, traditionally by [0, S+LCMn) as actual schedulable
Property test section.This section of schedulability test siding-to-siding block length is smaller, and efficiency is higher in actual test.It, can from the point of view of common situation
Scheduling property test siding-to-siding block length is typically no less than LCMn.Before this without using linear linked list recording dispatching process to task-set can
The method that scheduling property is tested.
Summary of the invention:
The object of the present invention is to provide a kind of, and the real-time task schedulability based on linear linked list tests semi-direct simulation side
Method indicates that the scheduling of task (or event) executes the stage by using chained list node, using the scheduling of linear linked list record test
Process simultaneously achievees the purpose that determining real-time task (or event) schedulability is tested using the method for semi-direct simulation;It is suitable for
The situation that real-time task or Event Priority are fixed.
Above-mentioned purpose is realized by following technical scheme:
A kind of semi-direct analogy method of real-time task schedulability test based on linear linked list, this method comprises: to every
A i, 1iN remembers task τiRelease time of first task instances for being no earlier than scheduling stable point S release be new release
Offset is put, Φ is also usediIt indicates, according to given scheduling model, using the simulation of linear linked list recording dispatching and test process, first
To task τ1,τ2,...,τn-1, in time range Φmin (n-1)To Φmin (n-1)+ LCMn-1Inside according to priority mould in descending order
Intend each task τiScheduling execute, then to task τ on current chained listnIt is tested.
The real-time task schedulability based on linear linked list tests semi-direct analogy method, and the use is linear
The simulation of chained list recording dispatching and test process, first to task τ1,τ2,...,τn-1, in time range Φmin (n-1)To Φmin (n-1)
+ LCMn-1Each task τ is inside according to priority simulated in descending orderiScheduling execute, then to task τ on current chained listn
It carries out test to refer to, is executed using the dispatching simulation of a linear linked list logger task and test process, task instances start to hold
The start field of chained list node is recorded in row time point, and task instances execute the end word that chained list node is recorded in intermission point
Section, each chained list node indicate the time provided from the time point that node start field value provides to node end field value
The continuous scheduling of one or more task instances executes between point;Φmin (1)←Φ1, LRT1← C1;To each i, 2iN,
Φmin (i)←min(Φmin (i-1), Φi), LRTi←Ci;MAXinter←Φmin (n-1)+ LCMn-1;One is assigned to indexed variable flag
Initial value;[first in time range Φmin (n-1)To Φmin (n-1)+ LCMn-1Interior simulation task τ1From the 1st to LCMn-1/T1
The execution of a task instances, that is, establish LCMn-1/T1A chained list node, from small to large to each j, 1jLCMn-1/T1, " jth
The start field of a chained list node is assigned a value of task instances τ1,jRelease time r1,j, the end field tax of j-th of chained list node
Value is r1,j+C1;〗;Then to task τ2,τ3,...,τn-1, in time range Φmin (n-1)To Φmin (n-1)+LCMn-1It is interior to press preferentially
Grade simulates each task τ in descending orderiFrom the 1st to LCMn-1/TiThe scheduling of a task instances executes, that is, " to every
A i, 2iN -1, each j, 1jLCMn-1/Ti, j successively calls to execute from small to large simulates individual task example function F1
To task τiJ-th of task instances τi,jIt is simulated;〗;];I ← n calls test simulation individual task function F2 to task τi
It is tested;Providing task-set is schedulable information.
The real-time task schedulability based on linear linked list tests semi-direct analogy method, and described executes simulation
Individual task example function F1 is to task τiJ-th of task instances τi,jIt carries out simulation to refer to, [according to ri,jPass through in chained list
Compared with start field value and end field value in node search and since relative position of the current work j in chained list,
By when CP module scheduling by runing time CiCorrespond to 1 or continuous multiple tasks τiIdle section chained list node, these nodes
The sum of siding-to-siding block length of expression is equal to Ci;By when TP module scheduling by runing time CiCorrespond to task τiA permission section
The siding-to-siding block length that node PINode, node PINode are indicated is equal to Ci, and in the task instances release time to node PINode
Between whole task τsiVery big idle section be all merged into its adjacent interval;Chronologically successively chain enters the phase in chained list
Position is answered, chain merges the chained list node that scheduling executes interval time point overlapping margins, the nothing in simulation process while entering chained list
Method completes runing time C on chained listiTo it is corresponding when variable flag value be different from its initial value;Postscript is completed in simulation
Record task τiCurrent maximum response time LRTi;If indexed variable flag value is different from its initial value or LRTi>Di, then return
It returns non-scheduling information and stops to test the schedulability of the task-set;].
The real-time task schedulability based on linear linked list tests semi-direct analogy method, the test simulation
Individual task function F2 is to task τiIt carries out test to refer to, [when pressing TP module scheduling: " successively from the release of each task instances
Time point starts at most elapsed-time standards length LCMi-1, it is determined whether there is task τiPermission section, if it is not, return not
Schedulable information simultaneously stops to test the schedulability of the task-set;Logger task τ after the completion of each task instances simulationiCurrently
Maximum response time LRTi;If LRTi>Di, then return to non-scheduling information and stop to survey the schedulability of the task-set
Examination;〗;
When by CP module scheduling: " from time point Φmin (i)Start to time point Φmin (i)+LCMi, successively to task τiIt is every
A task instances determine whether that the sum of siding-to-siding block length is more than or equal to Ci1 or continuous multiple very big idle sections, if do not had
Have, then return to non-scheduling information and stops to test the schedulability of the task-set;Postscript is completed in each task instances simulation
Record task τiCurrent maximum response time LRTi;If LRTi>Di, then return to non-scheduling information and stop to the task-set
Schedulability test;〗;].
The real-time task schedulability based on linear linked list tests semi-direct analogy method, the TP model
Task τiPermission section refer to: task τiA free time section EI refer to, for task τ1,τ2,...,τn-1Scheduling knot
A no occupied continuous time range section [t in fruit1, t2), t2>t1, without task-set { τ in the section1,
τ2,...,τn-1In task release, and in moment t1And task-set { the τ discharged all before1,τ2,...,τn-1In
Task be all finished;
Task τiA free time section [t1, t2) it is known as a task τiVery big free time section maxEI refer to, moment t1
For task τiRelease time or task-set { τ1,τ2,...,τn-1In job end time, and from moment t2It begins with
Task-set { τ1,τ2,...,τn-1In task release or t2Equal to Φmin (i-1)+k×LCMi-1, k1;For TP model, such as
One task τ of fruitiIdle section [t1, t2) or very big free time section [t1, t2) meet t2-t1 Ci, then section [t1, t2) claim
For task τiA permission section PI.
The real-time task schedulability based on linear linked list tests semi-direct analogy method, and described provides this
Business collects schedulable or non-scheduling information and provides max when providing the information that task-set is schedulable1 i n(LRTi), table
Show whole task τsiMaximum response time in current priority setting and task release offset.
The real-time task schedulability based on linear linked list tests semi-direct analogy method, the merging scheduling
The chained list node for executing interval time point overlapping margins refers to, if can generate in chained list or there are two adjacent node
Node1 and Node2 makes the end field value of Node1 be equal to the start field value of Node2, then the two nodes is merged into one
A node Node3 chain enters the position of Node1 in chained list, instead of the two nodes of Node1 and Node2, the wherein start of Node3
Field value is assigned a value of the start field value of Node1, and the end field value of Node3 is assigned a value of the end field value of Node2, Node3's
Next field value is assigned a value of the next field value of Node2.
The utility model has the advantages that
1. method of the invention is different from existing real-time task (or event) schedulability test method, side of the invention
Method by indicated with linear linked list node task (or event) scheduling execute the stage, using linear linked list recording dispatching simulation and
Test process, existing real-time task (or event) schedulability test method do not use the simulation of linear linked list record test
And scheduling process.
Method of the invention makes the time of method of the invention using the simulation of linear linked list recording dispatching and test process
Complexity is to test the polynomial time of task instances quantity total in section, therefore, with existing real-time task (or event)
The exponential time of schedulability test method is compared, and from the point of view of common situation, improves efficiency;It is especially higher at preceding n-1
The minimum least common multiple LCM for reaching the period of priority tasksn-1When much larger than number of tasks, efficiency can be significantly improved.
In existing real-time task (or event) schedulability test method, it should consider to test total in section appoint
Pragmatic number of cases amount, meanwhile, test siding-to-siding block length is also greater than equal to LCMn;In method of the invention, due to LCMn/Tn LCMn-1,
It need to only consider to test task instances quantity total in section, even if being equal to LCM in test siding-to-siding block lengthn-1Or it is equal to LCMn, adjustable
The degree property test of length no more than LCM in sectionn;And LCM is equal to for TP model schedulability test siding-to-siding block lengthn-1 LCMn.This
The method of invention is in section [Φmin (n-1), Φmin (n-1)+LCMn-1) the interior preceding n-1 task τ of simulation1,τ2,...,τn-1, not firm
The n-th task is simulated on border, works as LCMn-1Less than LCMnWhen method ratio of the invention in section [S, S+LCMn) in directly simulation whole n it is a
The method of task is high-efficient.Method of the invention is to task τnOnly check that its schedulability reduces pair without operation simulation
The operation for adjusting chained list, improves efficiency.
The adjacent chain list node merging for the condition that meets is advantageously reduced chained list knot in simulation process by method of the invention
Point quantity, that is, chained list length, improves the efficiency of test.For example, chained list node quantity used is up to 5 in embodiment 10 and 11,
I.e. scan chain table length is up to 5 in simulation process, is siding-to-siding block length LCM than conventional method simulation step numbern-1=LCMn =24 want small
Much.
In the method for the present invention, for distribute n >=1 real-time task on a processor or CPU or Core or
Task-set { the τ of person's event1,τ2, ...,τn, these tasks are periodic or not timing occurs, it is thus necessary to determine that this
The schedulability of business collection, each task τi, 1iN is endowed a unique fixed priority i, and 1 represents highest priority,
N represents lowest priority.
Each task τiWith following parameter: max calculation time or maximum runing time Ci ', copy time 0Ci copy 1, the load time 0Ci restore 1, Ci←Ci copy+Ci '+Ci restore, scheduling CP mould is preferentially seized for classical
Type, Ci copy=Ci restore=0, i.e. Ci←Ci ';The two neighboring task instances or calling of each task or being most short to for operation
It is T up to the timei;The opposite deadline date that each task instances execute completion is Di;0<Ci min(Di, Ti);When system starts
Between t be the moment 0;First task instances of each task are Φ relative to the release offset at moment time 0i, i.e. task τi?
One task instances begins to pass through time Φ from the time 0iIt is released, later at least every time span TiIt is released, i.e. task τi
Release time of j-th of task instances be no earlier than as Φi+(j–1)×Ti, j is greater than the integer equal to 1 here;Variables L RTi
Logger task τiMaximum response time in current priority setting and task release offset, to each k, 2kN, LRT1
←C1, LRTk←Ck;LCM1←T1, LCMk ←lcm(LCMk–1, Tk);I, j, k, n take positive integer.To each i, 1iN, note
Task τiRelease time of first task instances for being no earlier than scheduling stable point S release be that new release deviates, also use Φi
It indicates, at this moment Φmin (n)It is equal with S.
Detailed description of the invention:
Attached drawing 1 be 10 the method for the embodiment of the present invention time interval [11,11+24) between schedulability test
Figure.
In figure: LCM1=6, LCM2=24, LCM3=24, LCM4=24, CP model.
As i=4, task τ4Test section [11,11+24) share 2 task instances.
To task instances τ4,1, C4=3, from r4,1=14 start, successively have greatly idle section [15,16), [19,20),
[22,23) it meets the requirements, τ4,1It is schedulable, at this moment LRT4=9;To task instances τ4,2, C4=3, from r4,2=26 start, and successively have pole
Large space section [26,28), [33,35) it meets the requirements, τ4,2
It is schedulable, at this moment LRT4=9.
LRT1=2, LRT2=4, LRT3=2, LRT4=9, max1≤i≤n(LRTi)=9。
Attached drawing 2 be method described in the embodiment of the present invention 11 time interval [16,16+24) between schedulability test
Figure.
In figure: LCM1=6, LCM2=24, LCM3=24, LCM4=24, TP model.
As i=4, task τ4Test section [16,16+24) share 2 task instances.
To task instances τ4,1, C4=3, from r4,1=16 start, successively have permission section [21,24) meet the requirements, τ4,1It is adjustable
It spends, at this moment LRT4=8;To task instances τ4,2, C4=3, from r4,2=28 start, successively have Maximum Space section [29,30), [31,
32), then have permission space [37,40) meet the requirements, τ4,2
It is schedulable, at this moment LRT4=12.
LRT1=1, LRT2=3, LRT3=3, LRT4=12, max1≤i≤n(LRTi)=12。
Specific embodiment:
Embodiment 1:
A kind of semi-direct analogy method of real-time task schedulability test based on linear linked list, this method comprises: to every
A i, 1iN remembers task τiRelease time of first task instances for being no earlier than scheduling stable point S release be new release
Offset is put, Φ is also usediIt indicates, according to given scheduling model, using the simulation of linear linked list recording dispatching and test process, first
To task τ1,τ2,...,τn-1, in time range Φmin (n-1)To Φmin (n-1)+ LCMn-1Inside according to priority mould in descending order
Intend each task τiScheduling execute, then to task τ on current chained listnIt is tested.
Specific embodiment:
Embodiment 1:
A kind of semi-direct analogy method of real-time task schedulability test based on linear linked list, this method comprises: to every
A i, 1iN remembers task τiRelease time of first task instances for being no earlier than scheduling stable point S release be new release
Offset is put, Φ is also usediIt indicates, according to given scheduling model, using the simulation of linear linked list recording dispatching and test process, first
To task τ1,τ2,...,τn-1, in time range Φmin (n-1)To Φmin (n-1)+ LCMn-1Inside according to priority mould in descending order
Intend each task τiScheduling execute, then to task τ on current chained listnIt is tested.
Embodiment 2:
Semi-direct analogy method, institute are tested according to the real-time task schedulability described in embodiment 1 based on linear linked list
That states uses the simulation of linear linked list recording dispatching and test process, first to task τ1,τ2,...,τn-1, in time range
Φmin (n-1)To Φmin (n-1)+ LCMn-1Each task τ is inside according to priority simulated in descending orderiScheduling execute, then exist
To task τ on current chained listnIt carries out test to refer to, executes and tested using the dispatching simulation of a linear linked list logger task
The start field of chained list node is recorded in journey, task instances Starting Executing Time point, and task instances execute intermission point record
To the end field of chained list node, each chained list node was indicated from the time point that node start field value provides to the node
The continuous scheduling of one or more task instances executes between the time point that end field value provides;Φmin (1)←Φ1, LRT1←
C1;To each i, 2iN, Φmin (i)←min(Φmin (i-1), Φi), LRTi←Ci;MAXinter←Φmin (n-1)+ LCMn-1;It gives
Indexed variable flag assigns an initial value;[first in time range Φmin (n-1)To Φmin (n-1)+ LCMn-1Interior simulation task τ1From
1st to LCMn-1/T1The execution of a task instances, that is, establish LCMn-1/T1A chained list node, from small to large to each j, 1
jLCMn-1/T1, " the start field of j-th of chained list node is assigned a value of task instances τ1,jRelease time r1,j, j-th of chained list
The end field of node is assigned a value of r1,j+C1;〗;Then to task τ2,τ3,...,τn-1, in time range Φmin (n-1)It arrives
Φmin (n-1)+LCMn-1Each task τ is inside according to priority simulated in descending orderiFrom the 1st to LCMn-1/TiA task
The scheduling of example executes, that is, " to each i, 2iN -1, each j, 1jLCMn-1/Ti, j from small to large successively hold by calling
Individual task example function F1 is to task τ for row simulationiJ-th of task instances τi,jIt is simulated;〗;];I ← n calls test
Individual task function F2 is simulated to task τiIt is tested;Providing task-set is schedulable information.
Embodiment 3:
Real-time task schedulability according to embodiment 1 or 2 based on linear linked list tests semi-direct analogy method,
The execution simulation individual task example function F1 is to task τiJ-th of task instances τi,jSimulation is carried out to refer to, [according to
ri,jBy being searched and from current work j in chained list compared with start field value and end field value in node in chained list
Relative position start, by when CP module scheduling by runing time CiCorrespond to 1 or continuous multiple tasks τiIdle interval chain
Table node, the sum of siding-to-siding block length that these nodes indicate are equal to Ci;By when TP module scheduling by runing time CiCorrespond to task τi
A permission section node PINode, the siding-to-siding block length that node PINode is indicated is equal to Ci, and in task instances release
Between to whole task τs between node PINodeiVery big idle section be all merged into its adjacent interval;Chronologically successively
Chain enters the corresponding position in chained list, and chain merges the chained list node that scheduling executes interval time point overlapping margins while entering chained list,
Runing time C can not be completed on chained list in simulation processiTo it is corresponding when variable flag value be different from its initial value;
Logger task τ after the completion of simulationiCurrent maximum response time LRTi;If indexed variable flag value be different from its initial value or
Person LRTi>Di, then return to non-scheduling information and stop to test the schedulability of the task-set;].
Embodiment 4:
Real-time task schedulability according to embodiment 1 or 2 or 3 based on linear linked list tests semi-direct simulation side
Method, the test simulation individual task function F2 is to task τiIt carries out test to refer to, [when pressing TP module scheduling: " successively from every
The release time point of a task instances starts at most elapsed-time standards length LCMi-1, it is determined whether there is task τiPermission section, such as
Fruit does not have, then returns to non-scheduling information and stop to test the schedulability of the task-set;Each task instances simulation is completed
After record task τiCurrent maximum response time LRTi;If LRTi>Di, then return to non-scheduling information and stop to this
The schedulability test of business collection;〗;
When by CP module scheduling: " from time point Φmin (i)Start to time point Φmin (i)+LCMi, successively to task τiIt is every
A task instances determine whether that the sum of siding-to-siding block length is more than or equal to Ci1 or continuous multiple very big idle sections, if do not had
Have, then return to non-scheduling information and stops to test the schedulability of the task-set;Postscript is completed in each task instances simulation
Record task τiCurrent maximum response time LRTi;If LRTi>Di, then return to non-scheduling information and stop to the task-set
Schedulability test;〗;].
Embodiment 5:
Real-time task schedulability according to embodiment 1 or 2 or 3 or 4 based on linear linked list tests semi-direct mould
Quasi- method, the task τ of the TP modeliPermission section refer to: task τiA free time section EI refer to, for task
τ1,τ2,...,τn-1Scheduling result in one without occupied continuous time range section [t1, t2), t2>t1, in the area
It is interior there is no task-set { τ1,τ2,...,τn-1In task release, and in moment t1And the task-sets discharged all before
{τ1,τ2,...,τn-1In task be all finished;
Task τiA free time section [t1, t2) it is known as a task τiVery big free time section maxEI refer to, moment t1
For task τiRelease time or task-set { τ1,τ2,...,τn-1In job end time, and from moment t2It begins with
Task-set { τ1,τ2,...,τn-1In task release or t2Equal to Φmin (i-1)+k×LCMi-1, k1;For TP model, such as
One task τ of fruitiIdle section [t1, t2) or very big free time section [t1, t2) meet t2-t1 Ci, then section [t1, t2) claim
For task τiA permission section PI.
Embodiment 6:
Real-time task schedulability test according to embodiment 1 or 2 or 3 or 4 or 5 based on linear linked list is semi-direct
Analogy method, it is described to provide that the task-set is schedulable or non-scheduling information, it is schedulable information providing task-set
When, provide max1 i n(LRTi), indicate whole task τsiPeak response in current priority setting and task release offset
Time.
Embodiment 7:
Real-time task schedulability test half according to embodiment 1 or 2 or 3 or 4 or 5 or 6 based on linear linked list
Direct analogy method, the chained list node that the merging scheduling executes interval time point overlapping margins refers to, if in chained list
It can generate or there are two adjacent node Node1 and Node2, and the end field value of Node1 to be made to be equal to the start word of Node2
The two nodes are then merged into the position that a node Node3 chain enters Node1 in chained list, instead of Node1 and Node2 by segment value
The two nodes, wherein the start field value of Node3 is assigned a value of the start field value of Node1, and the end field value of Node3 is assigned
Value is the end field value of Node2, and the next field value of Node3 is assigned a value of the next field value of Node2.
Embodiment 8:
Real-time task schedulability test according to embodiment 1 or 2 or 3 or 4 or 5 or 6 or 7 based on linear linked list
Semi-direct analogy method executes simulation individual task example function F1 to task τiJ-th of task instances τi,jIt is simulated,
That is, [tempCi←Ci;According to ri,jIt is current by being searched compared with start field value and end field value in node in chained list
Relative position of the operation j in chained list, point or less 5 kinds of situations, and in simulation process as far as possible merge scheduling occupied section when
Between put overlapping margins node: (one) is if ri,jGreater than the end field value of the last one node, then " inter ← MAXinter–
ri,j;Increase a new node to enter as the last node chain in chained list, the start field value of new node is assigned a value of ri,j, new to tie
The end field value of point is assigned a value of min (ri,j+tempCi, MAXinter);If inter < tempCi, then modified logo variable flag
Value is different from its initial value;〗;(2) if ri,jEqual to the end field value of the last one node, then " inter ← MAX is enabledinter–
ri,j;By min (MAXinter, ri,j+tempCi) it is assigned to the end field of the last one node;If inter < tempCi, then repair
Change indexed variable flag value different from its initial value;〗;(3) if ri,jLess than the start field value of first node, then " note the
One node is Node1, enables the start field value-r of inter ← Node1i,j;If inter < tempCi, then " by Node1
Start field value be assigned a value of ri,j;If it is pressing CP module scheduling, then tempCi←tempCi–inter;If it is by TP mould
Type is dispatched, then tempCi←Ci;Then continue to dispatch current j-th of task instances by following situation (five);』;If inter >
tempCi, then increase a new node and enter as first node chain in chained list, wherein the start field value of new node is assigned
Value is ri,j, the end field value of new node is assigned a value of ri,j+tempCi;If inter is equal to tempCi, then by first node
Start field value is assigned a value of ri,j;〗;(4) make r if there is node Node1 and Node2i,jEnd field value greater than Node1
And ri,jStart field value less than Node2, the then " start field value-r of inter ← Node2i,j;If inter >
tempCi, then in chained list between Node1 and Node2 increase a new node chain enter, wherein newly node start field value
It is assigned a value of ri,j, the end field value of new node is assigned a value of ri,j+tempCi;If inter is equal to tempCi, then by Node2's
Start field value is assigned a value of ri,j;If inter < tempCi, then " the start field value of Node2 is assigned a value of ri,j;If it is
By CP module scheduling, then tempCi← tempCi–inter;If it is pressing TP module scheduling, then tempCi←Ci;At this time will
Node2 is denoted as Node1, then continues to dispatch current j-th of task instances by following situation (five);』;〗;(5) if there is
Node Node1 makes ri,jStart field value more than or equal to Node1 and the end field value less than or equal to Node1, then continue
Current j-th of task instances are dispatched, until the remaining time tempC of current j-th of task instancesiIt is zero, that is, executes loop body
H, loop control condition are as follows: work as tempCi>0;Loop body H specifically: " if " enabled after Node1 without other nodes
inter ← MAXinterThe end field value of-Node1;If intertempCi, then [the end field value of Node1 is added
tempCiIt is assigned to the end field of Node1;LRTi← max (end field value-the r of Node1i,j, LRTi);tempCi←0;];Such as
Fruit inter < tempCi, then [the end field value of Node1 is assigned a value of MAXinter, modified logo variable flag value is different from it
Initial value, tempCi←0;];』;If having other nodes after Node1: the next field meaning node for remembering Node1 is
The end field value of the start field value-Node1 of Node2, inter ← Node2;If inter > tempCi, then " will
End field value+the tempC of Node1iIt is assigned to the end field of Node1, LRTi← max (end field value-the r of Node1i,j,
LRTi);tempCi←0;』;If inter is equal to tempCi, then " LRTi← max (end field value-the r of Node1i,j, LRTi);
The end field value of Node1 is assigned a value of to the end field value of Node2, the next field value of Node1 is assigned a value of to the next of Node2
Field value;tempCi←0;』;If inter < tempCi, then " the end field value of Node1 is assigned a value of to the end field of Node2
The next field value of Node1, is assigned a value of the next field value of Node2 by value;If it is pressing CP module scheduling, then tempCi←
tempCi–inter;If it is pressing TP module scheduling, then tempCi←Ci;』;〗;At the beginning of if indexed variable flag value is different from it
Value or LRTi>Di, then return to non-scheduling information and stop to test the schedulability of the task-set;].
Embodiment 9:
Real-time task schedulability according to embodiment 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 based on linear linked list
Semi-direct analogy method is tested, test simulation individual task function F2 is to task τiIt is tested, that is, [press TP module scheduling
When: " on current chained list, from time point Φmin (i)To time point Φmin (i-1)+LCMi-1Search whole permission section iPI, note
The number for allowing section iPI is k, if k is equal to 0, returns to non-scheduling information and stops the schedulability to the task-set
Test;If k > 0, " tempCi←Ci;Remember from Φmin (i-1)To Φmin (i-1)+LCMi-1Interior first permission section is [ts1,
ts2);To each j, 1jLCMi/Ti, " modj← mod(ri,j- S, LCMi-1)+S, if modj<Φmin (i-1)And j > 1, then
modj←modj+ LCMi-1;Remember modjFirst permission section later is [tj1, tj2), if modjTo Φmin (i-1)+LCMi-1
Between without allow section, then by [ts1+LCMi-1, ts2+LCMi-1) it is used as modjFirst permission section later, is still denoted as
[tj1, tj2);If modj<tj1, then, if tj1≠t1, then LRTi←max(tj1–modj+ tempCi, LRTi);";』;If
LRTi>Di, then return to non-scheduling information and stop to test the schedulability of the task-set;〗;
When by CP module scheduling: " to each j, 1jLCMi/Ti, " tempCi←Ci;modj← mod(ri,j- S,
LCMi-1)+S, if modj<Φmin (i-1)And j > 1, then modj←modj+ LCMi-1;tempLRTi← LRTi, LRTi←0;Loc
←modj;cycle←0;Execute loop body Loop1, loop control condition are as follows: work as tempCi> 0, loop body Loop1 is specific
Are as follows: it " executes and finds task τiVery big free time interval function SearchmaxEI (i);If LRTi>Di, then non-scheduling is returned
Information simultaneously stops to test the schedulability of the task-set;If indexed variable flag value is different from its initial value, [cycle value
Increase by 1;Loc←Φmin (i-1);Its initial value is assigned to indexed variable flag value;];』;LRTi← max(LRTi, tempLRTi);If
Indexed variable flag value is different from its initial value or LRTi>Di, then return to non-scheduling information and stop to the adjustable of the task-set
The test of degree property;〗;Wherein, task τ is foundiVery big free time interval function SearchmaxEI (i) refer to, " in task τ1,
τ2,...,τn-1Scheduling result since time point Loc be no more than time point Φmin (i-1)+LCMi-1In the range of find task
τiFirst greatly idle section;If not finding task τiVery big free time section maxEI, then [if cycle > 1, return
It returns non-scheduling information and stops to test the schedulability of the task-set;Otherwise, modified logo variable flag value is different from it
Initial value;];If finding a task τiVery big free time section maxEI, be denoted as [tj1, tj2), then " if tj2–tj1
tempCi, then [LRTi←tj1+cycle×LCMi-1–Loc+ tempCi+ LRTi;tempCi←0;];If tj2–tj1<
tempCi, then [LRTi←tj2+cycle×LCMi-1–Loc+LRTi;tempCi←tempCi–(tj2–tj1);Loc←
tj2;];』;〗;].
Embodiment 10:
It is schedulable according to the real-time task based on linear linked list described in embodiment 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9
Property the semi-direct analogy method of test, be scheduled by CP model, the priority of each task instances is as corresponding in the present embodiment
The priority of the priority of task, i.e., each task instances is fixed.
Given set of tasks { the τ being made of n=4 periodic task (or event)1,τ2,τ3,τ4, related parameter such as table 1
It is shown.
1 task parameters of table
2 are shown in Table after stable point S=11 and adjustment release offset have been determined using existing method, by given CP model,
Using linear linked list recording dispatching process, an initial value is assigned to indexed variable flag value and uses semi-direct simulation since point S
Method carries out task-set { τ1,τ2,τ3,τ4Schedulability test;Wherein, LCM1=6, LCM2=24, LCM3=24, LCM4=24。
Φmin (1)=Φmin (2)=Φmin (3)=Φmin (4)=11.Task τ1,τ2,τ3Section [11,11+24) task schedule and task τ4
Test case is as shown in Fig. 1, all schedulable;Task τ4Also schedulable after tested.Simulation complete when the task-set it is schedulable and
Maximum response time is 9.
The task parameters that table 2 gives stable point S=11 and is adjusted after release offset
The task parameters that table 2 gives stable point S=11 and is adjusted after release offset
Embodiment 11:
It can according to the real-time task based on linear linked list described in embodiment 1 or 2 or 3 or 4 or 5 or 6 or 7 or 8 or 9 or 10
The semi-direct analogy method of scheduling property test, the present embodiment it is given be to be scheduled by TP model, each task instances it is preferential
Grade is the priority of corresponding task, i.e., the priority of each task instances is fixed.
Given set of tasks { the τ being made of n=4 periodic task (or event)1,τ2,τ3,τ4, related parameter such as table 3
It is shown.
3 task parameters of table
4 are shown in Table after stable point S=16 and adjustment release offset have been determined using existing method, by given TP model,
Using linear linked list recording dispatching process, an initial value is assigned to indexed variable flag value;Since point S, semi-direct simulation is used
Method carries out task-set { τ1,τ2,τ3,τ4Schedulability test;Wherein, LCM1=6, LCM2=24, LCM3=24, LCM4=24。
Task τ1,τ2,τ3Section [16,16+24) task schedule and task τ4Test case is as shown in Fig. 2, all schedulable;Task τ4
Also schedulable after tested.The task-set is schedulable when simulation is completed and maximum response time is 12.
Table 4 gives the task parameters for determining stable point S=16 and being adjusted after release offset
Table 4 gives the task parameters for determining stable point S=16 and being adjusted after release offset
Claims (6)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510481348.1A CN105260497B (en) | 2015-08-07 | 2015-08-07 | Semi-direct simulation method for real-time task schedulability test based on linear linked list |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201510481348.1A CN105260497B (en) | 2015-08-07 | 2015-08-07 | Semi-direct simulation method for real-time task schedulability test based on linear linked list |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN105260497A CN105260497A (en) | 2016-01-20 |
| CN105260497B true CN105260497B (en) | 2019-04-30 |
Family
ID=55100186
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN201510481348.1A Expired - Fee Related CN105260497B (en) | 2015-08-07 | 2015-08-07 | Semi-direct simulation method for real-time task schedulability test based on linear linked list |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN105260497B (en) |
Families Citing this family (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP6712934B2 (en) * | 2016-08-31 | 2020-06-24 | 株式会社日立ソリューションズ | Data analysis device and data analysis method |
| CN106453140B (en) * | 2016-09-29 | 2019-12-06 | 北京汽车股份有限公司 | Message processing method and device based on electronic control unit |
| CN106773711B (en) * | 2017-01-13 | 2019-09-17 | 清华大学 | A kind of the hybrid tasks scheduling method and model of railway locomotive operation steerable system |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7165252B1 (en) * | 1999-06-21 | 2007-01-16 | Jia Xu | Method of scheduling executions of processes with various types of timing properties and constraints |
| CN100462924C (en) * | 2005-03-25 | 2009-02-18 | 株式会社东芝 | Schedulability determination method and real-time system |
| CN103823706A (en) * | 2014-02-12 | 2014-05-28 | 浙江大学 | RTLinux (real-time Linux) based real-time scheduling method for analog simulation of controlled object model |
| CN104156266A (en) * | 2014-08-14 | 2014-11-19 | 黑龙江大学 | Method for determining real-time task or event schedulability test minimum interval |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002054238A2 (en) * | 2000-12-29 | 2002-07-11 | Honeywell International Inc. | Methods and apparatus for sharing slack in a time-partitioned system |
-
2015
- 2015-08-07 CN CN201510481348.1A patent/CN105260497B/en not_active Expired - Fee Related
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7165252B1 (en) * | 1999-06-21 | 2007-01-16 | Jia Xu | Method of scheduling executions of processes with various types of timing properties and constraints |
| CN100462924C (en) * | 2005-03-25 | 2009-02-18 | 株式会社东芝 | Schedulability determination method and real-time system |
| CN103823706A (en) * | 2014-02-12 | 2014-05-28 | 浙江大学 | RTLinux (real-time Linux) based real-time scheduling method for analog simulation of controlled object model |
| CN104156266A (en) * | 2014-08-14 | 2014-11-19 | 黑龙江大学 | Method for determining real-time task or event schedulability test minimum interval |
Non-Patent Citations (2)
| Title |
|---|
| Minimal schedulability testing interval for real-time perodic tasks with arbitrary release offsets;Yu Jiang等;《2014IEEE International Conference on High Performance Computing and Communications》;20150312;第611-614页 |
| 一个调度fork-join任务图的新算法;刘振英等;《软件学报》;20020423;第13卷(第4期);第693-697页 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN105260497A (en) | 2016-01-20 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| TWI742045B (en) | Task resource scheduling method and device | |
| CN104156266B (en) | Determine the method that real-time task or event schedulability test smallest interval | |
| CN105260497B (en) | Semi-direct simulation method for real-time task schedulability test based on linear linked list | |
| CN112748993A (en) | Task execution method and device, storage medium and electronic equipment | |
| Nasri et al. | Non-work-conserving non-preemptive scheduling: motivations, challenges, and potential solutions | |
| CN108459966A (en) | Dispatching method, device, equipment and the computer readable storage medium of test suite | |
| CN103744730B (en) | Task scheduling method and device | |
| CN103995778A (en) | Script file generation method and device based on event and action | |
| CN110928657A (en) | Deterministic Analysis Methods for Embedded Systems | |
| CN110276689A (en) | Realization method of smart contract based on dynamic decision | |
| CN105138401B (en) | A direct simulation method for real-time task schedulability test based on linear linked list | |
| JP2006505189A (en) | How to optimize the link schedule | |
| US10198290B2 (en) | Method for composing and executing a real-time task sequence plan | |
| CN104239218B (en) | Real-time software stress test case generation method and device | |
| Rahni et al. | Feasibility analysis of non-concrete real-time transactions with edf assignment priority | |
| CN105183640B (en) | Real-time task schedulability test copy analogy method based on linear linked list | |
| CN112835773B (en) | Method and device for evaluating task running instantaneity in operating system | |
| Wang et al. | Schedulability analysis for self-suspending tasks under edf-like scheduling | |
| CN105224400B (en) | Using the method for linear linked list record real-time task scheduling process | |
| Matsikoudis et al. | On the schedulability of real-time discrete-event systems | |
| CN116069471A (en) | Deterministic scheduling method and device for tasks and electronic equipment | |
| Zou et al. | A non-work-conserving model for P-FRP fixed priority scheduling | |
| CN120410040B (en) | A Data Evaluation System and Method for Water Supply Equipment Maintenance Based on Big Data Analysis | |
| CN117290113B (en) | Task processing method, device, system and storage medium | |
| CN115766505B (en) | Method and system for verifying the schedulability of microprograms in embedded systems |
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 | ||
| CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20190430 Termination date: 20210807 |
|
| CF01 | Termination of patent right due to non-payment of annual fee |