Flow Shop for Dual CPUs in Dynamic Voltage Scaling Vincent Chau, Ken - - PowerPoint PPT Presentation

flow shop for dual cpus in dynamic voltage scaling
SMART_READER_LITE
LIVE PREVIEW

Flow Shop for Dual CPUs in Dynamic Voltage Scaling Vincent Chau, Ken - - PowerPoint PPT Presentation

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Flow Shop for Dual CPUs in Dynamic Voltage Scaling Vincent Chau, Ken C.K. Fong, Minming Li and Kai Wang Department of Computer Science, City University of Hong Kong March


slide-1
SLIDE 1

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Flow Shop for Dual CPUs in Dynamic Voltage Scaling

Vincent Chau, Ken C.K. Fong, Minming Li and Kai Wang

Department of Computer Science, City University of Hong Kong

March 2016

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 1 / 25

slide-2
SLIDE 2

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Outline

1

Introduction

2

Flowshop on m machines Discrete Speed (fixed order) Continuous Speed (arbitrary order)

3

Sense-And-Aggregate Model

4

Conclusion

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 2 / 25

slide-3
SLIDE 3

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Outline

1

Introduction

2

Flowshop on m machines Discrete Speed (fixed order) Continuous Speed (arbitrary order)

3

Sense-And-Aggregate Model

4

Conclusion

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 3 / 25

slide-4
SLIDE 4

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Models

We are given a set of n jobs and m machines:

each job j has a processing requirement pi,j on machine i

Flowshop on 2 machines

a job j can start on machine 2 only when it is completed on machine 1

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 4 / 25

slide-5
SLIDE 5

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Models

We are given a set of n jobs and m machines:

each job j has a processing requirement pi,j on machine i

Flowshop on 2 machines

a job j can start on machine 2 only when it is completed on machine 1

Speed-Scaling setting

Cost is

  • s(t)αdt with α > 1

s α = 3 p = 10 2 4 s3 × 5

s3 × 2.5

✲ time

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 4 / 25

slide-6
SLIDE 6

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Models

We are given a set of n jobs and m machines:

each job j has a processing requirement pi,j on machine i

Flowshop on 2 machines

a job j can start on machine 2 only when it is completed on machine 1

Speed-Scaling setting

Cost is

  • s(t)αdt with α > 1

s α = 3 p = 10 2 4 40 160

✲ time

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 4 / 25

slide-7
SLIDE 7

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Example

When order of jobs is given, there exists a O(n3) algorithm

  • Z. Mu, M. Li, Journal of Combinatorial Optimization, 2015

E =

  • p1,1 +

α

  • (p1,2 + p1,3)α + (p2,1 + p2,2)α +

α

√p1,4α + p2,3α + p2,4 α D

D speed time critical interval 1 2 3 4 4 3 2 1

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 5 / 25

slide-8
SLIDE 8

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Our contributions

Flowshop on m machines

Fixed order, Discrete speeds, a Linear Program Formulation Arbitrary order, Continuous speeds, an approximation algorithm

Sense-And-Aggregate Model

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 6 / 25

slide-9
SLIDE 9

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

Outline

1

Introduction

2

Flowshop on m machines Discrete Speed (fixed order) Continuous Speed (arbitrary order)

3

Sense-And-Aggregate Model

4

Conclusion

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 7 / 25

slide-10
SLIDE 10

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

Continuous to Discrete

Jobs order is given with processing requirement of 10 Set of speeds S = {1, 2}

10 2 1 speed 2 1 2.9289 7.071 α = 2 Energy : 19.7994 time

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 8 / 25

slide-11
SLIDE 11

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

Continuous to Discrete

Jobs order is given with processing requirement of 10 Set of speeds S = {1, 2}

10 2 1 speed 2 1 2.9289 7.071 α = 2 Energy : 19.7994 Energy : 31.7157 time

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 8 / 25

slide-12
SLIDE 12

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

Continuous to Discrete

Jobs order is given with processing requirement of 10 Set of speeds S = {1, 2}

10 2 1 speed 2 1 2.5 7.5 α = 2 Energy : 19.7994 Energy : 31.7157 time Energy : 30

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 8 / 25

slide-13
SLIDE 13

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

A Linear Program

Let xi,j,v be the workload done for job j on machine i at speed v. Let si,j (resp. ci,j) be the starting time (resp. completion time) of job j on machine i. min

  • v∈S
  • i
  • j

vα−1xi,j,v s.t.

  • v∈S

xi,j,v = pi,j ∀i, j all jobs must be scheduled si,j +

  • v∈S

xi,j,v v = ci,j ∀i, j Processing time cm,n ≤ D ci,j ≤ si,j+1 ∀i, j Precedence const. between jobs ci,j ≤ si+1,j ∀i, j between machines xi,j,v, si,j, ci,j ≥ 0 ∀i, j, v

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 9 / 25

slide-14
SLIDE 14

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

A Linear Time Approximation Algorithm

Recall that for fixed order, a polynomial time algorithm exists

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 10 / 25

slide-15
SLIDE 15

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

A Linear Time Approximation Algorithm

Recall that for fixed order, a polynomial time algorithm exists We schedule jobs at speed

  • i,j pi,j

D

in any order on each machine

D speed time

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 10 / 25

slide-16
SLIDE 16

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

Approximation algorithm

Theorem This algorithm is a mα−1-approximation

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 11 / 25

slide-17
SLIDE 17

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

Approximation algorithm

Theorem This algorithm is a mα−1-approximation

Proof Let Vi =

j pi,j ∀i

ALG LB = (

i Vi)αD1−α

m

  • i

Vi m

α D1−α = (

i Vi)α

m

  • i

Vi m

α = (

i Vi)α

m(

i Vi)α 1 m

α = mα−1

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 11 / 25

slide-18
SLIDE 18

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion Discrete Speed (fixed order) Continuous Speed (arbitrary order)

Approximation algorithm

Theorem This algorithm is a mα−1-approximation

Proof Let Vi =

j pi,j ∀i

ALG LB = (

i Vi)αD1−α

m

  • i

Vi m

α D1−α = (

i Vi)α

m

  • i

Vi m

α = (

i Vi)α

m(

i Vi)α 1 m

α = mα−1 Note that if we fix an arbitrary order and compute the minimum energy consumption, the approximation cannot be larger than mα−1 but takes O(n3) time.

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 11 / 25

slide-19
SLIDE 19

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Outline

1

Introduction

2

Flowshop on m machines Discrete Speed (fixed order) Continuous Speed (arbitrary order)

3

Sense-And-Aggregate Model

4

Conclusion

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 12 / 25

slide-20
SLIDE 20

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Sense-And-Aggregate Model

Rules: Sensor collects one unit of data at each time Computation can decide to process now or wait for more data

Outputs one unit of data for each aggregation

Common deadline D

Sensor Computation

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 13 / 25

slide-21
SLIDE 21

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

D speed time

  • utput

sensor computation

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 14 / 25

slide-22
SLIDE 22

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

D speed time sensor computation

  • utput

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 14 / 25

slide-23
SLIDE 23

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

D speed time sensor computation

  • utput

Observations The more we wait, the less workload there is on the computation machine Decide to compute earlier allows to speed down the processing, and potentially the energy consumption

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 14 / 25

slide-24
SLIDE 24

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Workload-Consideration-Function

The computation depends on the nature of the problem For example: we want the maximum/minimum value: f (x) = x − 1

D speed time sensor computation

  • utput

4 3 4 10 10 8 9 12 12 10 10

Optimal schedule: Compute as soon as possible

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 15 / 25

slide-25
SLIDE 25

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Workload-Consideration-Function f (x) = x

Guess the critical intervals: the workload of each machine Guess when to start each computation/aggregation

critical interval s + 1 i workload= i − (s + 1) + 1 workload= B

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 16 / 25

slide-26
SLIDE 26

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Workload-Consideration-Function f (x) = x

Guess the critical intervals: the workload of each machine Guess when to start each computation/aggregation

s + 1 i workload= i − (s + 1) + 1 workload= g + 1 pending workload= g

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 16 / 25

slide-27
SLIDE 27

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Definition Let F(s, w, g) be the minimum cost of the jobs s + 1, . . . , n with a workload of w on the second machine and a pending workload of g

  • n the first machine (before job s + 1).

s + 1 i workload= i − (s + 1) + 1 workload= B workload= w − B D n · · · i + 1 pending workload= g

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 17 / 25

slide-28
SLIDE 28

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Definition Let F(s, w, g) be the minimum cost of the jobs s + 1, . . . , n with a workload of w on the second machine and a pending workload of g

  • n the first machine (before job s + 1).

s + 1 i workload= i − (s + 1) + 1 workload= B workload= w − B D n · · · i + 1 pending workload= g

We need to guess the value of B and i at each step.

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 17 / 25

slide-29
SLIDE 29

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Dynamic Programming

Once the values i and B are fixed, we need to compute the minimum pending workload in this critical interval.

s + 1 workload= B workload= w − B D n · · · i + 1 pending workload

F(s, w, g) = min

s+1≤i≤n 1≤B≤w

α

  • (i − s)α + Bα +F(i +1, w −B, (i −s)−k)

where k is the pending workload

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 18 / 25

slide-30
SLIDE 30

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Objective function

D n · · · 1 j i + 1 F(j + 1, w, j) · · · · · ·

The cost of the optimal schedule is min

0≤w≤W 1≤j≤n

(F(j + 1, w, j) + j)α D Note that when workloads are fixed during the computation, the time of critical intervals are also fixed.

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 19 / 25

slide-31
SLIDE 31

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Guessing the minimum pending workload

Definition A(i, g, B, e) is the maximum workload on the first machine that can be aggregated such that: there is at most a workload of i on the first machine there is at most a workload of B on the second machine there is a pending workload of g (already scheduled on the first machine on a previous critical interval) the second machine has already scheduled a workload of e The remaining workload is the pending workload: k = (i − s) − A(i, g, B, B)

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 20 / 25

slide-32
SLIDE 32

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Dynamic Programming (2)

In this critical interval, we ensure precedence constraints.

A(i,g,B,e′)+(e−e′−1) i

should be before e′

B (from the beginning of the interval) g B/B

e B e′ B

e − e′ e − e′ − 1

A(i,g,B,e) i

= A(i,g,B,e′)+(e−e′−1)

i

i/i

A(i,g,B,e′) i

A(i, g, B, e) = max    A(i, g, B, e − 1) (cannot aggregate) max

0≤e′<e

A(i,g,B,e′)+(e−e′−1) i

≤ e′

B

A(i, g, B, e′) + (e − e′ − 1) A(i, g, B, 0) = −g

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 21 / 25

slide-33
SLIDE 33

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

To sum up

When f (x) = x, then B ≤ w ≤ 2n which lead to an overall time complexity of O(n5). When f (x) = x − 1, a greedy algorithm in linear time can solve it. Other workload-consideration-function f (x)?

Can solve any function f (x) in time O(n3W 2) where W ≤ n(max0≤x≤n f (x) + 1) Overall complexity : O(n5(max f (x))2)

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 22 / 25

slide-34
SLIDE 34

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Outline

1

Introduction

2

Flowshop on m machines Discrete Speed (fixed order) Continuous Speed (arbitrary order)

3

Sense-And-Aggregate Model

4

Conclusion

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 23 / 25

slide-35
SLIDE 35

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Conclusion and Directions

Flowshop on m machines

Fixed order, Discrete speeds, a Linear Program Formulation

A more efficient algorithm?

Arbitrary order, Continuous speeds, an approximation algorithm

Improve the approximation ratio

  • pen : Is the 2-machine-flowshop polynomial when order is

not fixed?

Sense-And-Aggregate Model

A more general workload-consideration-function Approximation algorithm Online setting

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 24 / 25

slide-36
SLIDE 36

Introduction Flowshop on m machines Sense-And-Aggregate Model Conclusion

Thanks for your attention!

Minming Li Flow Shop for Dual CPUs in Dynamic Voltage Scaling March 2016 25 / 25