View
213
Download
0
Embed Size (px)
Citation preview
UCb
Kim G. Larsen Arne Skou &
Peter Koch Anders Brødløs Henrik Schiøler
Dynamic Voltage Scalingusing
Optimal Infinite Schedulingwork in progress
POTENTIAL NEW CS
2AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Overview
Dynamic Voltage Scaling
Task Scheduling Principles using timed automata
Energy Optimal Task Scheduling using priced timed automata
3AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Energy vs. Batteries
Increased processor performance => Increasing power dissipation
Slow battery development
year
BatteryCapacity
required
expected
4AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Energy in Processor
Power consumption mainly by dynamic power
Supply voltage reduction => decreased frequency
1;V~f 1)-(ddclk
2ddL.
clk2ddLdynamic
VCE
fVCP
cycleprdynamic
energy
Vdd
delay
Vdd
We may miss deadlines
A non-experts understanding of CMOS
5AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Task Scheduling
FCFSFCFS
EDFEDF
Fixed PriorityFixed Priority
Time SliceTime Slice
CPU not always fully utilized !We may occationally/dynamically lower frequency/supply voltage !Save Energy
with/without preemption
6AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb Task SchedulingScheduling utilization of CPU
T2 is running{ T4 , T1 , T3 } readyordered according to somegiven priority:(e.g. Fixed Priority, Earliest Deadline,)
T1T1
T2T2
TnTn
SchedulerScheduler
2 14 3
readydone
stoprun
P(i): period for Ti
C(i): execution time for Ti
D(i): deadline for Ti
P(i): period for Ti
C(i): execution time for Ti
D(i): deadline for Ti
7AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Modeling Task
T1T1
T2T2
TnTn
SchedulerScheduler
2 14 3
readydone
stoprun
8AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Modeling Sched.
T1T1
T2T2
TnTn
SchedulerScheduler
2 14 3
readydone
stoprun
9AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Modeling Queue
T1T1
T2T2
TnTn
SchedulerScheduler
2 14 3
readydone
stoprun
10AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb Schedulability = Safety Property
A :(Task0.Error or Task1.Error or …)
:(Task0.Error or Task1.Error or …)
May be extended with preemption
11AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Energy Optimal Scheduling
T1T1
T2T2
TnTn
SchedulerScheduler
2 14 3
readydone
stoprun F:= ?? ; V:= ??
“Choose” Freq/Scaling
(Voltage/Cost)
Using PTA
12AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb Energy Optimal Scheduling = Optimal Infinite Path
c1 c2
c3 cn
t1 t2
t3 tn
Value of path : val() = limn!1 cn/tn
Optimal Schedule *: val(*) = inf val()
Accumulated cost
Accumulated time:(Task0.Error or Task1.Error or …)
13AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb 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=M C=M C=M
T>=NT>=N
T<NT<N
T<NX XX
Optimal infinite schedulemodulo cost-horizon
C=M
14AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Preliminary Results
Computed Schedule without preemption
15AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Preliminary Results
Computed Schedule WITH preemption
16AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Event Periodic Distributed Burst
Job Constant Distributed Branch
RTOS (Scheduler) FCFS EDF (Pre-emptive, Non Pre-emptive) Fixed Priority
(Pre-emptive, Non Pre-emptive) RR (Time Slicing)
J o b 1J o b 2
J o b N
Eve nt 1Eve nt 2 Eve nt N
Pro c e sso r with RTO S(Sc he d uling & DVS)
. . .
. . .
Time
Event 1
Event 2
CISS Project w Analog Devices
17AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
DVS Simulation Tool
Execution Profile
RTOS
System Model
Simulation Evaluation/Presentation
DVS
Event Setup J ob Structure
ProcessorModel
DVSMethod
Scheduler
“Application Program”
MATLAB-based Tool developed in theADI/CISS project
18AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Future Work
Extension to EDF Extension to preemption
Evaluation how close DVS strategies (simulation) are wrt optimal strategy (synthesized).
Evaluation of performance of fixed DVS strategy on sporadic/non-deterministic/irregular task-models (worst/best perform.)
19AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
20AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Dynamic Voltage Scaling
21AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb The Plate Juggling Problem thanks to Oded
Problem: avoid having the plates falling down
22AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb The Plate Juggling Problem thanks to Oded
Problem: avoid having the plates falling down
23AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb The Plate Juggling Problem using Timed Automata
A Plate
The Joggler
24AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Optimal Infinite Schedulingwith respect to what ??
25AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Optimal Infinite Schedulingwith respect to what ??
64
72
Linearly Priced Timed Automata=
Timed Automata withCosts (rates and impulses)
1
5
26AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Optimal Infinite Schedulingwith respect to what ??
6/34/5
7/12/4
Linearly Multi-Priced Timed Automata=
Timed Automata withCosts (rates and impulses)
andRewards (rates and impulses)
1
5/1
1
27AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Optimal Infinite Scheduling
:(Plate1.Bang or Plate2.Bang or …)
c1 c2
c3 cn
r1 r2
r3 rn
Value of path : val() = limn!1 cn/rn
Optimal Schedule *: val(*) = inf val()
28AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Optimal Infinite Scheduling
:(Plate1.Bang or Plate2.Bang or …)
c1 c2
c3 cn
r1 r2
r3 rn
Value of path : val() = limn!1 cn/rn
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]
29AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Discrete Case
Simplified Juggling Problem
whack1 whack2
2 1
30AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Discrete Case
Simplified Juggling Problem
whack1 whack2
2 1
x
y
1 2 3 4
1
2
3
31AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
x
y
1 2 3 4
1
2
3
Discrete Case
Infinite Schedule: = ((2);whack1;epsilon(1); whack2;(3);whack2;whack1)*
whack1 whack2
2 1
Simplified Juggling Problem
32AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Discrete Case
val()= (2+1+1+2)/(2+1+3) = 1
whack1 whack2
2 1
Simplified Juggling ProblemInfinite Schedule: = ((2);whack1;epsilon(1); whack2;(3);whack2;whack1)*
x
y
1 2 3 4
1
2
3
2
3
12
2
11
33AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Discrete Case
whack1 whack2
2 1
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
1 2 3 4
1
2
3
2
3
12
2
11
val()= (2+1+1+2)/(2+1+3) = 1
34AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Appr Optimal Schedules using UPPAAL
whack1 whack2
2 1
Simplified Juggling Problem
optimal ??
cost: impulsereward: time
Infinite Schedule: = ((2);whack1;epsilon(1); whack2;(3);whack2;whack1)*
x
y
1 2 3 4
1
2
3
2
3
12
2
11
val()= (2+1+1+2)/(2+1+3) = 1
35AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Appr Optimal Schedules
int[0,N] cost;clock time;
36AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
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)
37AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
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
38AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
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) 9²[] (N,M)
(3,3) YES
(3,4) NO
(7,8) YES
(7,9) NO
(10,12) YES
(10,13) NO
39AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Appr Optimal Schedules
int[0,N] cost;clock time;
(N,M) 9²[] (N,M)
(3,3) YES
(3,4) NO
(7,8) YES
(7,9) NO
(10,12) YES
(10,13) NO
x
y
1 2 3 4
1
2
3
1012
40AMETIST Aalborg Sep 2003 Kim G. Larsen
UCb
Conclusion & Future Work
CLAIM: and val() computable for LMPTA’s with cost or reward being impulse-driven
On-the-fly Computation
Interesting subclass: Impulse cost (reward) / time