minimum energy scheduling
play

Minimum Energy Scheduling Marek Chrobak University of California, - PowerPoint PPT Presentation

Minimum Energy Scheduling Marek Chrobak University of California, Riverside How to Keep Sheep Warm in a Snow Storm? How to Keep Sheep Warm in a Snow Storm? n sheep on a line huddle together to stay warm Each sheep is chained


  1. How to Keep Sheep Warm in a Snow Storm? Algorithm B1: if a k ∉ [u,v] then Gaps k (u,v) = Gaps k-1 (u,v) if a k ∈ [u,v] then Gaps k (u,v) = min t { Gaps k-1 (u,t-1) + Gaps k-1 (t+1,v) } where a k ≤ t ≤ min(v,b t ) Output Gaps n ( a min -1 , b max +1 ) Choose u,v,t from {b j ±z’ s} So running time = O(n ⋅ n 2 ⋅ n 2 ⋅ n 2 ) = O(n 7 ) [Baptiste, SODA’06]

  2. Minimum Energy Scheduling - Overview

  3. Minimum Energy Scheduling Instance: collection of n jobs • job j has release time r j , deadline d j , processing time p j • 1 unit of processing costs 1 unit of energy • turning the system on costs L units of energy Schedule = when each job is processed and when the processor is on Objective: Compute a preemptive schedule that minimizes the total energy usage (assume instance is feasible)

  4. Minimum Energy Scheduling Instance: collection of n jobs • job j has release time r j , deadline d j , processing time p j • 1 unit of processing costs 1 unit of energy • turning the system on costs L units of energy Schedule = when each job is processed and when the processor is on Objective: Compute a preemptive schedule that minimizes the total energy usage (assume instance is feasible) Structure of an optimal schedule: long short ≤ L > L ≤ L ≤ L > L idle busy

  5. Minimum Energy Scheduling Instance: collection of n jobs • job j has release time r j , deadline d j , processing time p j • 1 unit of processing costs 1 unit of energy • turning the system on costs L units of energy Schedule = when each job is processed and when the processor is on Objective: Compute a preemptive schedule that minimizes the total energy usage (assume instance is feasible) Structure of an optimal schedule: long short ≤ L > L ≤ L ≤ L > L idle busy

  6. Minimum Energy Scheduling Instance: collection of n jobs • job j has release time r j , deadline d j , processing time p j • 1 unit of processing costs 1 unit of energy • turning the system on costs L units of energy Schedule = when each job is processed and when the processor is on Objective: Compute a preemptive schedule that minimizes the total energy usage (assume instance is feasible) Structure of an optimal schedule: long short ≤ L > L ≤ L ≤ L > L idle busy objective function (ignore green time): E = ∑ gaps g min( length(g) , L )

  7. Minimum Energy Scheduling What sheep have to do with it? For L = 1 and all p j = 1 : • E = # of gaps • = j • r j = a j and d j = b j

  8. Minimum Energy Scheduling What sheep have to do with it? For L = 1 and all p j = 1 : • E = # of gaps • = j • r j = a j and d j = b j So the case (unit jobs, L ≤ 1) can be solved in time O(n 7 )

  9. Minimum Energy Scheduling What’ s known? Posed as open: Sviridenko [05], Irani, Pruhs [05] # proc. L p j assumption time O(n 7 ) [B’06] 1 any 1 O(n 4 ) [BCD’08] 1 any any O(n 5 ) [BCD’08] m any 1 O(n 7 m 5 ) [DG...’07] 1 1 any O(nlogn) [GJS’10] agreeable 1 any 1 O(n 3 ) [GJS’10] agreeable m 1 1 O(n 3 m 2 ] [GJS’10] agreeable [B’06] = Baptiste [BCD’08] = Baptiste, Chrobak, Dürr [DG...’07] = Demaine, Ghodsi, Hajiaghayi, Sayedi-Roshkhar, Zadimoghaddam [GJS’10] = Gururaj, Jalan, Stein

  10. Minimum Energy Scheduling What’ s known? Posed as open: Sviridenko [05], Irani, Pruhs [05] # proc. L p j assumption time O(n 7 ) [B’06] 1 any 1 O(n 4 ) [BCD’08] 1 any any O(n 5 ) [BCD’08] m any 1 O(n 7 m 5 ) [DG...’07] 1 1 any O(nlogn) [GJS’10] agreeable 1 any 1 O(n 3 ) [GJS’10] agreeable m 1 1 O(n 3 m 2 ] [GJS’10] agreeable r i < r j ⇔ d j < d j [B’06] = Baptiste [BCD’08] = Baptiste, Chrobak, Dürr [DG...’07] = Demaine, Ghodsi, Hajiaghayi, Sayedi-Roshkhar, Zadimoghaddam [GJS’10] = Gururaj, Jalan, Stein

  11. Minimum Energy Scheduling - Techniques

  12. Minimum Energy Scheduling Main techniques: s partitioning trick √ ✴ Philippe’ ✴ Reducing the minimizer sets ✴ Inversion trick (“large” parameter ⇔ “small” value) ✴ O(n 2 )-time reduction: Energy ≼ Gaps

  13. Reducing Minimizer Sets (L=1, p j =1) Algorithm B1-L1P1: if r k ∉ [u,v-1] then Gaps k (u,v) = Gaps k-1 (u,v) if r k ∈ [u,v-1] then Gaps k (u,v) = min t { Gaps k-1 (u,t) + Gaps k-1 (t+1,v) } where r k ≤ t < min(v,d t ) Output Gaps n ( r min -1 , d max +1 ) Reminder: u,v,t ∈ {d j ±z} , | {d j ±z} | = O(n 2 ) k v u t Inst k-1 (t+1,v) Inst k-1 (u,t)

  14. Reducing Minimizer Sets (L=1, p j =1) k v u t Inst k-1 (t+1,v) Inst k-1 (u,t) Three WLOG observations:

  15. Reducing Minimizer Sets (L=1, p j =1) k v u t Inst k-1 (t+1,v) Inst k-1 (u,t) Three WLOG observations: ‣ t is maximum possible

  16. Reducing Minimizer Sets (L=1, p j =1) k v u t Inst k-1 (t+1,v) Inst k-1 (u,t) Three WLOG observations: ‣ t is maximum possible ‣ all deadlines are different

  17. Reducing Minimizer Sets (L=1, p j =1) k v u t Inst k-1 (t+1,v) Inst k-1 (u,t) Three WLOG observations: ‣ t is maximum possible ‣ all deadlines are different ➩

  18. Reducing Minimizer Sets (L=1, p j =1) k v u t Inst k-1 (t+1,v) Inst k-1 (u,t) Three WLOG observations: ‣ t is maximum possible ‣ all deadlines are different ➩ ‣ release times are different

  19. Reducing Minimizer Sets (L=1, p j =1) k v u t Inst k-1 (t+1,v) Inst k-1 (u,t) Three WLOG observations: ‣ t is maximum possible ‣ all deadlines are different ➩ ‣ release times are different ‣ v ≤ d k +1

  20. Reducing Minimizer Sets (L=1, p j =1) Assume k ∈ Inst k (u,v) and k scheduled at t (latest possible)

  21. Reducing Minimizer Sets (L=1, p j =1) Assume k ∈ Inst k (u,v) and k scheduled at t (latest possible) If k scheduled last then Inst k-1 (t+1,v) is empty So assume k is not last

  22. Reducing Minimizer Sets (L=1, p j =1) Assume k ∈ Inst k (u,v) and k scheduled at t (latest possible) If k scheduled last then Inst k-1 (t+1,v) is empty So assume k is not last Claim: There is j right after k k j t

  23. Reducing Minimizer Sets (L=1, p j =1) Assume k ∈ Inst k (u,v) and k scheduled at t (latest possible) If k scheduled last then Inst k-1 (t+1,v) is empty So assume k is not last Claim: There is j right after k k j t Proof: If not k t

  24. Reducing Minimizer Sets (L=1, p j =1) Assume k ∈ Inst k (u,v) and k scheduled at t (latest possible) If k scheduled last then Inst k-1 (t+1,v) is empty So assume k is not last Claim: There is j right after k k j t Proof: If not k t move k to later (possible, because d k is largest) -- contradiction

  25. Reducing Minimizer Sets (L=1, p j =1) Assume k ∈ Inst k (u,v) and k scheduled at t (latest possible) If k scheduled last then Inst k-1 (t+1,v) is empty So assume k is not last Claim: There is j right after k k j t From claim: t = r j -1 so - minimizer set for t’ s = {r j -1’ s} - minimizer set for u’ s = {r j s}

  26. Reducing Minimizer Sets (L=1, p j =1) Algorithm B2-L1P1: if r k ∉ [u,v-1] then Gaps k (u,v) = Gaps k-1 (u,v) if r k ∈ [u,v-1] then Gaps k-1 (u,v-1) Gaps k (u,v) = min min t { Gaps k-1 (u,t) + Gaps k-1 (t+1,v) } where a k ≤ t < min(v,d t ) Output Gaps n ( r min -1 , d max +1 ) Above, choose: u ∈ {r j ’ s} , t ∈ {r j +1’ s} and v ∈ {d j ±z’ s} ⇒ Running time = O( (n k’ s) ⋅ (n u’ s) ⋅ (n 2 v’ s) ⋅ (n t’ s) ) = O(n 5 )

  27. Minimum Energy Scheduling Main techniques: s partitioning trick √ ✴ Philippe’ ✴ Reducing the minimizer sets √ ✴ Inversion trick (“large” parameter ⇔ “small” value) ✴ O(n 2 )-time reduction: Energy ≼ Gaps

  28. Inversion Trick Consider a function F(a,...) = min{f : Yaddi-Yadda(a,f,...)} s.t. • F(a,...) is monotone w.r.t. a • range of a is large (exponential) • range of F(a,...) is small (polynomial) f Yaddi-Yadda(a,f,...) F(a,...) a a

  29. Inversion Trick Consider a function F(a,...) = min{f : Yaddi-Yadda(a,f,...)} s.t. • F(a,...) is monotone w.r.t. a • range of a is large (exponential) • range of F(a,...) is small (polynomial) f Yaddi-Yadda(a,f,...) f a A(f,...) Instead compute A(f,...) = min{a : Yaddi-Yadda(a,f,...)} and then F(a,...) = min{f : A(f,...) ≥ a} (binary search ....)

  30. Inversion Trick ( any p j , gaps) Example 1: Extending Algorithm B2L1P1 (minimizing # gaps,unit jobs) to arbitrary processing times

  31. Inversion Trick ( any p j , gaps) Example 1: Extending Algorithm B2L1P1 (minimizing # gaps,unit jobs) to arbitrary processing times Obvious approach: break each job into unit jobs p j = 4 ➩

  32. Inversion Trick ( any p j , gaps) Example 1: Extending Algorithm B2L1P1 (minimizing # gaps,unit jobs) to arbitrary processing times Obvious approach: break each job into unit jobs p j = 4 ➩ This leads to: • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • G k,p (u,v) = minimum # gaps w.r.t. [u,v] for Inst k,p (u,v)

  33. Inversion Trick ( any p j , gaps) Example 1: Extending Algorithm B2L1P1 (minimizing # gaps,unit jobs) to arbitrary processing times Obvious approach: break each job into unit jobs p j = 4 ➩ This leads to: • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • G k,p (u,v) = minimum # gaps w.r.t. [u,v] for Inst k,p (u,v) We can apply Algorithm 2 but ... range of p not polynomial

  34. Inversion Trick ( any p j , gaps) Example 1: Extending Algorithm B2L1P1 (minimizing # gaps,unit jobs) to arbitrary processing times Obvious approach: break each job into unit jobs p j = 4 ➩ This leads to: • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • G k,p (u,v) = minimum # gaps w.r.t. [u,v] for Inst k,p (u,v) So we invert: A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps

  35. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps

  36. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: k k k u v

  37. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: k k k u v t

  38. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: k k k u v t busy before and after t

  39. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: k k k u v t we must have t = r l busy before and after t

  40. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: f gaps h gaps where f+h = g k k k u v t

  41. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: f gaps h gaps where f+h = g k k k u v t A k,h (t,v) units of k

  42. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: f gaps h gaps where f+h = g k k k u v t A k,h (t,v) units of k minimum amount of k with f gaps before t

  43. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: f gaps h gaps where f+h = g k k k u v t A k,h (t,v) units of k max. compl. time of Inst k-1 (u,t) with f gaps = C k-1,f (u,t)

  44. Inversion Trick ( any p j , gaps) • Inst k,p (u,v) = jobs 1,2,...,k with r j ∈ [u,v-1], and with p k ← p • A k,g (u,v) = minimum amount p of job k for which Inst k,p (u,v) has a schedule with ≤ g gaps Assume not whole k executed at the end: f gaps h gaps where f+h = g k k k u v t A k,h (t,v) units of k C k-1,f (u,t) A k,g (u,v) = min t min f+h=g ( t - C k-1,f (u,t) + A k,h (t,v) ) where t ∈ {r j }, u ∈ {r j }, v ∈ {d j ±z} Also, we need recurrence for C k,f (u,v) using A(...) Running time O(n 7 )

  45. Inversion Trick ( unit jobs, gaps, but faster) Example 2: Speeding up the unit/gaps case to O(n 4 ) G k (u,v) = min t { # gaps : yaddi yadda } O(n) O(n) values O(n) O(n) O(n 2 )

  46. Inversion Trick ( unit jobs, gaps, but faster) Example 2: Speeding up the unit/gaps case to O(n 4 ) G k (u,v) = min t { # gaps : yaddi yadda } O(n) O(n) values O(n) O(n) O(n 2 ) Invert: compute V k (u,g) = max { v : Inst k (u,v) has schedule with g gaps }

  47. Inversion Trick ( unit jobs, gaps, but faster) Example 2: Speeding up the unit/gaps case to O(n 4 ) G k (u,v) = min t { # gaps : yaddi yadda } O(n) O(n) values O(n) O(n) O(n 2 ) Invert: compute V k (u,g) = max { v : Inst k (u,v) has schedule with g gaps } Gives O(n 4 ) [BCD’08] Can be extended to any p j ‘s in time O(n 5 ) [BCD’08]

  48. Minimum Energy Scheduling Main techniques: s partitioning trick √ ✴ Philippe’ ✴ Reducing the minimizer sets √ ✴ Inversion trick (“large” parameter ⇔ “small” value) √ ✴ O(n 2 )-time reduction: Energy ≼ Gaps

  49. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule [u,v) = short gap in S Claim: wlog, if r j < v then j is executed before v

  50. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule [u,v) = short gap in S Claim: wlog, if r j < v then j is executed before v Proof: suppose not S ≤ L j u v j

  51. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule [u,v) = short gap in S Claim: wlog, if r j < v then j is executed before v Proof: suppose not S ≤ L j u v j

  52. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule [u,v) = short gap in S Claim: wlog, if r j < v then j is executed before v Proof: suppose not S ≤ L j u v j Then E(new S) ≤ E(S) and new S is lex-smaller than S -- contradiction

  53. Reduction: Energy ≼ Gaps S = lex-minimal energy optimal schedule [u,v) = short gap in S So S looks like this jobs released before v jobs released at or after v ≤ L m u v = r m no release times

  54. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule So S looks like this: Inst(u,v) S > L > L > L v = r j u = r s schedule with G(u,v) gaps and maximum completion time C(u,v)

  55. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule So S looks like this: Inst(u,v) S > L > L > L v = r j u = r s schedule with G(u,v) gaps and maximum completion time C(u,v) Denote E s = minimum energy schedule of jobs released ≥ r s

  56. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule So S looks like this: Inst(u,v) S > L > L > L v = r j u = r s schedule with G(u,v) gaps and maximum completion time C(u,v) Denote E s = minimum energy schedule of jobs released ≥ r s E s = min { L ⋅ [ G(r s ,r j )-1 ] + [ r j -C(r s ,r j ) ] + E j } r j > r s

  57. Reduction: Energy ≼ Gaps S = lex-minimal energy-optimal schedule So S looks like this: Inst(u,v) S > L > L > L v = r j u = r s schedule with G(u,v) gaps and maximum completion time C(u,v) Denote E s = minimum energy schedule of jobs released ≥ r s E s = min { L ⋅ [ G(r s ,r j )-1 ] + [ r j -C(r s ,r j ) ] + E j } r j > r s Running time: O(n 2 ) + (time to compute all G(), C() values)

  58. Minimum Energy Scheduling Main techniques: s partitioning trick √ ✴ Philippe’ ✴ Reducing the minimizer sets √ ✴ Inversion trick (“large” parameter ⇔ “small” value) √ ✴ O(n 2 )-time reduction: Energy ≼ Gaps √

  59. Minimum Energy Scheduling - Other Results

  60. m processors, unit jobs, gaps [DG...’07] Claim: WLOG, optimal schedule is compact: 1 2 3 4 5 6

Recommend


More recommend