feedback edf scheduling exploiting dynamic voltage scaling
DESCRIPTION
Feedback EDF Scheduling Exploiting Dynamic Voltage Scaling. Yifan Zhu and Frank Mueller Department of Computer Science Center for Embedded Systems Research North Carolina State University. Overview. Motivation Background Feedback-DVS Example Experiments Summary. Motivation. - PowerPoint PPT PresentationTRANSCRIPT
Feedback EDF Scheduling Exploiting Dynamic Voltage Scaling
Yifan Zhu and Frank Mueller
Department of Computer Science
Center for Embedded Systems Research
North Carolina State University
Overview
Motivation Background Feedback-DVS Example Experiments Summary
Motivation
Embedded systems w/ limited power supply DVS for real-time system
trade-off: energy saving vs. timing requirements lower CPU voltage/frequency deadline may miss
Task workloads change dynamically WCET overestimates actual execution time wide variation of execution times
• Longest vs. shortest times
Motivation
Prior DVS algorithms: lack adaptability to dynamic workloads.
0
0.2
0.4
0.6
0.8
1
1.2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
WCET Utilization
En
erg
y (
no
rma
lize
d)
c==50%WCET
c in [20%WCET, 80%WCET]
Real-world examples: graphics: 78% of WCET [Wegener,Mueller]; defense: 87%; automotive: 74%; benchmarks: 30-89%; image recognition: 85% [Wolf]
Look-ahead DVS [Pillai/ Shin]
Background
DVS: E ~ f V²
Hard real-time systems periodic, preemptive, independent tasks [Liu, Layland] jobs: periodically released instances of a task WCET: measured at full freq., w/o DVS most practical system: U << 1
Earliest-deadline-first (EDF) scheduling
, Ci=WCET, Pi=period
, = (0< 1) scaled by frequency
1i i
i
P
C
n
i i
i
P
C
1maxf
fk
Feedback-DVS Framework
V/F selector:
error c – Ca Ca = func(error)
Fig. Feedback-DVS Framework Maximum EDF schedule
determine slack in EDF schedule assumes: c = WCET
Voltage-Frequency Selector
1}{\},...,1{
1
kni i
i
k
k
P
C
P
C :
Greedy scheme: assign all idle time/slack to running task
Assuming all other tasks at the maximal freq. (speed) Capitalize on early completion of current task
early completion more slack for other tasks repeat scaling on next task
Task Splitting
T Ta + Tb Ta at freq. ( 0 100%); Tb at freq. 100% More aggressive:
• < uniform frequency w/o splitting Objective:
• T should finish before Tblower energy consumption
Solve for Ck = Ca+Cb (w/o slack) Ck+slack = Ca/ +Cb = Ca/(Ca+slack)
Tb
100%
f
tTa
Ca/ Cb
Slack Collection
Static and dynamic slack U<100% static slack Idle task: fills gap between actual U and 100% U Early completion dynamic slack Slack passing
Preemption handling Reserve future execution time for preempted task Avoid over-utilizing slack by high priority tasks Backward sweep reservation
I
Example (w/o Feedback)
T1 T2 T3
0 5 10 15
100%75%50%25%
0 5 10 15
100%75%50%25%
T1={C=3,P=8,c=2} T2={C=3,P=10,c=2}T3={C=1,P=14,c=1} IdleT={C=1,P=4,c=0} Ca=50%WCET
I I T1 I T2
2
Maximal Schedule (EDF with idle task)
Actual Schedule (w/o Feedback)
0.5+2 1+2
f
f
t
t
We can do better!
Feedback Control
Scaling factor: =Ca/(Ca+slack) Feedback control: to adjust Ca
0<Ca<=WCET Objective:
Ca actual exec. time (c) But actual exec. time changes dynamically
high processing demands up to some point receding processing demands afterwards
PID Feedback control to improve adaptability to exec. time fluctuations
PID Feedback
Controlled variable: Ca Set point: c System error: = c – Ca When Ca c:
T = Ta, no Tb, entire task at low freq./speed PID: Proportional + Integral + Derivative
Proportional control:
Integral control:
Derivative control:
IW
jijI 1
1
ijK
DWD
DWjiij ,
PID
c
Ca +-
Ca
Feedback Example
0 5 10 15
0 3 5 6.5 10 15
T1={C=3,P=8,c=2} T2={C=3,P=10,c=2}T3={C=1,P=14,c=1} IdleT={C=1,P=4,c=0}
I T1 T2 T3
100%75%50%25%
I I T1 I T2
Maximal Schedule (EDF + idle task)100%75%50%25%
Actual Schedule without feedback100%75%50%25%
Actual Schedule with feedback (from the 1st hyperperiod) 480 485 490 495
Ca=2,s=2
f
f
f
t
t
t
Ca=1,s=2Ca=2,s=2
Algorithm Complexity
Task admission (offline): generate maximal schedule: O(N)
• N = # jobs in hyperperiod Scheduling point (online):
O(n), n = # tasks Task splitting overhead:
only paid when task does not complete within Ta• hardly even happens
Experiements
Frequency/Voltage levels [Puwelse et al.]: Parameters: 3 tasks, 10 tasks, Vary U: utilization=0.1~ 1.0 Feedback controller
DW=1, IW=10 Kp=0.9, I=0.08, D=0.1
Compare: Our feedback-DVS vs. Look-ahead DVS [Pillai/Shin]
Freq. Voltage
25% 2V
50% 3V
75% 4V
100% 5V
0
0.2
0.4
0.6
0.8
1
1.2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
WCET Utilization
En
erg
y (
no
rma
lize
d)
Our Feedback-DVS
Look-ahead RT-DVS
Result (1)
Task exec. time pattern 1: event-triggered activities,
often observed in interrupt-driven systems
c
job
0
0.2
0.4
0.6
0.8
1
1.2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
WCET Utilization
En
erg
y (n
orm
aliz
ed)
Our feedback-DVS
Look-ahead RT-DVS
Result (2)
Task exec. time pattern 2: simulating computational
demands with slowly decaying tendency
c
job
0
0.2
0.4
0.6
0.8
1
1.2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
WCET Utilization
En
erg
y (n
orm
aliz
ed)
Our Feedback-DVS
Look-ahead RT-DVS
Result (3)
Task exec. time pattern 3: periodic fluctuating activities
with peak computational demands
c
job
Varying Task Sets Property
10 tasks vs. 3 tasks Varying exec. time (baseline: pattern 1)
0
0.2
0.4
0.6
0.8
1
1.2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
WCET Utilization
En
erg
y (n
orm
aliz
ed)
Ours,baseline=75%WCET
Ours, baseline=50%WCET
Ours, baseline=25%WCET
Look-ahead, baseline=75%WCET
Look-ahead, baseline=50%WCET
Look-ahead, baseline=25%WCET
0
0.2
0.4
0.6
0.8
1
1.2
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
WCET Utilization
En
erg
y (n
orm
aliz
ed)
10 tasks, ours
10 tasks, Look-ahead
3 tasks, ours
3 tasks, Look-ahead
Related Work
Feedback control real-time scheduling [C. Lu et. al.] DVS with feedback for multimedia systems [Z. Lu et. al.] Look-ahead DVS [Pillai/Shin] Exploit early completion of tasks [Aydin et. al.] Dual-frequency DVS, stochastic approach [Gruian] Non-preempt. Blocking, dual-speed DVS [Zhang et. al.]
Conclusion
Feedback-DVS for hard real-time systems more aggressive by task splitting more adaptive with feedback control
Not sensitive to particular workload characteristics O(n) online complexity Up to 29% more energy savings over prior workFuture Work Feedback analytical model Real-world architecture evaluation Systematic PID parameter tuning
Example (w/o Feedback)
T1 T2
0 5 10 15
100%75%50%25%
0 5 10 15
100%75%50%25%
T1={C=4,P=10,c=1} T2={C=4,P=14,c=1}T3={C=1,P=17,c=1} IdleT={C=1,P=4,c=0} Ca=50%WCET
T1I
Maximal Schedule (EDF with idle task)
Actual Schedule (w/o Feedback)
f
f
t
t
it will be better with feedback!
T1 IT2II I T3
s=3 s=6s=6
Feedback Example
0 5 10 15
0 5 10 15
T1={C=4,P=10,c=1}, T2={C=4,P=14,c=1}, T3={C=1,P=17,c=1}, IdleT={C=1,P=4,c=0}
100%75%50%25%
Actual Schedule without feedback100%75%50%25%
Actual Schedule with feedback (from the 1st hyperperiod) 480 485 490 495
Ca=1,s=3
f
f
f
t
t
t
T1 T2 T1IT1 IT2II I T3
100%75%50%25%
Maximal Schedule
Ca=1,s=3Ca=1,s=3