0% found this document useful (0 votes)
15 views

1 Multiprocessor Scheduling With Precedence Constraints: 1.1 Problem Description

The document summarizes a lecture on multiprocessor scheduling with precedence constraints. It describes the problem of scheduling jobs with processing times and precedence constraints on identical machines to minimize makespan. Graham's list scheduling algorithm is discussed, which sequentially schedules jobs on the least loaded machine while respecting constraints. It is shown to provide a (2-1/m) approximation. The problem is proved to be strongly NP-hard, and it is shown there is no approximation better than (3-ε) for any ε > 0 unless P=NP.

Uploaded by

ssfofo
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

1 Multiprocessor Scheduling With Precedence Constraints: 1.1 Problem Description

The document summarizes a lecture on multiprocessor scheduling with precedence constraints. It describes the problem of scheduling jobs with processing times and precedence constraints on identical machines to minimize makespan. Graham's list scheduling algorithm is discussed, which sequentially schedules jobs on the least loaded machine while respecting constraints. It is shown to provide a (2-1/m) approximation. The problem is proved to be strongly NP-hard, and it is shown there is no approximation better than (3-ε) for any ε > 0 unless P=NP.

Uploaded by

ssfofo
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

CS 598CSC: Approximation Algorithms Instructor: Chandra Chekuri

Lecture date: Feb. 6th, 2009 Scribe: Tae Hyun Kim

In this lecture, multiprocessor scheduling is explored with precedence constraints. Applications such as parallel programming and instruction scheduling in multi-issue processors fall into this category.

1
1.1

Multiprocessor Scheduling with Precedence Constraints


Problem Description

In the Multiprocessor Scheduling with Precedence Constraints, we are given n-jobs denoted by {J1 , J2 , , Jn }, the associated processing time pi , i = 1, , n and m identical machines to which jobs are needed to be assigned. In addition, jobs have precedence constraints between them, and we use notation Jj Ji to imply that Ji cannot be done before completing Jj (the smaller runs earlier). A directed acyclic graph (DAG) can encode these constraints. The goal of this problem is to minimize the makespan. Denote the start time and completion time of Jj by sj and cj , respectively. Then job Jj occupies time slots from sj +1 to cj . The goal is thus min maxj cj . This problem is also strongly NP-hard as the scheduling problem without constraints.

1.2

Grahams List Scheduling

According to the precedence constraints, a DAG is created, where each vertex represents a job, and a directed edge indicates a precedence constraint. One example of such DAGs is depicted in Figure 1. In the gure, the numbers in vertices are job indices, and the associated processing times with the jobs are noted next to vertices. In this DAG, it is noticeable, for instance, that J1 J4 , J2 J6 , etc. Subsequently, priority between jobs for scheduling is also given by having a DAG. In Grahams List Scheduling, jobs are sequentially scheduled on the least loaded machine while satisfying the precedence constraints. One example of schedules for the jobs in Figure 1 is depicted in Figure 2. Due to the precedence constraints J5 J7 J10 , J7 and J10 had to be delayed to c5 and c7 , respectively. It turns out that this scheduling gives the following approximation. Theorem 1 Grahams List Scheduling with any list gives a (2
1 m)

approximation.

To prove this theorem, we rst need to establish two lower bounds on OPT. Claim 2 (Lower Bound 1) OPT
1 m j

pj .

This claim is trivial since the total amount of work ( j pj ) should be done on m machines. Another lower bound for OPT is given by using the concept of a chain. A chain is dened as a sequence of jobs which have predecessor-successor relationship. Since no two jobs in a chain can execute simultaneously, we have the following observation, where for a chain A, p(A) denotes j A pj .

Figure 1: Directed acyclic graph (DAG) example. Numbers inside vertices are job indices, and the numbers noted by them are processing times.

Figure 2: Output example of Grahams List Scheduling. The precedence constraints are from Figure 1. Claim 3 (Lower Bound 2) OPT max p(A),
A:chain

(1)

We now dene a particular chain of interest for the analysis. First, observe the example in Figure 2 which shows that not all machines are always executing, because of the precedence constraints among jobs. Let us dene a full time slot to indicate a time slot during which all machines are busy. Meanwhile, a partial time slot is dened as a time slot in which some of the machines are not busy, but waiting for certain jobs to be completed. By summing up full and partial time slots, we can have a lower bound on OPT. Dene cmax := maxj cj . The job i1 is such that ci1 = cmax . Dene t2 is a maximum integer in [0, si1 ] such that t2 is a partial slot. In case that t2 = 0, the chain including i1 has i1 only. Inductively we can dene the following. tk : the maximum integer in [0, sik ] such that tk is a partial slot. ik+1 : the predecessor of ik that is executing at tk . The index k is from 1 to k such that tk = 0. It follows from the denitions that i1 i2 ik and t1 > t2 > > tk > tk+1 . The pictorial description of the terms is given in Figure 3.

Figure 3: Illustrations on the terms ij , tk and sij . Let A be the chain dened in this manner, and note that some job in A is executing during every partial time slot of the schedule. Further, between two consecutive jobs in a chain, all time slots are full. This fact suggests the following lemma. Lemma 4 For the chain A dened above: cmax p(A) + 1 m
n

pj .
j =1

(2)

Proof: The completion time cmax is given by the sum of the number of partial and the number of full time slots in the schedule. The former is at most p(A), and the total amount of work done in the full time slots cannot exceed the sum of processing times for all jobs on m machines. The number of full time slots is 1/m times the amount of work done in those slots, and so we obtain (2). 2 Using the two lower bounds on OPT, Theorem 4 immediately gives us a 2-approximation. This analysis can be further improved by observing that the upper bound for the sum of full time slots can be tighter as follows. Claim 5 cmax 2 1 OPT. m

(3)

Proof: Let n denote the number of partial time slots in which a job of A is executing; we have 1 cmax n + m j pj n ; since the total amount of work done in full slots is no more than
1 + pj n . Thus, we have cmax n 1 m bounds on OPT, we obtain the desired result. j 1 n j

pj . But n p(A), and from the two lower 2

1.3

Hardness of the Problem

Some problems related to Multiprocessor Scheduling with Precedence Constraints remain open. Is the m = 3 case with unit processing times NP-hard? For xed m, is there a (2 ) approximation where > 0?

Even with unit processing times, we have the following hardness result:
4 Theorem 6 Unless P = NP, there is no approximation better than ( 3 ) for any

> 0.

This theorem is proved by a reduction from the clique problem. Given a graph G = (V, E ) and integer k , the clique problem is to nd out if G has a clique of size k . This problem is known to be NP-complete. Given G = (V, E ) and k , the scheduling instance is created as follows. There are m identical machines where m = 1 2 n(n 1) + 1 and n = |V |. There are 3m jobs with unit processing time. Jobs are grouped into graph jobs and dummy jobs where graph jobs are from all vertices and edges of G, and dummy jobs are additionally introduced as three sets D1 , D2 and D3 which respectively have |D1 | = m k, 1 |D2 | = m k (k 1) n + k, and 2 1 |D3 | = m |E | + k (k 1) 2 jobs. The precedence constraints are constructed as follows. 1. The jobs from vertices connected by an edge are predecessors for the job from that edge. (For edge e = uv , jobs Ju and Jv are predecessor to Je .) 2. Each job in D1 is a predecessor to each job in D2 . 3. Each job in D2 is a predecessor to each job in D3 . In this scheduling instance, it is clear that OPT 3 even if there are only dummy jobs. We have the following claims. Claim 7 If G has a clique of size k , then OPT = 3. Proof: Consider 3 time slots. The jobs from clique vertices are scheduled in the rst slot since they are all predecessors to edge jobs. In the second slot, the edges of the clique are scheduled. For the remaining vertices and edges, the vertex jobs are scheduled in the second slot in addition to the edges of the clique. This allows the remaining edge jobs to be scheduled in the last slot. Regarding dummy jobs, each job in Di is scheduled in ith slot. They ensure that all the machines are always busy during three slots, thus giving us OPT = 3. 2 Claim 8 If OPT = 3, then G has a clique of size k . Proof: Suppose G does not have a clique of size k . We want to show that all jobs in this case cannot be scheduled in 3 time slots (OPT > 3). To use only 3 time slots, all dummy jobs in D1 , D2 and D3 should be scheduled in time slot 1, 2 1 and 3, respectively. Then, the time slots respectively have k , 2 k (k 1)+(n k ), |E | 1 2 k (k 1) idle machines to schedule all edge and vertex jobs; since the total amount of processing time remaining is n + |E |, each slot must be used fully if we are to complete the jobs in 3 time slots. (4) (5) (6)

Since no edge job can be scheduled in the rst slot, only k vertex jobs corresponding to a set of vertices V are scheduled. Now, the only edge jobs that can be scheduled in the second slot are those corresponding to edges that have both their endpoints in V . But since V is not a clique, there are strictly fewer than 1 2 k (k 1) such edge jobs, and even if all the remaining (n k ) vertex jobs are scheduled in the second time slot, some machine must be idle in this slot. Thus, we cannot schedule all the jobs in 3 slots. 2

You might also like