Minimizing Weighted Flow Time - PowerPoint PPT Presentation

About This Presentation
Title:

Minimizing Weighted Flow Time

Description:

for non-clairvoyant weighted flow time. 1 speed , 1 1/ compet. ... 3) Non-clairvoyant case, better than 1 1/ competitive for 1 speed up ? Nikhil Bansal ... – PowerPoint PPT presentation

Number of Views:57
Avg rating:3.0/5.0
Slides: 34
Provided by: Nik11
Learn more at: http://www.cs.cmu.edu
Category:

less

Transcript and Presenter's Notes

Title: Minimizing Weighted Flow Time


1
Minimizing Weighted Flow Time
  • Nikhil Bansal (CMU)
  • Kedar Dhamdhere (CMU)

2
Scheduling
  1. Single Machine (with preemptions)
  2. Jobs arrive at different times
  3. Different sizes (service requirements)

Keep users happy, some measure
  • What the heck is flowtime
  • 1r_j pmtn W_j F_j

3
Scheduling (contd)
t0
Flow Time of Job 1
Flow Time Completion Time Release Time
Time spent in system
Measure Total Weighted Flow Time ( 1 rj, pmtn
wj Fj)
Competitive Ratio Max. Online Cost / Opt.
Offline Cost
4
Results
Unweighted Optimal 56 , SRPT (Shortest Rem.
Proc. Time)
Previous Results Our Results
NP Hard Lenstra, Kan, Brucker 77 O(Log2 P) compet. Semi-online Chekuri, Khanna, Zhu 01 k competitive for k weight classes gtO(Log W) competitive Truly online gt Semi-online O(log n log P)
P max. size / min. size W
max. wt / min. wt
5
Results (Resource Augmentation)
s-speed c-competitive algorithm Kalyanasundaram,
Pruhs 95 Onlines(I) c
. Opt Offline1(I)
Previous Results Our Results
1? speed , 11/? compet. for clairvoyant weighted flow time Becchetti, Leonardi, Pruhs, Spaccamela 01 1? speed , 11/? compet. For non-clairvoyant unweighted flow time Kalyanasundaram,Pruhs 95 1? speed , 11/? compet. for non-clairvoyant weighted flow time
6
An alternate view
  • Weighted Flow Time of a job wj (Time in
    system)
  • think of contributing wj at each time step
  • Total Wt. Flow Time W(t) ?t Total weight(t)

Local c-Competitive If W(t) c Wopt(t) for
all t Clearly sufficient to guarantee
c-competitive
Also Necessary!!
Need to keep total weight close to Opt at all
times
7
A Balancing Act
Need to keep total weight close to Opt at all
times
Density Weight/ Remaining Service
Greedy could be very BAD
(W 99, Size 100)
W1, Size 1
What happens at time 100 ?
  • Also need to take care of BIG weights

8
The Algorithm
  • 1. Let the weights be w1 lt w2 lt lt wk
  • 2. Put same weight jobs in a bucket.
  • Work on the bucket with highest total weight
    (breaking ties in favor of the larger index).
  • 3. Do SRPT within each bucket.

W11
W24
9
The Algorithm
  • 1. Let the weights be w1 lt w2 lt lt wk
  • 2. Put same weight jobs in a bucket.
  • Work on the bucket with highest total weight
    (breaking ties in favor of the larger index).
  • 3. Do SRPT within each bucket.

W11
W24
10
The Algorithm
  • 1. Let the weights be w1 lt w2 lt lt wk
  • 2. Put same weight jobs in a bucket.
  • Work on the bucket with highest total weight
    (breaking ties in favor of the larger index).
  • 3. Do SRPT within each bucket.

W11
W24
11
The Algorithm
  • 1. Let the weights be w1 lt w2 lt lt wk
  • 2. Put same weight jobs in a bucket.
  • Work on the bucket with highest total weight
    (breaking ties in favor of the larger index).
  • 3. Do SRPT within each bucket.

W11
W24
12
Analysis Idea
  • Maintain an Invariant Show does not change with
  • time
  • Simpler Problem
  • Optimality of SRPT (Shortest remaining processing
    time) wrt of jobs
  • At all times SRPT has min of jobs Schrage 68

13
Proof
SRPT
Other
SRPT(2)
Other(2)
Let A(l) Jobs in the first l levels under A
Let A(l) Total work contained in jobs 2 A(l)
Invariant Srpt(l) Other(l) , for all l
1,2,3,
If true, it follows NSRPT (t) NOther(t)
14
Proof (No arrival Case)
SRPT
Other
SRPT always works on last job
15
Proof (No arrival Case)
SRPT
Other
Srpt(l) decreases!
Key Property Srpt(l) decreases iff Srpt(l)
total work
16
Proof (Arrivals)
SRPT
Other
17
Proof (Arrivals, Case 1)
SRPT
Other
18
Proof (Arrivals)
SRPT
Other
New SRPT(5) Old SRPT(4) new arrival
New Other(5) Old Other(4) new arrival
19
Proof (Arrivals)
SRPT
Other
Easy SRPTs prefix only increases
20
Our Algorithm
  1. Let the weights be w1 lt w2 lt lt wk
  2. Work on bucket with highest total weight (break
    ties in favor of the larger weight index)
  3. Do SRPT within each bucket

W11
W24
21
Proof Idea
  • Let (j,l) denote lth job with weight wj
  • B(j,l) (j,l) jobs which cannot be executed
    before (j,l)

1) Key Property B(j,l) decreases iff B(j,l)
total work 2) Weight(B(j,l)) k . l . Wj
W11
W24
(2,1)
(2,2)
(1,2)
(1,5)
B(1,5)
22
Proof Idea
P(j,l) Any packing of jobs with total weight l
wj
Invariant For every (j,l) packing, B(j,l)
P(j,l)
W24
W11
Opt
un
P(1,5)
B(1,5)
23
Proof Idea
P(j,l) Any packing of jobs with total weight l
wj
Invariant For every (j,l) packing, B(j,l)
P(j,l)
W24
W11
Opt
P(1,5)
un
B(1,5)
Could have holes
24
Invariant gt Result
  • Consider all jobs in Opt at time t.
  • Total wt W and min. wt wj
  • Let l W/wj , and consider B(j,l)
  • By Invariant, B(j,l) P(j,l) total work
    in system
  • B(j,l) All the jobs
  • Weight(B(j,l)) k wj l
  • k Weight(Opt)
  • Thus, K competitive

25
Proof Idea
P(j,l) Any packing of jobs with total weight l
wj
Invariant For every (j,l) packing, B(j,l)
P(j,l)
Key Property B(j,l) decreases iff B(j,l)
total work
W24
W11
Opt
P(1,5)
un
B(1,5)
26
Proving the Invariant (Arrival)
W11
W24
More capacity here
More elaborate argument Presence of holes
Want to show B(1,5) gt P(1,5) on arrival
27
Proving the Invariant
W11
W24
On arrival of red job P(1,5) increases, but
B(1,5) does not Need to use that in fact B(1,4)
gt P(1,4) A couple more cases!
28
Open Problems
  • O(1) competitive for weighted flow time ?
  • O(1) approx ?
  • QPTAS, (nO(log Wlog P/?3)) time
    Chekuri,Khanna
  • 3) Non-clairvoyant case, better than 11/?
  • competitive for 1? speed up ?

29
  • Thank You!

30
Proof Idea
P(j,l) Any packing of jobs with total weight l
wj
Invariant For every (j,l) packing, B(j,l)
P(j,l)
W24
W11
Opt
un
P(1,5)
B(1,5)
31
Proof (Arrivals, Case 2)
SRPT
Other
32
Proof (Arrivals, Case 2)
SRPT
Other
33
Proof (Arrivals, Case 2)
SRPT
Other
Other(2) might increase but Srpt(2) does not
But, in SRPT first 2 jobs bigger than new (red) ,
not so for Other!
Write a Comment
User Comments (0)
About PowerShow.com