Preemptive Online Scheduling: Optimal Algorithms for All Speeds

Introduction Algorithm and Lower Bound Summary
Preemptive Online Scheduling:
Optimal Algorithms for All Speeds
Tomáš Ebenlendr1
Wojciech Jawor2
Jiřı́ Sgall1
1 Mathematical
Institute
Academy of Sciences of the Czech Republic
2 University
of California at Riverside, U.S.A.
ALGO 2006
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Offline
time
speed (machines)
jobs
Sequential jobs: One job on one machine at any time.
Completed: Total work (area) processing time.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Offline
time
speed (machines)
jobs
Sequential jobs: One job on one machine at any time.
Completed: Total work (area) processing time.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Offline
time
OPT
jobs
speed (machines)
Sequential jobs: One job on one machine at any time.
Completed: Total work (area) processing time.
Goal: minimize the makespan (length of schedule).
OPT denotes the minimal makespan.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
speed (machines)
Jobs arrive one by one.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
speed (machines)
Jobs arrive one by one.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
speed (machines)
Jobs arrive one by one.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
speed (machines)
Jobs arrive one by one.
Job completely scheduled before the next job arrives.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
speed (machines)
Jobs arrive one by one.
Job completely scheduled before the next job arrives.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
OPT
speed (machines)
Jobs arrive one by one.
Job completely scheduled before the next job arrives.
ALG is R-competitive if ALG ≤ R · OPT for all instances.
For randomized algorithms, Exp[ALG] ≤ R · OPT.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
ALG
OPT
speed (machines)
Jobs arrive one by one.
Job completely scheduled before the next job arrives.
ALG is R-competitive if ALG ≤ R · OPT for all instances.
For randomized algorithms, Exp[ALG] ≤ R · OPT.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Preemptive Scheduling – Online
time
ALG
OPT
speed (machines)
Jobs arrive one by one.
Job completely scheduled before the next job arrives.
ALG is R-competitive if ALG ≤ R · OPT for all instances.
For randomized algorithms, Exp[ALG] ≤ R · OPT.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Notation and Optimal Makespan
processing times p1 , p2 , . . . , pn
speeds s1 ≥ s2 ≥ · · · ≥ sm
k largest jobs:
k fastest machines:
Pk = pi1 + · · · + pik
Sk = s1 + · · · + sk
total processing time P = Pn
total speed S = Sm
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Notation and Optimal Makespan
processing times p1 , p2 , . . . , pn
speeds s1 ≥ s2 ≥ · · · ≥ sm
k largest jobs:
k fastest machines:
Pk = pi1 + · · · + pik
Sk = s1 + · · · + sk
total processing time P = Pn
total speed S = Sm
Optimal Makespan
OPT = max{P/S,
P1 /S1 ,
Ebenlendr, Javor, Sgall
P2 /S2 ,
...,
Pm−1 /Sm−1 }
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Notation and Optimal Makespan
processing times p1 , p2 , . . . , pn
speeds s1 ≥ s2 ≥ · · · ≥ sm
k largest jobs:
k fastest machines:
Pk = pi1 + · · · + pik
Sk = s1 + · · · + sk
total processing time P = Pn
total speed S = Sm
Optimal Makespan
OPT = max{P/S,
P1 /S1 ,
Ebenlendr, Javor, Sgall
P2 /S2 ,
...,
Pm−1 /Sm−1 }
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Notation and Optimal Makespan
processing times p1 , p2 , . . . , pn
speeds s1 ≥ s2 ≥ · · · ≥ sm
k largest jobs:
k fastest machines:
Pk = pi1 + · · · + pik
Sk = s1 + · · · + sk
total processing time P = Pn
total speed S = Sm
Optimal Makespan
OPT = max{P/S,
P1 /S1 ,
Ebenlendr, Javor, Sgall
P2 /S2 ,
...,
Pm−1 /Sm−1 }
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Previous Optimal Algorithms for Special Cases
Identical Machines
R=
1
1− 1−
1 m
m
[Chen, van Vliet, Woeginger]
→ e/(e − 1) ≈ 1.582
as m → ∞.
Two Machines [Wen, Du; Epstein, Noga, Seiden, Sgall, Woeginger]
s1 s2
R =1+ 2
.
s1 + s1 s2 + s22
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Previous Optimal Algorithms for Special Cases
Identical Machines
R=
[Chen, van Vliet, Woeginger]
1
1− 1−
1 m
m
→ e/(e − 1) ≈ 1.582
as m → ∞.
Two Machines [Wen, Du; Epstein, Noga, Seiden, Sgall, Woeginger]
s1 s2
R =1+ 2
.
s1 + s1 s2 + s22
Non-Decreasing Speed Ratios
[Epstein]
Epstein: If s1 /s2 ≤ s2 /s3 ≤ · · · ≤ sm−1 /sm , then
R=
s1 + s2 X + s3
S
,
+ · · · + sm X m−1
X2
Ebenlendr, Javor, Sgall
where X = 1 −
Preemptive Online Scheduling
s1
.
S
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Previous General Bounds
An Optimal Algorithm with Known OPT
[Ebenlendr, Sgall]
If the value OPT is given to the algorithm, it is possible to build
an optimal schedule online.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Previous General Bounds
An Optimal Algorithm with Known OPT
[Ebenlendr, Sgall]
If the value OPT is given to the algorithm, it is possible to build
an optimal schedule online.
Doubling Algorithms
[Ebenlendr, Sgall]
R ≤ 4 for deterministic algorithms, and
R ≤ e ≈ 2.718 for randomized algorithms.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Previous General Bounds
An Optimal Algorithm with Known OPT
[Ebenlendr, Sgall]
If the value OPT is given to the algorithm, it is possible to build
an optimal schedule online.
Doubling Algorithms
[Ebenlendr, Sgall]
R ≤ 4 for deterministic algorithms, and
R ≤ e ≈ 2.718 for randomized algorithms.
Lower Bound
R≥2
[Epstein, Sgall]
for large m.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Our Results – Algorithm RatioStretch
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Our Results – Algorithm RatioStretch
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
Overall competitive ratio
R ≥ 2.054 for m ≥ 100.
R ≤ e ≈ 2.718.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Model Previous Work Our Results
Our Results – Algorithm RatioStretch
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
Overall competitive ratio
R ≥ 2.054 for m ≥ 100.
R ≤ e ≈ 2.718.
Special cases
In proceedings:
Complete analysis for m = 3.
New proof for non-decreasing ratios, slightly generalized.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
machines.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
virtual machines.
Merge empty slots on machines into virtual machines with
changing speeds.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
virtual machines.
Merge empty slots on machines into virtual machines with
changing speeds.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT2
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
virtual machines.
Merge empty slots on machines into virtual machines with
changing speeds.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT2
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
virtual machines.
Merge empty slots on machines into virtual machines with
changing speeds.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT2
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
virtual machines.
Merge empty slots on machines into virtual machines with
changing speeds.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT2
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
virtual machines.
Merge empty slots on machines into virtual machines with
changing speeds.
If needed, add machines with speed 0.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Description
R · OPT2
R · OPT1
Compute R · OPT for a parameter R and current OPT .
Schedule each job in time (0, R · OPT ] on two adjacent
virtual machines.
Merge empty slots on machines into virtual machines with
changing speeds.
If needed, add machines with speed 0.
Remains to show: Each job fits on the first virtual machine.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Optimality
R · OPT3
R · OPT2
R · OPT1
Note: OPTi are increasing.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Optimality
R · OPT3
R · OPT2
R · OPT1
We need: p1 + p2 + p3 ≤ R · (s1 OPT3 + s2 OPT2 + s3 OPT1 ).
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Optimality
R · OPT3
R · OPT2
R · OPT1
We need: p1 + p2 + p3 ≤ R · (s1 OPT3 + s2 OPT2 + s3 OPT1 ).
Remove jobs on other virtual machines from the instance.
Assume that there exists some R-competitive algorithm.
Note: This may decrease OPTi , which is okay.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Optimality
R · OPT3
R · OPT2
R · OPT1
We need: p1 + p2 + p3 ≤ R · (s1 OPT3 + s2 OPT2 + s3 OPT1 ).
Remove jobs on other virtual machines from the instance.
Assume that there exists some R-competitive algorithm.
In its schedule, no machine runs after R · OPT3 , at most
one runs after R · OPT2 , at most two run after R · OPT1 .
A randomized algorithm: The same holds in expectation.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Algorithm RatioStretch – Optimality
R · OPT3
R · OPT2
R · OPT1
We need: p1 + p2 + p3 ≤ R · (s1 OPT3 + s2 OPT2 + s3 OPT1 ).
Remove jobs on other virtual machines from the instance.
Assume that there exists some R-competitive algorithm.
In its schedule, no machine runs after R · OPT3 , at most
one runs after R · OPT2 , at most two run after R · OPT1 .
Thus the inequality holds. Q.E.D.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
But this holds only if we know the optimal R.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
But this holds only if we know the optimal R.
We know that R = e ≈ 2.718 works for all speeds.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
But this holds only if we know the optimal R.
We know that R = e ≈ 2.718 works for all speeds.
It is possible to compute optimal R for given set of speeds by
linear program.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Description Optimality Lower Bound
Lower Bound – Numerical Solution
If si are variables, the linear program becomes quadratic and
we can solve it only numerically.
1
m = 100, R = 2.05467722307586032
0.8
0.6
0.4
0.2
0
10 20 30 40 50 60 70 80 90 100
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Conclusions
Our Results
Main Theorem
For every set of speeds s1 , . . . , sm , RatioStretch
achieves the smallest possible competitive ratio.
It is deterministic, no better randomized algorithm exists.
The competitive ratio for fixed speeds can be computed by
a linear program.
Overall competitive ratio
R ≥ 2.054 for m ≥ 100
R ≤ e ≈ 2.718
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Conclusions
Open Problems
Find the overall optimal competitive ratio.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Conclusions
Open Problems
Find the overall optimal competitive ratio.
Complete analysis for 4 or 5 machines.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Conclusions
Open Problems
Find the overall optimal competitive ratio.
Complete analysis for 4 or 5 machines.
Are the holes in the schedule necessary?
Even for 3 machines?
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Conclusions
Open Problems
Find the overall optimal competitive ratio.
Complete analysis for 4 or 5 machines.
Are the holes in the schedule necessary?
Even for 3 machines?
Non-preemptive scheduling.
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling
Introduction Algorithm and Lower Bound Summary
Conclusions
Open Problems
Find the overall optimal competitive ratio.
Complete analysis for 4 or 5 machines.
Are the holes in the schedule necessary?
Even for 3 machines?
Non-preemptive scheduling.
Thank you!
Ebenlendr, Javor, Sgall
Preemptive Online Scheduling