1 pruhs, woeginger, uthaisombut 2004 qos objective: minimize total flow time flow time f i of a...
TRANSCRIPT
![Page 1: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/1.jpg)
1
Pruhs, Woeginger, Uthaisombut 2004
Qos Objective: Minimize total flow time Flow time fi of a job i is completion time Ci – ri
Power Objective: constraint that at most E energy is used
We make the simplifying assumptions that all jobs have the same (unit) amount of work Optimal job selection policy?
![Page 2: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/2.jpg)
2
Pruhs, Woeginger, Uthaisombut 2004
Qos Objective: Minimize total flow time Flow time fi of a job i is completion time Ci – ri
Power Objective: constraint that at most E energy is used
We make the simplifying assumptions that all jobs have the same (unit) amount of work In this case the optimal job selection policy is
First Come First Served. We thus focus on speed setting policy.
wlog assume, r1 ≤ r2 ≤ … ≤ rn
![Page 3: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/3.jpg)
Warm up Exercise: n unit jobs released at time 0
How much energy to devote to each job?
3
![Page 4: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/4.jpg)
Warm up Exercise: n unit jobs released at time 0
How much energy to devote to each job? Min Σ_i (n-i+1)/s_i
Subject to Σ_i s_i^2 <= E
Either by Lagrange multipliers or intuitive reasoning, s_i ≈ (n_i+1)^(1/3)
4
![Page 5: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/5.jpg)
Convex Program with Release Times
Min Σ_i (C_i – r_i) Subject to
Σ_i (C_i – max(r_{i}, C_{i-1})^2 <= E C_i > C_{i-1}
5
![Page 6: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/6.jpg)
6
KKT Optimality Conditions(2)
Consider a strictly-feasible convex differentiable program
A sufficient condition for a solution x to be optimal is theexistence of Lagrange multipliers λi such that
![Page 7: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/7.jpg)
7
KKT Optimality Conditions
Total energy of E is used Ci < ri+1 implies ρi = ρn
Ci > ri+1 implies ρi = ρi+1 + ρn
Ci = ri+1 implies ρn ≤ ρi ≤ ρi+1 + ρn Example:
Pn = p7
2pn3pnpnpn
p2
P2 + pn
r3r2 r6 r7
![Page 8: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/8.jpg)
Offline Algorithm
8
![Page 9: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/9.jpg)
9
KKT Optimality Conditions
Algorithmic Difficulties: This doesn’t tell us the value of ρn
Solution: Binary search Don’t know the value of pi when Ci = ri+1
Solution: Can calculate since you know interval when job runs
Don’t know if Ci < ri+1, Ci = ri+1, or Ci > ri+1
Easy for high energy E, Ci < ri+1
Solution: Trace out optimal schedules as E decreases
p2
p2 + pn
r3r2
![Page 10: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/10.jpg)
10
Algorithmic Evolution
< <
= <
> =
> >
High Energy
Low Energy
> <
r2 r3
Configurations
![Page 11: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/11.jpg)
11
Intuition
Intuitively as you lose energy, should jobs run faster or slower?
![Page 12: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/12.jpg)
12
Intuition
Intuitively as you lose energy, jobs should run slower, but this intuition is false
Example: Higher energy: p1=2p3 and p2 = p3
Lower energy: p1 = 3p3 and p2 = 2 p3
p1/p2 decreases and job 2 speeds up as we lose energy
![Page 13: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/13.jpg)
13
What Goes Wrong With Arbitrary Work Jobs
≤ ≤
= ≤
≥ ≤
Arbitrary length
Open Question: What is thecomplexity of finding optimal
flow time schedules whenjobs have arbitrary work?
Optimal scheuduleis not a continuous
function of energy E
![Page 14: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/14.jpg)
14
Theorem: There is no O(1)-competitive online algorithm for the bounded energy problem Proof Idea: How much energy do you give the
first job that arrives?
If it is not an Ω(E) then you are not O(1)-competitive
![Page 15: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/15.jpg)
15
Energy/Flow Trade-Off Problem Definition [AF06]
Job i has release date ri and work yi
Optimize total flow + ρ * energy used Natural interpretation: User specifies an
energy amount ρ that he is willing to spend to get a unit improvement in responsee.g. If the user is willing to spend 1 ergs
of energy for a 3 microsecond improvement in response, then ρ=3.
wlog, ρ=1.
![Page 16: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/16.jpg)
One job example
16
![Page 17: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/17.jpg)
Natural Policies
Job Selection?
Speed Scaling?
17
![Page 18: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/18.jpg)
Natural Policies
Job Selection: SRPT
Speed Scaling: Power = Number of unfinished jobs Increase in energy objective = increase in flow
objective
18
![Page 19: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/19.jpg)
19
Bansal, Chan, Pruhs, SODA 2009
We consider allowing an arbitrary power function P(s) Only require something like P is piece-wise smooth, e.g.
PowerP(s)
Speed s
![Page 20: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/20.jpg)
20
Our Results
Main Theorem: SRPT + variation of natural speed scaling algorithm is 3-competitive for the objective of flow+energy for an arbitrary power function P(s) and for arbitrary work jobs
Later improved to 2-competitive by Lachlan L. H. Andrew, Adam Wierman and Ao Tang.
Second Theorem: HDF + variation of natural speed scaling algorithm is 2-competitive for the objective of fractional weighted flow+energy for essentially any power function P(s) and for arbitrary work and weight jobs Probably not possible to get such a result for integral
weighted flow since to be competitive for weighted flow requires resource/speed augmentation [BC09]
![Page 21: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/21.jpg)
Equation for Amortized Local Competitiveness Argument
Pon(t) + Non(t) + dΦ(t)/dt ≤ c [ Popt(t) + Nopt(t) ] P(t) is the power at time t N(t) is the unfinished jobs at time t on is the online algorithm opt is the adversary/optimal Φ(t) is the potential function c is the competitive ratio
21
![Page 22: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/22.jpg)
Initial Equation: Pon + Non + dΦ/dt ≤ 2 [ Popt + Nopt ]
Since Pon = Non, 2Pon + dΦ/dt ≤ 2 [ Popt + Nopt ]
Guess potential Φ is a function of N = Non – Nopt so job arrivals do not affect potential function
Worst case is when Nopt = 0, or equivalently when N = Non
By the chain rule dΦ/dt=dΦ/dN dN/dt. Note dN/dt=(sopt – son), 2Pon + dΦ/dN * (sopt – son) ≤ 2 * Popt
Solving for Φ gives dΦ/dN ≤ 2 [ Popt – Pon] /(sopt – son)
The term [ Popt – Pon] /(sopt – son) looks like the slope of P(s) around the point s=son.
So set dΦ/dN = 2 dP(son)/ds = 2 dP(P-1(N))/ds
Or equivalently, Φ = 2∫0
N dP(P-1(N))/ds dy
Derivation of Potential Function for Unit Work Jobs
22
PowerP
Speed s
![Page 23: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/23.jpg)
Chan, Edmonds, Pruhs 2009
23
1. Nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
2. Speed scaling on a uniprocessor
SPAA 2009: Speed scaling and
nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
We define and address one algorithmic multiprocessor power management
problem
![Page 24: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/24.jpg)
Outline of the Talk
24
1. Nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
![Page 25: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/25.jpg)
Speed-up Curves
Each portion of work/code has a speed up function that specifies how fast work is processed as a function of the number of processors assigned.
25
Ratework is
processed
Number of Processors
1
Parallel speed-up curve
Sequential speed-up curve
Arbitrary speed-up curve
![Page 26: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/26.jpg)
Definition: Nonclairvoyant means that the scheduling algorithm doesn’t know the speed-up curves or the work of the jobs
Question: What is the most natural scheduling algorithm if one doesn’t know the speed-up curves?
26
![Page 27: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/27.jpg)
Definition: Nonclairvoyant means that the scheduling algorithm doesn’t know the speed-up curves or the work of the jobs
Question: What is the most natural scheduling algorithm if one doesn’t know the speed-up curves?
Answer: Equipartition (round-robin, processor sharing) which assigns an equal number of processors to each job
27
![Page 28: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/28.jpg)
Theorem [E99]: Equipartition is 2+εspeed O(1)-competitive The average waiting time using Equipartition at
at most a constant factor larger than the optimal schedule on processors that are slightly slower than ½ as fast
28
![Page 29: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/29.jpg)
Question: What else can a nonclairvoyant algorithm do besides sharing the processor equally among the jobs that might be better?
29
![Page 30: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/30.jpg)
Question: What else can a nonclairvoyant algorithm do besides sharing the processor equally among the jobs that might be better?
Answer: Late Arrival Processor Sharing (LAPS) which shares the processors equally among the latest arriving δn jobs
Theorem [EP09]: LAPS is 1+εspeed O(1)-competitive Note that 1+εspeed is required to be
competitive even if the online algorithm knows the speed-up curves and the work of each job
30
![Page 31: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/31.jpg)
Analysis of Equipartition and LAPS
Key Lemma: The worst case is if all work is parallel or sequential
31
![Page 32: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/32.jpg)
Outline of the Talk
32
1. Nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
2. Speed scaling on a uniprocessor
SPAA 2009: Speed scaling and
nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
![Page 33: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/33.jpg)
Outline of the Talk
33
2. Speed scaling on a uniprocessor
![Page 34: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/34.jpg)
Second most natural nonclairvoyant online algorithm Job selection: LAPS
Recall LAPS shares the processing power equally among the latest arrive constant fraction of the jobs
Speed scaling: Power = number of unfinished jobs
Theorem [CELLMP09]: The above algorithm is O(1)-competitive for total flow time plus energy Proof: amortized local competitiveness argument
34
![Page 35: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/35.jpg)
Outline of the Talk
35
1. Nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
2. Speed scaling on a uniprocessor
SPAA 2009: Speed scaling and
nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
![Page 36: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/36.jpg)
Outline of the Talk
36
SPAA 2009: Speed scaling and
nonclairvoyant scheduling of jobs with
arbitrary speed-up curves on a
multiprocessor
![Page 37: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/37.jpg)
Problem we address in SPAA 2009 paper
Nonclairvoyantly scheduling and speed scaling on a multiprocessor so as to minimize total flow time plus energy
37
Schedule
Job 1
Height =speed
Processor 1
Processor 2
![Page 38: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/38.jpg)
Warm-up Problem
Question: If you are running a single parallel job on m processors, what should the speed s be?
38
![Page 39: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/39.jpg)
Warm-up Problem
Question: If you are running a single parallel job on m processors, what should the speed s be?
Answer: To optimize flow+energy you should equate
flow and energy, since x+y = Θ(max(x, y)) Thus you want the rate of increase of flow
(which is the number of unfinished jobs) to equal the rate of increase in energy (which is power P).
Therefore total power = mP=1 P=1/m or equivalently s = 1/m1/3 since P = s3
Note that the total power used is independent of the number of machines
39
![Page 40: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/40.jpg)
Impossibility Theorem: There is no algorithm who competitiveness scales reasonably with the number of processors
Proof: Consider an instance of a single job that is either parallel or sequential
40
![Page 41: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/41.jpg)
Impossibility Theorem: There is no algorithm who competitiveness scales reasonably with the number of processors
Proof: Consider an instance of a single job that is either parallel or sequential If you run the job on few processors, then either the flow
or energy must be much higher than optimal in the case that the job is parallel
If you run the job on many processors, then either the flow or the energy must be much higher than optimal in the case that the job is parallel
41
![Page 42: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/42.jpg)
Question: If you have only one job that you know is either parallel or sequential, how would you schedule it?
42
![Page 43: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/43.jpg)
Question: If you have only one job that you know is either parallel or sequential, how would you schedule it?
Answer: Run one copy at speed 1 on one processor and
one copy at speed 1/m1/3 on the rest of the processors
This is O(1)-competitive This is allowable if the job has no side effects
43
![Page 44: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/44.jpg)
Impossibility Theorem: There is no algorithm whose competitiveness scales reasonably with the number of processors if jobs can have side effects
44
![Page 45: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/45.jpg)
Candidate algorithm for 1 job instance: Run one copy on 2i processors at power 1/2i
This candidate algorithm works if all portions of the job has a single speed up curve
45
![Page 46: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/46.jpg)
Candidate algorithm for 1 job instance: Run one copy on 2i processors at power 1/2i
Impossibility Theorem: The candidate algorithm, and no other possible nonclairvoyant algorithm, has a competitive ratio that scales reasonably with the number of processors Proof: Consider a jobs where the speed-up
curves of the different portions of the jobs change over time
46
![Page 47: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/47.jpg)
Question: If you have only one job where different portions have different speed up curves, how would you schedule it?
47
![Page 48: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/48.jpg)
Question: If you have only one job where different portions have different speed up curves, how would you schedule it?
Answer: Run one copy on 2i processors at power 1/2i
checkpointing constantly This is O(log m) competitive
48
![Page 49: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/49.jpg)
Impossibility Theorem: There is no algorithm who competitiveness scales reasonably with the number of processors if jobs can have side effects or can not be checkpointed
But we can get a positive result if jobs don’t have side effects and we can checkpoint cheaply
49
![Page 50: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/50.jpg)
Main Theorem: If jobs have no side effects and are checkpointable then there a nonclairvoyant scheduling and speed scaling algorithm that is O(log m) competitive for the objective of flow + energy
Corollary: O(1)-competitiveness is possible for clairvoyant online algorithms
50
![Page 51: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/51.jpg)
Main Theorem: If jobs have no side effects and are checkpointable then there a nonclairvoyant scheduling and speed scaling algorithm that is O(log m) competitive for the objective of flow + energy
Algorithm Description: Scheduling: LAPS, plus run copies at a faster
rate on fewer processors in case the jobs are not parallel, checkpointing constantly
Speed Scaling: Natural algorithm that equates power and number of unfinished jobs
51
![Page 52: 1 Pruhs, Woeginger, Uthaisombut 2004 Qos Objective: Minimize total flow time Flow time f i of a job i is completion time C i – r i Power Objective:](https://reader033.vdocuments.net/reader033/viewer/2022051516/56649ebb5503460f94bc2fa0/html5/thumbnails/52.jpg)
Algorithm Analysis
Key Lemma: The worst case is if every speed up curve is parallel up to some number of processors and then is sequential
Contrast this to the fixed speed processor case where the worst case is if all work is either parallel or sequential
The rest of the analysis is a reduction to the single processor case
52
Ratework is
processed
Number of Processors
Speed up curve