Practical Schedulability Analysis for Generalized Sporadic Tasks in

advertisement
Practical Schedulability Analysis for
Generalized Sporadic Tasks in
Distributed Real-Time Systems
Yuanfang 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



Generalized sporadic Tasks



Periodic task: period
Traditional sporadic task: minimum inter-arrival
time
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


Generalized sporadic task Ti




(1, Wi) limit, window
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



Leaky bucket model



K(i) = 3
{(1,2), (3, 10), (5, 18)}
ρ =0.5
σ =1
Leaky bucket model
greatly overestimates
the workload
Time-Demand Analysis

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

Maximum number of
arrivals

Maximum execution
time demand

Earliest arrival time

if
0
MNAi (t )  

min MNAi (t  wi ,k )  zi ,k |1  k  K (i ) if
t0
t 0
TDi (t )  MNAi (t )* i

if

EATi (n)  0
if

max  EATi (n  zi ,k )  wi ,k |1  k  K (i ) if
n0
0  n  zi ,1
n  zi ,1
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


Compute an upper bound on the response time of the mth job of
Ti in the busy period



C2(1) = min{ t>0 | t = MNA1(t)*10+8} = 18, C2(2) = 26
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
Ti
Ti,j
Exec time
Phase
Pi
T1
T1,1
10
0
P1
T2
T2,1
8
0
P1
T2,2
5
0
P2
T3,1
15
18
P2
T3
Schedule with RG
Release
time
T1,1
0
10
40
50
T2,1
10
P1
18
26
30
38
58 60
68
RG
Sync
signal
P2
50
T2,2
18
23
28
33
28
33
43
48
63
48
63
T3,1
23
43
Idle
point
Idle
point
68
73
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
T1
T2
T3
T4
Period
312
90
162
203
Deadline
284
90
162
203
Priority
4
1
2
3
Allocated to 3 processors (execution time)
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
P2
P3
30
23
24
42
30
13
58
18
20
Sporadic Task

Periodic task T3 (for example T3,1 on P1)
30
30
0

162
X=30
Make T3 jittery (1-x/100)*162

Arrival constrains {(1, 113), (2, 324)}
30
30
0

113
324
Arrival constrains {(1, 65), (2, 324)}
30
30
0
30
65
30
X=60
324
When T3 is allowed 30 percent jitter

1000
PT/RG
ST/RG
PT/RG

WCRT Bound
800

600
ST/RG

400

200
0
T1
T2
T3
T4
Minimum inter-arrival
time analysis
Generalized sporadic
task analysis
ST/RG outperforms
PT/RG on WCRT
bound for T1
When T3 is allowed 60 percent jitter
1000
PT/RG
ST/RG
WCRT Bound
800
600
400
200
0
T1
T2
T3
WCRT bounds for T1 and T3 in PT/RG are infinite
T4
When T3 jitter increases
800
1
PT/RG
PT/RG
ST/RG
ST/RG
0.8
Miss Ratio
WCRT Bound for T 1
600
400
0.6
0.4
200
0.2
0
0
0
5
10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95
Jitter Percentage




0
10
20
30
40
50
60
70
80
90
Jitter Percentage
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
Arrival time constraints {(1, 50), (2, 400)
10000
WCRT Bound
8000
6000
4000
2000
0
T1
T2
T3
T4
T5
T6
T7
T8
PT/RG
T9
T10 T11
T12 T13
T14 T15
ST/RG
The WCRT bounds for 6 tasks in PT/RG are infinite
Comparisons under different scenarios
1
PT/RG
1
PT/RG
ST/RG
ST/RG
0.8
Miss Ratio
Miss Ratio
0.8
0.6
0.6
0.4
0.4
0.2
0.2
0
0
1
0
10
20
30
40
50
60
70
80
2
90
3
4
5
6
7
Number of Simultaneous Release
Jitter Percentage
• T10 jitter increases
• Limit in the first window increases
1
1
PT/RG
PT/RG
ST/RG
ST/RG
0.8
0.6
Miss Ratio
Miss Ratio
0.8
0.4
0.2
0.6
0.4
0.2
0
2
3
4
5
6
7
8
Number of Time Constraints
• Number of time constraints for T10 increases
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Number of Sporadic Tasks
• Number of sporadic tasks increases
Conclusions



Generalized sporadic task model
characterizes arrival time more precisely
Our schedulability analysis tightens the
bounds on worst case response time
Our schedulability analysis more effectively
guarantee schedulability when arrival time
jitter increases
Download