Practical Schedulability Analysis for Generalized Sporadic Tasks in
Practical Schedulability Analysis for Generalized Sporadic Tasks in Distributed Real-Time Systems Yuanfang Zhang 1, Donald K. Krecker 2, Christopher Gill 1, Chenyang Lu 1, Gautam H. Thaker 2 1. Washington University, St. Louis, MO, USA 2. Lockheed Martin Advanced Technology Laboratories
Outline n n Motivation Generalized Sporadic Task Model Schedulability Test for independent generalized sporadic tasks Schedulability Test for end-to-end generalized sporadic tasks q n n Generalized release guard synchronization protocol Simulations Conclusions
Motivation n Offline schedulability analysis q q n Generalized sporadic Tasks q q n Periodic task: period Traditional sporadic task: minimum inter-arrival time Higher instantaneous arrival rate Lower average arrival rate Problem q q Overestimate the task’s time demand Pessimistic schedulability analysis
Generalized sporadic task model n Traditional sporadic task Ti q n Generalized sporadic task Ti q q q n (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 q q ρ: token input rate σ: Bucket size
Leaky bucket vs. generalized sporadic task n Generalized sporadic task q q n Leaky bucket model q q n K(i) = 3 {(1, 2), (3, 10), (5, 18)} ρ =0. 5 σ =1 Leaky bucket model greatly overestimates the workload
Time-Demand Analysis n 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 n Maximum number of arrivals n Maximum execution time demand n Earliest arrival time
Schedulability Test for independent generalized sporadic tasks n One example q q T 1: a periodic task T 2: a generalized sporadic task Arrival time constraints priority Exec. time Deadline T 1 {(1, 40)} 1 10 40 T 2 {(1, 10), (2, 30), (3, 50)} 2 8 50
Schedulability Test for T 2 n n n Compute an upper bound on the duration of a level-i busy period q D 2 = min { t>0 | t = MNA 1(t)*10 + MNA 2(t)*8} = 26 Compute an upper bound on the number of instances Ti in a level -i busy period of duration Di q M 2 = MNA(D 2) = 2 For m=1 to M 2 q Compute an upper bound on the completion time of the mth job of Ti in a level-i busy period n q Compute an upper bound on the response time of the mth job of Ti in the busy period n n n C 2(1) = min{ t>0 | t = MNA 1(t)*10+8} = 18, C 2(2) = 26 V 2(1) = C 2(1) – EATi(1) = 18, V 2(2) = 16 The maximum is the WCRT for Ti q W 2 = 18 Compare WCRT with Di q W 2 < D 2, task 2 is schedulable.
Schedulability Test for end-to-end generalized sporadic tasks n Generalized release guard gi, j for each non-initial subtask Ti, j (j>1) q q q n At the initial time, set gi, j=0 When m-1 th 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 n 1 periodic task q Task 1 n n period 40, highest priority 2 sporadic tasks q Task 2 n q Time constrains {(1, 10), (2, 30), (3, 50)}, 2 nd highest priority Task 3 n Time constrains{(1, 30), (2, 80)}, lowest priority Ti Ti, j Exec time Phase Pi T 1, 1 10 0 P 1 T 2, 1 8 0 P 1 T 2, 2 5 0 P 2 T 3, 1 15 18 P 2 T 3
Schedule with RG Release time T 1, 1 0 10 40 50 T 2, 1 10 P 1 P 2 18 26 30 38 Sync signal RG 50 58 60 68 T 2, 2 18 23 28 33 43 48 63 T 3, 1 23 43 Idle point 68 73
End-to-end WCRTs n WCRT in the above schedule q q q T 1 is 10 T 2 is 23 T 3 is 25 n WCRT bounded by our generalized sporadic task analysis q q q T 1 is 10 T 2 is 23 T 3 is 25 Since they are matching, WCRT bounds calculated by our analysis are true WCRTs.
Simulations n n 4 end-to-end periodic tasks T 1 T 2 T 3 T 4 Period 312 90 162 203 Deadline 284 90 162 203 Priority 4 1 2 3 Allocated to 3 processors (execution time) T 1, 1 T 1, 2 T 1, 3 T 2, 1 T 2, 2 T 2, 3 T 3, 1 T 3, 2 T 3, 3 T 4, 1 P 1 21 75 P 2 P 3 30 23 24 42 30 13 58 18 20
Sporadic Task n Periodic task T 3 (for example T 3, 1 on P 1) 30 30 0 n 162 X=30 Make T 3 jittery (1 -x/100)*162 q Arrival constrains {(1, 113), (2, 324)} 30 30 0 q 113 324 Arrival constrains {(1, 65), (2, 324)} 30 30 65 X=60 30 324
When T 3 is allowed 30 percent jitter n PT/RG q n ST/RG q n Minimum inter-arrival time analysis Generalized sporadic task analysis ST/RG outperforms PT/RG on WCRT bound for T 1
When T 3 is allowed 60 percent jitter WCRT bounds for T 1 and T 3 in PT/RG are infinite
When T 3 jitter increases n n When the jitter percentage reaches 37. 5, the WCRT bound for T 1 is infinite when PT/RG is used. The WCRT bounds for T 1 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 n n n Military shipboard computing 15 end-to-end periodic tasks on 50 processors T 10 becomes a generalized sporadic task q q q Highest priority Share processors with other 12 tasks Original period 200
Arrival time constraints {(1, 50), (2, 400) The WCRT bounds for 6 tasks in PT/RG are infinite
Comparisons under different scenarios • T 10 jitter increases • Number of time constraints for T 10 increases • Limit in the first window increases • Number of sporadic tasks increases
Conclusions n n n 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
- Slides: 21