feb 23, 2010 university of liverpool minimizing total busy time in parallel scheduling with...
DESCRIPTION
Feb 23, 2010 University of Liverpool Problem Statement Example: A feasible schedule for g=2 A machine is busy at time t if it processes at least one job at time t. The goal: Minimize the total busy time of all the machines.TRANSCRIPT
Feb 23, 2010University of Liverpool
Minimizing Total Busy Time in Parallel Scheduling with Application to Optical
NetworksMichele Flammini – University of L’AquilaGianpiero Monaco – University of L’AquilaLuca Moscardelli – University of Chieti-PescaraHadas Shachnai – Technion, HaifaMordechai Shalom – Tel Hai Academic CollegeTami Tamir – IDC, HerzliaShmuel Zaks – Technion, Haifa
Feb 23, 2010University of Liverpool
Problem Statement
• A job scheduling problem.• Parallel machines.• n jobs, each job given by an interval.
• Parallelism parameter g 1 : A machine can process at most g jobs at any given point in time.
sj cj
Job j
Feb 23, 2010University of Liverpool
Problem Statement• Example: A feasible schedule for g=2
• A machine is busy at time t if it processes at least one job at time t.
• The goal: Minimize the total busy time of all the machines.
Feb 23, 2010University of Liverpool
Problem Statement• Solution 1: Cost =busygreen + busyred + busyblue
• A better solution – total width of busy intervals is smaller:
Feb 23, 2010University of Liverpool
Previous Results
• Batch Scheduling:– The number of machines is given.– The cost function is different
• Maximum completion time as opposed to• Total busy time
• The problem is NP-Hard even for g=2– Winkler & Zhang 2003– (implied by) Flammini et al. 2008
Feb 23, 2010University of Liverpool
Our Results
• An algorithm with approximation ratio between 3 and 4 for the general case.
• A 2-approximation algorithm for proper interval graphs.
• A (2+)-approximation algorithm for bounded ratio integral instances.
Feb 23, 2010University of Liverpool
Definitions
• Given a time interval I=[s,c], the length of I is len(I)=c-s.
• For a set S of intervals, len(S)=IS len(I).• For a set S of intervals, the span of S is span(S)=len( IS I).
Feb 23, 2010University of Liverpool
Properties of OPT
• For any instance J and parallelism parameter g 1, the optimal solution can be bounded as follows:
1. The parallelism bound: OPT(J) len(J)/g.2. The span bound: OPT(J) span(J).
• W.l.o.g. no machine is idle (otherwise, split into machines with busy intervals with smaller total
length).
Feb 23, 2010University of Liverpool
Algorithm FirstFit
• Sort jobs in non-increasing order of length, i.e. J1≥ J2≥… Jn
• Start with an empty set of machines.• for j=1 to n
– Assign jj to the first machine that can accommodate it.
– If no machine can accommodate jj, open a new machine and assign jj to this machine.
Feb 23, 2010University of Liverpool
FirstFit-Observation
• Let some job J be assigned to some machine Mi and let 1≤k ≤ i, then
• There is some time t in J, in which there is “enough” load in Mk ”around” t.
Mi
Mk
Feb 23, 2010University of Liverpool
FirstFit-Observation (cont’d)
• “enough” is g . len(J)• “around” is the neighborhood len(J) of t.
Mi
Mk
Feb 23, 2010University of Liverpool
Lemma 2.3 (intuition)
• The “density” of Mk around t is at least ½.
• span(Mi) can be divided into segments in which the density of Mk is at least ½.
Mi
Mk
Feb 23, 2010University of Liverpool
Lemma 2.3 (intuition)
• The average density of Mk on span(Mi) is at least 1/3.
Mi
Mk
Feb 23, 2010University of Liverpool
Lemma 2.3
• Ji – the set of jobs assigned to Mi
• len(Jk) ≥ g * span(Ji) / 3
• span(Ji) ≤ 3 * len(Jk)/g• In particular:
– span(Ji) ≤ 3 * len(Ji-1)/g
Feb 23, 2010University of Liverpool
FirstFit is a 4-approximation
– busy2 = span(J2) ≤ 3 * len(J1)/g
– busy3 = span(J3) ≤ 3 * len(J2)/g
– busy4 = span(J4) ≤ 3 * len(J3)/g
– busy5 = span(J5) ≤ 3 * len(J4)/g– …..– FirstFit(J \ J1) < 3 len(J) / g ≤ 3 OPT(J)– busy1 = span(J1) ≤ span(J) ≤ OPT(J)– FirstFit(J) ≤ 4 OPT(J)
Feb 23, 2010University of Liverpool
FirstFit is not a (3-ε)-approximation
• All jobs have the same length l.
g-1 jobs
g-1 jobs
g-1 jobs
…..
FirstFit = g (3l – 2)OPT = 2 l + (g-1) l = (g+1) l
For every g and ε one can find some l, big enough, to get a contradiction.
Feb 23, 2010University of Liverpool
Special Cases
1. Proper Interval Graph: no job interval is properly contained in another.
yes
no
2. Bounded Lengths Instances: for all 1 j n, len(Jj) {1,2, …, d}, where d 1 is a fixed constant.
Feb 23, 2010University of Liverpool
Greedy Algorithm for Proper Interval Graphs
1. Sort the jobs in non-decreasing order by their starting points, i.e., s1 s2 … sn.
2. Scan the list of jobs in the above order. If possible, assign the next job to the currently
filled machine; else (adding the job forms a (g+1)-clique in the currently filled machine), open a new machine for the currently scheduled job.
Feb 23, 2010University of Liverpool
Greedy Algorithm for Proper Interval Graphs
Theorem: Greedy is a 2-approximation for proper interval graphs.
Note: FirstFit is not a 2-approximation for proper interval graphs.
Greedyt – the number of machines used by Greedy at time t
OPTt – the number of machines used by OPT at time t
Nt – the number of jobs at time t
Claim: Nt ≥ g (Greedyt – 2) + 2
Feb 23, 2010University of Liverpool
Greedy Algorithm for Proper Interval GraphsClaim: Nt ≥ g (Greedyt – 2) + 2
Given time t, consider the Job J that caused Machine Greedyt to be opened
MGreedyt J
M1 is processing at least one job J’
M1 J’
J’ starts (and therefore ends) before J
t
All other jobs J’’ that assigned to M2, M3, … started after J’, therefore still active
Feb 23, 2010University of Liverpool
Greedy Algorithm for Proper Interval Graphs
Nt ≥ g (Greedyt – 2) + 2
Using the parallelism bound: OPTt ≥ ceil(Nt/g ) = Greedyt - 1
Summing up for all values of t: OPT(J) ≥ Greedy(J) – span(J)
Using the span bound: Greedy(J) ≤ OPT(J) + span(J) ≤ 2 OPT(J)
Feb 23, 2010University of Liverpool
• Let d be the upper bound on len(J).• Divide the instance J into sub instances J1,
J2, … such that each instance Ji consists of jobs starting in [d.i+1, d.(i+1)]
• Solve each instance separately. • This introduces a factor of at most 2
because instance Ji is independent of Ji+2 due to the bound on the lengths.
• We will show a PTAS for each instance
Algorithm for Bounded Lengths Instances
Feb 23, 2010University of Liverpool
A PTAS for the sub-Instances• The running time is polynomial in n,g but
exponential in the length of the longest job.Main ideas:• When job lengths are rounded, the number of
ways to allocate machines to job-classes and to determine the machine’s busy intervals is polynomial.
• For each such allocation, use f-factor algorithms to assign efficiently independent sets of jobs to machines.
• Select the best solution among those considered.
Feb 23, 2010University of Liverpool
A PTAS for the sub-Instances• Given a parameter ε.• Guess the number of machines in an optimal
solution. (n possibilities)• Guess the vector of busy times busyi with a relative
error ε. (log1+ ε 2d possibilities) and start times si (d possibilities).
• Guess a partition of the jobs to independent sets ISj.– An independent set has at most d elements (constant). – The number of independent sets is bounded by a
constant– The number of partitions to such sets is bounded by a
constant
Feb 23, 2010University of Liverpool
A PTAS for the sub-Instances• Check the feasibility of the guess (si, busyi,
ISj ):• Build a bipartite (Machines, Independent
Sets) graph. • Each machine can accommodate at most g
independent sets• Each independent set can be assigned to at
most one machine.• Calculate maximum f-factor with these
constrains.