Title: Online Scheduling With Precedence Constraints
1Online Scheduling With Precedence Constraints
- Yumei Huo
- http//www.cs.csi.cuny.edu/yumei/
- huo_at_mail.csi.cuny.edu
- Department of Computer Science
- College of Staten Island, CUNY
- Feb. 26, 2008
2Outline
- Introduction
- Background and Notations
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Approximation Algorithms for Online Scheduling of
Equal Processing Time Task System - Future Work
3Outline
- Introduction
- Background and Notations
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Approximation Algorithms for Online Scheduling of
Equal Processing Time Task System - Future Work
4What is Scheduling ?
Scheduling deals with the allocation of scarce
resources to jobs over time subject to some
constraints. It is a decision-making process with
the goal of optimizing one or more objectives.
(Pinedo, 2001)
- Resource machines, runways, CPUs
- Jobs operations, takeoffs and landings,
programs - Constraints priority, release date, due date,
preemption - Objectives
- minimize total completion time
- minimize the maximum completion time
- maximize the number of on-time jobs
5(No Transcript)
6(No Transcript)
7(No Transcript)
8Outline
- Introduction
- Background and Notations
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Approximation Algorithms for Online Scheduling of
Equal Processing Time Task System - Future Work
9Coffman-Graham algorithm(P2pj1, precCmax and
P2pj1, prec ?Ci )?
- Step 1. Labeling
- Step 2. Scheduling
10Coffman-Graham algorithm (cont.)?
- Comparing two decreasing sequences of positive
integers by lexicographical order - Example
- (8, 6, 4, 3) lt (8, 6, 5) and (9, 8, 6) lt (9, 8,
6, 4, 3).
11(No Transcript)
12Hus algorithm(Ppj1, intreeCmax and Ppj1,
outtreeCmax )?
- Step 1. Labeling
- Step 2. Scheduling
13Hus algorithm---Level
- Definition The level of a job i with no
immediate successor is its processing time pi.
The level of a job with immediate successor(s) is
its processing time plus the maximum level of its
immediate successor(s).
14(No Transcript)
15Muntz-Coffman algorithm (P2pmtn, prec Cmax,
Ppmtn, intreeCmax and Ppmtn, outtreeCmax )?
- 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 lt 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.
16(No Transcript)
17Outline
- Introduction
- Background and Notations
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Approximation Algorithms for Online Scheduling of
Equal Processing Time Task System - Future Work
18Online 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 Cmax, i.e., a schedule as good as any
schedule produced by any scheduling algorithm
with full knowledge of future releases of tasks.
19Classical Scheduling Problems with polynomial
optimal algorithms
- Ppj1, intreeCmax and Ppj1, outtreeCmax ---
Hus algorithm - P2pj1, precCmax and P2pj1, prec ?Cj ---
Coffman-Graham algorithm - P2pmtn, prec Cmax, Ppmtn, intreeCmax and
Ppmtn, outtreeCmax --- Muntz-Coffman algorithm - PpmtnCmax --- McNaughtons Rule
20Online version of these problems
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax
- Ppj1, intreei is released at riCmax
- Ppj1, outtreei is released at riCmax
- P2pj1, preci is released at riCmax
- Preemptive scheduling problems
- P2pmtn, preci is released at riCmax
- Ppmtn, intreei is released at riCmax
- Ppmtn, outtreei is released at riCmax
- Ppmtn, rjCmax (K.S.Hong and J.Y-T.Leung, 1988)?
21Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, intreei is released at riCmax---- no
optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
22Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, intreei is released at riCmax---- no
optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
23(No Transcript)
24Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, intreei is released at riCmax---- no
optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
25(No Transcript)
26Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, intreei is released at riCmax---- no
optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
27P2pj1, preci is released at riCmax
- 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 -
28(No Transcript)
29Our result
- Theorem 2.1.4 Algorithm A is optimal for
P2pj1, preci is released at riCmax. - 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 P2pj1, preci
is released at ri ?Cj)?
30Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, intreei is released at riCmax---- no
optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
31Ppj1, outtreei is released at riCmax
- 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 -
32(No Transcript)
33Our result
- Theorem 2.1.5 Algorithm B is optimal for Ppj1,
outtreei is released at riCmax. - 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 Ppj1,
outtreei is released at ri ?Cj)?
34Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, intreei is released at riCmax---- no
optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
35(No Transcript)
36Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, pj1, intreei is released at riCmax----
no optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
37P2 pmtn,preci is released at riCmax
- 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 -
38(No Transcript)
39Our result
- Theorem 2.2.4 Algorithm C is an optimal online
algorithm for P2 pmtn, preci is released at
riCmax.
40Our results
- Nonpreemptive scheduling problems
- P2pjp, chainsi are released at riCmax-----no
optimal algorithm can possibly exist - Ppj1, intreei is released at riCmax-----no
optimal algorithm can possibly exist - P2pj1, preci is released at riCmax ---- there
is optimal algorithm - Ppj1, outtreei is released at riCmax-----
there is optimal algorithm - Preemptive scheduling problems
- Ppmtn, intreei is released at riCmax---- no
optimal algorithm can possibly exist - P2 pmtn, preci is released at riCmax ---- there
is optimal algorithm - Ppmtn, outtreei is released at riCmax---- there
is optimal algorithm
41Ppmtn, outtreei is released at riCmax
- Theorem 2.2.6 Algorithm C is an optimal online
algorithm for Ppmtn, outtreei is released at
riCmax.
42Outline
- Introduction
- Background and Notations
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Approximation Algorithms for Online Scheduling of
Equal Processing Time Task System - Future Work
43known results
- P pj1, outtreei released at ri Cmax
- Online version of Hus algorithm is known to be
optimal (Huo Leung)? - P2 pj1, preci released at ri Cmax
- Online version of Coffman-Graham algorithm is
known to be optimal (Huo Leung)? - P prec, online Cmax
- Online version of List scheduling has competitive
ratio 2-1/m (Sgall)?
44Problems
- P pj1, intreei released at ri Cmax
- P pjp, intreei released at ri Cmax
- P pjp, outtreei released at ri Cmax
- P2 pjp, preci released at ri Cmax
45Problems
- P pj1, intreei released at ri Cmax
- P pjp, intreei released at ri Cmax
- P pjp, outtreei released at ri Cmax
- P2 pjp, preci released at ri Cmax
46On-line version of Hus Algorithm(revisited)?
- Hus Algorithm
- Whenever a machine is idle, pick a job from the
highest level and schedule it. - Hus algorithm is optimal for the off-line
problem of - ppj1, intreecmax
- On-line version
- Whenever new jobs arrive, do
- Tthe current time
- Uthe set of jobs not finished at time T
- reschedule the tasks in U by Hus algorithm.
47An Example of On-line Hus Algorithm
- A set of jobs released at time 0
2
3
1
1
3
5
6
2
4
4
5
6
48An Example of On-line Hus Algorithm (Algorithm
B)?
- A new set of jobs released at time 1.
New Release
7
8
3
9
10
4
5
11
6
1
Jobs has been scheduled
2
49An Example
7
8
3
9
10
4
5
11
6
1
3
8
5
10
11
2
7
4
9
6
50Result 1
- For p intree,pj1,online cmax problem, let S
be the cmax produced by the on-line version of
Hus algorithm, and S be the cmax of the optimal
schedule, then S/S 1.5
51Problems
- P pj1, intreei released at ri Cmax
- P pjp, intreei released at ri Cmax
- P pjp, outtreei released at ri Cmax
- P2 pjp, preci released at ri Cmax
52Meta-Algorithm Delay-X (from pj1 to pjp)?
- Suppose X is an algorithm which solves online
problem for pj1. - For any job released at time r such that
kpltrlt(k1)p, delay it from consideration until
the time instant (k1)p. - Call algorithm X at time instant (k1)p
53Result 2
- Suppose algorithm X gives competitive ratio of ?
for apj1,onlinecmax problem, then, - For the problemapjp,onlinecmax, let s be the
cmax produced by Delay-X and s be the cmax of
the optimal schedule, then s?s ? p
54Result 3
- P pjp, intreei released at ri cmax
- Let S be the cmax produced by Delay-Hus
algorithm and S be the cmax of optimal schedule,
then S1.5(Sp). The asymptotic competitive
ratio is 1.5 since Sgtgtp. - P pjp, outtreei released at ri cmax
- Let S be the cmax produced by Delay-Hus
algorithm and S be the cmax of optimal schedule,
then S (Sp). The asymptotic competitive ratio
is 1 since Sgtgtp. - P2 pjp, preci released at ri cmax
- Let S be the cmax produced by Delay-Coffman-Graham
algorithm and S be the cmax of optimal
schedule, then S (Sp). The asymptotic
competitive ratio is 1 since Sgtgtp.
55Outline
- Introduction
- Background and Notations
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Approximation Algorithms for Online Scheduling of
Equal Processing Time Task System - Future Work
56Future Work (Continued Work)?
- For p pj1, intreei released at ri cmax
problem - Better approximation algorithms? Tight
Competitive Ratio? - For p pjp, preci released at ri cmax
- Asymptotic competitive ratio? (gt2-2/m Lam and
Sethi )? - For p pmtn, intreei released at ri cmax
problem - Approximation Algorithm? Competitive Ratio?
- Other Criteria of these online scheduling
problems? - Objective function mean flow time
57Selected Publications
- Huo, Y. and J. Y-T. Leung, "Online Scheduling of
Precedence Constrained Tasks," SIAM J. on
Computing, Volume 34, Number 3, pp. 743-762.
2005. - Huo, Y. and J. Y-T. Leung, "Minimizing Total
Completion Time for UET Tasks with Release Time
and Outtree Precedence Constraints," Mathematical
Methods of Operations Research, Vol. 62, No. 2,
pp. 275-278, 2005 . - Huo, Y. and J. Y-T. Leung, "Minimizing Total
Completion Time for UET Tasks ," ACM Transactions
on Algorithms, Vol. 2, No. 2, pp. 244-262. April
2006 . - Huo, Y., J. Y-T. Leung and H. Zhao, "Complexity
of Two Dual Criteria Scheduling Problems,"
submitted to Operations Research Letters,
35211-220, 2007. - Huo, Y., J. Y-T. Leung and H. Zhao, "Bi-criteria
Scheduling Problems Number of Tardy Jobs and
Maximum Weighted Tardiness," European Journal of
Operational Research,177116-134, 2007. - Huo, Y., J. Y-T. Leung and X. Wang, "Online
Scheduling of Equal-Processing-Time Task
Systems," Submitted to Theoretical Computer
Science.
58Thank you!
59Makespan
- Total completion time ?Ci C1 C2Cn
- Makespan ?(Ci - ri) /n
- Ci is the completion time of job i
- ri is the release time of job i
- n is the number of jobs
60Application of Scheduling
- Scheduling of Flexible Resources in Professional
Service Firms - Novel metaheuristic Approaches to Nurse Rostering
Problems in Belgian Hospitals - University Timetabling
- Adapting the GATES Architecture to Scheduling
Faculty - Constraint Programming for Scheduling
- Batch Production Scheduling in the Process
Industries - A Composite Very-Large-Scale Neighborhood Search
Algorithm for the Vehicle Routing Problem - Scheduling Problems in the Airline Industry
- Bus and Train Driver Scheduling
- Sports Scheduling
61Application 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 )?
62(No Transcript)
63Complexity results for scheduling problems
- by Brucker and Knust http//www.mathematik.uni-o
snabrueck.de/research/OR/class/