Scheduling in and out Forests in the Presence of Communication Delays
Total Page:16
File Type:pdf, Size:1020Kb
IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 7, NO. 10, OCTOBER 1996 1065 Scheduling In and Out Forests in the Presence of Communication Delays Theodora A. Varvarigou, Member, IEEE, Vwani P. Roychowdhury, Member, IEEE, Thomas Kailath, Fellow, /€E€, and Eugene Lawler Abstract-We consider the problem of scheduling tasks on multiprocessor architectures in the presence of communication delays. Given a set of dependent tasks, the schedulingproblem is to allocate the tasks to processors such that the pre-specified precedence constraints among the tasks are obeyed and certain cost-measures(such as the computation time) are minimized. Several cases of the scheduling problem have been proven to be NP-complete [16],[lo]. Nevertheless, there are polynomial time algorithms for interesting special cases of the general scheduling problem [12], [14], [lo]. Most of these results, however, do not take into consideration the delays due to message passing among processors. In this paper we study the increase in time complexity of scheduling problems due to the introduction of communication delays. In particular, we address the open problem of scheduling Out-forests (In-forests)in a multiprocessor system of m identical processors when communication delays are considered. The corresponding problem of scheduling Out-forests (In-forests) without communication delays admits an elegant polynomial time solution as presentedfirst by Hu in 1961 1121; however, the problem in the presence of communication delays has remained unsolved. We present here first known polynomial time algorithms for the computation of the optimal schedule when the number of available processors is given and bounded and both computation and communication delays are assumed to take one unit of time. Furthermore, we present a linear-time algorithm for computing a near-optimalschedulefor unit-delay out-forests. The schedule’s length exceeds the optimum by no more than (m- 2) time units, where m is the number of processors. Hence for two processors the computed schedule is strictly optimum. Index Terms-Communication delays, out-forest precedence graphs, multiprocessor architectures, out-forest precedence graphs, optimal deterministic schedules, polynomial-time algorithms. 1 INTRODUCTION E consider deterministic scheduling problems in the Nevertheless, there are polynomial time algorithms for W presence of communication delays among the proc- several interesting special cases of the general scheduling essors. The area of deterministic scheduling is of obvious problem. One of the first polynomial time algorithms was importance, and has been extensively studied since the developed by Hu [12], who presented a linear time algo- early 1950s. In most of the cases, however, the communica- rithm for computing the optimum schedule of an In-forest tion delays among processors were ignored. We study here (or Out-forest) precedence graph, for a given number of the increase in the complexity of scheduling problems due available processors. The general strategy used in this algo- to the introduction of communication delays. rithm is the highest-level-fiust strategy, modified versions of Scheduling of dependent tasks in a multiprocessor sys- which give optimal results for other scheduling problems tem is such a well studied topic that any reference to the such as for the interval oder precedence graphs 1141, [71 or for available material has to be selective. The general problem the special case where only two processors are available for of scheduling a set of n unit delay and arbitrarily depend- the computation of the tasks [6], [8]. Polynomial time algo- ent tasks on a set of m identical processors where both m rithms have been presented for the special cases of oppos- and n are variables of the problem and unbounded has ing forests 1101, [51 as well as level order 151 precedence been proven to be NP-complete [161. Moreover, the sched- graphs. uling problem remains NP-complete even in some cases of The above mentioned results and algorithms assume restricted kind of dependencies among the tasks (see 1101, that the communication delays due to message passing 1131, [191, [Ill, [91). among processors that compute dependent tasks is negligi- ble. A more realistic approach is to take communication delays into coiisideration for the computation of the opti- T.A. Varvarigou is with the Department of Electronic and Computer Engi- mal schedule. Ilowever, introducing communication delays neering, Technical University of Crete, Chania 73100, Crete. may destroy the optimality of the schedules computed for Email: [email protected]. precedence graphs without communication delays. Hence a V.P.Roychowdhury is with the Department of Electrical Engineering, new analysis of the scheduling problem is needed when Univeusit?yof Cnlifurnia at Los Angeles, Los Angeles, CA90095. T. Knilath is with the Department of Electrical Engineering, Stanford Uni- communication delays are considered. Unfortunately, the versity, Stanford, CA 94305. general scheduling problem with communication delays is E. Lnzulev was with the Department of Electrical Engineering and Com- NP-complete; this is because it is a general version of the puter Science, University of California, Berkeley. He is deceased. usual scheduling problem (i.e., without communication Manuscript received Sept. I, 1992. delays), which is NP-complete [161. The problem remains For informatioil on obtaining reprints of this article, please send e-mail to: tmnspds~computcr.org,and reference IEEECS Log Number D95195. NP-complete wen when the number of available proces- 1045-9219/96$05.00 01996 IEEE 1066 IEEE TRANSACTIONS ON PARALLEL AND DISTRIBUTED SYSTEMS, VOL. 7, NO. 10, OCTOBER 1996 sors is arbitrary (number of processors is said to be arbitrary 1.1 The Model and Results if the algorithm can use unrestricted number of processors). The general model that we are going to assume in this pa- In particular, Chretienne showed that for general prece- per is similar to the models used by other researchers (see dence graphs, and for arbitrary computational and com- [l], [SI, [lo]) and can be described as follows: The model munication delays, the problem of computing the optimal consists of m identical processors PI,P,, . ., P, where m is a schedule remains NP-complete, even if no restrictions are parameter of the problem and bounded by a constant c. imposed on the number of available processors (see [31). There exist n computational tasks TI, T,, ..., T, that can be Note that the corresponding scheduling problem with ar- executed in any of the m available processors. There is a bitrary num.ber of processors but without communication partial order among the tasks. This implies that if Ti+ TI delays admits a simple linear time algorithm [91. An even (i.e., Ti is dependent on Ti)then the computation of Tiin stronger NP-complete result was shown by Papadimitriou some processor Pj cannot start before task Tiis computed and Yannakakis in 1990. They proved that even if the com- (say in processor P,) and the results of this computation putation delays are restricted to be unit, and the communi- have been transmitted from processor PI to processor Pi. cation delays are restricted to be a positive integer t, the The partial order among the tasks introduces a precedence problem still remains NP-complete (see 1151). graph associated with the scheduling problem. The tasks {Til However, as already mentioned, there are polynomial are the nodes of the graph and we assume directed edges time algoritl~msfor different special cases of the scheduling between the nodes Ti + Ti whenever there is a dependency problem, such as In/Out forest precedence graphs, interval between tasks T,and Ti. order precedence graphs, etc., without communication de- For our purposes we shall assume that the precedence lays. The question we ask is: How does the complexity of these graph is of the Out-forest (or In-forest) form which is de- special cases change when communication delays are introduced? fined as follows: A precedence graph is an Out-Forest (In- In particula.r, we investigate the complexity of the schedul- Forest) if and only if: For every task T, there is only one task ing problem, with communication delays for the special case TI for which the dependency TI -+ Ti(Ti -+ Ti) exists. All the of In/Out forest precedence graphs. tasks are of unit computational time, i.e., it takes one unit of An atternpt to incorporate communication delays in time to compute any of the tasks TI,..., T, in any of the scheduling of general graphs was made by Colin and processors PI, ..., P,n. The processors are fully connected, Chretienne .in [4]. They consider general precedence graphs, i.e., any processor can communicate with any other proces- and they allow short communication delays, as well as du- sor. Moreover, the computation of the tasks in the proces- plication of tasks. The number of available processors is sors is independent of the communication among them. considered ito be arbitrary. Under these constraints, for each This implies that the processors can execute tasks at the task i, they propose polynomial time algorithms to compute same time that communication is taking place among them. lower boun'ds b, of the starting time of any of its copies. A The communication delay among any two processors takes first attempt to consider communication delays in In-tree unit time, i.e., it takes one unit of time for the transmission precedence graphs was made by Chretienne in [2]. He de- of the results of the computation of any task from any proc- veloped a greedy but optimal algorithm for computing the essor P, to any processor PI different than Pi. There is no optimal schLedule of In-tree precedence graphs under the communication delay involved when some task Ti and its assumptions of arbitrary number of available processors and dependent task Ti are computed in the same processor.