Title: Algorithmic problems in Scheduling jobs on Variablespeed processors
1Algorithmic problems in Scheduling jobs on
Variable-speed processors
- Frances Yao
- City University of Hong Kong
2Background
- Energy and heat
- Workstation and server draw energy and produce
heat - Portable electronic devices rely on battery
Analysis from Intel 25,000-square-foot server
farm with approximately 8,000 servers consumes 2
megawatts 25 of the total cost for such a
facility
3Background
- Financial Times (2000)
- Information Technology (IT) consumes about
- 8 of energy in US
- exponential growth?50 of the energy consumption
- Some techniques
- Add several inactive states
- Processor can be set at one of the states if idle
- Extra energy is required to bring the processor
back to the normal state
4DVS Technique(dynamic voltage scaling)
- Variable Voltage Processor
- Processor with multiple speeds
- Voltage is proportional to speed
- Power function sp (pgt1)
-
- Current and future DVS technology
- Intels SpeedStep 2 speeds
- AMDs PowerNow 9 speeds
- Intels Foxton technology 64 speeds
- Operating systems can save energy by scheduling
jobs wisely - -- executing as slowly as possible
5DVS Scheduling Model (Yao, Demers and Shenker
(1995))
arearequired cycles
- A set of n jobs
- ak arrival time
- bk deadline
- Rk required CPU cycles
- Preemptive execution
- Schedule S specifies
- 0s(t)lt
- which job is executed at time t
- Cost
- Whats the optimal (Min-Energy)
- schedule
- Good characterization
- ?efficient computation
- Benchmark for heuristics
s
t
jobk
6The Basics
- Each job will be executed at one uniform speed in
optimal schedule - Convexity
- Optimal schedule needs at most n different speeds
- the flatter the better
- Strategy
- Determine peak speed s ,
- apply iterative procedure
- to find 2nd peak speed etc.
7Optimal Schedule
- Whats the peak speed in the optimal schedule?
- defines the speed lower bound over
any I - s defines peak speed and critical
interval I - s over critical interval is feasible
- Extract critical interval, update jobs and repeat
speed
I
time
8Developments
- 1995 Model and characterization of optimal
schedule - O(n3)
- 2005 Optimal schedule in the discrete model
- O(n3) ? O(nlogn)
- 2006 New scheduling algorithm for the continuous
model - O(n3) ? O(n2logn)
- Yao F, Demers A and Shenker S. A Scheduling Model
for Reduced CPU Energy. FOCS 1995, 374-382. - Minming Li, Frances F. Yao. An Efficient
Algorithm for Computing Optimal Discrete Voltage
Schedules. SIAM J. Comput. 2005, 35(3) 658-671. - Minming Li, Andrew C. Yao, Frances F. Yao.
Discrete and Continuous Min-Energy Schedules for
Variable Voltage Processors. Proceedings of the
National Academy of Sciences of the USA,
2006(103) 3983-3987.
9Scheduling Model (Discrete)
- Discrete speed levels
- Discrete Optimal
- Kwon and Kim (2002)
- Compute optimal schedule for the continuous model
- Adjust each jobs optimal speed to adjacent
levels -
si
s
si1
10Can we obtain discrete optimal without
computing continuous optimal?
- For example, what if only two speed levels are
available? - Strategy
- Partition
- sufficient to do repeated Bi-partition
- Two-Level scheduling
Two-Level Scheduling
11Bi-partition (relative to some speed s)
- Let sgt0 be given for job set J
- Can we divide jobs into Jhigh and Jlow correctly?
- Identify segments of Thigh and Tlow
speed
Thigh
Thigh
Sopt(t)
s
Tlow
Tlow
Tlow
time
12Bi-partition
- Main tool s-schedule
- an EDF schedule with constant speed s
- Gaps
- Tight deadlines
- Tight arrival times
- J(Tlow)Jlow
- J(Thigh)Jhigh
Thigh
Thigh
Gap
s
1
5
2
3
4
5
8
6
7
9
10
Tlow
Tlow
Tlow
13Bi-partition (Algorithm Outline)
- Gaps always exist (and only exist) in Tlow
- Expand a gap suitably to identify a connected
- component of Tlow
- Delete all jobs intersecting with this component
- New gaps must exist
14Example Bi-partition Algorithm
gap
1
5
4
2
3
4
6
11
7
8
9
10
15Optimal Discrete Schedule
- Strategy
- Partition J into J1,J2,Jd with Bi-partition
- Find Two-Level schedule for Ji with sisi1
16Optimal Discrete Schedule
- Strategy
- Partition J into J1,J2,Jd with Bi-partition
- Find Two-Level schedule for Ji with si si1
17Two-Level Scheduling
s1
s2
- Given job set J and s1gts2 satisfying
- Optimal speeds of jobs in J are between s1 s2
- Compute an optimal (s1, s2)- schedule
- Observation
- Any feasible (s1,s2)-schedule is optimal
- How to obtain a feasible (s1,s2)-schedule?
18Two-Level Scheduling (Algorithm Outline)
- Compute s1-schedule and s2-schedule
- Process jobs reversely by deadlines jn , jn-1 ,
j1 - Use up all s2-execution time of each job
- Take extra time (if needed) from its s1-execution
time (all available)
s1
1
i
i1
n
s2
i1
n
1
i
disjoint
19Correctness and Complexity
- Every iteration preserves the existence of
feasible schedule for the remaining jobs - No idle time is left in the end
- Total intervals of the final schedule
- Intersection of sorted lists of s1-schedule and
s2-schedule blocks (can be pre-computed) - At most one extra interval is introduced
when scheduling every job - O(n log n)
20Optimal Discrete Schedule
- Strategy
- Partition J into J1,J2,Jd with Bi-partition
- O(d nlogn)
- Find Two-Level schedule for Ji with si and si1
- O(nlogn)
- Total time O(d nlogn)
21Lower Bound
- Any deterministic algorithm for computing a
min-energy Discrete Voltage Schedule with dgt1
voltage levels will require - A linear reduction from Integer Element
Uniqueness (IEU) to this problem
22Interesting By-product
Continuous Model
Discrete Model
- Original Method for Continuous Optimal
- Compute iteratively peak speed via convex program
- New Method
- Calculate successive approximations to the entire
optimal speed curve - Complexity
23Optimal Continuous Schedule
speed
savr(J)
time
24Online Heuristics
AVR(t)
- Competitive ratio
- AVR (Average Rate)
- Lower bound 4 and upper bound 8
- Yao, Demers and Shenker
(1995) - Tight bound 4 for some special job sets
- Li, Liu and Yao (2005)
- Can be adapted to the discrete model with
competitive ratio 2(k1)2/k, where
k max ratio of two adjacent speeds -
- OPA (Optimal Available)
- Tight bound 4
- Bansal, Kimbrel and Pruhs
(2004)
t
25AVR for Discrete Model
- Discrete Speed Levels
- kmax si/si1
- Adjustment change speed s to its
- adjacent speed levels
- AVRDoff off-line adjustment of AVR
- AVRDon on-line adjustment of AVR
- (running at higher speed first)
26AVR for Discrete Model
s1
s1
s
s
s2
s2
t
t
- AVRDon
AVRDoff (knows the future) -
- It can be proved that
- E(AVRDon)E(AVRDoff)
- E(AVRDoff) 2(k1)2/k ? E(AVR)
- True for a class of online heuristics
27Analysis of OPA Bansal, Kimbrel and Pruhs
(2004)
- Defining a potential function f
- Let ?f(t) denote the change in the potential due
to a job arrival at time t. Then ?f(t)0 - At any time t between arrivals,
saopa(t) - aa saopt(t) df(t)/dt 0 - f(t0)f(t ) 0
28Temperature Model
- The rate of cooling follows Fouriers law
- The rate of cooling is proportional to the
difference in temperature between the object and
the ambient environmental temperature - First order approximation
- T(t)aP(t)-bT(t)
- P(t) supplied power at time t
29Throughput (under max speed constraint)
- Throughput total workload of those
- jobs finished by their deadlines
- Max Throughput NP-hard
- Approx maximizing throughput while Approx
minimizing energy - An online algorithm Chan et al. (SODA 2007)
- 14-competitive in throughput
- 68-competitive in energy
- An offline algorithm Li et al. 2007
- 3-approx in throughput 4-approx in energy
30Summary
- Job scheduling for variable speed processor
- Optimal discrete DVS schedule O(n logn)
- Multi-level partition
- Two-level schedule
- Optimal continuous DVS schedule O(n2 logn)
- Find successive approx to optimal speed curve
- Online heuristics
31Conclusion
- Many open problems in DVS scheduling throughput,
job switches (online offline) etc. - Algorithmic techniques needed to enable more
efficient use of energy in various domains - variable voltage processors
- wireless ad hoc networks
- ? Suitable modeling to capture the essence
- ? Specific problems solutions
- ? Unifying techniques for multiple models
- ? Algorithmic foundations for new paradigms
32Thank you!