CS521 CSE IITG 11/23/2012

Similar documents
Metode şi Algoritmi de Planificare (MAP) Curs 2 Introducere în problematica planificării

Partition is reducible to P2 C max. c. P2 Pj = 1, prec Cmax is solvable in polynomial time. P Pj = 1, prec Cmax is NP-hard

Algorithm Design. Scheduling Algorithms. Part 2. Parallel machines. Open-shop Scheduling. Job-shop Scheduling.

Lecture 2: Scheduling on Parallel Machines

P C max. NP-complete from partition. Example j p j What is the makespan on 2 machines? 3 machines? 4 machines?

LPT rule: Whenever a machine becomes free for assignment, assign that job whose. processing time is the largest among those jobs not yet assigned.

Embedded Systems 15. REVIEW: Aperiodic scheduling. C i J i 0 a i s i f i d i

APTAS for Bin Packing

Single Machine Models

Deterministic Models: Preliminaries

Deterministic Scheduling. Dr inż. Krzysztof Giaro Gdańsk University of Technology

Lecture 4 Scheduling 1

Average-Case Performance Analysis of Online Non-clairvoyant Scheduling of Parallel Tasks with Precedence Constraints

Task Models and Scheduling

On Machine Dependency in Shop Scheduling

Single Machine Problems Polynomial Cases

RCPSP Single Machine Problems

Resource Management in Machine Scheduling Problems: A Survey

Approximation Algorithms for scheduling

Scheduling jobs on two uniform parallel machines to minimize the makespan

MINIMIZING SCHEDULE LENGTH OR MAKESPAN CRITERIA FOR PARALLEL PROCESSOR SCHEDULING

Lecture 13. Real-Time Scheduling. Daniel Kästner AbsInt GmbH 2013

Flow Shop and Job Shop Models

Scheduling Lecture 1: Scheduling on One Machine

A comparison of sequencing formulations in a constraint generation procedure for avionics scheduling

1 Ordinary Load Balancing

Two Processor Scheduling with Real Release Times and Deadlines

Embedded Systems 14. Overview of embedded systems design

University of Twente. Faculty of Mathematical Sciences. Scheduling split-jobs on parallel machines. University for Technical and Social Sciences

Embedded Systems Development

Computers and Intractability. The Bandersnatch problem. The Bandersnatch problem. The Bandersnatch problem. A Guide to the Theory of NP-Completeness

Computers and Intractability

Scheduling on Unrelated Parallel Machines. Approximation Algorithms, V. V. Vazirani Book Chapter 17

3. Scheduling issues. Common approaches 3. Common approaches 1. Preemption vs. non preemption. Common approaches 2. Further definitions

Algorithms. Outline! Approximation Algorithms. The class APX. The intelligence behind the hardware. ! Based on

Dynamic Scheduling with Genetic Programming

Multiprocessor Scheduling I: Partitioned Scheduling. LS 12, TU Dortmund

Recoverable Robustness in Scheduling Problems

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Networked Embedded Systems WS 2016/17

Contents college 5 and 6 Branch and Bound; Beam Search (Chapter , book)! general introduction

Scheduling Lecture 1: Scheduling on One Machine

Real-time Scheduling of Periodic Tasks (2) Advanced Operating Systems Lecture 3

Minimizing Mean Flowtime and Makespan on Master-Slave Systems

No-Idle, No-Wait: When Shop Scheduling Meets Dominoes, Eulerian and Hamiltonian Paths

Non-Preemptive and Limited Preemptive Scheduling. LS 12, TU Dortmund

Real-Time Systems. Event-Driven Scheduling

New Utilization Criteria for Online Scheduling

A Dynamic Programming algorithm for minimizing total cost of duplication in scheduling an outtree with communication delays and duplication

Aperiodic Task Scheduling

Complexity of preemptive minsum scheduling on unrelated parallel machines Sitters, R.A.

Real-Time Systems. Event-Driven Scheduling

A Framework for Scheduling with Online Availability

Chapter 11. Approximation Algorithms. Slides by Kevin Wayne Pearson-Addison Wesley. All rights reserved.

Bounding the End-to-End Response Times of Tasks in a Distributed. Real-Time System Using the Direct Synchronization Protocol.

EECS 571 Principles of Real-Time Embedded Systems. Lecture Note #7: More on Uniprocessor Scheduling

Paper Presentation. Amo Guangmo Tong. University of Taxes at Dallas February 11, 2014

Andrew Morton University of Waterloo Canada

More Approximation Algorithms

Scheduling preemptable tasks on parallel processors with limited availability

Linear Programming. Scheduling problems

Preemptive Online Scheduling: Optimal Algorithms for All Speeds

4 Sequencing problem with heads and tails

Using column generation to solve parallel machine scheduling problems with minmax objective functions

Dependency Graph Approach for Multiprocessor Real-Time Synchronization. TU Dortmund, Germany

Scheduling Periodic Real-Time Tasks on Uniprocessor Systems. LS 12, TU Dortmund

Energy-efficient Mapping of Big Data Workflows under Deadline Constraints

How the structure of precedence constraints may change the complexity class of scheduling problems

Lecture 6. Real-Time Systems. Dynamic Priority Scheduling

CMSC 722, AI Planning. Planning and Scheduling

Paper Presentation. Amo Guangmo Tong. University of Taxes at Dallas January 24, 2014

Shop problems in scheduling

Embedded Systems - FS 2018

Rate-monotonic scheduling on uniform multiprocessors

TDDB68 Concurrent programming and operating systems. Lecture: CPU Scheduling II

There are three priority driven approaches that we will look at

2 Martin Skutella modeled by machine-dependent release dates r i 0 which denote the earliest point in time when ob may be processed on machine i. Toge

Tardiness Bounds under Global EDF Scheduling on a Multiprocessor

Non-Work-Conserving Non-Preemptive Scheduling: Motivations, Challenges, and Potential Solutions

Single Machine Scheduling with a Non-renewable Financial Resource

Schedulability analysis of global Deadline-Monotonic scheduling

Clock-driven scheduling

Complexity analysis of the discrete sequential search problem with group activities

Scheduling on a single machine under time-of-use electricity tariffs

Multiprocessor Scheduling II: Global Scheduling. LS 12, TU Dortmund

Real-Time Systems. Lecture 4. Scheduling basics. Task scheduling - basic taxonomy Basic scheduling techniques Static cyclic scheduling

Real-Time Scheduling

CIS 4930/6930: Principles of Cyber-Physical Systems

THE LINEAR SWITCHING STATE SPACE: A NEW MODELING PARADIGM FOR TASK SCHEDULING PROBLEMS. Hamid Tabatabaee-Yazdi and Mohammad-R. Akbarzadeh-T.

Priority-driven Scheduling of Periodic Tasks (1) Advanced Operating Systems (M) Lecture 4

Real-time operating systems course. 6 Definitions Non real-time scheduling algorithms Real-time scheduling algorithm

On the Soft Real-Time Optimality of Global EDF on Multiprocessors: From Identical to Uniform Heterogeneous

Polynomial Time Algorithms for Minimum Energy Scheduling

these durations are not neglected. Little is known about the general problem of scheduling typed task systems: Jae [16] and Jansen [18] studied the pr

Basic Scheduling Problems with Raw Material Constraints

showed that the SMAT algorithm generates shelf based schedules with an approximation factor of 8.53 [10]. Turek et al. [14] proved that a generalizati

Scheduling Parallel Jobs with Linear Speedup

Study of Scheduling Problems with Machine Availability Constraint

APPROXIMATION ALGORITHMS FOR SCHEDULING ORDERS ON PARALLEL MACHINES

Parallel machines scheduling with applications to Internet ad-slot placement

Transcription:

Today Scheduling: lassification Ref: Scheduling lgorithm Peter rukerook Multiprocessor Scheduling : List PTS Ref job scheduling, by uwe schweigelshohn Tomorrow istributed Scheduling ilk Programming and Work Stealing Scheduling in NO and NO ind time slots in which activities (or jobs) should be processed under given constraints. onstraints Resource constraints Precedence constraints between activities. quite general scheduling problem is Resource onstrained Project Scheduling Problem (RPSP) We have ctivities j =,..., n with processing times p j. Resources k =,..., r. constant amount of R k units of resource k is available at any time. uring processing, activity j occupies r jk units of resource k for k =,..., r. Precedence constrains i jbetween some activities i, j with the meaning that activity j cannot start before iis finished.. Objective : etermine starting times S j for all activities j in such a way that at each time t the total demand for resource k is not greater than the availability R k for k =,..., r, the given precedence constraints are fulfilled, i. e. S i + p i S j if i j, Some objective function f(,..., n ) is minimized where j = S j + p j is the completion time of activity j. The fact that activities j start at time S j and finishattimes time j +p j impliesthattheactivitiesj the activities are not preempted. We may relax this condition by allowing preemption(activity splitting).

onsider a project with n = activities, r = resources with capacities R = 5 and R = 7, a precedence relation and the following data: i p i 58 r i r i 5 R=5 R=7 corresponding schedule with minimal makespan Production scheduling Robotic cell scheduling omputer processor scheduling tabling Personnel scheduling Railway sc ir traffic control, tc. Most machine scheduling problems are special cases of the RPSP. Single machine problems, Online Problem: S, S, SR, RR Parallel machine problems, and Shop scheduling problems. We have n jobs j =,..., n to be processed on a single machine. dditionally precedence constraints between the jobs may be given. Thisproblemcanbemodeled be modeled byanrpsp with r =, R =, and r j = for all jobs j. We have jobs j as before and m identical machinesm,..., M m. The processing time for j is the same on each machine. One has to assign the jobs to the machines and to schedule them on the assigned machines. This problem corresponds to an RPSP with r =, R = m, and r j = for all jobs j. 8 5 6 7

or unrelated machines the processing timep jk depends on the machine M k on which j is processed. Themachinesarecalleduniformif are called p jk = p j /r k. n a problem with multi purpose machines a set of machines μ j is isassociated with each job j indicating that j can be processed on one machine in μ j only. n a general shop scheduling problemwe have m machines M,..., M m and n jobs j =,..., n. ob j consists of n(j) operations O j,o j,..., O n(j)j where O ij must be processed for p ij time units on a dedicated machine μ ij {M,..., M m }. Two operations of the same job cannot be processed at the same time. Precedence constraints are given between the operations. job shop problem is a general shop scheduling problem with chain precedence constraints of the form O j O j... O n(j)j. j j n(j)j flow shop problemis a special job shop problem with n(j) = m operations for j =,..., n and μ ij = M i for i =,..., m and j =,..., n. n a permutation flow shop problemthe jobs have to be processed in the same order on all machines. n open shop problemis like a flow shop problem but without precedence constraints between the operations. lasses of scheduling problems can be specified in terms of the three field classification α β γ where α specifiesthemachineenvironment environment, β specifiesthe job characteristics, and γdescribes the objective function(s).

Symbol Meaning Single Machine P Parallel dentical Machine Q R MPM UniformMachine UnrelatedMachine Multipurpose Machine ob Shop low Shop f the number of machines is fixed to m we write Pm, Qm, Rm, MPMm, m, m, Om. Symbol meaning pmtn preemption r j d j release times deadlines p j =or p j =por restrictedprocessingtimes times p j {,} prec arbitrary precedence constraints intree(outtree) intree(or outtree) precedences chains chain precedences series parallel a series parallel precedence graph Two types of objective functions are most common: bottleneck objective functions max {f j ( j ) j=,..., n}, and sum objective functions Σ f j ( j ) = f ( ) + f ( ) +...... + f n ( n ). j is completion time of task j max and L max symbolizethe bottleneck objective max objective functions with f j ( j ) = j (makespan) L max objective functions f j( j) = j d j(maximum Lateness) ommon sum objective functions are: Σ j (mean flow time) Σ ω j j (weighted flow time) Σ U j (number of late jobs) and Σ ω j U j (weighted number of late jobs) where U j = if j > d j and U j = otherwise. Σ T j (sum of tardiness) and Σ ω j T j (weighted sum of tardiness/lateness) where the tardiness of job j is given by T j = max {, j d j. prec; p j = Σ ω j j P max P p j = ; r j Σ ω j U j R chains; pmtn max n = max p ij = ; outtree; r j Σ j Om p j = Σ T j

problem is called polynomially solvable if it can be solved by a polynomial algorithm. xample Σ ω j j can be solved by scheduling the jobs in an ordering of non increasing ω j /p j values. omplexity: O(n log n) efore certain jobs are allowed to start processing, one ormorejobsfirsthavetobecompleted. efinition Successor Predecessor mmediate successor mmediate predecessor Transitive Reduction 7 9 8 6 5 p ( ) = i One or more job have to be completed before another job is allowed to start processing. One or more job have to be completed before another job is allowed to start processing. Prec : rbitrary acyclic graph efinition Successor Predecessor mmediate successor mmediate predecessor Transitive Reduction 7 9 8 6 5 p ( ) = i efinition Successor Predecessor mmediate successor mmediate predecessor Transitive Reduction 7 9 8 6 5 p ( ) = i n tree (Out tree) n forest (Out forest) n tree Opposing forest Out tree Opposing forest nterval orders Series parallel orders n forest Out forest Level orders 5

Processor nvironment m identical processors are in the system. ob characteristics Precedence constraints are given by a precedence graph; Preemption is not allowed; The release time of all the jobs is. Objective function max : the time the last job finishes execution. f c j denotes the finishing time of j in a schedule S, max = max j n c j P P P antt chart indicates the time each job spends in execution, as well as the processor on which it executes of some Schedule Slot Slot 5 9 5 8 7 6 axis 7 9 8 5 6 5 p ( ) = i ue to the number of processors Number of processors is a variable (m) Pm prec, p j = max Number of processors is a constant (k) Pk prec, p j = max Theorem Pm prec, p j = max is NP complete..ullman(976) ST Pm prec, p j= max. Lenstraand RinooyKan (978) k clique Pm prec, p j = max orollary. The problem of determining the existence of a schedule with max for the problem Pm prec, pj= max is NP complete. Proof: out of Syllabus Mayr(985) Theorem Pm p j =, SP max is NP complete. SP: Series parallel Theorem Pm p j =, O max is NP complete. O: Opposing forest PTS : Polynomial pproximation Scheme pproximation List scheduling policies raham s list algorithm L algorithm MS algorithm Proof: out of Syllabus 6

Set up a priority list L of jobs. When a processor is idle, assign the first ready job to the processor and remove it from the list L. 9 8 6 raham first analyzed the performance of the simplest list scheduling algorithm. List scheduling algorithm with an arbitrary job list iscalledraham slistalgorithm. rahams list algorithm. 9 7 7 8 6 5 L= ( 9, 8, 7, 6, 5,,,,,,,, ) 5 pproximation ratio for Pk prec, p j = max δ= /k. (Tight bound!) pproximation ratio is δif for each input instance, the makespan produced by the algorithm is at most δtimes of the optimal makespan. T.. u(96), ritical Path lgorithm or u s algorithm lgorithm ssign a level h to each job. f job has no successors, h(j) equals. Otherwise, h(j) equals one plus the maximum level of its immediate successors. Set up a priority list L by nonincreasingorder of the jobs levels. xecute the list scheduling policy on this level based priority list L. 9 8 7 6 5 9 Level Level Level 8 7 L= (,,,, 9, 8, 7, 6, 5,,,, ) 6 5 complexity O( V + ) ( V is the number of jobs and is the number of edges in the precedence graph) Theorem (u, 96) The L algorithm is optimal for Pk p j =, in tree (out tree) max. orollary The L algorithm is optimal for Pk p j =, in forest (out forest) max. N.. hen &.L. Liu (975) The approximation ratio of L algorithm for the problem with general precedence constraints: f k =, δ L /. f k, δ L /(k-). Tight! 7

lgorithm: Set up a priority list L by nonincreasing order of the jobs successors numbers. (i.e. the job having more successors should have a higher priority in L than the job having fewer successors) xecute the list scheduling policy based on this priority list L. 6 9 7 8 7 6 5 8 5 9 7 6 L= (, 8,,,, 9, 7, 6, 5,,,, ) 7 6 complexity O( V + ) Theorem (Papadimitriou and Yannakakis, 979) The MS algorithm is optimal for Pk p j =, interval max. Theorem (Moukrim, 999) The MS algorithm is optimal for Pk p j =, quasiinterval max. Prove out of Syllabus iven processing times for n jobs, p, p,, p n, and an integer m ind an assignment of the jobs to m identical machines So that the completion time, also called the makespan, is minimized. for each job j whether job j is scheduled in machine i ach job is scheduled in one machine. lgorithm. Order the jobs arbitrarily.. Schedule jobs on machines in this order, schedulingthenextjobonthemachinethathas next on that has been assigned the least amount of work so far. for each machine i for each job j, machine i ach machine can finish its jobs by time T bove algorithm achieves an approximation guarantee of for the minimum makespan problem. 8

Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine 9

Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Machine Optimal Schedule Machine Machine Machine Machine Machine Machine List schedule

lgorithm: List scheduling asic idea: n a list of jobs, schedule the next one as soon as a machine is free a b c d e ood or bad? machine machine machine machine lgorithm: List scheduling asic idea: n a list of jobs, schedule the next one as soon as a machine is free a b c d e f machine machine machine machine S job ffinishes last, at time compare to time OPT of best schedule: how? a b c d e f machine machine machine machine S job ffinishes last, at time compare to time OPT of best schedule: how? () job f must be scheduled in the best schedule at some time: S <= OPT. () up to time S, all machines were busy all the time, and OPT cannot beat that, and job f was not yet included: S < OPT. () both together: = S + S < OPT. approximation (raham, 966) Proof: Let T= t i, i=,,n, the sum of all processing times to be accommodated. We know that the total processing time available in an optimal schedule on the machines is m.opt(). So, OPT() T/m. Moreover, OPT() t k for every k. Let () be the makespanof the schedule produced by LS. y definition there must be a job k, with processing time t k, that ends at the makespantime. No machine can end its operation before () t k, because then job kwould have been scheduled on that machine, thus reducing the makespan. So all machines are busy from time through ()-t k onsequently, M M i T t k m(() t k ) T t k m() mt k T t k +mt k m() T+(m )t k m() So, () T/m+t k (m )/m () t k k PrevSlide : s m.opt() T. So, OPT() T/m. lso OPT() t k for every k. OPT()+( /m)opt()=( /m)opt() () ( /m)opt() M m () m x m m x makespan: m m x makespan: m+

List scheduling can do badly if long jobs at the end of the list spoil an even division of processing times. We now assume that the jobs are all given ahead oftime,i.e.thelptruleworksonlyintheoff i.e. the only in the off line situation. onsider the Largest Processing first or LPT rule that works as follows. LPT() sort the jobs in order of decreasing processing times: t t... t n execute list scheduling on the sorted list return the schedule so obtained. The LPT rule achieves a performance ratio / /(m). Proveout of Syllabus