a model for minimizing active processor time
DESCRIPTION
A Model for Minimizing Active Processor Time . Jessica Chang. Joint work with Hal Gabow and Samir Khuller. Simple Batch Scheduling Problem . n jobs release times and deadlines length batch machine time is slotted in each slot, “active” or “inactive” - PowerPoint PPT PresentationTRANSCRIPT
A Model for Minimizing Active Processor Time
Jessica Chang
Joint work with Hal Gabow and Samir Khuller
Simple Batch Scheduling Problem
B=3n=9
• n jobs– release times and
deadlines – length
• batch machine– time is slotted– in each slot,
“active” or “inactive”
– “active” at t can schedule ≤ B jobs
• minimize number of “active” slots
Simple Batch Scheduling Problem
B=3n=9
FOUR ACTIVE SLOTS
• n jobs– release times and
deadlines – length
• batch machine– time is slotted– in each slot,
“active” or “inactive”
– “active” at t can schedule ≤ B jobs
• minimize number of “active” slots
Of Ovens and Trucks
?
B=2 B=2
“Potential benefits include increased data center capacity and reduced capital expenditures as well as reduced power and cooling costs with power-aware job scheduling … However, current batch job scheduling algorithms and configurations are tuned only to optimize performance; energy efficiency has been ignored.”
- Intel TR, 2010
Simple Batch Scheduling Problem
B=3n=9
• n jobs– release times and
deadlines – length
• batch machine– time is slotted– in each slot,
“active” or “inactive”
– “active” at t can schedule ≤ B jobs
• minimize number of “active” slots
View Through FlowsJ T
B=2
job
timeslot
1 111
1
can be scheduled in
2222
2
View Through FlowsJ T
B=2
2222
2
Goal: pick the smallest subset of T that can support n units of flow
1 111
1
Batching Algorithms• Wolsey’s greedy algorithm [‘82]
– -approximation• Exact alg via Dynamic Programming
[Even et. al., ‘08]– Time complexity:
• Faster exact algorithm?
Lazy Activation
Lazy Activation• Step I. Scan slots right to left, and
decrement deadlines in overloaded slots– favor decrementing deadlines of jobs
with earlier
B=3
Lazy Activation• Step I. Scan slots right to left, and
decrement deadlines in overloaded slots– favor decrementing deadlines of jobs
with earlier • Step II.
– Order jobs s.t. – Consider deadlines LTR:
• Schedule at any outstanding jobs with deadline
• Fill the remaining capacity with feasible jobs of later deadline, favoring those with earlier deadline
Example of Step II
B=3n=9
Example of Step II
B=3n=9
Example of Step II
B=3n=9
Example of Step II
B=3n=9 ACTIVE TIME:
3
Optimality of Lazy Activation
1. Modifying deadlines in Step I does not change optimal active time
2. After Step I, OPT w.l.o.g. opens only deadlines
3. At the first deadline, w.l.o.g. OPT satisfies the same set of jobs that Lazy Activation does
Lazy Activation Maximizes Throughput
• On infeasible instances, Step I preserves the maximum number of jobs
B=3
A more general model• Each job may have a non-unit (integral)
processing requirement, but preemption at integral points is allowed
• Each job can be done in a subset of time slots (not necessarily one interval)
Main Results• An O(n log n) algorithm for unit jobs with one
window (any B)• Polynomial DP solution for unit jobs with one
window and (time is not slotted, any B)
• For B ≥3, NP-hard (even for unit jobs), trivial O(log n)-approx. [Wolsey, ‘82]
• Polynomial solution for B=2 and unit length jobs– Extension to non-unit length jobs and to
budgeted problem• For (unrestricted) preemption, a fast
combinatorial algorithm• For B=2, integrally-preemptive OPT is within 4/3
of the unrestricted-preemptive OPT
SINGLE WINDOW
MULTIPLE WINDOWS
Lazy Activation
Handling Jobs with Multiple Windows
1111
1
BBBB
B
J T
Polynomial Alg. for B=2J T
d(v) ≤ 1 d(v) ≤ 2
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
Polynomial Alg. for B=2J T
d(v) ≤ 1 d(v) ≤ 2
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
inactive slot
MAX DEGREE SUBGRAPH:Given a graph G=(V,E) and upper bound on degree constraints, find a max cardinality subgraph satisfying degree constraints.– Reducible to finding max
matchings
Need to be a bit careful!J T
d(v) ≤ 1 d(v) ≤ 2
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
MAX DEGREE SUBGRAPH:Given a graph G=(V,E) and upper bound on degree constraints, find a max cardinality subgraph satisfying degree constraints.– Reducible to finding max
matchings
unscheduled
Need to be a bit careful!J T
Need to be a bit careful!J T
FIX:– Find a standard max matching M
on (J,T) sans loops
d(v) ≤ 1 d(v) ≤ 2
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
Need to be a bit careful!J T
d(v) ≤ 1 d(v) ≤ 2
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
FIX:– Find a standard max matching M
on (J,T) sans loops – Augment M to a max DCS
including loops– Matched nodes remain matched
Polynomial Alg. for B=2J T
d(v) ≤ 1 d(v) ≤ 2
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 1
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
d(v) ≤ 2
|max DCS| = |J|+ # self-loops
Unrestricted Preemption (B=2)• Time slots may be partially active
J T
Unrestricted Preemption (B=2)• Time slots may be partially active
J T
𝑠1𝑠2
2-matching: s.t.
Unrestricted Preemption (B=2)• Time slots may be partially active
J T
𝑠1𝑠2
2-matching: s.t.
1/21/2
1/21
1
1/2 1/2
1/2 1
Unrestricted Preemption (B=2)• Time slots may be partially active
J T
𝑠1𝑠2
1/21/2
1/21
1
1/2 1/2
1/2 1
Max triangle-free 2-matching: [Babenko, Gusakov, Razenshteyn, ‘10]
Unrestricted Preemption (B=2)• Time slots may be partially active• Can reduce 2 slots to 1.5 active slots
B=2
Unrestricted Preemption (B=2)• Time slots may be partially active• Can reduce 2 slots to 1.5 active slots• Theorem: int-pmtv OPT ≤ 4/3 unres-
pmtv OPTJ T
Related Work• DP improvement [Khuller, Koehler, ‘12]• Batch scheduling to minimize makespan;
max tardiness [Ikura, Gimple, ‘86]– improvement [Condotta, Knust, Shakhlevich, ‘10]– does not minimize number of batches
• Minimizing busy time [Khandekar, Schieber, Shachnai, Tamir, ‘10]– infinite batch resources– jobs of arbitrary length– 5-approximation
• Minimizing gaps [Baptiste, ‘06; Baptiste, Chrobak, Dürr, ‘07]
Future Work• Polynomial time algorithms for jobs of non-
unit length and arbitrary B• Online versions• Improved algorithms for minimizing busy
time
Thanks. Questions?