a model for minimizing active processor time

37
A Model for Minimizing Active Processor Time Jessica Chang Joint work with Hal Gabow and Samir Khuller

Upload: audra

Post on 23-Feb-2016

31 views

Category:

Documents


0 download

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 Presentation

TRANSCRIPT

Page 1: A Model for Minimizing Active Processor Time

A Model for Minimizing Active Processor Time

Jessica Chang

Joint work with Hal Gabow and Samir Khuller

Page 2: A Model for Minimizing Active Processor Time

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

Page 3: A Model for Minimizing Active Processor Time

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

Page 4: A Model for Minimizing Active Processor Time

Of Ovens and Trucks

?

B=2 B=2

Page 5: A Model for Minimizing Active Processor Time

“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

Page 6: A Model for Minimizing Active Processor Time

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

Page 7: A Model for Minimizing Active Processor Time

View Through FlowsJ T

B=2

job

timeslot

1 111

1

can be scheduled in

2222

2

Page 8: A Model for Minimizing Active Processor Time

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

Page 9: A Model for Minimizing Active Processor Time

Batching Algorithms• Wolsey’s greedy algorithm [‘82]

– -approximation• Exact alg via Dynamic Programming

[Even et. al., ‘08]– Time complexity:

• Faster exact algorithm?

Page 10: A Model for Minimizing Active Processor Time

Lazy Activation

Page 11: A Model for Minimizing Active Processor Time

Lazy Activation• Step I. Scan slots right to left, and

decrement deadlines in overloaded slots– favor decrementing deadlines of jobs

with earlier

B=3

Page 12: A Model for Minimizing Active Processor Time

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

Page 13: A Model for Minimizing Active Processor Time

Example of Step II

B=3n=9

Page 14: A Model for Minimizing Active Processor Time

Example of Step II

B=3n=9

Page 15: A Model for Minimizing Active Processor Time

Example of Step II

B=3n=9

Page 16: A Model for Minimizing Active Processor Time

Example of Step II

B=3n=9 ACTIVE TIME:

3

Page 17: A Model for Minimizing Active Processor Time

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

Page 18: A Model for Minimizing Active Processor Time

Lazy Activation Maximizes Throughput

• On infeasible instances, Step I preserves the maximum number of jobs

B=3

Page 19: A Model for Minimizing Active Processor Time

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)

Page 20: A Model for Minimizing Active Processor Time

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

Page 21: A Model for Minimizing Active Processor Time

Handling Jobs with Multiple Windows

1111

1

BBBB

B

J T

Page 22: A Model for Minimizing Active Processor Time

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

Page 23: A Model for Minimizing Active Processor Time

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

Page 24: A Model for Minimizing Active Processor Time

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

Page 25: A Model for Minimizing Active Processor Time

Need to be a bit careful!J T

Page 26: A Model for Minimizing Active Processor Time

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

Page 27: A Model for Minimizing Active Processor Time

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

Page 28: A Model for Minimizing Active Processor Time

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

Page 29: A Model for Minimizing Active Processor Time

Unrestricted Preemption (B=2)• Time slots may be partially active

J T

Page 30: A Model for Minimizing Active Processor Time

Unrestricted Preemption (B=2)• Time slots may be partially active

J T

𝑠1𝑠2

2-matching: s.t.

Page 31: A Model for Minimizing Active Processor Time

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

Page 32: A Model for Minimizing Active Processor Time

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]

Page 33: A Model for Minimizing Active Processor Time

Unrestricted Preemption (B=2)• Time slots may be partially active• Can reduce 2 slots to 1.5 active slots

B=2

Page 34: A Model for Minimizing Active Processor Time

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

Page 35: A Model for Minimizing Active Processor Time

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]

Page 36: A Model for Minimizing Active Processor Time

Future Work• Polynomial time algorithms for jobs of non-

unit length and arbitrary B• Online versions• Improved algorithms for minimizing busy

time

Page 37: A Model for Minimizing Active Processor Time

Thanks. Questions?