• Keine Ergebnisse gefunden

Stochastic Scheduling with two Processors and Arbitrary Precedence Relations

N/A
N/A
Protected

Academic year: 2021

Aktie "Stochastic Scheduling with two Processors and Arbitrary Precedence Relations"

Copied!
49
0
0

Wird geladen.... (Jetzt Volltext ansehen)

Volltext

(1)

Stochastic Scheduling with two Processors and Arbitrary Precedence Relations

Carlos Camino

August 4, 2015

1 / 49

(2)

Overview

I. Introduction

II. Theoretical Foundations III. Methods

IV. Results and Discussion V. Conclusion

2 / 49

(3)

Overview

I. Introduction

II. Theoretical Foundations III. Methods

IV. Results and Discussion V. Conclusion

3 / 49

(4)

What is scheduling?

4 / 49

(5)

What is scheduling?

5 / 49

(6)

What is scheduling?

6 / 49

(7)

What is scheduling?

7 / 49

(8)

8 / 49

(9)

9 / 49

(10)

10 / 49

(11)

11 / 49

(12)

12 / 49

(13)

13 / 49

(14)

14 / 49

(15)

15 / 49

(16)

16 / 49

(17)

Literature Review

Problem Reference

P 2 | prec | C max Solved by Coffman and Graham in 1972.

P 2 | intree , exp | E [C max ] Solved by Chandy and Reynolds in 1975.

P 2 | prec , exp | E[C max ] Subject of this thesis.

17 / 49

(18)

Overview

I. Introduction

II. Theoretical Foundations III. Methods

IV. Results and Discussion V. Conclusion

18 / 49

(19)

Probability Theory

Why consider exponentially distributed random variables X i ∼ Exp(λ i )?

I Expected value:

E [X i ] = 1 λ i

.

I Minimum:

min{X 1 , . . . , X n } ∼ Exp(λ 1 + . . . + λ n ).

I Memorylessness:

Pr[X i > x + y |X i > y] = Pr[X i > x ] (x, y > 0).

19 / 49

(20)

Snapshots

Let m be the number of available machines. A snapshot S = (T , P, A) consists of

I a finite set T ,

I a binary relation PT × T and

I a subset AT ,

such that (T , P ) is a DAG, |A| ≤ m and every tA is a source in (T , P).

T (S ), P (S ) and A(S) can be defined as T , P and A, respectively.

20 / 49

(21)

Example

Let m = 2. The snapshot S with

I T (S) = {1, 2, 3, 4, 5},

I P (S ) = {(1, 3), (1, 4), (2, 4)} and

I A(S) = {1}

can be represented as

S

1 2

3 4 5

21 / 49

(22)

Strategies and Direct Snapshots

I A strategy σ is a function that maps a snapshot S = (T , P, A) to a snapshot σ(S) = (T , P , A 0 ) with AA 0 .

I The resulting snapshot S 0 after removing a task tA from a snapshot S = (T , P , A) is called direct subsnapshot of S.

22 / 49

(23)

Example

Snapshots S, S 0 , S 00 with

I σ(S) = S 0 for some strategy σ and

I S 00 direct subsnapshot of S 0 :

S

1 2

3 4 5

S 0

1 2

3 4 5

S 00

2

3 4 5

23 / 49

(24)

A formula for the expected makespan E [T S σ ]

Assuming independent finishing times X 1 , . . . , X n ∼ Exp(1) we can derive for a given strategy σ:

E [T S σ ] = E

h T σ(S) σ i

= E

h T σ(S) σ 0 + T σ(S) σ 00 i

= E

h T σ(S) σ 0 i + E

h T σ(S) σ 00 i

= E [min{X t | tA(σ(S))}] + X

S

0

∈D(σ(S))

E [T S σ

0

] · 1

|D(σ(S ))|

= 1

|D(σ(S ))|

 1 + X

S

0

∈D(σ(S))

E [T S σ

0

]

,

where D(S) is the set of all direct subsnapshots of a snapshot S .

24 / 49

(25)

For m = 2 machines we obtain:

E[T S σ ] =

 

 

0 if D(σ(S )) = ∅

1 + E[T S σ

0

] if D(σ(S )) = {S 0 }

1

2 + 1 2 E [T S σ

0

] + 1 2 E [T S σ

00

] if D(σ(S )) = {S 0 , S 00 } for S 0 6= S 00 .

25 / 49

(26)

Overview

I. Introduction

II. Theoretical Foundations III. Methods

IV. Results and Discussion V. Conclusion

26 / 49

(27)

Schedule Visualization

PROSIT (Probabilistic Scheduling Interactive Tool) allows to

I draw a snapshot and

I visualize its schedule.

It can be downloaded from

www.carlos-camino.de/prosit

27 / 49

(28)

Demo: Schedule example 1

28 / 49

(29)

Computing Expectancies

layer L i

intermediate layer L 0 i

layer L i+1

E [T S σ ] = E h

T σ(S) σ i

= 1 + E [T S σ

0

] E [T S σ ] = E h

T σ(S) σ i

= 1 2 + 1 2 E [T S σ

0

] + 1 2 E [T S σ

00

] S

σ(S)

S 0 S 00 S

σ(S)

S 0

E [T S σ ]

E h

T σ(S) σ i

E [T S σ

0

] E [T S σ

00

] E [T S σ ]

E h

T σ(S) σ i

E [T S σ

0

]

29 / 49

(30)

The Coffman-Graham Algorithm

1 2

3

4 5

6 7

8 9

10 11 12 13 14

15 16

17 18 19

30 / 49

(31)

The Coffman-Graham Algorithm

χ 0 χ 1

χ 2 χ 3

1 2

3

4 5

6 7

8 9

10 11 12 13 14

15 16

17 18 19

31 / 49

(32)

Demo: Schedule example 2

32 / 49

(33)

Overview

I. Introduction

II. Theoretical Foundations III. Methods

IV. Results and Discussion V. Conclusion

33 / 49

(34)

Case Studies on the HLF Policy The snapshot

n .. .

has optimal makespan n in the deterministic setting and optimal expected makespan n in the probabilistic setting.

34 / 49

(35)

The snapshot

n . . .

has optimal makespan n 2 in the deterministic setting and optimal expected makespan

n+1

2 in the probabilistic setting.

35 / 49

(36)

Demos: Two parallel chains and a small counterexample for HLF

36 / 49

(37)

Low Level Tasks with High Priority

n

m .. .

. . .

u v

For which values of m, n would an optimal strategy . . . . . . assign u ?

. . . assign v ?

37 / 49

(38)

The following snapshot L m,n

n

m .. .

. . .

with optimal expected makespan l m,n satisfies l m,0 = m 2 + 1, l 0,n = n + 1 and

l m,n = 1

2 l m−1,n + 1

2 l m,n−1 + 1 2 for m, n ≥ 1.

38 / 49

(39)

The following snapshot H m,n

n

m .. .

. . .

with optimal expected makespan h m,n satisfies h m,0 = m 2 + 2 and

h m,n = 1

2 h m,n−1 + 1

2 l m,n + 1 2 for m, n ≥ 1.

39 / 49

(40)

The following snapshots A u m,n and A v m,n

n

m .. .

. . .

u v

n

m .. .

. . .

u v

with optimal expected makespans a u m,n and a v m,n satisfy

a u m,n = 1

2 l m,n+1 + 1

2 h m,n+1 + 3

4 and a v m,n = h m,n+1 + 1 2 .

40 / 49

(41)

For which m, n it holds a m,n u < a m,n v ? For which a u m,n > a v m,n ?

n

m

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

0 5 10 15 20 25 30

41 / 49

(42)

For which m, n it holds a m,n u < a m,n v ? For which a u m,n > a v m,n ?

n

m a u m,n > a v m,n

a u m,n < a v m,n

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

0 5 10 15 20 25 30

42 / 49

(43)

How big is the difference a u m,na v m,n ?

n

m

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

0 5 10 15 20 25 30

0.5

0

−0.5

43 / 49

(44)

How big is the difference a u m,na v m,n ?

n

m

0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100

0 5 10 15 20 25 30

0.5

0

−0.5

44 / 49

(45)

A formula for l m,n The recurrence relation

l m,n = 1

2 l m−1,n + 1

2 l m,n−1 + 1 2 can be visualized as

1 2 1 2

1 2 1 2

1 2 1 2

1 2 1 2

1 2 1 2

1 2 1 2

1 2 1 2 1 2

1 2 1 2 1 2

1 2 1 2 1 2

1 2 1 2 1 2

1 2 1 2 1 2

. . .

. . .

. . .

. . .

. . .

. . . . . .

l 0,0 l 0,1 l 0,2

l 1,0 l 1,1 l 1,2

l 2,0 l 2,1 l 2,2

l 3,0 l 3,1 l 3,2

l 4,0 l 4,1 l 4,2

l 5,0 l 5,1 l 5,2

45 / 49

(46)

Using combinatorical arguments we can derive

l m,n =

m−1

X

i=0

n + i − 1 i

! 1 2

n+i

l m−i,0

+

n−1

X

j=0

m + j − 1 j

! 1 2

m+j

l 0,n−j

+

m−1

X

i=0 n−1

X

j =0

i + j i

! 1 2

i+j+1

with l m−i ,0 = m−i 2 + 1 and l 0,n−j = nj + 1 for all (m, n) ∈ N 0 × N 0 \ {(0, 0)}.

46 / 49

(47)

Using generating functions we can derive the more complete formula

l m,n =

m

X

i=0

n + i − 1 i

! 1 2

n+i

l m−i,0

+

n

X

j=0

m + j − 1 j

! 1 2

m+j

l 0,n−j

+

m−1

X

i=0 n−1

X

j=0

i + j i

! 1 2

i+j+1

− 1

2

m+n m + n m

! l 0,0

with l m−i ,0 = m−i 2 + 1 and l 0,n−j = nj + 1 for all (m, n) ∈ N 0 × N 0 .

47 / 49

(48)

Overview

I. Introduction

II. Theoretical Foundations III. Methods

IV. Results and Discussion V. Conclusion

48 / 49

(49)

Adaptations of PROSIT

I other distributions

I more sophisticated strategies

I runtime optimizations Further Analyses

I consider other task parameters

I find closed-form expressions for l m,n , h m,n , . . .

49 / 49

Referenzen

ÄHNLICHE DOKUMENTE

Mixed (Steigungsschwelle = 0.0001) 2.9 17.2 Mixed (Steigungsschwelle = 0.0002) 6.3 34.4 Mixed (Steigungsschwelle = 0.0008) 17.1 24.2. Max Queue

We present our collision concept for the Laser Source Sharing Problem (LSP) [Gr¨otschel et al (2006), Rambau and Schwarz (2009)]: dispatch arc welding robots (laser welding

Ein Betriebssystem verwendet Paging, um f¨ur die verschiedenen Prozesse einen virtuellen Hauptspeicher zu realisieren.. Der virtuelle Speicher wird auf 12 MB Hauptspeicher und

We introduced a casual employee scheduling problem arising in an Austrian as- sociation, where employees have to be assigned to shifts to satisfy demands at locations for a

It is relevant to note at this point that MiniZinc solutions work with more information from the start—it includes the soft constraints and all hard constraints, while the

We consider stochastic programming problems with probabilistic constraints in- volving random variables with discrete distributions.. They can be reformulated as large scale

Together with the upper and lower bounds for l tj the equations (2) mean that certain reservoir constraints have to be maintained for all storage plants during the whole time

We show that the resource augmentation is necessary by proving polyno- mial lower bounds on the max-stretch and total flow time for the case where online and offline algorithms