Minimizing Average Flow-Time Naveen Garg IIT Delhi Joint work with Amit Kumar, Jivi Chadha,V Muralidhara, S. Anand.

Slides:



Advertisements
Similar presentations
1 LP, extended maxflow, TRW OR: How to understand Vladimirs most recent work Ramin Zabih Cornell University.
Advertisements

Coordination Mechanisms for Unrelated Machine Scheduling Yossi Azar joint work with Kamal Jain Vahab Mirrokni.
On the Complexity of Scheduling
A Dependent LP-Rounding Approach for the k-Median Problem Moses Charikar 1 Shi Li 1 1 Department of Computer Science Princeton University ICALP 2012, Warwick,
Network Design with Degree Constraints Guy Kortsarz Joint work with Rohit Khandekar and Zeev Nutov.
Routing in Undirected Graphs with Constant Congestion Julia Chuzhoy Toyota Technological Institute at Chicago.
Machine scheduling Job 1Job 3 Job 4 Job 5Machine 1 Machine 2 time 0C max Job 2.
Primal Dual Combinatorial Algorithms Qihui Zhu May 11, 2009.
Submodular Set Function Maximization via the Multilinear Relaxation & Dependent Rounding Chandra Chekuri Univ. of Illinois, Urbana-Champaign.
A threshold of ln(n) for approximating set cover By Uriel Feige Lecturer: Ariel Procaccia.
Minimum Vertex Cover in Rectangle Graphs
IMIM v v v v v v v v v DEFINITION L v 11 v 2 1 v 31 v 12 v 2 2 v 32.
Truthful Mechanism Design for Multi-Dimensional Scheduling via Cycle Monotonicity Ron Lavi IE&M, The Technion Chaitanya Swamy U. of Waterloo and.
GRAPH BALANCING. Scheduling on Unrelated Machines J1 J2 J3 J4 J5 M1 M2 M3.
Approximation Algorithms Chapter 14: Rounding Applied to Set Cover.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Approximation Algorithms for Capacitated Set Cover Ravishankar Krishnaswamy (joint work with Nikhil Bansal and Barna Saha)
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
1 of 56 Linear Programming-Based Approximation Algorithms Shoshana Neuburger Graduate Center, CUNY May 13, 2009.
Online Social Networks and Media. Graph partitioning The general problem – Input: a graph G=(V,E) edge (u,v) denotes similarity between u and v weighted.
Scheduling with Outliers Ravishankar Krishnaswamy (Carnegie Mellon University) Joint work with Anupam Gupta, Amit Kumar and Danny Segev.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Maurizio Patrignani seminar on the paper on the single-source unsplittable flow problem authored by Yefim Dinitz Naveen Garg Michel X. Goemans FOCS ‘98.
Completion Time Scheduling Notes from Hall, Schulz, Shmoys and Wein, Mathematics of Operations Research, Vol 22, , 1997.
Parameterized Approximation Scheme for the Multiple Knapsack Problem by Klaus Jansen (SODA’09) Speaker: Yue Wang 04/14/2009.
Linear Programming and Approximation
Ecole Polytechnique, Nov 7, Minimizing Total Completion Time Each job specified by  procesing time (length p j )  release time r j Goal: compute.
1 Optimization problems such as MAXSAT, MIN NODE COVER, MAX INDEPENDENT SET, MAX CLIQUE, MIN SET COVER, TSP, KNAPSACK, BINPACKING do not have a polynomial.
1 Ecole Polytechnque, Nov 7, 2007 Scheduling Unit Jobs to Maximize Throughput Jobs:  all have processing time (length) = 1  release time r j  deadline.
Approximation Algorithms
1 Scheduling on Heterogeneous Machines: Minimize Total Energy + Flowtime Ravishankar Krishnaswamy Carnegie Mellon University Joint work with Anupam Gupta.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
1 Introduction to Approximation Algorithms Lecture 15: Mar 5.
(work appeared in SODA 10’) Yuk Hei Chan (Tom)
Approximation Algorithms: Bristol Summer School 2008 Seffi Naor Computer Science Dept. Technion Haifa, Israel TexPoint fonts used in EMF. Read the TexPoint.
Minimizing Flow Time on Multiple Machines Nikhil Bansal IBM Research, T.J. Watson.
Dana Moshkovitz, MIT Joint work with Subhash Khot, NYU.
Minimizing Makespan and Preemption Costs on a System of Uniform Machines Hadas Shachnai Bell Labs and The Technion IIT Tami Tamir Univ. of Washington Gerhard.
1 The Santa Claus Problem (Maximizing the minimum load on unrelated machines) Nikhil Bansal (IBM) Maxim Sviridenko (IBM)
LP-based Algorithms for Capacitated Facility Location Chaitanya Swamy Joint work with Retsef Levi and David Shmoys Cornell University.
Yossi Azar Tel Aviv University Joint work with Ilan Cohen Serving in the Dark 1.
Round and Approx: A technique for packing problems Nikhil Bansal (IBM Watson) Maxim Sviridenko (IBM Watson) Alberto Caprara (U. Bologna, Italy)
Approximation schemes Bin packing problem. Bin Packing problem Given n items with sizes a 1,…,a n  (0,1]. Find a packing in unit-sized bins that minimizes.
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
© 2009 IBM Corporation 1 Improving Consolidation of Virtual Machines with Risk-aware Bandwidth Oversubscription in Compute Clouds Amir Epstein Joint work.
Great Theoretical Ideas in Computer Science.
1 Server Scheduling in the L p norm Nikhil Bansal (CMU) Kirk Pruhs (Univ. of Pittsburgh)
Batch Scheduling of Conflicting Jobs Hadas Shachnai The Technion Based on joint papers with L. Epstein, M. M. Halldórsson and A. Levin.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Packing Rectangles into Bins Nikhil Bansal (CMU) Joint with Maxim Sviridenko (IBM)
Workforce scheduling – Days off scheduling 1. n is the max weekend demand n = max(n 1,n 7 ) Surplus number of employees in day j is u j = W – n j for.
1 Short Term Scheduling. 2  Planning horizon is short  Multiple unique jobs (tasks) with varying processing times and due dates  Multiple unique jobs.
Outline Introduction Minimizing the makespan Minimizing total flowtime
Maximum Flow Problem (Thanks to Jim Orlin & MIT OCW)
15.082J and 6.855J March 4, 2003 Introduction to Maximum Flows.
Parallel Machine Scheduling
Implicit Hitting Set Problems Richard M. Karp Erick Moreno Centeno DIMACS 20 th Anniversary.
© The McGraw-Hill Companies, Inc., Chapter 12 On-Line Algorithms.
11 -1 Chapter 12 On-Line Algorithms On-Line Algorithms On-line algorithms are used to solve on-line problems. The disk scheduling problem The requests.
Scheduling Parallel DAG Jobs to Minimize the Average Flow Time K. Agrawal, J. Li, K. Lu, B. Moseley.
New Algorithms for Disjoint Paths Problems Sanjeev Khanna University of Pennsylvania Joint work with Chandra Chekuri Bruce Shepherd.
Linear program Separation Oracle. Rounding We consider a single-machine scheduling problem, and see another way of rounding fractional solutions to integer.
Hardness of Shops and Optimality of List Scheduling
Approximation algorithms
Maximum Matching in the Online Batch-Arrival Model
On Scheduling in Map-Reduce and Flow-Shops
Analysis of Algorithms
Linear Programming and Approximation
Non-clairvoyant Precedence Constrained Scheduling
Presentation transcript:

Minimizing Average Flow-Time Naveen Garg IIT Delhi Joint work with Amit Kumar, Jivi Chadha,V Muralidhara, S. Anand

Problem Definition Given : A set of M machines A set of jobs A matrix of processing times of job i on machine j. Each job specifies a release date

Problem Definition Conditions : Pre-emption allowed Migration not allowed

Problem Definition Flow-time of j, Goal : Find a schedule which minimizes the average flow-time

Special Cases Parallel : all machines identical Related : machines have different speeds Subset Parallel : parallel except that a job can only go on a subset of machines Subset Related All of these are NP-hard.

Previous work The problem is well studied when the machines are identical. For a single machine the Shortest- remaining-processing-time (SRPT) rule is optimum. [Leonardi-Raz 97] argued that for parallel machines SRPT is (min (log n/m, log P)) competitive, where P is max/min processing time. They also show a lower bound of (log P) on competitive ratio

Preemptive, unweighted Flow time OnlineOffline Parallel machines O(log P), (log P) [LR97] (log 1-ε P) [GK07] Related machines O(log P) [GK06] Subset parallel Unbounded [GK07] O(log P) (log P/loglogP) [GK07] Unrelated machines O(k) [S09]

Fractional flow-time p j (t ) = remaining processing of job j at time t remaining fraction at time t = Fractional flow-time of j = t r j p j (t )/p j Recall, flow-time of j =

Fractional flow-time 1512 Fractional flow-time = 1*2 + 2/3*3 + 1/3*7 Fractional flow-time can be much smaller than (integral) flow-time 20

Integer Program Define 0-1 variables : x(i,j,t) : 1 iff job j processed on i during [t,t+1] Write constraints and objective in terms of these variables. Fractional flow-time of j = t r j ( t-r j ) x(i,j,t)/ p ij

LP Relaxation One Caveat …

Fractional flow-time A job can be done simultaneously on many machines : flow-time is almost 0

LP Relaxation Add a term for processing time

Class of a job : The processing time of j rounded up to nearest power of 2 If, we say k is the class of job j Number of different classes = O(log P)

Modified Linear Program

Modified LP LP value changes by a constant factor only. But : rearranging jobs of the same class does not change objective value.

From fractional to integral The solution to the LP is not feasible for our (integral) problem since it schedules the same job on multiple m/cs. We now show how to get a feasible, non- migratory schedule.

Rounding the LP solution Consider jobs of one class, say blue. Find the optimum solution to the LP.

Rounding the LP solution (contd.) Rearrange blue jobs in the space occupied by the blue jobs so that each job is scheduled on only one m/c. If additional space is needed it is created at the end of the schedule Additional space

Preemptive, unweighted Flow time OnlineOffline Parallel machines O(log P), (log P) (log 1-ε P) Related machines O(log P) Subset parallelUnboundedO(log P) (log P/loglogP) Unrelated machines O(k)

Assignment as flow Fix a class k : arrange the jobs in ascending order of release dates. r1r1 0 0 i v(i,k,j) s Flow = ? r7r7 r6r6 r5r5 r4r4 r3r3 r2r2

Unsplittable Flow Problem s d1 d2 d3

Unsplittable Flow Problem s d1 d2 d3 Flow can be converted to an unsplittable flow such that excess flow on any edge is at most the max demand [Dinitz,Garg, Goemans]

Back to scheduling... Fix a class k : find unsplittable flow i v(i,j,k) s Gives assignment of jobs to machines

Back to scheduling... J(i,k) : jobs assigned to machine i i v(i,j,k) s Can we complete J(i,k) on class k slots in I ?

Building the Schedule Flow increases by at most max processing time = 2 k So all but at most 2 jobs in J(i,k) can be packed into these slots Extra slots are created at the end to accommodate this spillover

Increase in Flow-time How well does capture the flow-time of j ? Charge to the processing time of other classes

Finally... Since there are only log P classes… Can get OPT + O(log P).processing time flow-time for subset parallel case.

Preemptive, unweighted Flow time OnlineOffline Parallel machines O(log P), (log P) (log 1-ε P) Related machines O(log P) Subset parallelUnboundedO(log P) (log P/loglogP) Unrelated machines O(k)

Integrality Gap for our LP(identical m/c) 0 m k-1 2m k-1 mkmk +m k-1 mkmk m k-1 m T 1 Phase0 1k-1k

Integrality Gap for our LP(identical m/c) For sufficiently large T, flow time mT(1+k/2) 0 m k-1 2m k-1 mkmk +m k-1 T Phase0 1k-1k Blue jobs can be scheduled only in this area of volume (m k +m k-1 )m/2 At least m/2 blue jobs left At least mk/2 jobs left

Integrality Gap for our LP(identical m/c) Optimum fractional solution is roughly mT 0 m k-1 2m k-1 mkmk +m k-1 mkmk m k-1 m T 1 Phase0 1k-1k

Integrality gap Optimum flow time is at least mT(1+k/2) Optimum LP solution has value roughly mT So integrality gap is (k). Largest job has size P = m k. For k = m c, c>1, we get an integrality gap of (log P/loglogP)

Hardness results We use the reduction from 3-dimensional matching to makespan minimization on unrelated machines [lenstra,shmoys,tardos] to create a hard instance for subset-parallel. Each phase of the integrality gap example would have an instance created by the above reduction. To create a hard instance for parallel machines we do a reduction from 3- partition.

Preemptive, unweighted Flow time OnlineOffline Parallel machines O(log P), (log P) (log 1-ε P) Related machines O(log P) Subset parallelUnboundedO(log P) (log P/loglogP) Unrelated machines O(k)

A bad example 0 T B x A x A+B=T A> T/2 T+L A x Flow time is at least AxL > T L/2 OPT flow time is O(T 2 +L) Ω(T) lower bound on any online algorithm

Other Models What if we allow the algorithm extra resources ? In particular, suppose the algorithm can process (1+ε) units in 1 time-unit. [first proposed by Kalyanasundaram,Pruhs95] Resource Augmentation Model

Resource Augmentation For a single machine, many natural scheduling algorithms are O(1/ O(1) )- competitive with respect to any L p norm [Bansal Pruhs 03] Parallel machines : randomly assign each job to a machine – O(1/ O(1) ) competitive [Chekuri, Goel, Khanna, Kumar 04] Unrelated Machines : O(1/ 2 )-competitive, even for weighted case. [Chadha, Garg, Kumar, Muralidhara 09]

Our Algorithm When a job arrives, we dispatch it to one of the machines. Each machine just follows the optimal policy : Shortest Remaining Processing Time (SRPT) What is the dispatch policy ? GREEDY

p j 1 (t ) The dispatch policy When a job j arrives, compute for each machine i the increase in flow-time if we dispatch j to i. j1j1 j2j2 jrjr j r+1 jsjs j arrives at time t : p ij 1 (t) p ij 2 (t) … p ij r (t) < p ij < p ij r+1 (t) j Increase in flow-time = p j 1 (t ) + … + p j r (t ) + p ij + p ij (s-r)

Our Algorithm When a job j arrives, compute for each machine i the increase in flow-time if we dispatch j to i. Dispatch j to the machine for which increase in fractional flow-time is minimum.

Analyzing our algorithm Primal LPDual LP LP opt. value Algorithms value Construct a dual solution Show that the dual solution value and algorithms flow-time are close to each other.

Dual LP αjαj β it

Dual LP

p j 1 (t ) α j = p j 1 (t ) + … + p j r (t ) + p ij + p ij (s-r) Setting the Dual Values When a job j arrives, set α j to the increase in flow- time when j is dispatched greedily. j1j1 j2j2 jrjr j r+1 jsjs j arrives at time t : p ij 1 (t) p ij 2 (t) … p ij r (t) < p ij < p ij r+1 (t) Thus j α j is equal to the total flow- time.

β it = s Setting the Dual Values j1j1 j2j2 jrjr j r+1 jsjs p j 1 (t ) Set β it to be the number of jobs waiting at time t for machine i. Thus i,t β it is equal to the total flow- time.

Need to verify Dual Feasibility j1j1 j2j2 jljl j l+1 jsjs p j 1 (t ) Fix a machine i, a job j and time t. Suppose p ij l (t) < p ij < p ij l+1 (t)

Dual Feasibility j1j1 j2j2 jljl j l+1 jsjs p j 1 (t ) What happens when t = t ?

Dual Feasibility j1j1 j2j2 jljl j l+1 jsjs δ What happens when t = t + δ? Suppose at time t job j k is being processed Case 1: k l

Dual Feasibility j2j2 jrjr j r+1 jsjs Case 2: k > l ¢

Dual Feasibility So, α j, β it are dual feasible But i,t β it and j α j both equal the total flow time and hence the dual objective value is Hence, for any machine i, time t and job j

Incorporating machine speed-up So the values α j, β it /(1+ ε) are dual feasible for an instance with processing times larger by a factor (1+ ε) For any machine i, time t and job j Equivalently, schedule given instance on machines of speed (1+ ε) to determine α j, β it. The values α j, β it /(1+ ε) are dual feasible.

Dual Objective Value The dual value is less than the optimum fractional flow time. Since i,t β it = j α j the value of the dual is Hence, the flow time of our solution, j α j, is at most (1+1/ ε) times the optimum fractional flow time.

Extensions Can extend this analysis to the L p -norm of the flow time to get a similar result. Analysis also extends to the case of minimizing sum of flow time and energy on unrelated machines.

Open Problems Single Machine : Constant factor approximation algorithm for weighted flow-time. loglog n approx [Bansal Pruhs 10] 2+ε quasi polynomial time algorithm [Chekuri Khanna Zhu 01]

Open Problems Parallel machines : Constant factor approximation algorithm if we allow migration of a job from one machine to another. The (log 1-ε P) hardness is for non- migratory schedules

Open Problems Unrelated Machines : poly-log approximation algorithm (LP integrality gap ?) O(k) approximation [Sitters 08] is known, where k is the number of different processing times.

Thank You