S ELFISH M IGRATE : A Scalable Algorithm for Non-clairvoyantly Scheduling Heterogeneous Processors Janardhan Kulkarni, Duke University Sungjin Im (UC Merced ), Kamesh Munagala (Duke), Kirk Pruhs (UPitt)
M M ONLINE UNRELATED MACHINE MODEL processing length - rate of processing - weight
M M ONLINE UNRELATED MACHINE (rate = 1, length=100) (rate = 0.5, length 200) (rate = 2, length =50) Time - processing length - rate of processing (rate = 0, length = infinity)
M M NON-CLAIRVOYANCE 3 3 (rate = 1, length=100) (rate = 0, infinity) (rate = 0.5, length = 200) (rate = 2, length =50) - processing length - rate of processing - weight Time
FLOW-TIME (DELAY OR RESPONSE TIME)
ANOTHER FORM
SPEED-AUGMENTATION: - Online scheduler runs at higher speed PREMPTION: - S top a job in middle of processing and continue later. MIGRATION: - Change the assignment of jobs to machines at no cost.
NO PARALLEL PROCESSING - No job is simultaneously processed on multiple machines OK
NO PARALLEL PROCESSING: - No job is simultaneously processed on multiple machines NOT ALLOWED
How to schedule jobs to minimize sum of weighted flow-time for unrelated machines in non-clairvoyant model?
It was very difficult Motivation
Heterogeneous architectures are ubiquitous Non-clairvoyance is very important in practice Motivation
S ELFISH M IGRATE is -speed -competitive for minimizing weighted flow-time on unrelated machines. Result also extends to energy + weighted flow-time. THE MAIN THEOREM
CLAIRVOYANT ALGORITHM Anand-Garg-Kumar, SODA ‘12 Chadha-Garg-Kumar-Muralidhara, STOC ‘09
Each machine schedules jobs using HDF (SJF) policy When a new job arrives, calculate the increase in the objective when the job is assigned to each of the machines. Assign the job greedily to the machine which increases the objective the least. ALGORITHM
SJF ALGORITHM Increase B = Increase A = NEW
For all jobs For all machines
THE DUAL For all jobs machines and time instants
DUAL FITTING Increase in the objective due to the job The total number of jobs alive at time on machine Speed-Augmentation
= Increase in the objective due to the job and
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
SELFISHMIGRATE
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
If is monotone, then
Dual Constraint:
If is monotone, then Dual Constraint:
Fraction of processor allocated = Round Robin or Proportional Sharing
If is monotone, then Dual Constraints:
If is monotone, then Dual Constraints: But which machine we should assign the job ?
If is monotone, then Dual Constraints: But which machine we should assign the job ? ANS IS MINIMUM
Dual constraints need us… For all jobs machines and time instants 1. BEST MACHINE- which maximizes speed. 2.The speed MONOTONICALLY increases.
KEY IDEA II: VIRTUAL QUEUES, VIRTUAL SPEED RR j
VIRTUAL QUEUES, VIRTUAL SPEEDS RR Inverse of instantaneous delay the job induces on the other jobs ahead of its virtual queue.
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
KEY IDEA III: SELFISHMIGRATE RULE 1: NO JUMPING ( not even virtual ones! )
Virtual speed of other jobs does not decrease if a job enters the machine! RULE 1: NO JUMPING
RULE 2: BE SELFISH! Increases virtual speed… migrate! Any time!
RULE 2: BE SELFISH! Remains Same Increases!
Jobs migrate whenever they can increase their virtual speed...
Jobs migrate whenever they can increase their virtual speed…..
Jobs migrate whenever they can increase their virtual speed…
Jobs migrate whenever they can increase their virtual speed…..
This cannot go on forever… as virtual speeds are finite
We get …MONOTONICITY Virtual speeds are monotone non-decreasing!
BEST MACHINE each job chooses the best machine on arrival
BEST MACHINE (Nash Equilibrium on Virtual Speed) S ELFISH M IGRATE ensures this is true at all times by design!
BEST MACHINE Entire process can be thought as Coordination ‘game’ on virtual speeds
DUAL SETTINGS The total delay job causes on the jobs ahead of its virtual queue over its entire sojourn
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)
The total number of jobs in the queue at time t. The total flow-time of all jobs (Cost of the algorithm) Dual setting = =
DUAL OBJECTIVE
What About Constraints? For all jobs machines and time instants
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
DELAY LEMMA
MINIMUM ( BEST MACHINE )
We gave a new framework to analyze non-clairvoyant scheduling problems CONCLUSIONS and OPEN PROBLEMS - norms of weighted flow-time
THANKS