OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
On the Value of Preemption in Scheduling
Yair Bartal1 Stefano Leonardi2 Gil Shallom1
Rene Sitters3
1Department of Computer Science, Hebrew University, Jerusalem, Israel
2Dipartimento di Informatica e Sistemistica,Universit di Roma La Sapienza, Rome, Italy
3Max-Planck-Insitut fur Informatik, Saarbrucken, Germany
TAU Algorithms Seminar, 2007
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Outline of Topics
Overview + Uses
The Model
Algorithm - Upper Bounds
Lower Bounds
Summary
Open Problems
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Overview
I Preemptive scheduling algorithms can achieve efficientperformance.
I Example: SRPT is optimal for minimizing total flow timeI Assumption:
I preemption is costlessI unbounded number of preemptions per job
I Real life: Preemption incurs a significant overhead.
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Focus
I A new model where preemption is costlyI New preemptive scheduling algorithm
I take the cost of preemption into account
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Competitive analysis
A common technique for measuring effectiveness of onlinealgorithms, by comparing the performance of an online algorithm,for any input sequence, to that of the optimal offline algorithm
ALG (I ) ≤ C · OPT (I ) + α
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Standard Scheduling Problems
I DefinitionsI Flowtime of Job j: Fj = Cj − rjI Total Flowtime:
∑j∈J Fj
I Goal Function: min∑
j∈J Fj
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
SRPT
SRPT Algorithm (Shortest Remaining Processing Time)
I Optimal with respect to total flowtime in the single machinecase (in the standard model)
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
The Standard Model Assumptions
I No info is available regarding future jobsI Online Algorithms (hard to plan)
I All job info is available on its arrivalI Relevant job info (job processing time)
I Preemption is costlessI Model does not take into account resources wasted due to
preemption
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
The Model
I Standard ModelI Minimizing total flowtime∑
j∈J
Fj
I New ModelI Preemption cost is KI Minimize the sum of total flowtime and the total cost of
preemptions ∑j∈J
Fj + K ·M
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Model Boundaries
I Cost of preemption is K∑j∈J
Fj + K ·M
I K = 0 =⇒ standard model
I K is large =⇒ non-preemptive model
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
WTP Algorithm (Wait to Preempt)
I When starting a new job, choose the job with the shortestremaining processing time. (Which job?)
I If there is an idle machine and a job is available, then startprocessing the shortest of the available jobs. (When toexecute?)
I Denote ε as the processing time of the shortest job
I Preempt a job as soon as it has been processed withoutinterruption for exactly
√Kε time units. That is, every job is
partitioned in parts of length√
Kε. (When to preempt?)
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
WTP Algorithm (Wait to Preempt)
I One proof for single and parallel machines
I WTP competitive ratio:
(C (α + 1) + α)
I SRPT competitive ratio:where C = 1 or C = O(log(min n
m , ρ))and α = minρ,
√κ , κ = K
ε
I ρ is the ratio between the longest and shortest job
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
WTP Analysis
1. Total Flowtime ∑j∈J
Fj
2. Total cost of preemption
K ·M
∑j∈J
Fj + K ·M
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Total cost of preemption
I At mostpj√Kε
preemptions for job j
I Total cost WTPP(I ) ≤ K (P
pj )√K ε
=√
κ∑
pj
OPT(I ) ≥∑
pj
I WTPP(I ) ≤√
κ OPT(I ) ≤ α ·OPT(I )
α = minP,√
κ
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Total Flowtime - Analysis Steps
I Jobs can arrive at any time, but WTP is not always allowed topreempt a job (unlike SRPT)
I For the analysis, We create a new schedule and shift the jobrelease times to the times when WTP is also allowed topreempt
I Now SRPT(I) and WTP(I) act the same on this new inputsequence
I We finally show that the flowtime incurred due to the shift isalso bounded
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Shifting jobs
Elaborate on that part at TAU - copy the proof from the paper
1. Create a new schedule I ′ from I
2. Result: WTPF (I ) = SRPT (I )
3. Flowtime cost for waiting is r ′j − rj for job j
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Total Flowtime - The Analysis
WTPF (I ) = WTPF (I ′) +∑
j
(r ′j − rj) =
= SRPT(I ′) +∑
j
(r ′j − rj) ≤
≤ C ·OPT(I ′) +∑
j
(r ′j − rj)
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Total Flowtime - The Analysis
OPT(I ′) ≤ OPT(I ) +∑
j
(αε + rj − r ′j )
WTPF (I ) ≤ C (OPT(I ) + nαε) + (C − 1)∑
j
(rj − r ′j )
≤ C (α + 1)OPT(I ).
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Upper Bound Result
WTP = WTPP(I ) + WTPF (I ) ≤ (C (α + 1) + α)OPT(I )
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Lower Bounds
What we are going to see:
I Lower bound 1:Idle Time Not Allowed Model
I Lower bound 2: Idle Time Allowed Model
I Inapproximability
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Idle Time Not Allowed Model
I We show a lower bound on the competitive ratio achievable byany online algorithm due to the online nature of the problem.
I The algorithm has to choose an action with information onlyregarding the past and therefore is bound to make mistakes.
I We construct an example which makes the algorithm performat its worst.
Ω(α), where α = minP,√
κ
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Idle Time Not Allowed Model
0 x 2x 3x
N processes
4x
A
B
(a) The job release sequence in the first case
N processes
0 x 2x 3x 4x
A
B
(b) The job release sequence in the second case
Figure: Idle Time Not Allowed Release Sequences
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Idle Time Not Allowed
0 x 2x 3x 4x
N processes
N processes
AlgA
OptAB
B
(a) The algorithm chooses to executethe longer process first
0 x 2x 3x 4x
N processes
Alg
OptA
N processes
B
AB
(b) The algorithm chooses to executethe shorter process first
Figure: Idle Time Not Allowed Execution Sequences
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Idle Time Not Allowed
Either many machines choose to:
I Execute Job A first and incur a significant cost
I Execute Job B and incur a significant cost
I Preempt and incur a significant cost due to preemption
The lower bound result:
Ω(α), where α = minP,√
κ
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Idle Time Allowed Model
I The algorithm is allowed not to execute a job even if an idlemachine is available
I Even in this case the lower bound is the same:
The lower bound result:
Ω(α), where α = minP,√
κ
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Inapproximability
I Using Woeginger et al. Ω(√
n) lower bound on theapproximation ratio of polynomial-time approximationalgorithms for the problem of minimizing flow time in anon-preemptive environment
I We get an inapproximability result (in our model) of:
Ω(min
κ
14−δ,P
13−δ
)
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Summary
I More realistic scheduling model
I Efficient online algorithms for this setting
I Lower bounds for the online settings
I Inapproximability bound
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
Open Problems
I Minimizing completion time, weighted flow time, or stretch
I Cost of preemption to be dependent on the jobs involved, ormore generally on the state of the system
I Semi-clairvoyance with costly preemption
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling
OutlineOverview + Uses
The ModelAlgorithm - Upper Bounds
Lower BoundsSummary
Open Problems
The end
Questions?
Bartal,Leonardi,Shallom,Sitters On the Value of Preemption in Scheduling