Title: Online Scheduling of Precedence Constrained Tasks
1Online Scheduling of Precedence Constrained Tasks
- Yumei Huo
- http//web.njit.edu/yh23
- yh23_at_njit.edu
- Department of Computer Science
- New Jersey Institute of Technology
2Outline
- Introduction
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Future Work
3Outline
- Introduction
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Future Work
4Coffman-Graham algorithm(P2pj1, precCmax and
P2pj1, prec ?Ci )
- Step 1. Labeling
- Step 2. Scheduling
5Coffman-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).
6Example of Coffman-Graham algorithm
(2,1)
(1)
(3)
(4)
(1)
(2)
7Hus algorithm(Ppj1, intreeCmax and Ppj1,
outtreeCmax )
- Step 1. Labeling
- Step 2. Scheduling
8Hus 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).
9Example for Hus algorithm
(16)
10Muntz-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.
11Example for Muntz-Coffman algorithm
12Outline
- Introduction
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Future Work
13Online 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.
14Classical Scheduling Problems with polynomial
optimal algorithms
- Ppj1, intreeCmax and Ppj1, outtreeCmax ---
Hus algorithm - P2pj1, precCmax and P2pj1, prec ?Ci ---
Coffman-Graham algorithm - P2pmtn, prec Cmax, Ppmtn, intreeCmax and
Ppmtn, outtreeCmax --- Muntz-Coffman algorithm - PpmtnCmax --- McNaughtons Rule
15Online 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)
16Our 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
17Our 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
18P2pjp, chainsi are released at riCmax
(Counterexample)
M2 pj2
19Our 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
20Ppj1, intreei is released at riCmax
(Counterexample)
M3
Tree1 released at r10
S1
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
22P2pj1, 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 -
23Example
24Our 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)
25Our 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
26Ppj1, 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 -
27Example
28Example
29Our 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)
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, pmtn, intreei is released at riCmax
(Counterexample)
M3
Tree1 released at r10
S1
S2
32Our 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
33P2 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 -
34Example
35Example
36Our result
- Theorem 2.2.4 Algorithm C is an optimal online
algorithm for P2 pmtn,preci is released at
riCmax.
37Our 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
38Ppmtn, outtreei is released at riCmax
- Theorem 2.2.6 Algorithm C is an optimal online
algorithm for Ppmtn, outtreei is released at
riCmax.
39Outline
- Introduction
- Three basic scheduling algorithms
- Online Scheduling of Precedence Constrained Tasks
- Four nonpreemptive scheduling problems
- Three preemptive scheduling problems
- Future Work
40Future Work (Continued Work)
- Online scheduling problems
- Competitive Ratio
- Objective function mean flow time
41Thank you!
42Application 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 )