computing the maximum blocking time for scheduling with
play

Computing the Maximum Blocking Time for Scheduling with Deferred - PowerPoint PPT Presentation

Computing the Maximum Blocking Time for Scheduling with Deferred Preemption Sebastian Altmeyer, Claire Burgui` ere, Reinhard Wilhelm Saarland University STFSSD, Tokyo 2009 Motivation preemptive schedule non-preemptive schedule good


  1. Computing the Maximum Blocking Time for Scheduling with Deferred Preemption Sebastian Altmeyer, Claire Burgui` ere, Reinhard Wilhelm Saarland University STFSSD, Tokyo 2009

  2. Motivation preemptive schedule non-preemptive schedule good performance/bad predictability bad performance/good predictability tradeoff: deferred preemption deferred preemption: preemption only at predefined, selected preemption points Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  3. Schedulability Analysis for Deferred Preemption Schedulability needs: • Periods • Worst Case Execution Time • Context Switch Costs • Maximum Blocking Time BT BT T 1 T 2 ∗ ∗ ∗ ∗ ∗ Context Switch Costs Task Activation Preemption Point ∗ Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  4. Overview Maximum Blocking Time (MBT) = longest non-preemptive path 1 Basics WCET Analysis Implicit Path Enumeration Technique Cache-Related Preemption Delay 2 Computing Maximum Blocking Time 3 Conclusion Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  5. WCET Analysis CFG Value Analysis Low-Level Analysis Loop Analysis Path Analysis WCET Value Analysis determines values for registers and memory cells Loop Analysis determines loop-bounds Low-Level Analysis determines WCET for basic blocks Path Analysis determines longest path trough the program Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  6. Implicit Path Enumeration Technique 1 y 1 y 2 1 = x 1 x 1 = y 1 + y 2 ; y 3 y 1 + y 4 = x 2 x 2 = y 3 + y 5 ; 2 3 y 2 = x 3 x 3 = y 6 ; 4 y 4 y 6 y 5 y 3 = x 4 x 4 = y 4 ; y 5 + y 6 = x 5 x 5 = 1; 5 y 3 ≤ b l · y 1 ; max � i x i c i • node counter x i , edge counter y i • first node x 1 entered once, last node x 5 left once. • nodes executed as often as entered/left • loop l executed b l times as often as entered • WCET given by max. sum of x i times c i ( = WCET of node i ) • set of constraints solved using ILP Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  7. Cache-Related Preemption Delay (CRPD) At basic block (2): 1 • a may be cached, a may be reused at (5) • d may be cached, 2 3 c may be reused at (4) b 4 d Preemption at (2) ⇒ 5 a 2 additional misses may occur Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  8. Useful Cache Blocks A memory block is a useful cache block (UCB) at program point P , if it • may be cached at P , and • may be reused at program point P ′ reached from P . CRPD at basic block i : CRPD i ≤ cost reload × | UCB i | Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  9. Maximum Blocking Time Maximum Blocking Time (MBT) = Longest Path from preemption point or program start to preemption point or program end longest path given by: WCET of the basic blocks + CRPD for the sake of simplicity: preemption points only at the beginning or end of a basic block Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  10. Maximum Blocking Time 1. partition preemption points into two sets: Up = { i | preemption point at beginning of B i } Lo = { i | preemption point at end of B i } 2. introduce artificial nodes: 1 1 3 u 2 3 2 3 4 4 4 l 5 5 Up = { 3 } Lo = { 4 } Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  11. 1 y 1 y 2 3u y 3 2 3 4 y 6 y 4 y 5 4l 5 • theoretical start node S, connected to beginnings of all paths • theoretical end node E, connected to ends of all paths • structural constraints as before (but with additional nodes) • MBT given by max. � x i c i + possible CRPD C i Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  12. S x 1 + x 3 + x l 1 4 = 1; y 1 y 2 3u y 3 2 3 4 y 6 y 4 y 5 4l 5 • theoretical start node S, connected to beginnings of all paths • theoretical end node E, connected to ends of all paths • structural constraints as before (but with additional nodes) • MBT given by max. � x i c i + possible CRPD C i Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  13. x 1 + x 3 + x l 1 4 = 1; 1 = x 4 + x 5 + x u y 1 3 ; y 2 3u y 3 2 3 4 y 6 y 4 y 5 4l 5 E • theoretical start node S, connected to beginnings of all paths • theoretical end node E, connected to ends of all paths • structural constraints as before (but with additional nodes) • MBT given by max. � x i c i + possible CRPD C i Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  14. x 1 + x 3 + x l 1 4 = 1; 1 = x 4 + x 5 + x u y 1 3 ; y 2 x 1 = y 1 + y 2 ; 3u y 3 y 1 + y 4 = x 2 x 2 = y 3 + y 5 ; 2 3 y 2 = x u 3 ; x 3 = y 6 ; 4 y 6 x l y 4 y 5 y 3 = x 4 ; 4 = y 4 ; 4l y 5 + y 6 = x 5 ; 5 y 3 ≤ by 1 ; • theoretical start node S, connected to beginnings of all paths • theoretical end node E, connected to ends of all paths • structural constraints as before (but with additional nodes) • MBT given by max. � x i c i + possible CRPD C i Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  15. x 1 + x 3 + x l 1 4 = 1; 1 = x 4 + x 5 + x u y 1 3 ; y 2 x 1 = y 1 + y 2 ; 3u y 3 y 1 + y 4 = x 2 x 2 = y 3 + y 5 ; 2 3 y 2 = x u 3 ; x 3 = y 6 ; 4 y 6 x l y 4 y 5 y 3 = x 4 ; 4 = y 4 ; 4l y 5 + y 6 = x 5 ; 5 y 3 ≤ by 1 ; i x i c i + x l 4 C l 4 + x 3 C u max � 3 • theoretical start node S, connected to beginnings of all paths • theoretical end node E, connected to ends of all paths • structural constraints as before (but with additional nodes) • MBT given by max. � x i c i + possible CRPD C i Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  16. Conclusion • Essential ingredient for the analysis of deferred preemption • Only minor extensions to IPET: • one new variable per preemption point • no additional constraints • All data available from WCET / UCB analysis & Future Work • implementation and evaluation • automatic derivation of good preemption points Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  17. Implicit Path Enumeration - Equations � max x i c i (1) i x i = 1 , where B i = s (2) x j = 1 , where B j = e (3) � y j = x k , where S = { j | E j = ( , B k ) } (4) j ∈ S � x k = y j , where S = { j | E j = ( B k , ) } (5) j ∈ S � y l ≤ b l ( y j ) where S = { j | E j loop entry edge } (6) j ∈ S Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  18. Maximum Blocking Time - Equations 1 n � � � x l i C l x i C u max ( x i c i ) + i + (7) i i =1 B i ∈ Lo B i ∈ Up � � x l x s + i + x i = 1 (8) B i ∈ Lo B i ∈ Up � � x u x e + i + x i = 1 (9) B i ∈ Up B i ∈ Lo Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

  19. Maximum Blocking Time - Equations 2 � x u if B k ∈ Up � k y j = (10) x k otherwise j ∈ S where S = { j | E j = ( , B k ) } � x l if B k ∈ Lo � k y j = (11) x k otherwise j ∈ S where S = { j | E j = ( B k , ) }   � y l ≤ b l y j (12)  j ∈ S where S = { j | E j loop entry edge } Computing Maximum Blocking for Deferred Preemption Altmeyer, Burgui` ere, Wilhelm STFSSD, Tokyo 2009

Recommend


More recommend