9
Computing 46, 183-191 (1991) COI~JI~ by Springer-Verlag 1991 Bounds for Nonpreemptive Scheduling of Jobs with Similar Processing Times on Multiprocessor Systems Using the LPT-Algorithm* H. Keilerer, Graz Received April 12, 1988; revised February 25, 1991 Abstract -- Zusammenfassung Bounds for Nonpreemptive Scheduling of Jobs with Similar Processing Times on Multiprocessor Systems Using the LPT-Algorithm. The well-known, NP- complete problem of scheduling a set of n independent jobs nonpreemptively on m identical parallel processors to minimize the maximum finish time is considered. Let 09 o be the finish time of an optimal schedule and co the finish time of a schedule found by the Longest Processing Time (LPT-)heuristic. We will improve the Graham-bound for the LPT- heuristic (co/coo< 4/3 - 1/3m), which is tight in general, by considering only jobs with similar processing times. AMS Subject Classification: 90 B 35, 68 C 15. Key words: Multiprocessor scheduling, worst case analysis, scheduling similar tasks, LPT-algorithm. Schranken fiir das Scheduling ohne Unterbrechung von Jobs mit iihnlichen ProzeBzeiten auf einem Multiprozessorsystem unter Verwendung des LPT- Aigorithmus. Wir untersuchen das bekannte, NP- vollst/indige Problem des Scheduling einer Menge yon n unabh~ingigen Jobs ohne Unterbrechung auf rn identischen parallelen Maschinen um die maximale Fertigstellungszeit zu minimieren. Sei co o die Fertigstellungszeit eines optimalen Schedule und co die Fertigstellungszeit des Schedule, den man durch die LPT-Heuristik erh~ilt. Wir verbessern die Graham-Schranke ffir die LPT-Heuristik (og/co o < 4/3 - 1/3m), eine im allgemeinen Fall schaffe Schranke, indem wir nur Jobs mit /ihnlichen Prozel3zeiten untersuchen. 1. Introduction One of the famous problems in scheduling theory is that of scheduling independent jobs nonpreemptively on a multiprocessor system to minimize the makespan [-2, 3, 5]. More precisely, let us have a set of n jobs Ji (i = 1 ..... n) with processing times Pl. We want to determine an assignment of the jobs to m machines M, ..... M,, such that the maximal finish time of the processors is minimized. The problem is known to be NP-complete and so in general quite difficult [3, chapter 4]. Therefore only heuristic and branch&bound approaches are known for this * Research partially supported by the Austrian Science Foundation (Fonds zur F6rderung der wissenschaftlichen Forschung), project $32/01.

Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

Embed Size (px)

Citation preview

Page 1: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

Computing 46, 183-191 (1991) C O I ~ J I ~

�9 by Springer-Verlag 1991

Bounds for Nonpreempt ive Scheduling o f Jobs with Similar Process ing Times on Mult iprocessor Systems Us ing the

LPT-Algor i thm*

H. Keilerer, Graz

Received April 12, 1988; revised February 25, 1991

Abstract - - Zusammenfassung

Bounds for Nonpreemptive Scheduling of Jobs with Similar Processing Times on Multiprocessor Systems Using the LPT-Algorithm. The well-known, NP- complete problem of scheduling a set of n independent jobs nonpreemptively on m identical parallel processors to minimize the maximum finish time is considered. Let 09 o be the finish time of an optimal schedule and co the finish time of a schedule found by the Longest Processing Time (LPT-)heuristic. We will improve the Graham-bound for the LPT- heuristic (co/coo < 4/3 - 1/3m), which is tight in general, by considering only jobs with similar processing times.

AMS Subject Classification: 90 B 35, 68 C 15.

Key words: Multiprocessor scheduling, worst case analysis, scheduling similar tasks, LPT-algorithm.

Schranken fiir das Scheduling ohne Unterbrechung von Jobs mit iihnlichen ProzeBzeiten auf einem Multiprozessorsystem unter Verwendung des LPT- Aigorithmus. Wir untersuchen das bekannte, NP- vollst/indige Problem des Scheduling einer Menge yon n unabh~ingigen Jobs ohne Unterbrechung auf rn identischen parallelen Maschinen um die maximale Fertigstellungszeit zu minimieren. Sei co o die Fertigstellungszeit eines optimalen Schedule und co die Fertigstellungszeit des Schedule, den man durch die LPT-Heuristik erh~ilt. Wir verbessern die Graham-Schranke ffir die LPT-Heuristik (og/co o < 4/3 - 1/3m), eine im allgemeinen Fall schaffe Schranke, indem wir nur Jobs mit /ihnlichen Prozel3zeiten untersuchen.

1. Introduction

One of the famous problems in scheduling theory is that of scheduling independent jobs nonpreemptively on a multiprocessor system to minimize the makespan [-2, 3, 5]. More precisely, let us have a set of n jobs Ji (i = 1 . . . . . n) with processing times Pl. We want to determine an assignment of the jobs to m machines M, . . . . . M,, such that the maximal finish time of the processors is minimized. The problem is known to be NP-complete and so in general quite difficult [3, chapter 4]. Therefore only heuristic and branch&bound approaches are known for this

* Research partially supported by the Austrian Science Foundation (Fonds zur F6rderung der wissenschaftlichen Forschung), project $32/01.

Page 2: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

184 H. Kellerer

problem. Let coo be the finish time of an optimal assignment and co the finish time for an arbitrary schedule. It is desirable to know a general upper bound for the ratio co/co o to judge the quality of a given heuristic.

A possible approach to this problem is list scheduling: We construct a priority list of the jobs. Whenever a processor becomes free for assignment, the first unexecuted job is taken from the list and assigned to that processor. Graham has shown in his fundamental paper [5] that the ratio co/co0 satisfies the inequality co/co o < 2 - 1/m. In [1] this algorithm was applied to a special class of jobs, that is jobs which have very similar processing times. Let r be the ratio of the maximal processing time of the jobs to the minimal processing time. The following bounds for list schedules have been derived in this paper:

f 2 -1/3[m/3] f o r m > 6

If r < 3 then co/coo_<~17/10 f o r m = 5 /

[. 5/3 for m = 3, 4

~5/3 - 1/3 [m/2] for m > 4 If r < 2 then c~176 f o r m = 2 , 3

Graham [5] considers also the so-called Longest Processing Time (LPT-)heuristic. It is defined by the fact that a special priority list is constructed. The jobs are ordered in nonincreasing processing times, that is Pl -> P2 > "'" > P,- Graham found the estimation co/coo < 4/3 - 1/3m, a bound which is tight for an arbitrary set of jobs. A third and rather different approach to our problem, [-4] uses bin-packing methods and binary search to find the bound co/coo < 1.22.

In this paper we want to give a parametric version of the LPT-bound 4/3 - 1/3m for similar execution times. Here similarity means that Pl/P, is always less or equal than 2. Especially we assume that pl/p, is equal to 2 - #/m where the parameter/~ is an arbitrary real number taken from the interval [-1,m[-. We will show that the LPT-bound can be improved to a set of inequalities depending on the subinterval o f [ l , m[ in which # is contained. To show that, we will use the fact that for Pa/P, < 2 the jobs can be assigned to the machines only in a very special manner. In detail we get the following series of bounds:

for 2,+q c~176 < km . . . . ' (k ~ (k q- -1) '

(k + 2 ) m - 1 Fm(k2- 2 k - 2 ) + k l +km.(kl -- 2)1 c~176176 ( k + l ) m for #~[_ ( k - 2 ) ( k + l ) '

. . .I

(k > 3, k integer).

Either we get a linear function of kt as upper bound (first series) or a constant function depending only on the corresponding subintervals. Thus altogether we get a piecewise linear monotonical decreasing curve which tends to 1 if Pl/Pn is close to 1 and tends to 4/3 - 1/3m if p~/p,, gets close to 2. Furthermore for large values of # we will give examples for the tightness of the bounds. But first of all we present in chapter 2 a list of notations to enable a convenient use of the paper.

Page 3: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

Bounds for Nonpreemptive Scheduling of Jobs with Similar Processing Times ! 85

2. Notations

We will use the following notations throughout the remainder of this paper:

m:

M j: n:

Pi:

Si:

f,: J(Mi):

Mmax:

So:

SL: lo:

l: coO:

co:

number of processors (machines) j-th machine (1 _< j _< m) number of jobs i-th job (1 _< i _<_ n) processing time of job Ji (Pl > P2 > "'" > P,) start of execution for job Ji in a certain schedule finish time of job Ji in a certain schedule (fi = si + Pi) number of jobs executed on machine Mi machine with maximal finish time assignment of the jobs to the machines in an optimal schedule assignment of the jobs to the machines obtained by the LPT-heuristic max1 <_i<_m J(Mi) in S o- to define l o uniquely we choose an optimal schedule with minimal lo m a x l <_i<_mJ(Mi) in SL finish time of an optimal schedule finish time of the LPT-schedule

3. Bounds for Schedules with Similar Execution Times

In this section we prove an upper bound for the ratio co/co o in the case of similar execution times by using the LPT-heuristic. To define the word "similar" more precisely we assume that the relation between the longest processing time Pl and the shortest processing time p. satisfies the equation below:

Pl/P, = 2 - #/m

# is an arbitrary number taken from the interval [1, m[. (Let us remember that the jobs are indexed in nonincreasing order: Pl > P2 > "'" >- P,). We are going to prove a set of inequalities for co/co o depending on the value of #. But first we mention two fundamental inequalities where (1) holds generally as a mean value property and (2) is a direct consequence from the list scheduling rule:

coo >- -- Pj (1) tT/ j=l

1 i-1 s i < - - - ~ pj for i = l . . . . . n (2)

t 'nj= 1

Now let S be a scheduling problem with jobs J1 . . . . . J~ and makespans coo(S), co(S) respectively. Let Jk be the last job assigned to Mma x by the LPT-heuristic. Consider the subproblem B consisting of the jobs J1 . . . . , Jk" Then we get co(B) -- co(S) and coo(B) --< coo(S) or

(B)/coo(B) >_ co(S)/coo(S).

Page 4: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

186 H. Kellerer

Therefore, if co/o~ o < C (C independent of n) holds for all configurations of jobs with f . = co in SL, then co/coo < C for each schedule of n jobs on m machines. Our upper bounds, which we want to prove, are independent of n. Hence we assume in the following that in S holds: f = co.

By using (1), (2), lop. <- coo and f . = co we are ready to show the following chain of inequalities:

1 .-2 ( m - - 1)p. co~coo _ s. -4- p. <_ p~ + ~ p~ < t- 1 < 1 + 1/Io -- 1~lore

coo coo mcoo i=a mcoo

It is easy to show (see [5]), that the LPT-schedule is optimal, if not more than two jobs are assigned to each machine in the optimal schedule So. The straightforward generalization of Graham's bound is summarized in Lemma 1:

L e m m a 1:

co=co o for lo_<2

co~co o <_ l + 1/I o - 1~lore for l o>_3

We now use for the first time the similarity of the processing times. The next lemma shows that on this condition on job in Sr is assigned to a machine as long as the difference between the number of jobs assigned to that machine and the number of jobs of any other machine is greater than zero.

Lemma 2: L e t n = km + r(O < r < m). Thenthe fo l lowingho lds inSr foreachk ~ {0,... ,k - 1}:

To each machine is assigned exactly one of the jobs {Jkm+~lr = 1 . . . . , m} and at most one of the jobs {Jkm+~l~ = 1 . . . . . r}.

I f J v is the a-th job and Jw the b-th job assigned to a machine with a > b, then pv <_ Pw.

Furthermore: J(Mi) ~ {l - 1,1}for all i = 1 . . . . . m, J ( M m J = I and 1 o >_ I.

Proof: By induction for k:

k = O:Yo

k ~ k + l :

Let the first km jobs already be assigned to machines in the described manner. We have to show, that the next ~jobs (1 _< ~ < m) are all assigned to different machines. We prove this by induction on ~:

~ = 1:%

~ - 1 ~ Y :

Let the machines be indexed in a way, that the first P - 1 jobs are assigned to machines M~, . . . , M~_ 1. Assume that the next job is assigned to machine M 1. Let Ji(1), - " , Jitk) be the jobs assigned to machine Mr (Pl(1) -> "'" > Pltr,)) and J;ta) . . . . . Ji'~+2) the jobs assigned to M~ at that time (Plm > "'" -> P~(~+2)). By definition of the

Page 5: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

Bounds for Nonpreemptive Scheduling of Jobs with Similar Processing Times 187

LPT-heuris t ic we get for the processing times:

Pi(i) + "'" + Pi(~) >- P~(1) + "'" + P~(~+i)

But by our induct ion assumpt ion we know that

Pi ( i ) --> Pi(2), Pi(2) >-- Pi(3) . . . . . P~(~-l) > Pi(~)

F r o m these set of inequalities we conclude Pi(~) > P~'tr,) + P~tr,+i), which is a contradic- tion to Pl /P, < 2. []

We are now ready to formulate the main theorem of this section:

Theorem: L e t p l / p , = 2 -- # /m (1 < p < m , p e ~ ) .

I f I~ �9 - ' (k - 2)(k + 1) then co~coo <- km '

/ f u e L (k ~ ( k q- i ) ' thenco/co~ < ( k + l ) m

f o r any integer k >_ 3.

For # <_ (m + 3)/4 (k = 3) the bound co~coo < (4m - #)/3m is achieved.

Proof: ( m ( k 2 - 2k - 2 ) + k )

First of all, we ment ion that the two series \ ( k Z ~-(k-2~-l) k>2 and

( 1 + m(k - 3)'] are monotonica l ly increasing and the assigned seies of intervals \ k -- 2 .i/k>2 covers the whole interval [1, m[.

By applying a scaling operat ion to the task times we get co o = lom and therefore p, _< m, pl < 2m - #, respectively.

Consider the processing times Pi,, . . . , Pi,_,, P. of the jobs executed on Mma x in S r, using the fact that f , = co. If I < l o the sum over these times yields:

c o = P h + ' ' " + p h ~ + p . - < ( 2 m - # ) ( l - 1 ) + m < _ ( 2 m - # ) ( 1 o - 2 )

+ m < m(2/o -- 2) - /~ ( l o -- 2)

In the case that l = lo, there is an r �9 {1, . . . ,m} such that n = rn(l o - 1) + r. Hence there are at least r machines Mi in S o with J(M~) = l o and there is a set of jobs R := {a~,b~, . . . ,a , ,b~} with p,, + Pb, <-- 2m, . . . , pa . + Pb. <-- 2m. If each of these jobs is executed on machines M~ with J(M~) = l, at least two of them are executed on Mm, ~ in S. For that reason and because of lemma 2

Pi~ ~ + P, <- 2m and co = Pl, -'}- "'" -b Pi ,_~ -{- Pn <-- (2m -- #)(lo -- 2) + 2m

= m(2lo -- 2) -- #(lo -- 2).

Otherwise there is at least one job a �9 R (with processing time p,) which is (in SL) executed on a machine Ms with J(M~) = l o -- 1. Let p'~,. . . , P~o-Z, P, be the processing

Page 6: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

188 H. Kellerer

times of the jobs executed on M s. The definition of the LPT-heuris t ic implies:

CO ~ p~ -[- "'" -k Plo-2 -]- Pa "[- Pn ~ (2m - #)(1 o - 2) + 2m = m(2lo - 2) - #(l 0 - 2)

Summarizing the following inequality holds:

m(2/o - 2) - p(lo - 2) co/coo -<-

lom

m(lo + 1) - 1 On the other side we know from lemma 1 that co/co o <

lore

For l o = 2 the LPT-schedule is optimal. This implies for l o < k the general bound:

(1)/0)0 ~ 3<-lo<<-kmax min { m ( 2 1 ~ 2 ) - # ( l ~ m , m(/~ + 1) - 1 } t o m

The series ( m(21~ - 2 ) - #(l o - 2)'] is monotonica l ly increasing and the series \ Io m I / l o > 2

(re(l~ + 1) - 1) is monotonica l ly decreasing. lom lo>2

m(2k - 2) - / ~ ( k - 2) m(k + l) - 1 Furthermore, < is equivalent to /~ >

km krn l + m ( k - 3) l+m(k-3)

k - 2 . So altogether for lo < k and/~ > k - 2

m(2k - 2) - #(k - 2) co~coo <-

kin

m(lo + 1 ) - 1 m(k + 2 ) - I 60/0)0 m_

lom (k + 1)m

But m(2k - 2) - #(k - 2) m(k + 2) - 1 is equivalent to

km - (k + 1)m

m(k 2 - 2 k - 2) + k #_<

(k - 2)(k + 1)

This completes the p roof of our inequalities.

It remains to show that our bounds can be achieved for/~ < (m + 3)/4 that is for k = 3 .

2m We distinguish three cases: m even and/~ < 2, m odd and # < m ~ l ' and the third

2m case which treats # > - -

- m + l "

For each of the cases we give an example for a schedule with co o = 3m and co = 4m - /~ . Fo r that we refer to figures 1-3. This completes the p roof of our theorem. [ ]

If k < lo, then

Page 7: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

Optimal Schedule

m I m I m 2m-~z m+p 2m-p m+H

0 J

2m-(m/2-11~ m+(m/2-1)R 2m-(m/2-1 m+(m/2-1 )~ 2m-m~/2 J 2m-mp/2 I

LPT-Schedule

2m-p

2m-p

2m-2p

2m-2p

m

m

m+p m+p

2m-m~/2 2m-m~/2

O i

m+(ml2-1)~ m+(m/2-1)p

m even, p ~ 2

Figure 1

Optimal Schedule

2m-p 1 m+g 2m-p m+~

I 0

2m-[m-3]~/2 J m+(m-3)p/2

2m-(m-1)~/2 1 2m-(m-1)g/2

m+(m-1)p/2 2m-(m+1]~/2 I

LPT-Schedule

2m-~ m

2m-~ m 2m-2~ I m+p

2m-(m-1)~/2 :m+(m-3)~/2 2m-Cm-1)R/2 Im+(m-3)p/2 2m-Cm+l)R/2 ~ m+Cm-1)~/2

m odd, ~ ~ 2m/(m+l)

Figure 2

Optimal Schedule

m J m J m 2m-~ j m+~

2m-( [ m/p]-I ]11 Ira+([ m/~]-1 ]I 2m-[mlp]p Jm+([m/p]-1 )~

�9 ~

2m-[ m/p] p m+ ([ m/p]-1 )~

2m-[ m/p] p 2m-[ m/M] p I

LPT-Scheduie

2m-~ m m J 2m-~ m

2m-2p m+p

2m-2~ m+p

2m-[m/pip Im+([m/p]-1)p

2m-[m/p]p Im+([m/#]-1)p

m-( [m/p ] - l )2 machines

~ 2m/(m+l)

Figure 3

Page 8: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

190 H. Kellerer

4. Final Remarks

As examples we present the upper bounds for CO/COo in the case k = 3, 4, 5:

m + 3 4 m - / z m + l /~ _< - - co/COo _< - - # _< - - CO/COo < - - - -

4 3m 2

3m + 2 6 m - 2# 2m + 1

5 4m 3

1 3 m + 5 8 m - 3 # 3 m + l

18 5m 4

5 m - 1

4m

6 m - 1

5m

7 m - 1

6m

Of course, if # --* 1, then we get the old G r a h a m bound (4m - l)/3m and if # --* m, then the LPT-heur is t ic becomes optimal. If we consider the upper bound for co/coo as a function fm of kt, we get a piecewise linear, monoton ica l decreasing curve, for which the intervals of s t rong monoton ic i ty and constance become shorter as the value o f / t increases.

Al though in general the bounds for/z > (m + 3)/4 are not achieved, we present two examples, where our bounds are tight.

The first example is for the case/1 = (m + 3)/3 and m = 3d (d e N). It is illustrated in figure 4. Similar examples are known of course for m # 3d.

Optimal Schedule

3d 5d-1 5d-1 4d+1 5d-1 4d+1

5 d - 2 1 4 d + 2 �9 ~

= (m+3)/3,

Fig~e4

LPT-schedule

5d-___] 5d-1 3d

3___Ad 3d 3d

4d+1 3 ~ 4d+1 3d

l 4d+1 3d

~ 4d ~

~/~0 = (5m-1)/4m

Page 9: Bounds for nonpreemptive scheduling of jobs with similar processing times on multiprocessor systems using the LPT-Algorithm

Bounds for Nonpreemptive Scheduling of Jobs with Similar Processing Times

The second example is g iven in f igure 5 for # = 3 a n d m = 4:

191

O p t i m a l S c h e d u l e

5 5

5 5

5 5

5 5

5 5

5 5

5

5

~ /~0 = 2 3 / 2 0

Figure 5

LPT-schedu 1 e

5 5 5 4 ]

[ 5 5 5 4

5 5 4

T o i m p r o v e o u r b o u n d s a m o r e de ta i led ana lys i s of schedules with l > 4 seems to be necessary.

References

[1] Achugbue, J. O., Chin F.: Bounds on schedules for independent tasks with similar execution times. Journal of the ACM 28, 1, 81-99 (1981).

[2] Baker, R.: Introduction to sequencing and scheduling. New York: John Wiley 1974. [3] Coffman, E. G. JR., ED.: Computer and job/shop scheduling theory. New York: John Wiley 1976. [4] Coffman, E. G., Garey, M. R., Johnson, D. S.: An application of binpacking to multiprocessor

scheduling. SIAM J. Comput. 7, 1, 1-17 (1978). [5] Graham, R. L.: Bounds on multiprocessing timing anomalies. SIAM J. Appl. Math. 17, 2, 416-429

(1969).

H. Kellerer Institut fiir Statistik, Okonometrie und Operations Research Universidit Graz Herdergasse 9 A-8010 Graz Austria