- Lorentz Center

advertisement
SELFISHMIGRATE: A Scalable Algorithm
for Non-clairvoyantly Scheduling
Heterogeneous Processors
Janardhan Kulkarni, Duke University
Sungjin Im (UC Merced ),
Kamesh Munagala (Duke),
Kirk Pruhs (UPitt)
ONLINE UNRELATED MACHINE MODEL
1
2
3
rj
p j - processing length
ℓij - rate of processing
M
w j - weight
ONLINE UNRELATED MACHINE
1
2
(rate = 1, length=100)
(rate = 0, length = infinity)
rj
100
3
(rate = 0.5, length 200)
t
Time
p j - processing length
(rate = 2, length =50)
M
ℓij - rate of processing
NON-CLAIRVOYANCE
1
(rate = 1, length=100)
rj
2
(rate = 0, infinity)
3
t
(rate = 0.5, length = 200)
p j - processing length
ℓij - rate of processing
M
(rate = 2, length =50)
w j - weight
Time
FLOW-TIME
(DELAY OR RESPONSE TIME)
ANOTHER FORM
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.
NO PARALLEL PROCESSING
- No job is simultaneously processed on
multiple machines.
1
OK
2
NO PARALLEL PROCESSING:
- No job is simultaneously processed on
multiple machines.
1
NOT ALLOWED
2
How to schedule jobs to minimize sum of
weighted flow-time
for unrelated machines in non-clairvoyant model?
Motivation
It was very difficult
Motivation
• Heterogeneous architectures are ubiquitous
• Non-clairvoyance is very important in practice
THE MAIN THEOREM
SELFISHMIGRATE is
-speed
-competitive for minimizing
weighted flow-time on unrelated machines.
Result also extends to energy + weighted flow-time.
CLAIRVOYANT ALGORITHM
Anand-Garg-Kumar, SODA ‘12
Chadha-Garg-Kumar-Muralidhara, STOC ‘09
ALGORITHM
20
SJF
1
10
100
Increase A = 31 + 20
NEW
20
20
SJF
3
5
70
Increase B = 28 + 20
xijt
å p ³1
ij
i,t
åx
ijt
j
£1
For all jobs
æ
pj ö
çç pij = ÷÷
ℓij ø
è
j
For all machines
i, t
THE DUAL
For all jobs
j machines
i and time instants t ³ rj
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 flowtimes 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
If
is monotone, then
Dual Constraint:
If
is monotone, then
Dual Constraint:
Round Robin or Proportional Sharing
1
Fraction of processor allocated =
N(i, t)
If
is monotone, then
Dual Constraints:
If
is monotone, then
But which machine we should assign the job
Dual Constraints:
?
If
is monotone, then
But which machine we should assign the job ? ANS IS
Dual Constraints:
MINIMUM
Dual constraints need us…
For all jobs
j machines
i and time instants t
1. BEST MACHINE- which maximizes speed.
2. The speed MONOTONICALLY increases.
KEY IDEA II: VIRTUAL QUEUES, VIRTUAL SPEED
j
RR
ℓij
f ( j, t) = *
N ( j, t) +1
VIRTUAL QUEUES, VIRTUAL SPEEDS
RR
ℓij
f ( j, t) =
N( j, t) +1
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 [t,C j ] is
proportional to
j
p (t)
f ( j, t)
KEY IDEA III: SELFISHMIGRATE
RULE 1: NO JUMPING (not even virtual ones!)
RULE 1: NO JUMPING
Virtual speed of other jobs does not decrease
if a job enters the machine!
RULE 2: BE SELFISH!
ℓij
f ( j, t) =
N *( j, t) +1
Increases virtual speed… migrate! Any time!
RULE 2: BE SELFISH!
Remains Same
Increases!
Remains Same
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
ℓij
f ( j, t) =
N( j, t) +1
each job chooses the best machine
on arrival
BEST MACHINE
(Nash Equilibrium on Virtual Speed)
SELFISHMIGRATE ensures this is
true at all times by design!
BEST MACHINE
Entire process can be thought as
Coordination ‘game’ on virtual speeds
DUAL SETTINGS
aj
The total delay job causes on the
jobs ahead of its virtual queue over
its entire sojourn
DUAL SETTINGS
aj
åa
j
The total delay job j causes on the
jobs ahead of its virtual queue over
its entire sojourn + its total
processing time.
j
The flow-time of all jobs
(Cost of the algorithm)
Dual setting
b
1
=
it
(2 + e )
å
i,t
1
bit =
(2 + e )
The total number of jobs in
the queue at time t.
The total flow-time of
all jobs
(Cost of the algorithm)
DUAL OBJECTIVE
Maxåa j - å bit
j
i,t
DUAL = O(e )*COSTALGO
What About Constraints?
For all jobs
j machines
i and time instants t
DELAY LEMMAS
Total delay a job induced on
jobs ahead of it over the
interval
Total delay a job induced
on jobs ahead of it in
t
rj
£ (t - r )
j
Cj
pj
£ 2*
f ( j, t)
(Follows from a property of Round Robin)
DELAY LEMMA
DELAY LEMMA
MINIMUM
(BEST MACHINE)
CONCLUSIONS and OPEN PROBLEMS
We gave a new framework to analyze
non-clairvoyant scheduling problems
- norms of weighted flow-time
THANKS
Download