UET Multiprocessor Scheduling Problems Nan Zang nzangcs ucsd
UET Multiprocessor Scheduling Problems Nan Zang nzang@cs. ucsd. edu
Overview of the paper q Introduction q Classification q Complexity results for Pm | prec, pj = 1 | Cmax q q Algorithms for Pk | prec, pj = 1 | Cmax Future research directions and conclusions Nan Zang
Scheduling q Scheduling activities. q For concerns optimal allocation of scarce resources to example Class scheduling problems Ø Ø Ø Courses Classrooms Teachers Nan Zang
Problem notation (1) q A set of n jobs J = { J 1, J 2, ……, Jn} The execution time of the job Jj is p(Jj). q A set of processors P = {P 1 , P 2, ……} q Schedule Specify which job should be executed by which processor at what time. q Objective Optimize one or more performance criteria Nan Zang
Problem Notation (2) 3 -field notation α|β|γ (Graham et al. ) q α describes the processor environment Number of processors, speed, … q β provides the job characteristics release time, precedence constraints, preemption, … q γ represents the objective function to be optimized The finishing time of the last job (makespan) The total waiting time of the jobs Nan Zang
Job Characteristics q Release time (rj) - earliest time at which job Jj can start processing. - available job q Preemption (prmp) - jobs can be interrupted during processing. q Precedence constraints (prec) - before certain jobs are allowed to start processing, one or more jobs first have to be completed. - a ready job Nan Zang
Precedence constraints (prec) Before certain jobs are allowed to start processing, one or more jobs first have to be completed. Definition q Successor q Predecessor q Immediate successor q Immediate predecessor q Transitive Reduction Nan Zang
Precedence constraints (prec) One or more job have to be completed before another job is allowed to start processing. Definition q Successor q Predecessor q Immediate successor q Immediate predecessor q Transitive Reduction Nan Zang
Precedence constraints (prec) One or more job have to be completed before another job is allowed to start processing. Definition q Successor q Predecessor q Immediate successor q Immediate predecessor q Transitive Reduction Nan Zang
Special precedence constraints (1) q In-tree (Out-tree) q In-forest (Out-forest) q Opposing forest q Interval orders q Quasi-interval orders q Over-interval orders q Series-parallel orders q Level orders Nan Zang
Special precedence constraints (2) Out-tree In-tree Opposing forest Out-forest In-forest Nan Zang
UET scheduling problem formal definition q Pm| prec, pj = 1 | Cmax (m≥ 1) Processor Environment Ø q m identical processors are in the system. Job characteristics Ø Precedence constraints are given by a precedence graph; Ø Preemption is not allowed; Ø The release time of all the jobs is 0. q Objective function Ø Cmax : the time the last job finishes execution. ( If cj denotes the finishing time of Jj in a schedule S, ) Nan Zang
Gantt Chart A Gantt chart indicates the time each job spends in execution, as well as the processor on which it executes Slot 1 Slot 2 P 1 P 2 P 3 Time axis Nan Zang
Overview of the paper q Introduction q Classification q Complexity results for Pm | prec, pj = 1 | Cmax q Algorithms for Pk | prec, pj = 1 | Cmax q Future research directions and conclusions Nan Zang
Classification Due to the number of processors q Number of processors is a variable (m) Pm | prec, pj = 1 | Cmax q Number of processors is a constant (k) Pk | prec, pj = 1 | Cmax Nan Zang
Classification Due to the number of processors q Number of processors is a variable (m) Pm| prec, pj = 1 | Cmax q Number of processors is a constant (k) Pk| prec, pj = 1 | Cmax Nan Zang
Pm| prec, pj = 1 | Cmax (1) Theorem 1 Pm| prec, pj = 1 | Cmax is NP-complete. 1. Ullman (1976) 3 SAT ≤ Pm | prec, pj = 1 | Cmax 2. Lenstra and Rinooy Kan (1978) k-clique ≤ Pm| prec, pj = 1 | Cmax Corollary 1. 1 The problem of determining the existence of a schedule with Cmax ≤ 3 for the problem Pm| prec, pj = 1 | Cmax is NP-complete. Nan Zang
Pm| prec, pj = 1 | Cmax (2) Mayr (1985) q Theorem 2 Pm | pj =1, SP | Cmax is NP-complete. SP: Series - parallel q Theorem 3 Pm | pj =1, OF | Cmax is NP-complete. OF: Opposing - forest Nan Zang
SP and OF q q Series-parallel orders Does NOT have a substructure isomorphic to Fig 1. Opposing-forest orders Is a disjoint union of in-tree orders and out-tree orders. Fig 1 a b c d Fig 2: Opposing forest Nan Zang
Conclusion on Pm| prec, pj = 1 | Cmax q q q 3 SAT is reducible to the corresponding scheduling problem. m is a function of the number of clauses in the 3 SAT problem. Results and techniques do not hold for the case Pk | prec, pj = 1 | Cmax Nan Zang
Classification q Number of processors is a variable (m) Pm | prec, pj = 1 | Cmax q Number of processors is a constant (k) Pk | prec, pj = 1 | Cmax Nan Zang
Optimal Schedule for Pk | prec, pj = 1 | Cmax q The complexity of Pk | prec, pj = 1 | Cmax is open. Ø 8 th problem in Garey and Johnson’s open problems list. (1979) Ø One of the three problems remaining unsolved in that list q If k = 2, P 2 | prec, pj = 1 | Cmax is solvable in polynomial time. Ø Fujii, Kasami and Ninomiya (1969) Ø Coffman and Graham (1972) q For any fixed k, when the precedence graph is restricted to certain special forms, Pk | prec, pj = 1 | Cmax turns out to be solvable in polynomial time. Ø In-tree, Out-tree, Opposing-forest, Interval orders… Nan Zang
Special precedence constraints q In-tree (Out-tree) q In-forest (Out-forest) q Opposing forest q Interval orders q Quasi-interval orders q Over-interval orders q Level orders Nan Zang
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
List scheduling policies (1) q q 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. Nan Zang
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
Graham’s list algorithm q Graham first analyzed the performance of the simplest list scheduling algorithm. q List scheduling algorithm with an arbitrary job list is called Graham’s list algorithm. q Approximation ratio for Pk | prec, pj = 1 | Cmax δ = 2 -1/k. (Tight!) l Approximation ratio is δ if for each input instance, the makespan is at most δ times of the optimal makespan. Nan Zang produced by the algorithm
Algorithms for Pk| prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
HLF algorithm (1) q q q T. C. Hu (1961) Critical Path algorithm or Hu’s algorithm Algorithm 1. 2. 3. Assign a level h to each job. Ø If job has no successors, h(j) equals 1. Ø Otherwise, h(j) equals one plus the maximum level of its immediate successors. Set up a priority list L by nonincreasing order of the jobs’ levels. Execute the list scheduling policy on this level based priority list L. Nan Zang
HLF algorithm (2) 3 3 3 2 1 1 1 Level 3 1 1 1 Level 2 Nan Zang 1 Level 1
HLF algorithm (3) q Time complexity O(|V|+|E|) (|V| is the number of jobs and |E| is the number of edges in the precedence graph) q Theorem 4 (Hu, 1961) The HLF algorithm is optimal for Pk | pj = 1 , in-tree (out-tree) | Cmax. p Corollary 4. 1 The HLF algorithm is optimal for Pk | pj = 1 , in-forest (out-forest) | Cmax. Nan Zang
HLF algorithm (4) q N. F. Chen & C. L. Liu (1975) The approximation ratio of HLF algorithm for the problem with general precedence constraints: If k = 2, δHLF ≤ 4/3. If k ≥ 3, δHLF ≤ 2 – 1/(k-1). Nan Zang Tight!
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
MSF algorithm (1) q Algorithm: Ø 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) Ø Execute the list scheduling policy based on this priority list L. Nan Zang
MSF algorithm (2) 2 2 2 1 7 6 0 0 7 6 0 2 0 0 0 2 2 1 Nan Zang 0 0 0 0
MSF algorithm (3) q Time complexity O(|V|+|E|) q Theorem 5 (Papadimitriou and Yannakakis, 1979) The MSF algorithm is optimal for Pk | pj = 1, interval | Cmax. q Theorem 6 (Moukrim, 1999) The MSF algorithm is optimal for Pk | pj = 1, quasi-interval | Cmax. Nan Zang
Special precedence constraints q q Interval orders Does NOT have a substructure isomorphic to Fig 1. Quasi – interval orders Does NOT have a substructure isomorphic to TYPE I, II or III. a b c d Fig 1 a c a b b c a c e d e d Type II Type I Nan Zang b Type III
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
CG algorithm (1) q Coffman and Graham (1972) q An optimal algorithm for P 2 | prec, pj = 1 | Cmax. q Best approximation algorithm known for Pk | prec, pj = 1 | Cmax, where k ≥ 3. Nan Zang
CG algorithm (2) q Definitions – Let IS(Jj) denote the immediate successors set of Jj. – A job is ready to label, if all its immediate successors are labeled and it has not been labeled yet. – N(Jj) denotes the decreasing sequence of integers formed by ordering of the set { label (Ji) | Ji IS(Jj) }. – Let label(Jj) be an integer label assigned to Jj. Nan Zang
CG algorithm (3) 1. Assign a label to each job: a. Choose an arbitrary task Jk such that IS(Jk) = 0, and define label(Jk) to be 1 b. for i 2 to n do I. R be the set of jobs that are ready to label. II. Let J* be the task in R such that N(J*) is lexicographically smaller than N(J) for all J in R III. Let label(J*) i end for 2. Construct a list of jobs L = {Jn, Jn-1, …, J 2, J 1} according to the decreasing order of the labels of the jobs. 3. Execute the list scheduling policy on this priority list L. Nan Zang
CG algorithm (4) N(J 10)= N(J 11)=N(J 12)=(8) 10 11 12 8 13 N(J 8)=(7, 6, 5, 4, 3, 2) 9 N(J 9)=(1) 1 2 3 13 12 11 4 5 10 6 9 7 8 Nan Zang 7 6 5 4 3 2 1
CG algorithm (4) 10 11 12 8 13 9 1 2 13 3 12 4 11 5 10 6 9 Nan Zang 7 8 7 6 5 4 3 2 1
CG algorithm (5) q Time complexity O(|V|+|E|) q Theorem 5 (Coffman and Graham, 1972) The CG algorithm is optimal for P 2 | prec, pj = 1| Cmax. q Theorem 6 (Moukrim, 2005) The CG algorithm is optimal for Pk | pj = 1, over-interval | Cmax. Nan Zang
Special precedence constraints q Quasi – interval orders Does NOT have a substructure isomorphic to TYPE I, II or III. q Over – interval orders Does NOT have a substructure isomorphic to TYPE I or II. b a c b e d Type I a d b c a c e d e Type II Nan Zang Type III
CG algorithm (6) The performance of CG algorithm when k≥ 3 q Lam and Sethi (1978) δCG ≤ 2 – 2/k q Braschi and Trystram (1994) Cmax(S) ≤ (2 – 2/k) Cmax(S*) – (k – 2 – odd(k))/k (tight!) Note: S is a CG schedule. S* is an optimal schedule. If k is an odd, odd(k): =1; otherwise, odd(k): =0. Nan Zang
List Scheduling Policy Conclusions q List scheduling policies Ø Ø Graham’s list algorithm HLF algorithm MSF algorithm CG algorithm q Property Ø easy to implement Ø extended to the problem Pm | prec, pj = 1| Cmax q Research directions: Ø Allow priority lists to depend on the number k of processors. Nan Zang
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policy algorithm Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
FKN algorithm (1) q q q Fujii, Kasami and Ninomiya (1969) First optimal algorithm for P 2 | prec, pj = 1 | Cmax. Basic Idea Ø Find a minimum partition of the jobs • There at most two jobs in each set. • The pair of jobs in the same set can be executed together. Ø Make a valid schedule according to a particular order of the partition. (Some clever swap work needed!) Ø The length of the result schedule = value of the min partition Ø Can be solved by some maximum matching algorithm. Nan Zang
FKN algorithm (2) q q Hard to extend! FKN algorithm cannot be extended to k = 3 directly. Minimal partition is {J 1, J 5, J 6} {J 4, J 2, J 3} and |P|=2. However, The optimal Cmax corresponds partition {J 1, J 4} {J 2, J 3, J 5} {J 6} Nan Zang
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
Merge Algorithm (1) q Dolev and Marmuth (1985) q Required input: An optimal schedule S for a high-graph H(G). q q Merge algorithms show to “ Merge” the known optimal schedule S with the remaining jobs. Produce an optimal schedule for the whole job set G. Nan Zang
Merge Algorithm (2) Definitions l height h(G) highest level of the vertices in G. l median μ(G) height of kth highest component +1 l high-graph H(G) a subgraph of G, made up of all the components which are strictly higher than the median. l low-graph L(G) remaining subgraph of G, except for H(G) Nan Zang
Merge Algorithm (3) K=3 C 1 3 rd highest C 2 J 1 J 2 J 8 J 3 J 4 J 5 J 6 J 7 H(C 1)=5 C 3 J 12 J 9 J 10 J 13 μ(G)=4 J 11 H(C 2)=3 H(G) H(C 3)=3 L(G) Nan Zang C 4 J 15 J 16 H(C 4)=2
Merge Algorithm (4) Idea of the Merge Algorithm q If there is an idle period in S, then fill it with a highest initial vertices in L(G), and remove it from L(G) q Similar to HLF Algorithm Nan Zang
Merging Algorithm (5) S: Optimal schedule for H(G) J 8 J 9 J 10 S’: from merge algorithm J 11 J 12 J 13 J 14 L(G) Nan Zang J 15 J 16
Merge Algorithm (6) Theorem 10 (Reduction theorem) Let G be a precedence graph and S be an optimal schedule for H(G). Then, the Merge algorithm finds an optimal schedule for the whole graph G in time and space O(|V|+|E|). Corollary 10 If H(G) is empty, then HLF is optimal for G. Nan Zang
Merge Algorithm (7) Why Merge algorithm is useful? Dolev and Marmuth 1. Find an optimal schedule for a subgraph H(G). Precedence Constraints 2. H(G) contains fewer than k-1 components. How to use it? 1. If H(G) is easy to solve. 2. If every closed subgraph of G can be classified into polynomial number of classes. Time complexity Level orders O(nk-1) Opposing forest O(n 2 k-2 logn) Bounded height O(nh(k-1)) Nan Zang
Algorithms for Pk | prec, pj = 1 | Cmax q List scheduling policies Ø Graham’s list algorithm Ø HLF algorithm Ø MSF algorithm Ø CG algorithm q FKN algorithm (Matching algorithm) q Merge algorithm Nan Zang
Main results known Approximatio n ratio K=2 List 3/2 HLF 4/3 MSF 4/3 CG opt L I S T FKN Merge K≥ 3 Intree OF Interval Quasi-interval Over-interval Arbitrary 2 -1/k opt 2 -1/(k-1) opt opt opt ≥ 2 -1/(k+1) opt ≈2 -2/k opt (Opt: We can get optimal solution in polynomial time. ) Nan Zang
Overview of the paper q Introduction q Classification q Complexity result for Pm | prec, pj = 1 | Cmax q Algorithms for Pk | prec, pj = 1 | Cmax q Future research directions and conclusions Nan Zang
Future research directions (1) q Finding a new class of orders which can be solved by known algorithms or their generalizations. Ø q over-interval (Moukrim, 2005) Find an algorithm with a better approximation ratio for the UET scheduling problem. Ø CG algorithm (1972) Ø Ranade (2003) graphs ) special precedence constraints (loosely connected task δ = 1. 875 Nan Zang
Future research directions (2) q Use the UET multiprocessor scheduling algorithms to solve other related scheduling problems Ø CG algorithm is optimal for P 2 | rj, pj = 1| Cmax. Ø HLF algorithm is optimal for P | rj, pj = 1, outtree| Cmax. (Huo and Leung, 2005) Ø MSF algorithm is optimal for P | pj = 1, cm=1, quasi-interval| Cmax. (Moukrim, 2003) Ø CG algorithm is optimal for P 2| prmp, pj = 1| Cmax and ∑Cj (Coffman, Sethuraman and Timkovsky, 2003) q The most challenging research task: Ø Solve the famous open problem Pk |pj = 1| Cmax (k≥ 3). Nan Zang
Thank You!
- Slides: 65