Energy-Efficient Soft Real-Time CPU Scheduling for Mobile Multimedia Systems Wanghong Yuan, Klara...
-
Upload
grant-lawson -
Category
Documents
-
view
216 -
download
3
Transcript of Energy-Efficient Soft Real-Time CPU Scheduling for Mobile Multimedia Systems Wanghong Yuan, Klara...
Energy-Efficient Soft Real-Time CPU Scheduling for
Mobile Multimedia Systems
Wanghong Yuan, Klara Nahrstedt
Department of Computer Science
University of Illinois at Urbana-Champaign
GRACE
Mobile Multimedia Devices
Challenges– Manage resources to save energy while
supporting multimedia quality
CPU
Opportunities– Dynamic frequency/voltage scaling (DVS)
– Applications release job periodically and meet deadline statistically (e.g., 95%)
GRACE-OS
Enhanced CPU scheduler
– Soft real-time scheduling + DVS
Which application, when, how long, how fast
– Stochastic scheduling decisions
Minimize energy while supporting quality
Part of cross-layer adaptation frameworkGRACE
Architecture
CPU
monitoring scheduling
speed scaling
demand
distribution
GR
AC
E-O
S
SRT Scheduler
Speed Adaptor
Profiler
Multimedia Applications
stochastic requirements
time constraint
Three Subproblems
1. Profiler: demand prediction
– Basis for scheduling and DVS
2. SRT scheduler: stochastic scheduling
– Which app, when, and how long to execute
3. Speed adaptor: stochastic DVS
– How fast to execute
Demand Prediction
Online profiling and estimation
1. Count number of cycles used by each job
2. Group and count occurrence frequency
b1 b2Cmin=b0 br=Cmax
1
br-1
cum
ulat
ive
prob
abil
ity
CDF F(x) = P [X x]
ObservationsDemand distribution of MPGDec
0
0.2
0.4
0.6
0.8
1
4.5 5.7 6.9 8.1 9.3frame cycles (millions)
cum
ulat
ive
prob
abilit
y
first 50first 100all frames
Demand distribution is stable or changes slowly
Demand distribution of H263Dec
0
0.2
0.4
0.6
0.8
1
7.2 8.2 9.2 10.2 11.2 12.2frame cycles (millions)
cum
ulat
ive p
roba
bility
first 50first 100all frames
Three Subproblems
1. Profiler: demand prediction
– Basis for scheduling and DVS
2. SRT scheduler: stochastic scheduling
– Which app to execute, when, and how long
3. Speed adaptor: stochastic DVS
– How fast to execute
Stochastic Allocation
How many cycles to allocate per job?
Application requires percent of deadlines
Each job meets deadline with probability
Allocate C cycles, such that F(C)=P[XC]
b1 b2 b0 br
1
br-1
cum
ulat
ive
prob
abil
ity
F(x)
C
Scheduling
Earliest deadline first (EDF) scheduling
1. Allocate cycle budget per job
2. Execute job with earliest deadline and +budget
3. Charge budget by number of cycles consumed
Preempt if budget is exhausted
Which job to execute, when, how long
Three Subproblems
1. Profiler: demand prediction
– Basis for scheduling and DVS
2. SRT scheduler: stochastic scheduling
– Which app to execute, when, and how long
3. Speed adaptor: stochastic DVS
– How fast to execute
How Fast ?
Intuitively, uniform speed
– Minimum energy if use the allocated exactly
However, jobs use cycles statistically
– Often complete before using up the allocated
– Potential to save more energy
Stochastic DVS
Stochastic DVS
For each job
1. Allocate time
2. Find speed Sx for each allocated cycle x
Time is 1/Sx and energy is (1 - F(x))S2x
such that
Speed Schedule
Piece-wise approximation
– Uniform speed within group
– Change speed at group boundaries, b0,…,bk
Speed schedule
– List of points (cycle bi, speed Sbi)
Change speed to Sbi at bi cycles
Example
0100 MHz
1 x 106
200 MHz2 x 106
400 MHzcycle:speed:
Job 12.5x106 cycles
spe
ed (
MH
z)
100
400
106106
5x105200
106
2x105
Job 21.2x106 cycles
Three Subproblems
1. Profiler: demand prediction
– Basis for scheduling and DVS
2. SRT scheduler: stochastic scheduling
– Which app to execute, when, and how long
3. Speed adaptor: stochastic DVS
– How fast to execute
SRT + DVS s
peed
A1 A1 B1B1 A1
A1
execution
speed upwithin job
context switch1. Store speed for switched-out2. New speed for switched-in
new job
A2
Implementation
Hardware: HP N5470 laptop
– Athlon CPU (300, 500, 600, 700, 800, 1000MHz) Round speed schedule to upper bound
GRACE-OS: extension to Linux kernel 2.4.18
– 716 lines of C code
process control block
standardLinux
scheduler
SRT-DVS modules• PowerNow speed scaling• Soft real-time scheduling
systemcall
Evaluation
Compare GRACE-OS with schemes performing deterministic allocation or DVS
DVS
uniform reclamation stochastic
allocation
worst-case wrsUni wrsRec wrsSto
stochastic stoUni stoRec GRACE-OS
Metrics
Quality evaluation
– Deadline miss ratio
Applications require to meet 95%
Energy evaluation
– CPU time distribution at speeds [Flautner02]
More time in low speeds better
– Normalized energy
GRACE-OS consumes least energyHowever, limited due to few speed options
Normalized Energy28.8
3.7 7
.8
5
56.7
17.2
3.3 7
.8
5
32.5
8.2
2.7
7.8
5
21.92
8.8
3.7 7
.8
5
42.1
17.2
3.3 7
.8
5
30.1
8.2
2.7
7.8
5
20.5
0
15
30
45
60
75
MPGDec H263Dec GSMEnc MP3Dec concurrent
no
rma
lzie
d e
ne
rgy
wrsUni wrsRec wrsSto stoUni stoRec grace-os
Time Distribution (concurrent run)
GRACE-OS spends most busy time at lowest
20.6
52.7 64
.4
20.7
53.2
83.8
0
20
40
60
80
100
wrsUni wrsRec wrsSto stoUni stoRec grace-os
% o
f CP
U ti
me
300MHz 500MHz 600MHz 700MHz 800MHz 1000MHz
GRACE-OS bounds miss ratio
Deadline Miss Ratio
0.4 0.3 0.5 0.5 0.6 0.40.3 0.5 0.4
4.85.2 4.9
0
2
4
6
8
10
wrsUni wrsRec wrsSto stoUni stoRec grace-os
mis
s ra
tio (
%)
MPGDec
concurrent
Conclusion
GRACE-OS– Energy-efficient soft real-time scheduler
Lessons– Effective for multimedia applications
Periodic with stable demand distribution
– Limited by few speed options
Future work– Extension to manage network bandwidth– GRACE http://rsim.cs.uiuc.edu/grace