Online Scheduling of Precedence Constrained Tasks Yumei Huo Department of Computer Science New Jersey Institute.

Slides:



Advertisements
Similar presentations
On the Complexity of Scheduling
Advertisements

Priority INHERITANCE PROTOCOLS
Covers, Dominations, Independent Sets and Matchings AmirHossein Bayegan Amirkabir University of Technology.
Minimum Clique Partition Problem with Constrained Weight for Interval Graphs Jianping Li Department of Mathematics Yunnan University Jointed by M.X. Chen.
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Jonathan Chan.  Scheduling problems of type Pm|prec|C max that are easily solvable ◦ Infinite machines: P∞|p j =1,prec|Cmax ◦ Intree, outtree precedence:
Chapter 5 Fundamental Algorithm Design Techniques.
Mehdi Kargahi School of ECE University of Tehran
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
Lateness Models Contents
1 Swiss Federal Institute of Technology Computer Engineering and Networks Laboratory Embedded Systems Exercise 2: Scheduling Real-Time Aperiodic Tasks.
Precedence Constrained Scheduling Abhiram Ranade Dept. of CSE IIT Bombay.
Spring, Scheduling Operations. Spring, Scheduling Problems in Operations Job Shop Scheduling. Personnel Scheduling Facilities Scheduling.
Merge Sort 4/15/2017 6:09 PM The Greedy Method The Greedy Method.
Precedence Constrained Scheduling Abhiram Ranade Dept. of CSE IIT Bombay.
1 IOE/MFG 543 Chapter 3: Single machine models (Sections 3.1 and 3.2)
Ecole Polytechnique, Nov 7, Minimizing Total Completion Time Each job specified by  procesing time (length p j )  release time r j Goal: compute.
1 Single Machine Deterministic Models Jobs: J 1, J 2,..., J n Assumptions: The machine is always available throughout the scheduling period. The machine.
Online Algorithms Motivation and Definitions Paging Problem Competitive Analysis Online Load Balancing.
UET Multiprocessor Scheduling Problems Nan Zang
CSE 421 Algorithms Richard Anderson Lecture 6 Greedy Algorithms.
Scheduling Master - Slave Multiprocessor Systems Professor: Dr. G S Young Speaker:Darvesh Singh.
INTRODUCTION TO SCHEDULING
Control and Optimization Meet the Smart Power Grid: Scheduling of Power Demands for Optimal Energy Management Authors: Iordanis Koutsopoulos Leandros Tassiulas.
CPU-Scheduling Whenever the CPU becomes idle, the operating system must select one of the processes in the ready queue to be executed. The short term scheduler.
Chapter 6: CPU Scheduling
OPERATING SYSTEMS CPU SCHEDULING.  Introduction to CPU scheduling Introduction to CPU scheduling  Dispatcher Dispatcher  Terms used in CPU scheduling.
Chapter 6 CPU SCHEDULING.
CHP-4 QUEUE.
Chapter 6 Scheduling. Basic concepts Goal is maximum utilization –what does this mean? –cpu pegged at 100% ?? Most programs are I/O bound Thus some other.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 01, 2005 Session 14.
1 Server Scheduling in the L p norm Nikhil Bansal (CMU) Kirk Pruhs (Univ. of Pittsburgh)
Operating Systems Process Management.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 08, 2005 Session 16.
Real Time Scheduling Telvis Calhoun CSc Outline Introduction Real-Time Scheduling Overview Tasks, Jobs and Schedules Rate/Deadline Monotonic Deferrable.
An Efficient Algorithm for Scheduling Instructions with Deadline Constraints on ILP Machines Wu Hui Joxan Jaffar School of Computing National University.
Real-Time Scheduling CS4730 Fall 2010 Dr. José M. Garrido Department of Computer Science and Information Systems Kennesaw State University.
3.1 : Resource Management Part2 :Processor Management.
5 May CmpE 516 Fault Tolerant Scheduling in Multiprocessor Systems Betül Demiröz.
Outline Introduction Minimizing the makespan Minimizing total flowtime
Optimal Algorithms for Task Scheduling Implemented by Ala Al-Nawaiseh Khaled Mahmud.
1 11/29/2015 Chapter 6: CPU Scheduling l Basic Concepts l Scheduling Criteria l Scheduling Algorithms l Multiple-Processor Scheduling l Real-Time Scheduling.
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 March 03, 2005 Session 15.
KUKUM Real Time System 1/21 Module 2 Real Time System Scheduling Lecture 05.
Parallel Machine Scheduling
Common Approaches to Real-Time Scheduling Clock-driven (time-driven) schedulers Priority-driven schedulers Examples of priority driven schedulers Effective.
Silberschatz and Galvin  Operating System Concepts Module 5: CPU Scheduling Basic Concepts Scheduling Criteria Scheduling Algorithms Multiple-Processor.
Introduction to Embedded Systems Rabie A. Ramadan 5.
Rounding scheme if r * j  1 then r j := 1  When the number of processors assigned in the continuous solution is between 0 and 1 for each task, the speed.
CS 3343: Analysis of Algorithms Lecture 19: Introduction to Greedy Algorithms.
Introduction to Real-Time Systems
1 Online Scheduling With Precedence Constraints Yumei Huo Department of Computer Science College.
1 JOB SEQUENCING WITH DEADLINES The problem is stated as below. There are n jobs to be processed on a machine. Each job i has a deadline d i ≥ 0 and profit.
CSEP 521 Applied Algorithms Richard Anderson Winter 2013 Lecture 3.
CHP-4 QUEUE Cont…. 7.DEQUE Deque (short form of double-ended queue) is a linear list in which elements can be inserted or deleted at either end but not.
Preemptive Scheduling of Intrees on Two Processors Coffman, E. G., Jr., Columbia University Matsypura, D., Oron, D., Timkovsky, V. G., University of Sydney.
Undergraduate course on Real-time Systems Linköping University TDDD07 Real-time Systems Lecture 2: Scheduling II Simin Nadjm-Tehrani Real-time Systems.
Lecture 12 Scheduling Models for Computer Networks Dr. Adil Yousif.
Basic Concepts Maximum CPU utilization obtained with multiprogramming
Single Machine Scheduling Problem Lesson 5. Maximum Lateness and Related Criteria Problem 1|r j |L max is NP-hard.
Distributed Process Scheduling- Real Time Scheduling Csc8320(Fall 2013)
Some Topics in OR.
Design and Analysis of Algorithm
CprE 458/558: Real-Time Systems
Chapter 6: CPU Scheduling
Richard Anderson Lecture 6 Greedy Algorithms
Richard Anderson Lecture 7 Greedy Algorithms
Selfish Load Balancing
Single Machine Deterministic Models
List Scheduling Given a list of jobs (each with a specified processing time), assign them to processors to minimize makespan (max load) In Graham’s notation:
Presentation transcript:

Online Scheduling of Precedence Constrained Tasks Yumei Huo Department of Computer Science New Jersey Institute of Technology

2 Outline Introduction: –Three basic scheduling algorithms Online Scheduling of Precedence Constrained Tasks –Four nonpreemptive scheduling problems –Three preemptive scheduling problems Future Work

3 Outline Introduction: –Three basic scheduling algorithms Online Scheduling of Precedence Constrained Tasks –Four nonpreemptive scheduling problems –Three preemptive scheduling problems Future Work

4 Coffman-Graham algorithm (P2|p j =1, prec|Cmax and P2|p j =1, prec|  C i ) Step 1. Labeling Step 2. Scheduling

5 Coffman-Graham algorithm (cont.) Comparing two decreasing sequences of positive integers: by lexicographical order Example: (8, 6, 4, 3) < (8, 6, 5) and (9, 8, 6) < (9, 8, 6, 4, 3).

6 Example of Coffman-Graham algorithm (9)(8) (7) (6) (5) (4) (3) (1)(2) (1) (2,1)

7 Hu’s algorithm (P|p j =1, intree|Cmax and P|p j =1, outtree|Cmax ) Step 1. Labeling Step 2. Scheduling

8 Hu’s algorithm---Level Definition: The level of a job i with no immediate successor is its processing time p i. The level of a job with immediate successor(s) is its processing time plus the maximum level of its immediate successor(s).

9 Example for Hu’s algorithm (1) (2) (3) (5) (6) (4) (7) (1) (2) (3) (5) (6) (4) (7) (1) (2) (3) (5) (6) (4) (7) (8) (9) (10) (11) (1) (2) (3) (5) (6) (4) (7) (8) (9) (10) (11) (12) (13) (1) (2) (3) (5) (6) (4) (7) (8) (9) (10) (11) (12) (13) (14) (15) (8) (9) (10) (11) (12) (13) (14) (15) (16)

10 Muntz-Coffman algorithm (P2|pmtn, prec |Cmax, P|pmtn, intree|Cmax and P|pmtn, outtree|Cmax ) Assign one processor each to the jobs at the highest level. If there is a tie among y jobs (because they are at the same level) for the last x (x < y) processors, then assign x/y processor to each of these y jobs. Whenever either of the two events below occurs, reassign the processors to the unexecuted portion of the unfinished tasks according to the above rule. Event 1: A task is completed. Event 2: We reach a point where, if we were to continue the present assignment, we would be executing some tasks at a lower level at a faster rate than other tasks at a higher level.

11 Example for Muntz-Coffman algorithm Preemptive schedule Processor-sharing schedule

12 Outline Introduction: –Three basic scheduling algorithms Online Scheduling of Precedence Constrained Tasks –Four nonpreemptive scheduling problems –Three preemptive scheduling problems Future Work

13 Online Scheduling Tasks are released, along with their constraints, at various different times.The scheduler schedules tasks with no future information. We say that an online scheduling algorithm is optimal if it always produces a schedule with the minimum C max, i.e., a schedule as good as any schedule produced by any scheduling algorithm with full knowledge of future releases of tasks.

14 Classical Scheduling Problems with polynomial optimal algorithms P|p j =1, intree|Cmax and P|p j =1, outtree|Cmax --- Hu’s algorithm P2|p j =1, prec|Cmax and P2|p j =1, prec|  C i --- Coffman- Graham algorithm P2|pmtn, prec |Cmax, P|pmtn, intree|Cmax and P|pmtn, outtree|Cmax --- Muntz-Coffman algorithm P|pmtn|Cmax --- McNaughton’s Rule

15 Online version of these problems Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax –P|p j =1, intree i is released at r i |Cmax –P|p j =1, outtree i is released at r i |Cmax –P2|p j =1, prec i is released at r i |Cmax Preemptive scheduling problems: –P2|pmtn, prec i is released at r i |Cmax –P|pmtn, intree i is released at r i |Cmax –P|pmtn, outtree i is released at r i |Cmax –P|pmtn, r j |Cmax (K.S.Hong and J.Y-T.Leung, 1988)

16 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

17 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

18 P2|p j =p, chains i are released at r i |Cmax (Counterexample) M=2 p j = S S Chains released at r 1 =0 Chains released at r 2 =

19 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

20 P|p j =1, intree i is released at r i |Cmax (Counterexample) Tree 1 released at r 1 =0 M= Tree 2 released at r 2 =4 S S2

21 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

22 P2|p j =1, prec i is released at r i |Cmax Algorithm A: Whenever new tasks arrive, do { t =the current time; U= the set of tasks active (i.e., not finished) at time t; Call the Coffman-Graham algorithm to reschedule the tasks in U; }

23 Example (9)(8) (7) (6) (5) (4) (3) (1)(2) (9) (8) (5) (1)(2) Tasks not finished at t=2 (3) (4) (6) (7) (10) 10 (11) Tasks released at t=

24 Our result Theorem Algorithm A is optimal for P2|p j =1, prec i is released at r i |Cmax. Moreover, the schedule produced by Algorithm A has the largest number of tasks completed at any time instant t. ( Note: Algorithm A is optimal for P2|p j =1, prec i is released at r i |  C j )

25 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

26 P|p j =1, outtree i is released at r i |Cmax Algorithm B: Whenever new tasks arrive, do { t =the current time; U= the set of tasks active (i.e., not finished) at time t; Call Hu's algorithm to reschedule the tasks in U; }

27 Example

28 Example

29 Our result Theorem Algorithm B is optimal for P|p j =1, outtree i is released at r i |Cmax. Moreover, the schedule produced by Algorithm B has the largest number of tasks completed at any time instant t. ( Note: Algorithm B is optimal for P|p j =1, outtree i is released at r i |  C j )

30 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

31 P|p j =1, pmtn, intree i is released at r i |Cmax (Counterexample) Tree 1 released at r 1 =0 M= Tree 2 released at r 2 =4 S S

32 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, p j =1, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

33 P2| pmtn,prec i is released at r i |Cmax Algorithm C: Whenever new tasks arrive, do { t =the current time; U= the set of tasks active (i.e., not finished) at time t; Call Muntz-Coffman algorithm to reschedule the tasks in U; }

34 Example

35 Example

36 Our result Theorem Algorithm C is an optimal online algorithm for P2| pmtn,prec i is released at r i |Cmax.

37 Our results Nonpreemptive scheduling problems: –P2|p j =p, chains i are released at r i |Cmax-----no optimal algorithm can possibly exist –P|p j =1, intree i is released at r i |Cmax-----no optimal algorithm can possibly exist –P2|p j =1, prec i is released at r i |Cmax ---- there is optimal algorithm –P|p j =1, outtree i is released at r i |Cmax----- there is optimal algorithm Preemptive scheduling problems: –P|pmtn, intree i is released at r i |Cmax---- no optimal algorithm can possibly exist –P2| pmtn, prec i is released at r i |Cmax ---- there is optimal algorithm –P|pmtn, outtree i is released at r i |Cmax---- there is optimal algorithm

38 P|pmtn, outtree i is released at r i |Cmax Theorem Algorithm C is an optimal online algorithm for P|pmtn, outtree i is released at r i |Cmax.

39 Outline Introduction: –Three basic scheduling algorithms Online Scheduling of Precedence Constrained Tasks –Four nonpreemptive scheduling problems –Three preemptive scheduling problems Future Work

40 Future Work (Continued Work) Online scheduling problems –Competitive Ratio –Objective function: mean flow time

41 Thank you!

42 Application of Online Scheduling Industrial Applications Multiuser operating systems such as Unix and Windows Web servers Database servers Load balancers sitting in front of server farms (Pruhs K., Sgall J., and Torng E., 2004 )