s elfish m igrate : a scalable algorithm for non-clairvoyantly scheduling heterogeneous processors...

57
SELFISHMIGRATE: A Scalable Algorithm for Non- clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced ), Kamesh Munagala (Duke), Kirk Pruhs (UPitt)

Upload: quentin-hamm

Post on 15-Dec-2015

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

SELFISHMIGRATE: A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors

Janardhan Kulkarni, Duke University

Sungjin Im (UC Merced ), Kamesh Munagala (Duke), Kirk Pruhs (UPitt)

Page 2: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

1

2

M

ONLINE UNRELATED MACHINE MODEL

3- processing length

- rate of processing

- weight

Page 3: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

1

2

M

ONLINE UNRELATED MACHINE

3

100

(rate = 1, length=100)

(rate = 0.5, length 200)

(rate = 2, length =50)

Time

- processing length

- rate of processing

(rate = 0, length = infinity)

Page 4: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

1

2

M

NON-CLAIRVOYANCE

3

(rate = 1, length=100)

(rate = 0, infinity)

(rate = 0.5, length = 200)

(rate = 2, length =50)

- processing length

- rate of processing

- weight

Time

Page 5: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

FLOW-TIME (DELAY OR RESPONSE TIME)

Page 6: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

ANOTHER FORM

Page 7: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

SPEED-AUGMENTATION: - Online scheduler runs at higher speed

PREMPTION: - Stop a job in middle of processing and continue later.

MIGRATION: - Change the assignment of jobs to machines at no cost.

Page 8: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

NO PARALLEL PROCESSING

- No job is simultaneously processed on multiple machines.

1

2

OK

Page 9: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

NO PARALLEL PROCESSING:

- No job is simultaneously processed on multiple machines.

1

2

NOT ALLOWED

Page 10: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

How to schedule jobs to minimize sum of weighted flow-time

for unrelated machines in non-clairvoyant model?

Page 11: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

It was very difficult

Motivation

Page 12: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

• Heterogeneous architectures are ubiquitous

• Non-clairvoyance is very important in practice

Motivation

Page 13: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

SELFISHMIGRATE is -speed -competitive for minimizing

weighted flow-time on unrelated machines.

Result also extends to energy + weighted flow-time.

THE MAIN THEOREM

Page 14: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

CLAIRVOYANT ALGORITHM

Anand-Garg-Kumar, SODA ‘12Chadha-Garg-Kumar-Muralidhara, STOC ‘09

Page 15: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

SJF

SJF

ALGORITHM

53 70

101 10020

2020

Increase B = 28 + 20

Increase A = 31 + 20 NEW

Page 16: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

For all jobs

For all machines

Page 17: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

THE DUAL

For all jobs machines and time instants

Page 18: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

The whole frame work breaks down for non-clairvoyant settings…

1. We cannot measure the increase in the objective

2. Migrating jobs is necessary

3. Migration of jobs makes calculating the flow-times difficult and complicates how jobs interfere with each other

Page 19: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

SELFISHMIGRATE

Page 20: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

KEY IDEA I

Focus on speed at which jobs are getting processed and monotonicity of speed

Speed of a job =

fraction of the job processed at time

Page 21: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

If is monotone, then

Page 22: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

If is monotone, then

Dual Constraint:

Page 23: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

If is monotone, then

Dual Constraint:

Page 24: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

Fraction of processor allocated =

Round Robin or Proportional Sharing

Page 25: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

If is monotone, then

Dual Constraints:

Page 26: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

If is monotone, then

Dual Constraints:

But which machine we should assign the job ?

Page 27: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

If is monotone, then

Dual Constraints:

But which machine we should assign the job ? ANS IS MINIMUM

Page 28: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

Dual constraints need us…

For all jobs machines and time instants

1. BEST MACHINE- which maximizes speed.

2. The speed MONOTONICALLY increases.

Page 29: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

KEY IDEA II: VIRTUAL QUEUES, VIRTUAL SPEED

RR

j

Page 30: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

VIRTUAL QUEUES, VIRTUAL SPEEDS

RR

Inverse of instantaneous delay the job induces on the other jobs ahead of its virtual queue.

Page 31: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

KEY IDEA II: VIRTUAL QUEUES, VIRTUAL SPEED

RR

Total delay induced by job if it stays on the machine till its completion is proportional to

Page 32: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

KEY IDEA III: SELFISHMIGRATE

RULE 1: NO JUMPING (not even virtual ones!)

Page 33: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

Virtual speed of other jobs does not decrease if a job enters the machine!

RULE 1: NO JUMPING

Page 34: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

RULE 2: BE SELFISH!

Increases virtual speed… migrate! Any time!

Page 35: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

RULE 2: BE SELFISH!

Remains Same

Remains Same Increases!

Page 36: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

Jobs migrate whenever they can increase their virtual speed...

Page 37: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

Jobs migrate whenever they can increase their virtual speed…..

Page 38: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

Jobs migrate whenever they can increase their virtual speed…

Page 39: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

Jobs migrate whenever they can increase their virtual speed…..

Page 40: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

This cannot go on forever… as virtual speeds are finite

Page 41: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

We get …MONOTONICITY

Virtual speeds are monotone non-decreasing!

Page 42: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

BEST MACHINE

each job chooses the best machineon arrival

Page 43: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

BEST MACHINE (Nash Equilibrium on Virtual Speed)

SELFISHMIGRATE ensures this istrue at all times by design!

Page 44: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

BEST MACHINE

Entire process can be thought asCoordination ‘game’ on virtual speeds

Page 45: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

DUAL SETTINGS

The total delay job causes on the jobs ahead of its virtual queue over its entire sojourn

Page 46: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced
Page 47: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced
Page 48: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced
Page 49: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

DUAL SETTINGS

The total delay job j causes on the jobs ahead of its virtual queue over its entire sojourn + its total processing time.

The flow-time of all jobs (Cost of the algorithm)

Page 50: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

The total number of jobs in the queue at time t.

The total flow-time of all jobs (Cost of the algorithm)

Dual setting

=

=

Page 51: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

DUAL OBJECTIVE

Page 52: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

What About Constraints?

For all jobs machines and time instants

Page 53: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

DELAY LEMMAS

(Follows from a property of Round Robin)

Total delay a job induced on jobs ahead of it over the interval

Total delay a job induced on jobs ahead of it in

Page 54: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

DELAY LEMMA

Page 55: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

DELAY LEMMA

MINIMUM

(BEST MACHINE)

Page 56: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

We gave a new framework to analyze non-clairvoyant scheduling problems

CONCLUSIONS and OPEN PROBLEMS

- norms of weighted flow-time

Page 57: S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced

THANKS