• Aucun résultat trouvé

Minimizing the volume in scheduling an outtree with communication delays and duplication

N/A
N/A
Protected

Academic year: 2021

Partager "Minimizing the volume in scheduling an outtree with communication delays and duplication"

Copied!
14
0
0

Texte intégral

(1)

HAL Id: hal-02545560

https://hal.archives-ouvertes.fr/hal-02545560

Submitted on 17 Apr 2020

HAL is a multi-disciplinary open access

archive for the deposit and dissemination of

sci-entific research documents, whether they are

pub-lished or not. The documents may come from

teaching and research institutions in France or

L’archive ouverte pluridisciplinaire HAL, est

destinée au dépôt et à la diffusion de documents

scientifiques de niveau recherche, publiés ou non,

émanant des établissements d’enseignement et de

recherche français ou étrangers, des laboratoires

Minimizing the volume in scheduling an outtree with

communication delays and duplication

Claire Hanen, Alix Munier

To cite this version:

Claire Hanen, Alix Munier. Minimizing the volume in scheduling an outtree with communication

delays and duplication. [Research Report] lip6.2001.015, LIP6. 2001. �hal-02545560�

(2)

outtree with communication delays and duplication Claire Hanen Laboratory LIP6 4, place Jussieu F-75 252 Paris cedex 05

Alix Munier Kordon

IUP Miage, university Paris 12

71, rue Saint-Simon

F-94 017 Creteil Cedex

June 5, 2001

Abstract

Weconsiderin thispap eraschedulingproblemgivenbyntasksof same pro cessing time d, an out-tree, communication delays all equal

toc d and an integer t. The problem is to nd the minimum vol-umeof a feasibleschedulewith makespant. Studying thedominance prop ertiesofsuchschedules,weprovethatthisproblemisp olynomial

using adynamic programmingalgorithm.

1 Introduction

With the recent development of parallel architectures arise a new class of

scheduling problems in which communication delays are considered. The

target machine is a set of parallel pro cessors connected by a network. A

parallel program is mo deled as usual by a directedacyclic graph, the no des

ofwhich aretasks. An arc fromtaski to taskj meansthati computesdata

that is an input for j. If these two tasks are not p erformed by the same

pro cessor, a delay must b e considered b etween the completionof i and the

b eginningof j to dispatchthe data through the network. The aimisto nd

(3)

veys [3][9]). Most of them are NP-hard evenwith very strong assumptions.

For example,ifweassume unitarypro cessing timesand unitary

communica-tion delays (UET-UCT task systems),and if in nitely many pro cessors are

available, Picouleau provedin [7] that the makespanminimizationproblem

denoted by Pjpr ec;c jk =1;p j =1jC max isNP-hard.

Taskduplicationmightb eusefultoreducethein uenceofcommunication

delays. Indeed, if a task i has several successors j 1

;:::;j k

, then p erforming

taskionkpro cessorsmayallowtheexecutionofj 1

;:::;j k

onthesepro cessors

just afteri, avoiding communicationthrough the network.

This feature also reduces the problem complexity : if communication

delays are less than or equalto the pro cessing times of the tasks, Colinand

Chretienne[4]provedthatthe makespanminimizationproblemon in nitely

many pro cessors is p olynomial. Unfortunately,if no assumption is made on

the communication delays, the problem Pjdupl ication;c jk

jC max

is NP-hard

[6]. Sothe UET-UCTassumptionseemsto b eab orderlineb etweeneasyand

hard problemsif duplication is allowed.

The main drawback concerning duplication on an unlimited numb er of

pro cessors isthat the numb erof duplicatesmayb e imp ortant. One solution

to reduce it is to x a limited numb er of pro cessors. Veltman [8] proved

that the problem without duplication Pjin tr ee;c jk = 1;p j = 1jC max is

NP-hard. But for this class of graph, duplication is useless since a taskhas

at mostone successor. Noticethat we provedin [5]that a greedy algorithm

with relativep erformanceequalto 2 1

m

may b edevelop edfor theproblem

Pjdupl ication;c jk =1;p j =1jC max .

In this pap er, we consider another way to reduce the numb er of

dupli-cations. We study the minimization of the overall numb er of duplicates (

called the volume of the schedule) for a class of feasible schedules with a

b ounded makespan t. We develop a p olynomial algorithm for tasks with

sameduration d, an out-tree and communicationdelays allequal to cd.

In the second section, we intro duce the notations and we prove several

useful dominance prop erties. In the third section, we prove a recurrence

prop erty on the de nition of the volumes. In the section 4, we prove that

we can computep olynomially these values and an optimal schedule for any

makespan t. In section 5, we present some exp erimental results. The last

(4)

Letusconsider asetT of taskswith duration d2IN 

indexed from1to jTj

and an out-tree A ro oted by task 1. 8i 2 T, A(i) denotes the sub-tree of

A ro oted by i and, if i 6= 1, p(i) denotes the unique immediate predecessor

of i in A. 8i 2 T, +

(i) is the numb er of immediate successors of i in A.

We consider that the tasks are numb ered such that, 8j 2 +

(i), i < j. We

supp ose that the value of the communicationdelays is c2IN 

with cd.

Theduplicationisallowedandthenumb erofpro cessorsisunlimited. For

anyfeasibleschedule, i

()denotesthesetofpro cessors p erformingi2T

and n i

() the numb er of executions of i. v() is the total numb erof tasks

(i.e. , originaland duplicates) of . Clearly,

v()= X i2T n i ()

This value is called the volume of . If there is no confusion,  may b e

omitted inthe notations.

8i2 T and 8t2 IN 

, we willdenote S i

(t) the set of feasibleschedule of

A(i)with completiontimeb oundedby tand V i

(t)the minimumvolumeofa

scheduleof S i

(t). WewillalsoconsiderthateveryelementfromS i

(t)veri es

the dominanceprop erty 1, 2 and 3proved inthe following. IfS i (t) =;, we setV i (t)=1. Clearly, V i (t)= min  2S i (t) v()

The aim of this pap er is to compute V 1

(t) for any t 2 IN 

and a

corre-sp onding schedule.

Property 1 The set of schedules such that :

1. for any task i> 1 with  2 i

()\ p(i)

(), if p(i) is performed by 

at time t, then i is performed by  at t+d,

2. for any task i>1with 2 i

()  p(i)

(), ifthe starting time of the

earliest execution of p(i) ist,then then i isperformedby  att+c+p,

is dominant.

Proof

(5)

i, then i can b e obviously p erformed by  at time t+d. Otherwise,

this execution of i can b e removedfrom and, if needed,executed by

another pro cessor earlier at timet+c.

2. The pro of is similarto the previous one.

Property 2 The set of schedules such that, for any task i 2 T, the

execu-tions of i are all performed at the same time denoted by t i

(), is dominant.

Proof

Let  b e a schedule whichveri es the prop erty 1. Leti b e the earliest task

with two executionsp erformed resp ectivelyat timest and t+ with >0.

Ifi=1, thenwecanobviouslyp erformallthe executionsof thero ot at time

0. So, we consideri>1.

All the executions of p(i) are p erformed at time t 0

= t d. Indeed,

if t 0

< t d, then by prop erty 1, the two considered executions of i are

p erformed by other pro cessors. So, they are p erformed simultaneously at

timet 0

+c+p.

So, the rst executionof iisp erformed at the completionof p(i) andthe

second one at timet+c. Since the rst instance ofi is p erformed at timet,

anytasksfrom +

(i)isstartedat mostat timet+d+c,whichisexactlythe

completiontimeofthesecondinstanceofi. So,thisinstancecanb eremoved

without any mo di cationon itsimmediatesuccessors.

Notice that the prop erty 2 is not true anymore if the communication

delays are not all equal to c. For example, let us consider the four tasks

T = f1;2;3;4g and the out-tree pictured by gure 1. For t = 20, the

optimumschedulehas twoexecutionsoftask2withdistinctstarting times.

The followingprop erty is a simpleconsequence ofprop erty 2 :

Property 3 The set of schedules such that,

1. for any task i, if J is the set of immediate successorsof i with 8j2J,

t j ()=t i ()+d, then n i ()=1 J=; + P i2J n j (),

2. the number of executions of any task i 2 T is bounded by the number

(6)

1

2

3

4

2

4

4

1

2

3

2

4

20

Figure1: A counterexamplefor prop erty 2

is dominant. In the following, this number of leaves will be denoted by l i

.

Proof

1. By prop erty 2, all the executions of j 2 J are p erformed at t j (), so n i ()  1 J=; + P i2J n j

(). Since the overall numb er of duplicates is

minimum,the equalityholds.

2. Weprovebyrecurrenceonthestructureofthetreethat,8i2T;n i

()

l i

.

 If task i2T isa leaf,then, by the previous equality,n i ()=1= l i ,  otherwise, by recurrence,n i ()1 J=; + P j2J l j . Since max(1 J=; ; X j2J l j ) X j2 + (i) l j

this prop erty is true.

3 A recurrence relation on the minimum

vol-umes

Theaimofthispartistoshowarecurrencerelationontheminimumvolumes.

(7)

we provethe recurrencerelation.

Letusconsiderthesmallexamplepicturedby gure2. The rstschedule

hasaminimumnumb erofduplicates. Thisexampleleadstothetwofollowing

remarks:

 Evenifthe thecompletiontimehasaminimumvalue, thereisno need

to duplicateany path fromthe ro ot to a leafto get a feasibleschedule

as thealgorithmin[4]do es. Itisclear thatthis algorithmpro ducesan

imp ortantnumb erof useless duplicates.

 Ifwe decideto not duplicatetask7,weget ascheduleofvolumeequal

to12. So, wemusthereduplicatean internalno dewithout duplicating

its predecessor. This means that the structure of solutions may b e

muchcomplicatedthan in the case where the numb er of duplicates is

not limited.

1

2

3

4

5

6

7

8

9

1

2

3

4

5

6

7

7

8

9

c = d = 1

t = 6

7 is duplicated,

but not its

predecessor.

V1(6)=10

1

2

3

4

5

6

1

2

3

7

8

9

7 is not duplicated.

This schedule is not

optimal.

(8)

i

A(i) with completiontime at most t and such that the ro ot i has at most

n executions. Wealso supp ose that S i

(n;t)is reducedto schedules verifying

the 3 previous dominance prop erties.

Clearly, S i

(n;t)S i

(n+1;t). Moreover,by prop erty 3, we get

S i (t)= [ n2IN  S i (n;t)=S i (l i ;t) where l i

denotesthe numb er ofleavesof A(i).

8n 2 f1;:::;l i

g, V i

(n;t) is the minimum volume of a schedule from

S i (n;t). Herealso, V i (n;t)V i (n+1;t), so weget V i (t)= min n2f1;:::;l i g V i (n;t)=V i (l i ;t) By convention, if S i (n;t) = ;, we set V i

(n;t) = +1. This leads to the

following lemma:

Lemma 1 If j is aleaf then 8t d, V j

(1;t)=1 and 8t<d, V j

(1;t)=+1

Now,wecan provethe following inequality :

Lemma 2 Let  2 S i

(n;t) and J be the set of immediate successors of i

beginning their executions at the completion time of i. Then,

v()1 J=; + X j2J (n j ()+V j (n j ();t d))+ X j2 + (i) J V j (l j ;t d c) Proof

Tasks (original and duplicates) from  can b e partitioned into 3sets :

 n i

() executionsof i,

 tasksfromA(j),8j2J. The volumeof thesub-scheduleof for A(j)

is then greaterthan V j

(n j

();t d).

 Tasks fromA(j),8j2 +

(i) J. Thevolumeof the sub-schedule of

forA(j)isgreaterthan V j (n j ();t d c). Byprop erty 3,n j ()l i , so V j (n j ();t d c)V j (l j ;t d c).

(9)

ity: Theorem 1 8t2IN  , 8i2T such that + (i)6=;, 8n2f1;:::;l i g, V i (n;t)= min J + (i) (1 J=; + X j2 + (i) J V j (l j ;t d c) + min n j >0; P j 2J n j n X j2J (n j +V j (n j ;t d)) Proof Let  2 S i

(n;t) b e a schedule with a minimumvolume v()= V i

(n;t). By

lemma2, V i

(n;t) is greater than the right termof the equality. If this term

is in nite,also is V i

(n;t).

Conversely,supp ose nowthatthis minimumis nite. Then,wecan build

an optimalschedule of S i

(n;t) by induction by setting :

(B) Ifiisaleaf,thenn=1. Sincethis minimumis nite,t1andp erform

one executionof i at timet.

(I) Now + (i) 6= ;. Let J   +

(i) verifying the equality and the

corre-sp onding numb er of executionsn  j >0;j 2J  . 1. p erform 1 J  =; + P j2J  n  j executionsof i at time0, 2. 8j 2J 

, startoneoptimalschedulefromS(n  j

;t d)at timedon

the samepro cessors than n  j executionsof i. 3. 8j 2 + (i) J 

, start one optimal schedule from S(l j

;t d c)

at timed+con new pro cessors.

4 Computation of the volumes

Inthis section,weprovethatthe volumesV i

(n;t)mayb ep olynomially

com-puted usingthe relationexpressed by theorem1. Firstly,we showthat only

a p olynomial numb er of timest 2 IN have to b e considered. Then, we will

intro duce somemiddlesteps for the computation of V i

(n;t). Lastly, we will

(10)

b e equal to t ;

= d + c, with ( ; ) 2 IN +

IN. Now, let us consider

t  =  d+ 

c the minimallength of a schedule of A without duplication

(this value may p olynomially computed by the algorithm of P.Chretienne

[2]). Weget t 

jTjd+(jTj 1)c.

1. 8tt 

,A mayb e scheduledwith makespant 

without any duplicate,

so V 1 (t)=V 1 (t  ). 2. 8tsuch that d t<t 

, let the greatest value t ; with t ; t. Then V i (t)=V i (t ; ).

3. If t<d, there is no feasibleschedule,so V i

(t)=1.

So, we will limit the times domain  to the values t ; with   , jTj 1and  d+  ct 

. The sizeof this domainisroughly b ounded

by jTj 2

.

ComputationofV i

(n;t) Letusconsiderataski 2T suchthat +

(i)6=;.

Wesupp osethat,foreveryj 2 + (i);8n 0 l j and8t 0 2 wehavecomputed V j (n 0 ;t 0

). The aim ishere to computeV i (n;t), 8nl i and 8t2. Let us consider + (i)= fj 1 ;:::;j j + (i)j

g the set of immediatesuccessors

ofi. 8k2f1;:::;j +

(i)jg,wewilldenotebyF i

(n;t;k)theminimumvolume

of a schedule of the subgraph A(i) A(j k +1

):::; A(j + (i)

) suchthat :

1. the makespanof  isat most t,

2. the numb erof executionsof iin  is b ounded by n,

3. there is at least one j 2 fj 1

;:::;j k

g which executions are p erformed

immediatelyat the end of i in.

Any schedule fromS i

(t;n) has eitherno successors of ip erformed at the

completiontimeof i,either at least one. So, we get :

V i (n;t)=min(F i (n;t;j + (i)j);1+ X j2 + (i) V j (l j ;t d c))

The second term of this minimum can b e easily computed. We will

present now how to compute the value F i

(n;t;k) by recurrence on k 2

f1;:::;j +

(11)

1 F i (n;t;1)= min 1mmin(n;l j 1 ) (m+V j 1 (m;t d))

 Now,letus considerk >1. Bytheorem 1and since J 6=;, we get :

F i (n;t;k+1) = min Jfj 1 ;:::j k +1 g;J6=; ( X j2fj 1 ;:::j k +1 g J V j (l j ;t d c)+ min 0<n j l j ; P j 2J n j n X j2J (n j +V j (n j ;t d)) LetJ 

b e an optimalsubset. Three cases may o ccur :

1. If j k +1

62 J 

, then there is a communicationdelay b etweeni and

j k +1 and : F i (n;t;k+1) =V j k +1 (l j k +1 ;t d c)+F i (n;t;k) 2. If J  =fj k +1 g, then F i (n;t;k+1)= X j2fj 1 ;:::;j k g V j (l j ;t d c) + min 1mmin(n;l j k +1 ) (m+V j k +1 (m;t d)) 3. Otherwise, fj k +1 gJ  and F i (n;t;k+1) = min 1m<min(n;lj k +1 ) (m+V j k +1 (m;t d)+F i (n m;t;k)) F i

(n;t;k+1) willb e obtained by gettingthe minimumof these3values.

Complexityof the algorithm Letusconsideri2T,n 2f1;:::;l i

gand

t2. ThecomplexityofthecomputationofV i (n;t)isO (j + (i)j(j + (i)j+n)).

Wededucethatthe complexityof V i (n;t);n2f1;:::;l i g isO (j + (i)j)l 2 i . So,

the complexity of the computation of every value V i (n;t) is O (jTj 3 :jj) = O (jTj 5 ).

For a xedvalue t,anoptimalscheduleasso ciatedwithV 1

(t)canb ebuilt

using a recursivealgorithmof complexityalso b ounded by O (jTj 5

(12)

For these exp eriments, we generate random trees using [1]. We observed

thatexp erimentally,duplicationdo esn'tseemto reducethe makespanofthe

optimalschedulesigni cantly and the resultspresented here are quite p o or.

Ourexplanationisthatthe structureofthe treesrandomlygenerated isvery

irregularandsuchthateveryno dehasafewnumb erofimmediatesuccessors.

For this class oftrees, the duplication do esn't allowto reducethe makespan

of the schedules.

Thefollowingtablesummarizesourexp erimentalresultsforrandomtrees

with 100 tasks.

 1 0:75 0:5 0:25 0:1

Percentageof duplication 30% 24% 20% 26% 26%

Averagevalue of improvement 4:5% 3:5% 1:4% 1:1% 0:4%

Averagemaximumvolume 138 140 135 144 140

For every value of the ratio  = c

d

, we generate 500 instances of the

schedulingproblem and we computethe following values:

1. Percentage ofduplication,ie. thep ercentageofinstancesb elonging

to the setT forwhichthe duplicationreducesthe minimummakespan

of a schedule.

2. Average value of improvement, ie. if C max

(A) (Resp. C d max

(A))

for A 2 T denotes the minimal value of a schedule of A without

(Resp. with) duplication, we computed the average value of the

ra-tio C max (A) C d max (A) C max (A) .

3. Averagemaximumvolume,ie. theaverageofthevolumeV(C d max

(A))

for everyA2T.

Noticethattheresultsareslightlyb etterfor=1. Now,wecancompare

(13)

the result for a completebinary treeof height6 (ie.,with 127 no des).

 1 0:75 0:5 0:25 0:1

Averagevalue of improvement 46% 40% 30% 17:6% 7:8%

Averagemaximumvolume 448 448 448 448 448

6 Perspectives

In this pap er, we intro duced a new objective function for scheduling with

communicationdelays inorder to reduceb oth the numb erof duplicatesand

the makespan. We proved that the minimizationof the volume for an

out-treewith equal pro cessing timesd and equal communicationdelays cd is

p olynomial. Many questions arose fromthis result, as :

 Is it p ossible to extend these results to other sp ecial classes of

prece-dence graphs ?

 Is it p ossible to use this result for minimizing the makespan for a

scheduling problemwith communicationdelays and a limitednumb er

of resources ?

References

[1] L Alonso and R Schott. Random Generation of trees. Kluwer academic

Publishers,1995.

[2] P Chretienne. A p olynomial time to optimally schedule tasks over an

idealdistributedsystemundertree-likeprecedenceconstraints. European

Journal of Operational Research,2:225{230, 1989.

[3] PChretienneandCPicouleau.Schedulingwithcommunicationdelays: a

survey. In P Chretienne, E.GCo man, J.K Lenstra, and Z Liu,editors,

Scheduling Theory and its Applications, pages 65{89. John Wiley Ltd,

(14)

delays and task duplication. Operations Research, 39:681{684, 1991.

[5] AMunierandCHanen. Usingduplicationforschedulingunitarytaskson

m pro cessors withcommunicationdelays. TheoreticalComputerScience,

(178):119{127, 1997.

[6] C Papadimitriou and M Yannakakis. Towards an architecture

inde-p endent analysis of parallel algorithms. SIAM Journal on Computing,

19:322{328, 1990.

[7] C Picouleau. Two new np-complete scheduling problems with

commu-nication delays and unlimited numb er of pro cessors. Discrete Applied

Mathematics, 60:331{342, 1995.

[8] B Veltman. Multiprocessor scheduling with communication delays. PhD

thesis, CWI-Amsterdam,1993.

[9] B Veltman, B.J. Lageweg, and J.K Lenstra. Multipro cessor scheduling

Figure

Figure 1: A counter example for prop erty 2
Figure 2: Two remarks concerning the structure of an optimal schedule

Références

Documents relatifs

11 of, roughly speaking, dividing the network into regions, determining at least one EOL terminal in each region as a breakbulk hub, and routing the traffic within the network such

Whereas, under a local FP scheduler the analysis is able to bound how many times the server for component G is suspended and resumed based on the computed

Since partitions allocated to the the same module share the overall execution time (i.e. only one partition can be executed by the module at a time), the system designer has to

Although this statement is still reductionist (that NVC activity is proportional to operator’s brain activity), this approach links the concept of human MWL and mental resources

• Relief facilities: Some of the stations in the network have the installations required by conductors who are waiting for their next trip, resting, or having a meal

3.3. Osmotic Pressure Experiments. To test our contentions from the previous section, we have performed neutron diffraction experiments on oriented multibilayers of DMPC as a

Nous proposons dans cet article un suivi en temps réel de chaque membre supérieur du corps d'une personne avec gestion de leurs occultations respectives.. Pour

The extended version of the LPP algorithm solves polynomially the determination of a feasible schedule for a unit execution time typed tasks sys- tem with arbitrary release dates