Presentation is loading. Please wait.

Presentation is loading. Please wait.

Algorithmic problems in Scheduling jobs on Variable-speed processors Frances Yao City University of Hong Kong.

Similar presentations


Presentation on theme: "Algorithmic problems in Scheduling jobs on Variable-speed processors Frances Yao City University of Hong Kong."— Presentation transcript:

1 Algorithmic problems in Scheduling jobs on Variable-speed processors Frances Yao City University of Hong Kong

2 Background 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

3 Background 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

4 DVS Technique (dynamic voltage scaling) Variable Voltage Processor Processor with multiple speeds Voltage is proportional to speed Power function s p ( p >1) Current and future DVS technology Intel’s SpeedStep — 2 speeds AMD’s PowerNow — 9 speeds Intel’s Foxton technology — 64 speeds Operating systems can save energy by scheduling jobs wisely -- executing as slowly as possible

5 DVS Scheduling Model ([Yao, Demers and Shenker (1995)]) A set of n jobs a k : arrival time b k : deadline R k : required CPU cycles Preemptive execution Schedule S specifies: 0≤s(t)< which job is executed at time t Cost What’s the optimal (Min-Energy) schedule Good characterization  efficient computation Benchmark for heuristics speed time bkbk akak RkRk t s area=require d cycles job k

6 The 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.

7 Optimal Schedule What’s 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 I* time speed

8 Developments 1995: Model and characterization of optimal schedule O(n 3 ) 2005: Optimal schedule in the discrete model O(n 3 )  O(nlogn) 2006: New scheduling algorithm for the continuous model O(n 3 )  O(n 2 logn) 1. Yao F, Demers A and Shenker S. A Scheduling Model for Reduced CPU Energy. FOCS 1995, 374-382. 2. Minming Li, Frances F. Yao. An Efficient Algorithm for Computing Optimal Discrete Voltage Schedules. SIAM J. Comput. 2005, 35(3): 658-671. 3. 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.

9 Scheduling Model (Discrete) Discrete speed levels Discrete Optimal [Kwon and Kim (2002)]: Compute optimal schedule for the continuous model Adjust each job’s optimal speed to adjacent levels sisi s s i+1

10 Can 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

11 Bi-partition (relative to some speed s) Let s>0 be given for job set J Can we divide jobs into J high and J low correctly? Identify segments of T high and T low s T high T low S opt (t) time speed

12 Bi-partition Main tool: s-schedule an EDF schedule with constant speed s Gaps Tight deadlines Tight arrival times J(T low )=J low J(T high )=J high s T high T low 152345867910 Gap

13 Bi-partition (Algorithm Outline) Gaps always exist (and only exist) in T low Expand a gap suitably to identify a connected component of T low Delete all jobs intersecting with this component New gaps must exist

14 Example: Bi-partition Algorithm 15423461178910 1 5 2 3 4 6 7 8 9 11 T low gap

15 Optimal Discrete Schedule Strategy Partition J into J 1,J 2,…J d with Bi-partition Find Two-Level schedule for J i with s i &s i+1

16 Optimal Discrete Schedule Strategy Partition J into J 1,J 2,…J d with Bi-partition Find Two-Level schedule for J i with s i & s i+1

17 Two-Level Scheduling Given job set J and s 1 >s 2 satisfying Optimal speeds of jobs in J are between s 1 & s 2 Compute an optimal ( s 1, s 2 )- schedule Observation Any feasible (s 1,s 2 )-schedule is optimal How to obtain a feasible (s 1,s 2 )-schedule ? s1s1 s2s2

18 Two-Level Scheduling (Algorithm Outline) Compute s 1 -schedule and s 2 -schedule Process jobs reversely by deadlines j n, j n-1, … j 1 Use up all s 2 -execution time of each job Take extra time (if needed) from its s 1 -execution time (all available) 1…i i+1…n disjoint i+1…n 1…i s2s2 s1s1

19 Correctness 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 s 1 -schedule and s 2 - schedule blocks (can be pre-computed) At most one extra interval is introduced when scheduling every job O(n log n)

20 Optimal Discrete Schedule Strategy Partition J into J 1,J 2,…J d with Bi-partition O(d nlogn) Find Two-Level schedule for J i with s i and s i+1 O(nlogn) Total time: O(d nlogn)

21 Lower Bound Any deterministic algorithm for computing a min-energy Discrete Voltage Schedule with d>1 voltage levels will require A linear reduction from Integer Element Uniqueness (IEU) to this problem

22 Interesting By-product: Original Method for Continuous Optimal: Compute iteratively peak speed via convex program New Method: Calculate successive approximations to the entire optimal speed curve Complexity: Continuous ModelDiscrete Model

23 Optimal Continuous Schedule s=avr(J) time speed

24 Online Heuristics 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(k+1) 2 /k, where k =max ratio of two adjacent speeds OPA (Optimal Available)  Tight bound 4 [Bansal, Kimbrel and Pruhs (2004)] AVR(t) t

25 AVR for Discrete Model Discrete Speed Levels: k=max {s i /s i+1 } Adjustment: change speed s to its adjacent speed levels AVRD off : off-line adjustment of AVR AVRD on : on-line adjustment of AVR (running at higher speed first)

26 AVR for Discrete Model AVRD on AVRD off (knows the future) s s1s1 s2s2 s s1s1 s2s2 tt It can be proved that E(AVRD on )≤E(AVRD off ) E(AVRD off ) ≤ 2(k+1) 2 /k ▪ E(AVR) True for a class of online heuristics

27 Analysis of OPA [Bansal, Kimbrel and Pruhs (2004)] Defining a potential function φ: Let Δφ(t) denote the change in the potential due to a job arrival at time t. Then Δφ(t)≤0 At any time t between arrivals, s α opa (t) - α α s α opt (t) + dφ(t)/dt ≤0 φ(t 0 )=φ(t )= 0

28 Temperature Model The rate of cooling follows Fourier’s 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

29 Throughput (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

30 Summary Job scheduling for variable speed processor Optimal discrete DVS schedule: O(n logn) Multi-level partition Two-level schedule Optimal continuous DVS schedule: O(n 2 logn) Find successive approx to optimal speed curve Online heuristics Continuous ModelDiscrete Model

31 Conclusion 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

32 Thank you!


Download ppt "Algorithmic problems in Scheduling jobs on Variable-speed processors Frances Yao City University of Hong Kong."

Similar presentations


Ads by Google