practical schedulability analysis for generalized sporadic tasks in distributed real-time systems...
TRANSCRIPT
Practical Schedulability Analysis for Generalized Sporadic Tasks in Distributed Real-Time SystemsYuanfang Zhang1, Donald K. Krecker2,
Christopher Gill1, Chenyang Lu1, Gautam H. Thaker2
1.Washington University, St. Louis, MO, USA
2.Lockheed Martin Advanced Technology Laboratories
Outline
Motivation Generalized Sporadic Task Model Schedulability Test for independent generalized
sporadic tasks Schedulability Test for end-to-end generalized
sporadic tasks Generalized release guard synchronization protocol
Simulations Conclusions
Motivation
Offline schedulability analysis Periodic task: period Traditional sporadic task: minimum inter-arrival
time Generalized sporadic Tasks
Higher instantaneous arrival rate Lower average arrival rate
Problem Overestimate the task’s time demand Pessimistic schedulability analysis
Generalized sporadic task model Traditional sporadic task Ti
(1, Wi) limit, window
Generalized sporadic task Ti
Introduce a greater limit Allow multiple pairs of limits and windows {(Zi,k, Wi,k) 1≤k≤K(i)}
Existing leaky bucket filter model ρ: token input rate σ: Bucket size
Leaky bucket vs. generalized sporadic task Generalized sporadic
task K(i) = 3 {(1,2), (3, 10), (5, 18)}
Leaky bucket model ρ =0.5 σ =1
Leaky bucket model greatly overestimates the workload
Time-Demand Analysis
Maximum number of arrivals
Maximum execution time demand
Earliest arrival time
The longest response time for Ti occurs during a level-i busy period if the arrivals of all tasks with equal or higher priority satisfy the maximum number of arrivals in that period
, ,
0 0( )
min ( ) |1 ( ) 0ii i k i k
if tMNA t
MNA t w z k K i if t
( ) ( )*i i iTD t MNA t
,1
,1, ,
0
( ) 0 0
max ( ) |1 ( )
i i
ii i k i k
if n
EAT n if n z
if n zEAT n z w k K i
Schedulability Test for independent generalized sporadic tasks One example
T1: a periodic task
T2: a generalized sporadic task
Arrival time constraints priority Exec. time Deadline
T1 {(1,40)} 1 10 40
T2 {(1, 10), (2, 30), (3, 50)} 2 8 50
Schedulability Test for T2 Compute an upper bound on the duration of a level-i busy period
D2 = min { t>0 | t = MNA1(t)*10 + MNA2(t)*8} = 26 Compute an upper bound on the number of instances Ti in a level-i
busy period of duration Di M2 = MNA(D2) = 2
For m=1 to M2 Compute an upper bound on the completion time of the mth job of
Ti in a level-i busy period C2(1) = min{ t>0 | t = MNA1(t)*10+8} = 18, C2(2) = 26
Compute an upper bound on the response time of the mth job of Ti in the busy period V2(1) = C2(1) – EATi(1) = 18, V2(2) = 16
The maximum is the WCRT for Ti W2 = 18
Compare WCRT with Di W2 < D2, task 2 is schedulable.
Schedulability Test for end-to-end generalized sporadic tasks Generalized release guard gi,j for each non-initial
subtask Ti,j (j>1) At the initial time, set gi,j=0 When m-1th job of Ti,j is released at time ri,j(m-1), update
gi,j=ri,j(m-1)+(ri,1(m)-ri,1(m-1)) Update gi,j to the current time if the current time is a processor
idle point on the processor where Ti,j executes An upper bound Wi to the end-to-end response time
of any generalized sporadic task Ti in a fixed-priority system synchronized according to the generalized release guard protocol is the sum of the upper bounds of WCRTs for all its subtasks
Simple Example
1 periodic task Task 1
period 40, highest priority 2 sporadic tasks
Task 2 Time constrains {(1, 10), (2, 30), (3, 50)}, 2nd highest priority
Task 3 Time constrains{(1, 30), (2, 80)}, lowest priority
TiTi,j Exec time Phase Pi
T1 T1,1 10 0 P1
T2 T2,1 8 0 P1
T2,2 5 0 P2
T3 T3,1 15 18 P2
Schedule with RG
0 10 40 50
10 18 26 30 38
18 23 28 33 43 48
23 28 33 43 48
50 58 60 68
68 73
63
T1,1
T2,1
T2,2
T3,1
Release time
Sync signal
RG
63
P1
P2
Idle point
Idle point
End-to-end WCRTs
WCRT in the above schedule T1 is 10
T2 is 23
T3 is 25
WCRT bounded by our generalized sporadic task analysis T1 is 10
T2 is 23
T3 is 25
Since they are matching, WCRT bounds calculated by our analysis are true WCRTs.
Simulations 4 end-to-end periodic tasks
Allocated to 3 processors (execution time)
T1 T2 T3 T4
Period 312 90 162 203
Deadline 284 90 162 203
Priority 4 1 2 3
T1,1 T1,2 T1,3 T2,1 T2,2 T2,3 T3,1 T3,2 T3,3 T4,1 T4,1
P1 21 75 30 42
P2 23 30 58
P3 24 13 18 20
Sporadic Task Periodic task T3 (for example T3,1 on P1)
Make T3 jittery (1-x/100)*162 Arrival constrains {(1, 113), (2, 324)}
Arrival constrains {(1, 65), (2, 324)}
0 113
30 30
324
30
X=30
X=60
0 65
30 30
324
30
0 162
30 30
When T3 is allowed 30 percent jitter
0
200
400
600
800
1000
T1 T2 T3 T4
WC
RT
Bo
un
d
PT/RGST/RG
PT/RG Minimum inter-arrival
time analysis ST/RG
Generalized sporadic task analysis
ST/RG outperforms PT/RG on WCRT bound for T1
WCRT bounds for T1 and T3 in PT/RG are infinite
When T3 is allowed 60 percent jitter
0
200
400
600
800
1000
T1 T2 T3 T4
WC
RT
Bo
un
dPT/RGST/RG
When T3 jitter increases
0
200
400
600
800
0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95
Jitter Percentage
WC
RT
Bo
un
d f
or
T1
PT/RG
ST/RG
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90
Jitter Percentage
Mis
s R
atio
PT/RG
ST/RG
When the jitter percentage reaches 37.5, the WCRT bound for T1 is infinite when PT/RG is used.
The WCRT bounds for T1 are under 600 when ST/RG is used The miss ratios that are calculated by PT/RG reach 75% The miss ratios that are calculated by ST/RG are always 0
Representative Example
Military shipboard computing 15 end-to-end periodic tasks on 50
processors T10 becomes a generalized sporadic task
Highest priority Share processors with other 12 tasks Original period 200
The WCRT bounds for 6 tasks in PT/RG are infinite
Arrival time constraints {(1, 50), (2, 400)
0
2000
4000
6000
8000
10000
T1 T2 T3 T4 T5 T6 T7 T8 T9 T10 T11 T12 T13 T14 T15
WC
RT
Bo
un
d
PT/RG ST/RG
Comparisons under different scenarios
0
0.2
0.4
0.6
0.8
1
0 10 20 30 40 50 60 70 80 90
Jitter Percentage
Mis
s R
atio
PT/RG
ST/RG
0
0.2
0.4
0.6
0.8
1
1 2 3 4 5 6 7
Number of Simultaneous Release
Mis
s R
atio
PT/RG
ST/RG
0
0.2
0.4
0.6
0.8
1
2 3 4 5 6 7 8
Number of Time Constraints
Mis
s R
atio
PT/RG
ST/RG
0
0.2
0.4
0.6
0.8
1
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Number of Sporadic Tasks
Mis
s R
atio
PT/RG
ST/RG
• T10 jitter increases • Limit in the first window increases
• Number of time constraints for T10 increases • Number of sporadic tasks increases