UCb Kim G. Larsen Arne Skou & Peter Koch Anders Brødløs Henrik Schiøler Dynamic Voltage Scaling using Optimal Infinite Scheduling work in progress POTENTIAL NEW CS
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 2 Overview zDynamic Voltage Scaling zTask Scheduling Principles using timed automata zEnergy Optimal Task Scheduling using priced timed automata
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 3 Energy vs. Batteries zIncreased processor performance => Increasing power dissipation zSlow battery development year Battery Capacity required expected
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 4 Energy in Processor zPower consumption mainly by dynamic power zSupply voltage reduction => decreased frequency energy V dd delay V dd We may miss deadlines A non-experts understanding of CMOS
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 5 Task Scheduling FCFS EDF Fixed Priority Time Slice CPU not always fully utilized ! We may occationally/dynamically lower frequency/supply voltage ! Save Energy with/without preemption
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 6 Task Scheduling Scheduling utilization of CPU T 2 is running { T 4, T 1, T 3 } ready ordered according to some given priority: (e.g. Fixed Priority, Earliest Deadline,) T1T1 T1T1 T2T2 T2T2 TnTn TnTn Scheduler ready done stop run P(i): period for T i C(i): execution time for T i D(i): deadline for T i P(i): period for T i C(i): execution time for T i D(i): deadline for T i
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 7 Modeling Task T1T1 T1T1 T2T2 T2T2 TnTn TnTn Scheduler ready done stop run
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 8 Modeling Sched. T1T1 T1T1 T2T2 T2T2 TnTn TnTn Scheduler ready done stop run
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 9 Modeling Queue T1T1 T1T1 T2T2 T2T2 TnTn TnTn Scheduler ready done stop run
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 10 Schedulability = Safety Property A ð : (Task0.Error or Task1.Error or …) : (Task0.Error or Task1.Error or …) May be extended with preemption
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 11 Energy Optimal Scheduling T1T1 T1T1 T2T2 T2T2 TnTn TnTn Scheduler ready done stop run F:= ?? ; V:= ?? “Choose” Freq/Scaling (Voltage/Cost) Using PTA
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 12 Energy Optimal Scheduling = Optimal Infinite Path c1c1 c2c2 c3c3 cncn t1t1 t2t2 t3t3 tntn Value of path : val( ) = lim n !1 c n /t n Optimal Schedule * : val( * ) = inf val( ) Accumulated cost Accumulated time : (Task0.Error or Task1.Error or …)
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 13 Approximate Optimal Schedule E[] (not (Task0.Error or Task1.Error or Task2.Error) and (cost>=M imply time >= N)) = E[] (N,M) ² (M,N) imply val( ) · M/N C=MC=MC=MC=MC=MC=M T>=N T<NT<N T<NT<N T<NT<N XX X Optimal infinite schedule modulo cost-horizon C=MC=M
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 14 Preliminary Results Computed Schedule without preemption
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 15 Preliminary Results Computed Schedule WITH preemption
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 16 zEvent yPeriodic yDistributed yBurst zJob yConstant yDistributed yBranch zRTOS (Scheduler) yFCFS yEDF (Pre-emptive, Non Pre-emptive) yFixed Priority (Pre-emptive, Non Pre-emptive) yRR (Time Slicing) CISS Project w Analog Devices
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 17 DVS Simulation Tool MATLAB-based Tool developed in the ADI/CISS project
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 18 Future Work zExtension to EDF zExtension to preemption zEvaluation how close DVS strategies (simulation) are wrt optimal strategy (synthesized). zEvaluation of performance of fixed DVS strategy on sporadic/non-deterministic/irregular task-models (worst/best perform.)
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 19
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 20 Dynamic Voltage Scaling
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 21 The Plate Juggling Problem thanks to Oded Problem: avoid having the plates falling down
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 22 The Plate Juggling Problem thanks to Oded Problem: avoid having the plates falling down
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 23 The Plate Juggling Problem using Timed Automata A Plate The Joggler
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 24 Optimal Infinite Scheduling with respect to what ??
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 25 Optimal Infinite Scheduling with respect to what ?? Linearly Priced Timed Automata = Timed Automata with Costs (rates and impulses) 1 5
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 26 Optimal Infinite Scheduling with respect to what ?? 6/34/5 7/12/4 Linearly Multi-Priced Timed Automata = Timed Automata with Costs (rates and impulses) and Rewards (rates and impulses) 1 5/1 1
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 27 Optimal Infinite Scheduling : (Plate1.Bang or Plate2.Bang or …) c1c1 c2c2 c3c3 cncn r1r1 r2r2 r3r3 rnrn Value of path : val( ) = lim n !1 c n /r n Optimal Schedule * : val( * ) = inf val( )
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 28 Optimal Infinite Scheduling : (Plate1.Bang or Plate2.Bang or …) c1c1 c2c2 c3c3 cncn r1r1 r2r2 r3r3 rnrn Value of path : val( ) = lim n !1 c n /r n Optimal Schedule * : val( * ) = inf val( ) CLAIM: If EITHER Cost or Reward is purely impulse-driven then * is computable [next AMETIST] CLAIM: If EITHER Cost or Reward is purely impulse-driven then * is computable [next AMETIST]
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 29 Discrete Case Simplified Juggling Problem whack1 whack2 21
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 30 Discrete Case Simplified Juggling Problem whack1 whack2 21 x y
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 31 x y Discrete Case Infinite Schedule: = ( (2);whack1;epsilon(1); whack2; (3);whack2;whack1 ) * whack1 whack2 21 Simplified Juggling Problem
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 32 Discrete Case val( )= ( )/(2+1+3) = 1 whack1 whack2 21 Simplified Juggling Problem Infinite Schedule: = ( (2);whack1;epsilon(1); whack2; (3);whack2;whack1 ) * x y
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 33 Discrete Case whack1 whack2 21 Simplified Juggling Problem Optimal Infinite Schedule (discrete case): Identify reachable cycle C * with smallest mean cost, i.e. cost(C * )/lgt(C *) is minimal. Optimal Infinite Schedule (discrete case): Identify reachable cycle C * with smallest mean cost, i.e. cost(C * )/lgt(C *) is minimal. Infinite Schedule: = ( (2);whack1;epsilon(1); whack2; (3);whack2;whack1 ) * x y val( )= ( )/(2+1+3) = 1
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 34 Appr Optimal Schedules using UPPAAL whack1 whack2 21 Simplified Juggling Problem optimal ?? cost: impulse reward: time Infinite Schedule: = ( (2);whack1;epsilon(1); whack2; (3);whack2;whack1 ) * x y val( )= ( )/(2+1+3) = 1
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 35 Appr Optimal Schedules int[0,N] cost; clock time;
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 36 Appr Optimal Schedules int[0,N] cost; clock time; E[] (not (Plate1.Bang or Plate2.Bang) and (cost>=N-1 imply time >= M)) = E[] (N,M)
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 37 Appr Optimal Schedules int[0,N] cost; clock time; E[] (not (Plate1.Bang or Plate2.Bang) and (cost>=N-1 imply time >= M)) = E[] (N,M) ² (N,M) imply val( ) · N/M
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 38 Appr Optimal Schedules int[0,N] cost; clock time; E[] (not (Plate1.Bang or Plate2.Bang) and (cost>=N-1 imply time >= M)) = E[] (N,M) (N,M)(N,M) 9 ² [] (N,M) (3,3)(3,3)YES (3,4)(3,4)NO (7,8)(7,8)YES (7,9)(7,9)NO (10,12)YES (10,13)NO
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 39 Appr Optimal Schedules int[0,N] cost; clock time; (N,M)(N,M) 9 ² [] (N,M) (3,3)(3,3)YES (3,4)(3,4)NO (7,8)(7,8)YES (7,9)(7,9)NO (10,12)YES (10,13)NO x y 10 12
AMETIST Aalborg Sep 2003Kim G. Larsen UCb 40 Conclusion & Future Work CLAIM: and val( ) computable for LMPTA’s with cost or reward being impulse-driven zOn-the-fly Computation zInteresting subclass: yImpulse cost (reward) / time