440 likes | 585 Vues
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”
E N D
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” • “active” at t can schedule ≤ B jobs • minimize number of “active” slots n=9 B=3
Simple Batch Scheduling Problem • 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 n=9 B=3 FOUR 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 • 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 n=9 B=3
View Through Flows J T job 2 1 2 1 2 1 2 1 2 1 timeslot can be scheduled in B=2
View Through Flows J T 2 1 2 1 2 1 2 1 2 1 B=2 Goal: pick the smallest subset of T that can support n units of flow
Batching Algorithms • Wolsey’s greedy algorithm [‘82] • -approximation • Exact alg via Dynamic Programming [Even et. al., ‘08] • Time complexity: • Faster exact algorithm?
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 n=9 B=3
Example of Step II n=9 B=3
Example of Step II n=9 B=3
Example of Step II ACTIVE TIME: 3 n=9 B=3
Optimality of Lazy Activation • Modifying deadlines in Step I does not change optimal active time • After Step I, OPT w.l.o.g. opens only deadlines • 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 Lazy Activation SINGLE WINDOW • 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 MULTIPLE WINDOWS
Handling Jobs with Multiple Windows J T B 1 1 B B 1 B 1 B 1
Polynomial Alg. for B=2 J T d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2
Polynomial Alg. for B=2 J T d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 inactive slot d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 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
Need to be a bit careful! J T unscheduled d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 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
Need to be a bit careful! J T d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 • FIX: • Find a standard max matching M on (J,T) sans loops
Need to be a bit careful! J T d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 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=2 J T d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 d(v) ≤ 2 d(v) ≤1 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 2-matching: s.t.
Unrestricted Preemption (B=2) • Time slots may be partially active J T 1/2 1/2 1/2 1 1 1/2 1/2 1/2 1 2-matching: s.t.
Unrestricted Preemption (B=2) • Time slots may be partially active J T 1/2 1/2 1/2 1 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 OPT J 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