and configuration selection
play

and Configuration Selection Tei-Wei Kuo Embedded Systems and - PowerPoint PPT Presentation

Efficient On-Line Schedulability Tests and Configuration Selection Tei-Wei Kuo Embedded Systems and Wireless Networking Laboratory Dept of Computer Science and Info. Engr. National Taiwan University Taipei, Taiwan Contents Motivation


  1. Efficient On-Line Schedulability Tests and Configuration Selection Tei-Wei Kuo Embedded Systems and Wireless Networking Laboratory Dept of Computer Science and Info. Engr. National Taiwan University Taipei, Taiwan

  2. Contents  Motivation  Configuration Selection  Schedulability Test for the Liu&Layland Model  Schedulability Test for the Multiframe Model  Performance Evaluation  Conclusion

  3. Motivation  In there a systematic way in selecting a better configuration for processes?  If overload is detected, what should we do?  How to schedule processes whose timing constraints change in reaction to the environment?

  4. What to do when overload is detected? Graceful Degradation! But how?  Load Shedding – kill less important processes!  Relax timing constraint briefly!  E.g., instead of processing a sporadic interrupt within 5 seconds, promise to process 2 interrupts within 10 seconds! Time 10 5 Time 10 5

  5. Another thought in relaxing timing constraints!  Load Scaling  Unschedulable configurations {( t A , 1.5, 3), ( t B , 2, 4)} {( t A , 1.5, 3), ( t B , 2.5, 5)}  Schedulable configurations {( t A , 1.5, 3), ( t B , 3, 6)} Furthermore, {( t A , 1.5, 3), ( t B , 1.5, 3)}  t A and t B become schedulable when their periods are harmonically related!!

  6. Questions: How to choose periods?  Configuration Selection Problem:  Given a set of configurations, choose a schedulable configuration!  Period Assignment Problem:  Given a set of adaptive processes, choose a schedulable configuration! • An adaptive process may change its timing constraints!

  7. Introduction  Needs of Schedulability Tests  Performance Guarantee  Resource Reservation  Open System Architecture  etc  Approaches:  Achievable Utilization Factor  Rate Monotonic Analysis (RMA)

  8. Introduction  A Sufficient Schedulability Condition  Liu & Layland 1  n ( 2 1 ) n (n = process #)  Kuo & Mok 1  k ( 2 1 ) k (k = fundamental frequency #)   Mok & Chen 1 r 1  * (( ) n 1 ) r n 1 )) 0 /c i (r = min (c i r  and various tests by Han, et al.  Sufficient and Necessary Schedulability Conditions  Rate Monotonic Analysis (RMA)

  9. Introduction  Motivation  On-line schedulability tests  Better precision t 1 t 2 t 3 t 4 60 (c i , p i ) (1,3) (1,5) (2,15) (8,60) U1=0.333 U2=0.533 U3=0.666 U4=0.8 p1’ = 1.875 p2’ = 3.75 p3’ = 15 p4’ = 60 Op 1 15 (r=1.875) U1=0.533 U2=0.8 U3=0.933 U4=1.066 p1’ = 2.5 p2’ = 5 p3’ =10 p4’ = 40 Op 2 (r=2.5) U3=0.8 U1=0.4 U2=0.6 U4=1.0 p1’ = 3 p2’ = 3 p3’ = 12 p4’ = 48 Op 3 5 3 (r=3) U1=0.333 U2=0.666 U3=0.833 U4=1.0 Kuo-Mok Han-Tyan     1 log ( p / p ' 2  p r 2 i 1 k ( 2 1 ) k i

  10. Our Approach  Exploit the harmonic relationship of task periods to improve existing schedulability tests:  Liu & Layland Process Model  Multiframe Process Model  Efficient for on-line implementation.  Effective for heavy CPU utilizations!

  11. Definitions  Critical Instant  Critical Interval  Utilization Factor n c   i U p  1 i i  Division Graph t 3:15 t 4:20  Root t2 :5 t 1:3

  12. Definitions  Offspring Set e.g., { t 1, t 2, t 4} and { t 1, t 2, t 3, t 4, t 5} are offspring sets of t 5.  Reduced Set and RS-Representative t 5:60 A process t is a RS-representative of a set { t 1, t 2, t 3} if the period of t t 3:15 t 4:20 is 15, and the utilization factor is equal to the sum of the utilization factors of t 1, t 2, and t 3 . { t 1, t 2, t 3} is a reduced set of t . t2 :5 t 1:3

  13. Schedulability Tests for the Liu&Layland Model  Computing the smallest harmonic base  Definition: Division Graph  An irreflexive, asymmetric, transitive, t 5:60 acyclic directed graph to represent the divisibility relation among a set of t 3:15 t 4:20 real numbers  Theorem 9 [KM:97] Given a set of n processes, there exists a corresponding division graph G. If K t2 :5 t 1:3 is the minimum number that G can be decomposed into vertex-disjoint linear paths, then its least upper bound of utilization factor is K(2 1/K -1).

  14. Schedulability Tests for the Liu&Layland Model  Definition: Minimum An O(N 5/2 ) Algorithm Linear Covering [KM:97] – Given an 7 7 acyclic directed graph G, 14 14 the problem is to find the 42 42 smallest integer K such 6 6 T S 12 12 that the vertices of G are 24 24 partitioned into K vertex- 5 5 disjoint linear paths. K is 10 10 the minimum linear 20 20 covering number of G. 60 60

  15. Schedulability Tests for the Liu&Layland Model More Precise Schedulability Tests?

  16. Schedulability Tests for the Liu&Layland Model  Theorem 1 [Lehoczky, Sha, Ding 89] Process t i in a set of periodic processes scheduled by a fixed-priority-driven preemptive scheduling algorithm will always meets its deadline for all processes phases if and only if there exists a pair (k,m) in R i such that   mp    k   ( ) c c mp j i k   p    j i j   where p     i  {( , ) | 1 , 1 , 2 , , } R k m k i m   i  p  k

  17. Schedulability Tests for the Liu&Layland Model  Lemma 1 Suppose that T i-1 is schedulable. Let t j be any process in T i , TO j a subset of an offspring set of t j in T i which includes t j , and t the RS-representative of TO j . Let process t ’ be the process with the largest period in (T i – TO j  { t }), where the period and computation requirements of t ’ are p i and c, respectively. If there exists a pair such that   ( , ) k m R   mp    k ( ) c   c mp x k  p   t    t  t ( { } { }) T TO x x i j   p   t    t  i {( , ) | ( { }), 1 , 2 ,  , } R k m T TO m   k i j  p  where , k then T i (including t i ) is schedulable.

  18. Schedulability Tests for the Liu&Layland Model  Theorem 2 Suppose that T i-1 is schedulable, and S T i is a non-empty subset of T i . For each process t j in S T i , let TO j be a subset of an offspring set of t j in T i such that TO j  S T i = { t j }, and TO j  TO k = {} for any two distinct processes t j and t k in S T i . For each process t j in S T i , t ’ j is the RS- representative of TO j . Let process t ’ be the process with the largest period in    t  t  t  (   { | is the RS - representa tive of , for every }) T T TO TO ST  i i j ST j j j j j i i where the period and the computation requirements of t ’ are p i and c,   ( , ) respectively. If there exists a pair such that k m R   mp    k ( ) c   c mp x k  p    t   t ( { }) T x x i   then T i is schedulable. where p i     t    {( , ) | , m 1, 2, , } R k m T  k i p   k

  19. Schedulability Tests for the Liu&Layland Model  Theorem 3 [Liu&Layland 73] A set of n periodic processes is schedulable if the total utilization factor of the process set is no larger than 1  n ( 2 1 ) n  Theorem 4 Suppose that T i-1 is schedulable. Let k be the number of roots in T i . If the total utilization factor of T i is no larger than 1  k ( 2 1 ) k then T i is schedulable.

  20. A Schedulability Test Algorithm  Step 1: i = 1;  Step 2: If there are K roots in T i and U i  K(2 1/K -1), Then t i is schedulable Else the schedulability of t i is not guaranteed; Exit;  Step 3: i = i + 1;  Step 4: Goto Step 1 unless i > n; Complexity: O(n 2 )

  21. Schedulability Tests for the Liu&Layland Model 60 15 20  1  n Example : ( ) ( 2 1 ) F n n F(1) = 1 F(2) = 0.8284 3 5 F(3) = 0.7798 F(4) = 0.7568 F(5) = 0.7435  Theorem 5 [Kuo&Mok 91] A set of periodic processes with k fundamental frequencies is schedulable if the total utilization factor of the process set is no larger than 1  ( 2 k 1 ) k

  22. Extension: Multiframe Model  Why the Multiframe model?  Modeling of processes with varying timing constraints!  Modeling of processes with skipping of process executions in consecutive periods.  Goal:  Extend the idea of reduced-set-based schedulability tests to the multiframe model to have a more precise test!

  23. Schedulability Tests for the Multiframe Model  Definition [Mok and Chen 96] – Multiframe Process A multiframe real-time process t i is a tuple ( G i ,p i ), where G i is an array of N i i ) for some N i  1, and p i is the period of t i . i , …, c Ni-1 execution times (c 0 i , c 1 – Remark : Let c 0 i be the maximum in an array of execution times i is called the peak execution time of t i . i , …, c Ni-1 (c 0 i ) . c 0 i , c 1 – AM Multiframe Process i , …, c Ni-1 An array (c 0 i , c 1 i ) is said to be AM (Accumulative Monotonic) if     j x j k mod N k mod N       ,1 x (N 1 ), 1 ( 1 ) C i C i j N i i i i   k 0 k x A multiframe process t i = { G i = (c 0 i , …, c Ni-1 i , c 1 i ),p i } is said to be AM if its array of execution times is AM .

Recommend


More recommend