• Aucun résultat trouvé

Online scheduling to maximize throughput

N/A
N/A
Protected

Academic year: 2022

Partager "Online scheduling to maximize throughput"

Copied!
41
0
0

Texte intégral

(1)

Online scheduling to maximize throughput

Nguyen Kim Thang

(joint work with Christoph Durr

and Lukasz Jez)

(2)

Online Algorithms

No (partial) information about future (requests are revealed litle by litle).

Guarantee the performance according to certain objective

(3)

Online Algorithms

No (partial) information about future (requests are revealed litle by litle).

Guarantee the performance according to certain objective

(4)

Competitive ratio

An algorithm ALG is -competitive if for any instance α I

(maximization problem) OP T (I)

ALG(I) α

(5)

Competitive ratio

An algorithm ALG is -competitive if for any instance α I

(maximization problem)

Measure the performance of an algorithm (worst-case analysis) What is a competitive ratio?

The price of an object (the problem):

Algorithm negociation Adversary (lower bound) (upper bound)

An algorithm is optimal if the bound is tight.

OP T (I)

ALG(I) α

(6)

Model

Enterprise: perishable product (electricity, ice-cream, ...).

Clients: arrive online, different demands.

Goal: maximize the profit.

Profit maximization

$

$

$

(7)

Model

Enterprise: perishable product (electricity, ice-cream, ...).

Clients: arrive online, different demands.

Goal: maximize the profit.

Profit maximization

$

$

$

Objective: maximize the total value of jobs completed on time.

Online Scheduling

Jobs: arrive at , processing time , deadline , value (weight) .pi di ri wi

(8)

Contribution

unit weight

unbounded processing times equal processing

times

bounded processing times (by )k

general

α = 1 α = Θ(log k)

α = Θ(k/ log k) 3

3

2 α 5

4.24

(9)

Contribution

unit weight

unbounded processing times equal processing

times

bounded processing times (by )k

general

α = 1 α = Θ(log k)

α = Θ(k/ log k) 3

3

2 α 5

(Simple) Optimal algorithms (up to a constant) General analysis framework

4.24

(10)

Lower bound (arbitrary weights)

0

0 R

R k

k et/R1

t 1

B At

Theorem: any deterministic algorithm has competitive ratio Ω(k/ log k)

Proof: Fix R = k/ ln k Define: A

t =

!1 0 t < R

e Rt 1 R t k.

B = R

(11)

Lower bound (arbitrary weights)

0

0 R

R k

k et/R1

t 1

B At

Theorem: any deterministic algorithm has competitive ratio Ω(k/ log k)

Proof: Fix R = k/ ln k Define: A

t =

!1 0 t < R

e Rt 1 R t k.

B = R Instance:

At time 0: release job and B A0 At time : release job t At

if ALG schedules at time B (t 1) otherwise, stop.

At time : stopk

(12)

Lower bound (arbitrary weights)

0

0 R

R k

k et/R1

t 1

B At

If ALG schedules then ADV schedulesAt(0 t < R) B ratio = R/1

(13)

Lower bound (arbitrary weights)

0

0 R

R k

k et/R1

t 1

B At

If ALG schedules then ADV schedulesAt(0 t < R) B If ALG schedules then ADV schedules

all jobs At(0 t t)

At(R t k)

!R" − 1 + ! t R

et/R1dt R · et/R1 ratio = R/1

(14)

Lower bound (arbitrary weights)

0

0 R

R k

k et/R1

t 1

B At

If ALG schedules then ADV schedulesAt(0 t < R) B If ALG schedules then ADV schedules

all jobs At(0 t t)

At(R t k)

!R" − 1 + ! t R

et/R1dt R · et/R1

If ALG completes then ADV schedules all jobs

B

At(0 t k) Rek/R1 = Rk/e R2

ratio = R/1

(15)

Settling the competitivity

i

wj

j α · wi

Methods: charging scheme, potential function, etc

(16)

Settling the competitivity

i

wj

j α · wi

Methods: charging scheme, potential function, etc

ALG

ADV

(17)

Settling the competitivity

i

wj

j α · wi

Methods: charging scheme, potential function, etc

ALG

ADV

Def: An unit is scheduled at time if job is scheduled at that time and the remaining processing time of is(i, a)

t i

i a

(18)

Properties of algorithms

Associate to a capacity function (i, a) π(i, a) A job is pending at time if t t + qj dj

A critical time of a job is the latest moment that the job is still pending.

(19)

Properties of algorithms

Associate to a capacity function (i, a) π(i, a) Desirable properties:

validity: if job is pending for ALG at then ALG j t (i, a) t

schedules a unit at such that π(i, a) wj/pj A job is pending at time if t t + qj dj

A critical time of a job is the latest moment that the job is still pending.

(20)

Properties of algorithms

Associate to a capacity function (i, a) π(i, a) Desirable properties:

validity: if job is pending for ALG at then ALG j t (i, a) t

schedules a unit at such that π(i, a) wj/pj -monotonicity: if the ALG schedules with

and at then

(i, a) a > 1 (i!, a!) (t + 1) ρ · π(i!, a!) π(i, a)

ρ

A job is pending at time if t t + qj dj

A critical time of a job is the latest moment that the job is still pending.

(21)

General charging scheme

Each unit of job completed by ADV has weight j wj/pj

(22)

General charging scheme

Each unit of job completed by ADV has weight j wj/pj Type 1 charge

(j, b) (j, 1)

ALG ADV

(23)

General charging scheme

Each unit of job completed by ADV has weight j wj/pj Type 1 charge

(j, b) (j, 1)

ALG ADV

Type 2 charge

(j, b) ALG

ADV

(i, a) (i0, 1)

next job completion

π(i, a) wj/pj

(24)

General charging scheme

Each unit of job completed by ADV has weight j wj/pj Type 1 charge

(j, b) (j, 1)

ALG ADV

Type 2 charge

(j, b) ALG

ADV

(i, a) (i0, 1)

next job completion

π(i, a) wj/pj

Type 3 charge

(j, b) ALG

ADV

(i, a) (i0, 1)

critical time of j

π(i, a) < wj/pj

(25)

Main lemmas

Lemma: a job receives at most charge of type 2i0 π(i0, 1) 1 ρ

(26)

Main lemmas

Lemma: a job receives at most charge of type 2i0 π(i0, 1) 1 ρ

Proof:

(j, b) ALG

ADV

(i, a) (i0, 1)

next job completion

π(i, a) wj/pj

(i!, a!) (j!, b!) (i!0, 1)

previous job completion

(27)

Main lemmas

Lemma: a job receives at most charge of type 2i0 π(i0, 1) 1 ρ

Proof:

(j, b) ALG

ADV

(i, a) (i0, 1)

next job completion

π(i, a) wj/pj

(i!, a!) (j!, b!) (i!0, 1)

previous job completion

!

j

wj

pj !

i

π(i, a) !

k

ρkπ(i0, 1) π(i0, 1) 1 ρ Total

charge:

type 2 monotonicity

(28)

Main lemmas

Lemma: set of job units that are type 3 charged to Then

J i0

|J| k 1 and wj/pj π(i0, 1) ∀j J

(29)

Main lemmas

Lemma: set of job units that are type 3 charged to Then

J i0

|J| k 1 and wj/pj π(i0, 1) ∀j J Proof:

(j, b) ALG

ADV

(i, a) (i0, 1)

π(i, a) < wj/pj critical time of j t

s

t0 (!, c)

(30)

Main lemmas

Lemma: set of job units that are type 3 charged to Then

J i0

|J| k 1 and wj/pj π(i0, 1) ∀j J Proof:

(j, b) ALG

ADV

(i, a) (i0, 1)

π(i, a) < wj/pj critical time of j t

s

t0 (!, c)

: otherwise, t0 t wj/pj π(", c) π(i, a)

(31)

Main lemmas

Lemma: set of job units that are type 3 charged to Then

J i0

|J| k 1 and wj/pj π(i0, 1) ∀j J Proof:

(j, b) ALG

ADV

(i, a) (i0, 1)

π(i, a) < wj/pj critical time of j t

s

t0 (!, c)

: otherwise, t0 t wj/pj π(", c) π(i, a) is critical time s

Moreover

s + qj(s) = dj t < dj

(32)

Main lemmas

Lemma: set of job units that are type 3 charged to Then

J i0

|J| k 1 and wj/pj π(i0, 1) ∀j J Proof:

(j, b) ALG

ADV

(i, a) (i0, 1)

π(i, a) < wj/pj critical time of j t

s

t0 (!, c)

: otherwise, t0 t wj/pj π(", c) π(i, a) is critical time s

Moreover

s + qj(s) = dj t < dj

Hence,

Then:

t s < qj(s) pj k

|J| k 1

(33)

Smith ratio algorithm

Algorithm: at any time, schedule the pending job that maximizes wj/pj

(34)

Smith ratio algorithm

Algorithm: at any time, schedule the pending job that maximizes wj/pj Theorem: the Smith ratio algorithm is -competitive2k

(35)

Smith ratio algorithm

Algorithm: at any time, schedule the pending job that maximizes wj/pj Theorem: the Smith ratio algorithm is -competitive2k

Proof: Define: π(i, a) = wi/a

The algorithm satisfies validity: π(i, a) wj/pj The algorithm is -monotone(k 1)/k

(36)

Smith ratio algorithm

Algorithm: at any time, schedule the pending job that maximizes wj/pj Theorem: the Smith ratio algorithm is -competitive2k

Let be an unit scheduled before(j, b) (i, a) If (i, a) = (j, b 1) then k 1

k π(i, a) = k 1 k

wj

b 1 wj

b = π(j, b) Otherwise,

k 1

k π(i, a) = k 1 k

wi

pi k 1 k

wj

pj wj

b = π(j, b) Proof: Define: π(i, a) = wi/a

The algorithm satisfies validity: π(i, a) wj/pj The algorithm is -monotone(k 1)/k

(37)

Smith ratio algorithm

Algorithm: at any time, schedule the pending job that maximizes wj/pj Theorem: the Smith ratio algorithm is -competitive2k

Let be an unit scheduled before(j, b) (i, a) If (i, a) = (j, b 1) then k 1

k π(i, a) = k 1 k

wj

b 1 wj

b = π(j, b) Otherwise,

k 1

k π(i, a) = k 1 k

wi

pi k 1 k

wj

pj wj

b = π(j, b) Proof: Define: π(i, a) = wi/a

The algorithm satisfies validity: π(i, a) wj/pj The algorithm is -monotone(k 1)/k

Total charge of job :i0 wi0 + wi0

1 (k 1)/k + (k 1)wi0

(38)

Optimal algorithm

Algorithm: at any time, schedule the pending job that maximizes π(j, qj) := wjαqj1 := wj

!

1 c2 ln k k

"qj1

Theorem: the Smith ratio algorithm is -competitive(4k/ ln k)

(39)

Optimal algorithm

Algorithm: at any time, schedule the pending job that maximizes π(j, qj) := wjαqj1 := wj

!

1 c2 ln k k

"qj1

Theorem: the Smith ratio algorithm is -competitive(4k/ ln k) Proof (sketch):

The algorithm satisfies validity: π(i, a) wj/pj The algorithm is -monotoneα

Total charge of job :i0 wi0 + O

! k ln k

"

wi0 + #

jJ

wi0 f (pj)

where f(x) = x1

(40)

Conclusion

Optimal algorithms and a general framework for the model

Constant competitive algorithms for a variant where jobs have equal lengths competitive randomized algos.O(log k)

Directions: Close the gap

Equal length jobs (2.59 < ratio < 4.25) Randomized algorithms Ω(!

log k/ log log k), O(log k)

(41)

Thank you!

Références

Documents relatifs

The approach presented in this work is intended to assign resources to tasks to reduce, on a H horizon, the costs of delays or deviations, proposes an algorithm to

The online stochastic algorithm described in this paper draws inspiration from the primal-dual algorithm for online optimization and the sample average approximation, and is built

We will from now on set ourselves in the context of early termination in the block Wiedemann algorithm. We have three candidate algorithms for order basis in block Wiede- mann

Computation times of early termination in block Wiedemann using order basis algorithm...

Slow Step 2.b Fast Step 2.b Fast Step 2.b.. Computation times of early termination in block Wiedemann using order basis algorithm.. ) Online approach gains up to a

L’archive ouverte pluridisciplinaire HAL, est destinée au dépôt et à la diffusion de documents scientifiques de niveau recherche, publiés ou non, émanant des

A dynamic energy aware job shop scheduling model is studied which seeks a trade-off among the total tardiness, the energy cost and the disruption to the original schedule;.. A

Perfect dyadic means essentially that the regularity is adapted to the dyadic grid: any function supported in a dyadic cube with mean 0 is mapped to a function supported in the