41
Chapter 1 Introduction to Scheduling and Load Balancing Advances in hardware and software technologies have led to increased interest in the use of large-scale parallel and distributed systems for database, real-time, defense, and large-scale commercial applications. The operating system and management of the concurrent processes constitute integral parts of the parallel and dis- tributed environments. One of the biggest issues in such systems is the development of effective techniques for the distribution of the processes of a parallel program on multiple processors. The problem is how to dis- tribute (or schedule) the processes among processing elements to achieve some performance goal(s), such as minimizing execution time, minimizing communication delays, and/or maximizing resource utilization [Casavant 1988, Polychronopoulos 1987]. From a system's point of view, this distribution choice becomes a resource management problem and should be considered an important factor during the design phases of multiprocessor systems. Process scheduling methods are typically classified into several subcategories as depicted in Figure 1.1 [Casavant 1988]. (It should be noted that throughout this manuscript the terms "job," "process," and "task" are used interchangeably.) Local scheduling performed by the operating system of a processor consists of the assignment of processes to the time-slices of the processor. Global scheduling, on the other hand, is the process of deciding where to execute a process in a multiprocessor system. Global scheduling may be carried out by a single central authority, or it may be distributed among the processing elements. In this tutorial, our focus will be on global scheduling methods, which are classified into two major groups: static scheduling and dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling, the assignment of tasks to processors is done before program execution begins. In- formation regarding task execution times and processing resources is assumed to be known at compile time. A task is always executed on the processor to which it is assigned; that is, static scheduling methods are processor nonpreemptive. Typically, the goal of static scheduling methods is to minimize the overall execu- tion time of a concurrent program while minimizing the communication delays. With this goal in mind, sta- tic scheduling methods [Lo 1988, Sarkar 1986, Shirazi 1990, Stone 1977] attempt to: • predict the program execution behavior at compile time (that is, estimate the process or task, execution times, and communication delays); • perform a partitioning of smaller tasks into coarser-grain processes in an attempt to reduce the commu- nication costs; and, • allocate processes to processors. The major advantage of static scheduling methods is that all the overhead of the scheduling process is in- curred at compile time, resulting in a more efficient execution time environment compared to dynamic sched- uling methods. However, static scheduling suffers from many disadvantages, as discussed shortly. Static scheduling methods can be classified into optimal and suboptimal. Perhaps one of the most critical shortcomings of static scheduling is that, in general, generating optimal schedules is an NP-complete prob- lem. It is only possible to generate optimal solutions in restricted cases (for example, when the execution time of all of the tasks is the same and only two processors are used). NP-completeness of optimal static schedul- ing, with or without communication cost considerations, has been proven in the literature [Chretienne 1989, Papadimitriou 1990, Sarkar 1989]. Here, we give a simple example to demonstrate the difficulties in attain- ing general optimal schedules. Assume we have n processes, with different execution times, which are to be scheduled on two process- ing elements, PEi and PE2. Since the goal of a scheduling method is to minimize the completion time of a set of processes, the scheduler must decide which process should be assigned to (or scheduled on) which PE so

Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

  • Upload
    others

  • View
    11

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Chapter 1

Introduction to Scheduling and Load Balancing

Advances in hardware and software technologies have led to increased interest in the use of large-scaleparallel and distributed systems for database, real-time, defense, and large-scale commercial applications. Theoperating system and management of the concurrent processes constitute integral parts of the parallel and dis-tributed environments. One of the biggest issues in such systems is the development of effective techniquesfor the distribution of the processes of a parallel program on multiple processors. The problem is how to dis-tribute (or schedule) the processes among processing elements to achieve some performance goal(s), such asminimizing execution time, minimizing communication delays, and/or maximizing resource utilization[Casavant 1988, Polychronopoulos 1987]. From a system's point of view, this distribution choice becomes aresource management problem and should be considered an important factor during the design phases ofmultiprocessor systems.

Process scheduling methods are typically classified into several subcategories as depicted in Figure 1.1[Casavant 1988]. (It should be noted that throughout this manuscript the terms "job," "process," and "task"are used interchangeably.) Local scheduling performed by the operating system of a processor consists of theassignment of processes to the time-slices of the processor. Global scheduling, on the other hand, is theprocess of deciding where to execute a process in a multiprocessor system. Global scheduling may be carriedout by a single central authority, or it may be distributed among the processing elements. In this tutorial, ourfocus will be on global scheduling methods, which are classified into two major groups: static scheduling anddynamic scheduling (often referred to as dynamic load balancing).

1.1 Static scheduling

In static scheduling, the assignment of tasks to processors is done before program execution begins. In-formation regarding task execution times and processing resources is assumed to be known at compile time.A task is always executed on the processor to which it is assigned; that is, static scheduling methods areprocessor nonpreemptive. Typically, the goal of static scheduling methods is to minimize the overall execu-tion time of a concurrent program while minimizing the communication delays. With this goal in mind, sta-tic scheduling methods [Lo 1988, Sarkar 1986, Shirazi 1990, Stone 1977] attempt to:

• predict the program execution behavior at compile time (that is, estimate the process or task, executiontimes, and communication delays);

• perform a partitioning of smaller tasks into coarser-grain processes in an attempt to reduce the commu-nication costs; and,

• allocate processes to processors.

The major advantage of static scheduling methods is that all the overhead of the scheduling process is in-curred at compile time, resulting in a more efficient execution time environment compared to dynamic sched-uling methods. However, static scheduling suffers from many disadvantages, as discussed shortly.

Static scheduling methods can be classified into optimal and suboptimal. Perhaps one of the most criticalshortcomings of static scheduling is that, in general, generating optimal schedules is an NP-complete prob-lem. It is only possible to generate optimal solutions in restricted cases (for example, when the execution timeof all of the tasks is the same and only two processors are used). NP-completeness of optimal static schedul-ing, with or without communication cost considerations, has been proven in the literature [Chretienne 1989,Papadimitriou 1990, Sarkar 1989]. Here, we give a simple example to demonstrate the difficulties in attain-ing general optimal schedules.

Assume we have n processes, with different execution times, which are to be scheduled on two process-ing elements, PEi and PE2. Since the goal of a scheduling method is to minimize the completion time of a setof processes, the scheduler must decide which process should be assigned to (or scheduled on) which PE so

Page 2: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Scheduling

~1f

Local

>fGlobal

1 1

>

>

fStatic

f

Optimal

>

>Sub-optimal

f

Approximate

>fHeuristic

>f| Optimal

>

i>

fDynamic

i

PhysicallyDistributed

f

Cooperative

>

>f

>

>f1 Physcany|Non-distributed

fNon-

cooperative

Sub-optimal

fApproximate

> f

Heuristic

Figure 1.1. Classification of scheduling methods [Casavant 1988].

that the overall completion time is minimized. In this case, the optimum schedule will ensure that the pro-cessing loads assigned PEi and PE2 are equal (with no unnecessary delay periods). However, this problem isNP-complete since it can be easily mapped to the well-known, NP-complete "set-partitioning" problem. Theset-partitioning problem is as follows:

Let Z be the set of integers. Given a finite set A and a "size" s(a) E Z for each aEA9 find a subset of A(that is , A') such that

X s(a) =

Because reaching optimal static schedules is an NP-complete problem, most of the research and develop-ment in this area has been focused on suboptimal solutions. These methods are classified into approximateand heuristic approaches. In approximate suboptimal static scheduling methods, the solution space issearched in either a depth-first or a breadth-first fashion. However, instead of searching the entire solutionspace for an optimal solution, the algorithm stops when a "good" (or acceptable) solution is reached.

Page 3: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Heuristic methods, as the name indicates, rely on rules-of-thumb to guide the scheduling process in theright direction to reach a "near" optimal solution. For example, the length of a critical path for a task is de-fined as the length of one of several possible longest paths from that task, through several intermediate anddependent tasks, to the end of the program. No concurrent program can complete its execution in a time pe-riod less than the length of its critical path. A heuristic scheduling method may take advantage of this fact bygiving a higher priority in the scheduling of tasks with longer critical path lengths. The idea is that by sched-uling the tasks on the critical path first, we have an opportunity to schedule other tasks around them, thusavoiding the lengthening of the critical path.

It should be noted that there is no universally accepted figure or standard for defining a "good" solution ora degree of "nearness" to an optimal solution. The researchers often use a loose lower-bound on the execu-tion time of a concurrent program (for example, the length of a critical path), and show that their method canalways achieve schedules with execution times within a factor of this lower-bound.

In addition to the NP-completeness of optimal general scheduling algorithms, static scheduling suffersfrom a wide range of problems, most notable of which are the following:

• The insufficiency of efficient and accurate methods for estimating task execution times and communi-cation delays can cause unpredictable performance degradations [Lee 1991, Wang 1991]. The compile-time estimation of the execution time of a program's tasks (or functions) is often difficult to find due toconditional and loop constructs, whose condition values or iteration counts are unknown before execu-tion. Estimating communication delays at compile time is not practical because of the run-time networkcontention delays.

• Existing task/function scheduling methods often ignore the data distribution issue. This omission causesperformance degradations due to run-time communication delays for accessing data at remote sites.

• Finally, static scheduling schemes should be augmented with a tool to provide a performance profile ofthe predicted execution of the scheduled program on a given architecture. The user can then utilize thistool to improve the schedule or to experiment with a different architecture.

The above shortcomings, as well as the existing and possible solutions to them, will be discussed in detailin the introduction section of the relevant chapters throughout this book.

1.2 Prognosis and future directions in static scheduling

Until now the focus of research in this area has been on the efficiency of scheduling algorithms. By "effi-ciency" we refer to both the efficiency of the scheduling algorithm itself and the efficiency of the schedule itgenerates. Based on our experience and evaluations [Shirazi 1990], our contention is that most of the exist-ing heuristic-based static scheduling algorithms perform comparably. Thus, the likelihood is low of findinga scheduling method that can achieve orders-of-magnitude (or even significant) improvements in performanceover the existing methods. As a result, we believe that, while this research direction must continue, effortsshould be focused on the practical applications of the developed static scheduling methods to the existing par-allel systems. This recommendation implies that we may need a whole new set of tools to support the practi-cal application of theoretic scheduling algorithms.

One such tool is a directed acyclic graph (DAG) generator. The input to a DAG generator will be a paral-lel program, written in the user's choice of language, and its output will be the DAG equivalent of the pro-gram (with proper functional dependencies, and execution-time and communication-delay estimations). Amore general question in this regard is, if we cannot estimate the execution times and communication delaysaccurately, can we still get performance via static scheduling? Preliminary results with PYRROS [ Yang 1992]show that as long as the task graph is coarse-grain and we use asynchronous communication, we can get goodperformance. Another supporting tool for static scheduling is a performance profiler. The function of a per-formance profiler tool is to read in the schedule of a parallel program on a given architecture and produce agraphical profile of the expected performance of the input program. The tool should also provide an ideal par-allelism profile of the application, giving the user an idea of the inherent parallelism in the program.

Page 4: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

1.3 Dynamic scheduling

Dynamic scheduling is based on the redistribution of processes among the processors during executiontime. This redistribution is performed by transferring tasks from the heavily loaded processors to the lightlyloaded processors (called load balancing) with the aim of improving the performance of the application[Eager 1986, Lin 1987, Shivaratri 1992, Wang 1985]. A typical load balancing algorithm is defined by threeinherent policies:

• information policy, which specifies the amount of load information made available to job placementdecision-makers;

• transfer policy, which determines the conditions under which a job should be transferred, that is, the cur-rent load of the host and the size of the job under consideration (the transfer policy may or may not in-clude task migration, that is, suspending an executing task and transferring it to another processor toresume its execution); and

• placement policy, which identifies the processing element to which a job should be transferred.

The load balancing operations may be centralized in a single processor or distributed among all the pro-cessing elements that participate in the load balancing process. Many combined policies may also exist. Forexample, the information policy may be centralized but the transfer and placement policies may be distrib-uted. In that case, all processors send their load information to a central processor and receive system load in-formation from that processor. However, the decisions regarding when and where a job should be transferredare made locally by each processor. If a distributed information policy is employed, each processing elementkeeps its own local image of the system load. This cooperative policy is often achieved by a gradient distri-bution of load information among the processing elements [Lin 1987]. Each processor passes its current loadinformation to its neighbors at preset time intervals, resulting in the dispersement of load information amongall the processing elements in a short period of time. A distributed-information policy can also be non-cooperative. Random scheduling is an example of noncooperative scheduling, in which a heavily loadedprocessor randomly chooses another processor to which to transfer a job. Random load balancing works ratherwell when the loads of all the processors are relatively high, that is, when it does not make much differencewhere a job is executed.

The advantage of dynamic load balancing over static scheduling is that the system need not be aware ofthe run-time behavior of the applications before execution. The flexibility inherent in dynamic load balanc-ing allows for adaptation to the unforeseen application requirements at run-time. Dynamic load balancing isparticularly useful in a system consisting of a network of workstations in which the primary performance goalis maximizing utilization of the processing power instead of minimizing execution time of the applications.The major disadvantage of dynamic load balancing schemes is the run-time overhead due to:

• the load information transfer among processors,• the decision-making process for the selection of processes and processors for job transfers, and• the communication delays due to task relocation itself.

1.4 Prognosis and future directions in dynamic load balancing

Up until now research and development in the dynamic load balancing area have been focused on the identi-fication and evaluation of efficient policies for information distribution, job transfers, and placement decision-making. In the future, a greater exchange of information among programmer, compiler, and operating systemis needed. In particular, we feel the emphasis will be on the development of efficient policies for load infor-mation distribution and placement decision-making, because these two areas cause most of the overhead ofdynamic load balancing. Although dynamic load balancing incurs overhead due to task transfer operations, atask transfer will not take place unless the benefits of the relocation outweigh its overhead. Thus, it is our con-tention that in the future research and development in this area will emphasize:

Page 5: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

• hybrid dynamic/static scheduling;• effective load index measures;• hierarchical system organizations with local load information distribution and local load balancing poli-

cies; and• incorporation of a set of primitive tools at the distributed operating system level, used to implement dif-

ferent load balancing policies depending on the system architecture and application requirements.

1.5 Chapter organization and overview

The three papers in this chapter provide a general overview of the fields of static scheduling and dynamicload balancing. The first paper, by Casavant and Kuhl, presents a comprehensive taxonomy of scheduling ingeneral-purpose concurrent systems. The proposed taxonomy provides the common terminology and classifi-cation mechanism necessary in addressing the scheduling problem in concurrent systems. The second paper,by Stone, is included for its historical significance in that it was one of the first papers to address the issue ofmultiprocessor scheduling. The paper makes use of the modified Ford-Fulkerson algorithm for finding max-imum flows in commodity networks to assign a program's modules in a multiprocessor system. The solutionsare discussed to the two-processor problem and its extensions to three- and n-processor problems. The lastpaper by Shivaratri, Krueger, and Singhal, focuses on the problem of the redistribution of the load of the sys-tem among its processors so that overall performance is maximized. The paper provides a good introductionand overview of dynamic scheduling, since it presents the motivations and design trade-offs for several loaddistribution algorithms; several load balancing algorithms are compared and their performances evaluated.

Bibliography

Bokhari, S. H., Assignment Problems in Parallel and Distributed Computing, Kluwer Academic Publishers, Norwell,Mass., 1987.

Bokhari, S. H., "Partitioning Problems in Parallel, Pipelined, and Distributed Computing," IEEE Trans. Computers,Vol. C-37, No. 1, Jan. 1988, pp. 48-57.

Casavant, T. L., and J. G. Kuhl, "A Taxonomy of Scheduling in General-Purpose Distributed Computing Systems," IEEETrans. Software Eng., Vol. 14, No. 2, Feb. 1988, pp. 141-154; reprinted here.

Chretienne, P., "Task Scheduling Over Distributed Memory Machines," Proc. inVl Workshop Parallel and DistributedAlgorithms, North Holland Publishers, Amsterdam, 1989.

Eager, D. L., E. D. Lazowska, and J. Zahorjan, "Adaptive Load Sharing in Homogeneous Distributed Systems," IEEETrans. Software Eng., Vol. SE-12, No. 5, May 1986, pp. 662-675.

Goscinski, A., Distributed Operating Systems, Addison-Wesley, Reading, Mass., 1992.Hummel, S. R, E. Schonberg, and L. E. Flynn, "Factoring: A Method for Scheduling Parallel Loops," Comm. ACM,

Vol. 35, No. 8, Aug. 1992, pp. 90-101.Lee, B., A. R. Hurson, and T.-Y. Feng, "A Vertically Layered Allocation Scheme for Data Flow Systems," J. Parallel

and Distributed Computing, Vol. 11, No. 3, 1991, pp. 175-187.Lewis, T. G., and H. El-Rewini, Introduction to Parallel Computing, Prentice Hall, Englewood Cliffs, N.J., 1992.Lin, F. C. H., and R. M. Keller, "The Gradient Model Load Balancing Method," IEEE Trans. Software Eng., Vol. SE-13,

No. l,Jan. 1987, pp. 32-38.Lo, V. M., "Heuristic Algorithms for Task Assignment in Distributed Systems," IEEE Trans. Computers, Vol. C-37,

No. 11, Nov. 1988, pp. 1384-1397.Papadimitriou, C, and M. Yannakakis, "Towards an Architecture-Independent Analysis of Parallel Algorithms," SIAM

J. Comput., Vol. 19, 1990, pp. 322-328.Polychronopoulos, C. D., and D. J. Kuck, "Guided Self-Scheduling: A Practical Scheduling Scheme for Parallel Super-

computers," IEEE Trans. Computers, Vol. C-36, No. 12, Dec. 1987, pp. 1425-1439.Polychronopoulos, C. D., Parallel Programming and Compilers, Kluwer Academic Publishers, Norwell, Mass., 1988.Sarkar, V., and J. Hennessy, "Compile-Time Partitioning and Scheduling of Parallel Programs," Symp. Compiler Con-

struction, ACM Press, New York, N.Y., 1986, pp. 17-26.Sarkar, V., Partitioning and Scheduling Parallel Programs for Multiprocessors, MIT Press, Cambridge, Mass., 1989.Shirazi, B., M. Wang, and G. Pathak, "Analysis and Evaluation of Heuristic Methods for Static Task Scheduling," J. Par-

allel and Distributed Computing, Vol. 10, 1990, pp. 222-232.

Page 6: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Shirazi, BM and A. R. Hurson, eds., Proc. Hawaii Intl Conf. Systems Sciences, Special Software Track on "Schedul-ing and Load Balancing/' Vol. 2, IEEE CS Press, Los Alamitos, Calif., 1993, pp. 484-486.

Shirazi, B., and A. R. Hurson,, eds., J. Parallel and Distributed Computing, Special Issue on "Scheduling and Load Bal-ancing," Vol. 16, No. 4, Dec. 1992.

Shivaratri, N. G., P. Kreuger, and M. Singhal, "Load Distributing for Locally Distributed Systems," Computer, Vol. 25,No. 12, Dec. 1992, pp. 33-44; reprinted here.

Stone, H. S.,"Multiprocessor Scheduling with the Aid of Network Flow Algorithms," IEEE Trans. Software Eng.,Vol. SE-3, No. 1, Jan. 1977, pp. 85-93; reprinted here.

Wang, M, et al., "Accurate Communication Cost Estimation in Static Task Scheduling," Proc. 24th Ann. Hawaii InflConf. System Sciences, Vol. I, IEEE CS Press, Los Alamitos, Calif., 1991, pp. 10-16.

Wang, Y.-T., and R. J. T. Morris, "Load Sharing in Distributed Systems," IEEE Trans. Computers, Vol. C-34, No. 3, Mar.1985, pp. 204-217.

Xu, J., and K. Hwang, "Dynamic Load Balancing for Parallel Program Execution on a Message-Passing Multicomputer,"Proc. 2nd IEEE Symp. Parallel and Distributed Processing, IEEE CS Press, Los Alamitos, Calif., 1990, pp. 402-406.

Yang, T., and A. Gerasoulis, "PYRROS: Static Task Scheduling and Code Generation for Message Passing Multi-processors," Proc. 6thACMInt'l Conf. Supercomputing (ICS92), ACM Press, New York, N.Y., 1992, pp. 428-437.

Page 7: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

A Taxonomy of Scheduling in General-PurposeDistributed Computing Systems

THOMAS L. CASAVANT, MEMBER, IEEE, AND JON G. KUHL, MEMBER, IEEE

Abstract—-One measure of usefulness of a general-purpose distrib-uted computing system is the system's ability to provide a level of per-formance commensurate to the degree of multiplicity of resources pres-ent in the system. Many different approaches and metrics ofperformance have been proposed in an attempt to achieve this goal inexisting systems. In addition, analogous problem formulations exist inother fields such as control theory, operations research, and produc-tion management. However, due to the wide variety of approaches tothis problem, it is difficult to meaningfully compare different systemssince there is no uniform means for qualitatively or quantitatively eval-uating them. It is difficult to successfully build upon existing work oridentify areas worthy of additional effort without some understandingof the relationships between past efforts. In this paper, a taxonomy ofapproaches to the resource management problem is presented in anattempt to provide a common terminology and classification mecha-nism necessary in addressing this problem. The taxonomy, while pre-sented and discussed in terms of distributed scheduling, is also appli-cable to most types of resource management. As an illustration of theusefulness of the taxonomy an annotated bibliography is given whichclassifies a large number of distributed scheduling approaches accord-ing to the taxonomy.

Index Terms—Distributed operating systems, distributed resourcemanagement, general-purpose distributed computing systems, sched-uling, task allocation, taxonomy.

I. INTRODUCTION

THE study of distributed computing has grown to in-clude a large range of applications [16], [17], [31],

[32], [37], [54], [55]. However, at the core of all the ef-forts to exploit the potential power of distributed com-putation are issues related to the management and allo-cation of system resources relative to the computationalload of the system. This is particularly true of attempts toconstruct large general-purpose multiprocessors [3], [8],[25], [26], [44]-[46], [50], [61], [67].

The notion that a loosely coupled collection of proces-sors could function as a more powerful general-purposecomputing facility has existed for quite some time. A largebody of work has focused on the problem of managing theresources of a system in such a way as to effectively ex-ploit this power. The result of this effort has been the pro-

Manuscript received August 30, 1985.T. L. Casavant was with the Department of Electrical and Computer

Engineering, University of Iowa, Iowa City, IA 52242. He is now with theSchool of Electrical Engineering, Purdue University, West Lafayette, IN47907.

J. G. Kuhl is with the Department of Electrical and Computer Engi-neering, University of Iowa, Iowa City, IA 52242.

IEEE Log Number 8718386.

posal of a variety of widely differing techniques and meth-odologies for distributed resource management. Alongwith these competing proposals has come the inevitableproliferation of inconsistent and even contradictory ter-minology, as well as a number of slightly differing prob-lem formulations, assumptions, etc. Thus, if is difficult toanalyze the relative merits of alternative schemes in ameaningful fashion. It is also difficult to focus commoneffort on approaches and areas of study which seem mostlikely to prove fruitful.

This paper attempts to tie the area of distributed sched-uling together under a common, uniform set of terminol-ogy. In addition, a taxonomy is given which allows theclassification of distributed scheduling algorithms accord-ing to a reasonably small set of salient features. This al-lows a convenient means of quickly describing the centralaspects of a particular approach, as well as a basis forcomparison of commonly classified schemes.

Earlier work has attempted to classify certain aspectsof the scheduling problem. In [9], Casey gives the basisof a hierarchical categorization. The taxonomy presentedhere agrees with the nature of Casey's categorization.However, a large number of additional fundamental dis-tinguishing features are included which differentiate be-tween existing approaches. Hence, the taxonomy givenhere provides a more detailed and complete look at thebasic issues addressed in that work. Such detail is deemednecessary to allow meaningful comparisons of differentapproaches. In contrast to the taxonomy of Casey, Wang[65] provides a taxonomy of load-sharing schemes.Wang's taxonomy succinctly describes the range of ap-proaches to the load-sharing problem. The categorizationpresented describes solutions as being either source ini-tiative or server initiative. In addition, solutions are char-acterized along a continuous range according to the de-gree of information dependency involved. The taxonomypresented here takes a much broader view of the distrib-uted scheduling problem in which load-sharing is only oneof several possible basic strategies available to a systemdesigner. Thus the classifications discussed by Wang de-scribe only a narrow category within the taxonomy.

Among existing taxonomies, one can find examples offlat and hierarchical classification schemes. The taxon-omy proposed here is a hybrid of these two—hierarchicalas long as possible in order to reduce the total number ofclasses, and flat when the descriptors of the system maybe chosen in an arbitrary order. The levels in the hier-

Reprinted from IEEE Trans, on Software Eng., vol. 14, no. 2, Feb. 1988, pp. 141-154.

Page 8: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

archy have been chosen in order to keep the descriptionof the taxonomy itself small, and do not necessarily re-flect any ordering of importance among characteristics. Inother words, the descriptors comprising the taxonomy donot attempt to hierarchically order the characteristics ofscheduling systems from more to less general. This pointshould be stressed especially with respect to the position-ing of the flat portion of the taxonomy near the bottom ofthe hierarchy. For example, load balancing is a charac-teristic which pervades a large number of distributedscheduling systems, yet for the sake of reducing the sizeof the description of the taxonomy, it has been placed inthe flat portion of the taxonomy and, for the sake of brev-ity, the flat portion has been placed near the bottom of thehierarchy.

The remainder of the paper is organized as follows. InSection II, the scheduling problem is defined as it appliesto distributed resource management. In addition, a tax-onomy is presented which serves to allow qualitative de-scription and comparison of distributed scheduling sys-tems. Section III will present examples from the literatureto demonstrate the use of the taxonomy in qualitativelydescribing and comparing existing systems. Section IVpresents a discussion of issues raised by the taxonomy andalso suggests areas in need of additional work.

In addition to the work discussed in the text of the pa-per, an extensive annotated bibliography is given in anAppendix. This Appendix further demonstrates the effec-tiveness of the taxonomy in allowing standardized de-scription of existing systems.

II. THE SCHEDULING PROBLEM AND DESCRIBING ITS

SOLUTIONS

The general scheduling problem has been described anumber of times and in a number of different ways in theliterature [12], [22], [63] and is usually a restatement ofthe classical notions of job sequencing [13] in the studyof production management [7]. For the purposes of dis-tributed process scheduling, we take a broader view of thescheduling function as a resource management resource.This management resource is basically a mechanism orpolicy used to efficiently and effectively manage the ac-cess to and use of a resource by its various consumers.Hence, we may view every instance of the schedulingproblem as consisting of three main components.

1) Consumers).2) Resource(s).3) Policy.

Like other management or control problems, understand-ing the functioning of a scheduler may best be done byobserving the effect it has on its environment. In this case,one can observe the behavior of the scheduler in terms ofhow the policy affects the resources and consumers. Notethat although there is only one policy, the scheduler maybe viewed in terms of how it affects either or both re-sources and consumers. This relationship between thescheduler, policies, consumers, and resources is shown inFig. 1.

Coniumtn

scheduler

policy Resources

Fig. 1. Scheduling system.

In light of this description of the scheduling problem,there are two properties which must be considered in eval-uating any scheduling system 1) the satisfaction of theconsumers with how well the scheduler manages the re-source in question (performance), and 2) the satisfactionof the consumers in terms of how difficult or costly it isto access the management resource itself (efficiency). Inother words, the consumers want to be able to quickly andefficiently access the actual resource in question, but donot desire to be hindered by overhead problems associatedwith using the management function itself.

One by-product of this statement of the general sched-uling problem is the unification of two terms in commonuse in the literature. There is often an implicit distinctionbetween the terms scheduling and allocation. However,it can be argued that these are merely alternative formu-lations of the same problem, with allocation posed interms of resource allocation (from the resources* point ofview), and scheduling viewed from the consumer's pointof view. In this sense, allocation and scheduling aremerely two terms describing the same general mecha-nism, but described from different viewpoints.

A. The Classification SchemeThe usefulness of the four-category taxonomy of com-

puter architecture presented by Flynn [20] has been welldemonstrated by the ability to compare systems throughtheir relation to that taxonomy. The goal of the taxonomygiven here is to provide a commonly accepted set of termsand to provide a mechanism to allow comparison of pastwork in the area of distributed scheduling in a qualitativeway. In addition, it is hoped that the categories and theirrelationships to each other have been chosen carefullyenough to indicate areas in need of future work as well asto help classify future work.

The taxonomy will be kept as small as possible by pro-ceeding in a hierarchical fashion for as long as possible,but some choices of characteristics may be made indepen-dent of previous design choices, and thus will be specifiedas a set of descriptors from which a subset may be chosen.The taxonomy, while discussed and presented in terms ofdistributed process scheduling, is applicable to a largerset of resources. In fact, the taxonomy could usefully beemployed to classify any set of resource management sys-tems. However, we will focus our attention on the areaof process management since it is in this area which wehope to derive relationships useful in determining poten-tial areas for future work.

1) Hierarchical Classification: The structure of the hi-erarchical portion pf the taxonomy is shown in Fig. 2. Adiscussion of the hierarchical portion then follows.

8

Page 9: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

local

optimal

heuristic

Fig. 2. Task scheduling characteristics.

a) Local Versus Global: At the highest level, wemay distinguish between local and global scheduling. Lo-cal scheduling is involved with the assignment of pro-cesses to the time-slices of a single processor. Since thearea of scheduling on single-processor systems [12], [62]as well as the area of sequencing or job-shop scheduling[13], [18] has been actively studied fora number of years,this taxonomy will focus on global scheduling. Globalscheduling is the problem of deciding where to execute aprocess, and the job of local scheduling is left to the op-erating system of the processor to which the process isultimately allocated. This allows the processors in a mul-tiprocessor increased autonomy while reducing the re-sponsibility (and consequently overhead) of the globalscheduling mechanism. Note that this does not imply thatglobal scheduling must be done by a single central au-thority, but rather, we view the problems of local andglobal scheduling as separate issues, and (at least logi-cally) separate mechanisms are at work solving each.

b) Static Versus Dynamic: The next level in the hi-erarchy (beneath global scheduling) is a choice betweenstatic and dynamic scheduling. This choice indicates thetime at which the scheduling or assignment decisions aremade.

In the case of static scheduling, information regardingthe total mix of processes in the system as well as all theindependent subtasks involved in a job or task force [26],[44] is assumed to be available by the time the programobject modules are linked into load modules. Hence, eachexecutable image in a system has a static assignment to aparticular processor, and each time that process image issubmitted for execution, it is assigned to that processor.A more relaxed definition of static scheduling may in-clude algorithms that schedule task forces for a particularhardware configuration. Over a period of time, the topol-ogy of the system may change, but characteristics de-scribing the task force remain the same. Hence, thescheduler may generate a new assignment of processes to

processors to serve as the schedule until the topologychanges again.

Note here that the term static scheduling as used in thispaper has the same meaning as deterministic schedulingin [22] and task scheduling in [56]. These alternativeterms will not be used, however, in an attempt to developa consistent set of terms and taxonomy.

c) Optimal Versus Sub optimal: In the case that allinformation regarding the state of the system as well asthe resource needs of a process are known, an optimalassignment can be made based on some criterion function[5], [14], [21], [35], [40], [48]. Examples of optimizationmeasures are minimizing total process completion time,maximizing utilization of resources in the system, ormaximizing system throughput. In the event that theseproblems are computationally infeasible, suboptimal so-lutions may be tried [2], [34], [47]. Within the realm ofsuboptimal solutions to the scheduling problem, we maythink of two general categories.

d) Approximate Versus Heuristic: The first is to usethe same formal computational model for the algorithm,but instead of searching the entire solution space for anoptimal solution, we are satisfied when we find a "good"one. We will categorize these solutions as suboptimal-ap-proximate. The assumption that a good solution can berecognized may not be so insignificant, but in the caseswhere a metric is available for evaluating a solution, thistechnique can be used to decrease the time taken to findan acceptable solution (schedule). The factors which de-termine whether this approach is worthy of pursuit in-clude:

1) Availability of a function to evaluate a solution.2) The time required to evaluate a solution.3) The ability to judge according to some metric the

value of an optimal solution.4) Availability of a mechanism for intelligently prun-

ing the solution space.The second branch beneath the suboptimal category is

Page 10: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

labeled heuristic [IS], [30], [66]. This branch representsthe category of static algorithms which make the most re-alistic assumptions about a priori knowledge concerningprocess and system loading characteristics. It also repre-sents the solutions to the static scheduling problem whichrequire the most reasonable amount of time and other sys-tem resources to perform their function. The most distin-guishing feature of heuristic schedulers is that they makeuse of special parameters which affect the system in in-direct ways. Often, the parameter being monitored is cor-related to system performance in an indirect instead of adirect way, and this alternate parameter is much simplerto monitor or calculate. For example, clustering groupsof processes which communicate heavily on the same pro-cessor and physically separating processes which wouldbenefit from parallelism [52] directly decreases the over-head involved in passing information between processors,while reducing the interference among processes whichmay run without synchronization with one another. Thisresult has an impact on the overall service that users re-ceive, but cannot be directly related (in a quantitative way)to system performance as the user sees it. Hence, our in-tuition, if nothing else, leads us to believe that taking theaforementioned actions when possible will improve sys-tem performance. However, we may not be able to provethat a first-order relationship between the mechanism em-ployed and the desired result exists.

e) Optimal and Suboptimal Approximate Tech-niques: Regardless of whether a static solution is optimalor suboptimal-approximate, there are four basic catego-ries of task allocation algorithms which can be used toarrive at an assignment of processes to processors.

1) Solution space enumeration and search [48].2) Graph theoretic [4], [57], [58].3) Mathematical programming [5], [14], [21], [35],

[40].4) Queueing theoretic [10], [28], [29].

/ ) Dynamic Solutions: In the dynamic schedulingproblem, the more realistic assumption is made that verylittle a priori knowledge is available about the resourceneeds of a process. It is also unknown in what environ-ment the process will execute during its lifetime. In thestatic case, a decision is made for a process image beforeit is ever executed, while in the dynamic case no decisionis made until a process begins its life in the dynamic en-vironment of the system. Since it is the responsibility ofthe running system to decide where a process is to exe-cute, it is only natural to next ask where the decision itselfis to be made.

g) Distributed Versus Nondistributed: The next is-sue (beneath dynamic solutions) involves whether the re-sponsibility for the task of global dynamic schedulingshould physically reside in a single processor [44] (phys-ically nondistributed) or whether the work involved inmaking decisions should be physically distributed amongthe processors [17]. Here the concern is with the logicalauthority of the decision-making process.

h) Cooperative Versus Noncooperative: Within therealm of distributed dynamic global scheduling, we may

also distinguish between those mechanisms which involvecooperation between the distributed components (coop-erative) and those in which the individual processors makedecisions independent of the actions of the other proces-sors (noncooperative). The question here is one of the de-gree of autonomy which each processor has in determin-ing how its own resources should be used. In thenoncooperative case individual processors act alone as au-tonomous entities and arrive at decisions regarding the useof their resources independent of the effect of their deci-sion on the rest of the system. In the cooperative case eachprocessor has the responsibility to carry out its own por-tion of the scheduling task, but all processors are workingtoward a common system*wide goal. In other words, eachprocessor's local operating system is concerned withmaking decisions in concert with the other processors inthe system in order to achieve some global goal, insteadof making decisions based on the way in which the deci-sion will affect local performance only. As in the staticcase, the taxonomy tree has reached a point where wemay consider optimal, suboptimal-approximate, and sub-optimal-heuristic solutions. The same discussion as waspresented for the static case applies here as well.

In addition to the hierarchical portion of the taxonomyalready discussed, there are a number of other distin-guishing characteristics which scheduling systems mayhave. The following sections will deal with characteris-tics which do not fit uniquely under any particular branchof the tree-structured taxonomy given thus far, but arestill important in the way that they describe the behaviorof a scheduler. In other words, the following could bebranches beneath several of the leaves shown in Fig. 2and in the interest of clarity are not repeated under eachleaf, but are presented here as a flat extension to thescheme presented thus far. It should be noted that theseattributes represent a set of characteristics, and any par-ticular scheduling subsystem may possess some subset ofthis set. Finally, the placement of these characteristicsnear the bottom of the tree is not intended to be an indi-cation of their relative importance or any other relation toother categories of the hierarchical portion. Their positionwas determined primarily to reduce the size of the de-scription of the taxonomy.

2) Flat Classification Characteristics:a) Adaptive Versus Nonadaptive: An adaptive solu-

tion to the scheduling problem is one in which the algo-rithms and parameters used to implement the schedulingpolicy change dynamically according to the previous andcurrent behavior of the system in response to previous de-cisions made by the scheduling system. An example ofsuch an adaptive scheduler would be one which takesmany parameters into consideration in making its deci-sions [52]. In response to the behavior of the system, thescheduler may start to ignore one parameter or reduce theimportance of that parameter if it believes that parameteris either providing information which is inconsistent withthe rest of the inputs or is not providing any informationregarding the change in system state in relation to the val-ues of the other parameters being observed. A second ex-

10

Page 11: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

ample of adaptive scheduling would be one which is basedon the stochastic learning automata model [39]. An anal-ogy may be drawn here between the notion of an adaptivescheduler and adaptive control [38], although the useful-ness of such an analogy for purposes of performance anal-ysis and implementation are questionable [51]. In contrastto an adaptive scheduler, a nonadaptive scheduler wouldbe one which does not necessarily modify its basic controlmechanism on the basis of the history of system activity.An example would be a scheduler which always weighsits inputs in the same way regardless of the history of thesystem's behavior.

b) Load Balancing: This category of policies, whichhas received a great deal of attention recently [10], [11],[36], [40]-[42], [46], [53], approaches the problem withthe philosophy that being fair to the hardware resourcesof the system is good for the users of that system. Thebasic idea is to attempt to balance (in some sense) the loadon all processors in such a way as to allow progress byall processes on all nodes to proceed at approximatelythe same rate. This solution is most effective when thenodes of a system are homogeneous since this allows allnodes to know a great deal about the structure of the othernodes. Normally, information would be passed about thenetwork periodically or on demand [1], [60] in order toallow all nodes to obtain a local estimate concerning theglobal state of the system. Then the nodes act together inorder to remove work from heavily loaded nodes and placeit at lightly loaded nodes. This is a class of solutions whichrelies heavily on the assumption that the information ateach node is quite accurate in order to prevent processesfrom endlessly being circulated about the system withoutmaking much progress. Another concern here is decidingon the basic unit used to measure the load on individualnodes.

As was pointed out in Section I, the placement of thischaracteristic near the bottom of the hierarchy in the flatportion of the taxonomy is not related to its relative im-portance or generality compared with characteristics athigher levels. In fact, it might be observed that at the pointthat a choice is made between optimal and suboptimalcharacteristics, that a specific objective or cost functionmust have already been made. However, the purpose ofthe hierarchy is not so much to describe relationships be-tween classes of the taxonomy, but to reduce the size ofthe overall description of the taxonomy so as to make itmore useful in comparing different approaches to solvingthe scheduling problem.

c) Bidding: In this class of policy mechanisms, abasic protocol framework exists which describes the wayin which processes are assigned to processors. The re-sulting scheduler is one which is usually cooperative inthe sense that enough information is exchanged (betweennodes with tasks to execute and nodes which may be ableto execute tasks) so that an assignment of tasks to proces-sors can be made which is beneficial to all nodes in thesystem as a whole.

To illustrate the basic mechanism of bidding, theframework and terminology of [49] will be used. Each

node in the network is responsible for two roles with re-spect to the bidding process: manager and contractor. Themanager represents the task in need of a location to exe-cute, and the contractor represents a node which is ableto do work for other nodes. Note that a single node takeson both of these roles, and that there are no nodes whichare strictly managers or contractors alone. The managerannounces the existence of a task in need of execution bya task announcement, then receives bids from the othernodes (contractors). A wide variety of possibilities existconcerning the type and amount of information exchangedin order to make decisions [53], [59]. The amount andtype of information exchanged are the major factors indetermining the effectiveness and performance of a sched-uler employing the notion of bidding. A very importantfeature of this class of schedulers is that all nodes gener-ally have full autonomy in the sense that the manager ul-timately has the power to decide where to send a task fromamong those nodes which respond with bids. In addition,the contractors are also autonomous since they are neverforced to accept work if they do not choose to do so.

d) Probabilistic: This classification has existed inscheduling systems for some time [13]. The basic idea forthis scheme is motivated by the fact that in many assign-ment problems the number of permutations of the avail-able work and the number of mappings to processors solarge, that in order to analytically examine the entire so-lution space would require a prohibitive amount of time.

Instead, the idea of randomly (according to some knowndistribution) choosing some process as the next to assignis used. Repeatedly using this method, a number of dif-ferent schedules may be generated, and then this set isanalyzed to choose the best from among those randomlygenerated. The fact that an important attribute is used tobias the random choosing process would lead one to ex-pect that the schedule would be better than one chosenentirely at random. The argument that this method ac-tually produces a good selection is based on the expecta-tion that enough variation is introduced by the randomchoosing to allow a good solution to get into the randomlychosen set.

An alternative view of probabilistic schedulers are thosewhich employ the principles of decision theory in the formof team theory [24]. These would be classified as proba-bilistic since suboptimal decisions are influenced by priorprobabilities derived from best-guesses to the actual statesof nature. In addition, these prior probabilities are usedto determine (utilizing some random experiment) the nextaction (or scheduling decision).

e) One-Time Assignment Versus Dynamic Reassign-ment: In this classification, we consider the entities to bescheduled. If the entities areyofos in the traditional batchprocessing sense of the term [19], [23], then we considerthe single point in time in which a decision is made as towhere and when the job is to execute. While this tech-nique technically corresponds to a dynamic approach, itis static in the sense that once a decision is made to placeand execute a job, no further decisions are made concern-ing the job. We would characterize this class as one-time

11

Page 12: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

assignments. Notice that in this mechanism, the only in-formation usable by the scheduler to make its decision isthe information given it by the user or submitter of thejob. This information might include estimated executiontime or other system resource demands. One critical pointhere is the fact that once users of a system understand theunderlying scheduling mechanism, they may present falseinformation to the system in order to receive better re-sponse. This point fringes on the area of psychologicalbehavior, but human interaction is an important designfactor to consider in this case since the behavior of thescheduler itself is trying to mimic a general philosophy.Hence, the interaction of this philosophy with the sys-tem's users must be considered.

In contrast, solutions in the dynamic reassignment classtry to improve on earlier decisions by using informationon smaller computation units—the executing subtasks ofjobs or task forces. This category represents the set ofsystems which 1) do not trust their users to provide ac-curate descriptive information, and 2) use dynamicallycreated information to adapt to changing demands of userprocesses. This adaptation takes the form of migratingprocesses (including current process state information).There is clearly a price to be paid in terms of overhead,and this price must be carefully weighed against possiblebenefits.

An interesting analogy exists between the differentia-tion made here and the question of preemption versusnonpreemption in uniprocessor scheduling systems. Here,the difference lies in whether to move a process from oneplace to another once an assignment has been made, whilein the uniprocessor case the question is whether to removethe running process from the processor once a decisionhas been made to let it run.

III. EXAMPLES

In this section, examples will be taken from the pub-lished literature to demonstrate their relationships to oneanother with respect to the taxonomy detailed in SectionII. The purpose of this section is twofold. The first is toshow that many different scheduling algorithms can fit intothe taxonomy and the second is to show that the categoriesof the taxonomy actually correspond, in most cases, tomethods which have been examined.

A. Global Static

In [48], we see an example of an optimal, enumerativeapproach to the task assignment problem. The criterionfunction is defined in terms of optimizing the amount oftime a task will require for all interprocess communica-tion and execution, where the tasks submitted by users areassumed to be broken into suitable modules before exe-cution. The cost function is called a minimax criterionsince it is intended to minimize the maximum executionand communication time required by any single processorinvolved in the assignment. Graphs are then used to rep-resent the module to processor assignments and the as-

signments are then transformed to a type of graph match-ing known as weak homomorphisms. The optimal searchof this solution space can then be done using the A* al-gorithm from artificial intelligence [43]. The solution alsoachieves a certain degree of processor load balancing aswell.

Reference [4] gives a good demonstration of the use-fulness of the taxonomy in that the paper describes thealgorithm given as a solution to the optimal dynamic as-signment problem for a two processor system. However,in attempting to make an objective comparison of this pa-per with other dynamic systems, we see that the algorithmproposed is actually a static one. In terms of the taxonomyof Section II, we would categorize this as a static, opti-mal, graph theoretical approach in which the a priori as-sumptions are expanded to include more information aboutthe set of tasks to be executed. The way in which reas-signment of tasks is performed during process executionis decided upon before any of the program modules beginexecution. Instead of making reassignment decisions dur-ing execution, the stronger assumption is simply made thatall information about the dynamic needs of a collection ofprogram modules is available a priori. This assumptionsays that if a collection of modules possess a certain com-munication pattern at the beginning of their execution, andthis pattern is completely predictable, that this pattern maychange over the course of execution and that these vari-ations are predictable as well. Costs of relocation are alsoassummed to be available, and this assumption appears tobe quite reasonable.

The model presented in [33] represents an example ofan optimum mathematical programming formulation em-ploying a branch and bound technique to search the so-lution space. The goals of the solution are to minimizeinterprocessor communications, balance the utilization ofall processors, and satisfy all other engineering applica-tion requirements. The model given defines a cost func-tion which includes interprocessor communication costsand processor execution costs. The assignment is thenrepresented by a set of zero-one variables, and the totalexecution cost is then represented by a summation of allcosts incurred in the assignment. In addition to the above,the problem is subject to constraints which allow the so-lution to satisfy the load balancing and engineering ap-plication requirements. The algorithm then used to searchthe solution space (consisting of all potential assign-ments) is derived from the basic branch and bound tech-nique.

Again, in [10], we see an example of the use of thetaxonomy in comparing the proposed system to other ap-proaches. The title of the paper—"Load Balancing inDistributed Systems*'—indicates that the goal of the so-lution is to balance the load among the processors in thesystem in some way. However, the solution actually fitsinto the static, optimal, queueing theoretical class. Thegoal of the solution is to minimize the execution time ofthe entire program to maximize performance and the al-gorithm is derived from results in Markov decision the-

12

Page 13: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

ory. In contrast to the definition of load balancing givenin Section II, where the goal was to even the load andutilization of system resources, the approach in this paperis consumer oriented.

An interesting approximate mathematical programmingsolution, motivated from the viewpoint of fault-tolerance,is presented in [2]. The algorithm is suggested by thecomputational complexity of the optimal solution to thesame problem. In the basic solution to a mathematicalprogramming problem, the state space is either implicitlyor explicitly enumerated and searched. One approxima-tion method mentioned in this paper [64] involves firstremoving the integer constraint, solving the continuousoptimization problem, discretizing the continuous solu-tion, and obtaining a bound on the discretization error.Whereas this bound is with respect to the continuous op-timum, the algorithm proposed in this paper directly usesan approximation to solve the discrete problem and boundits performance with respect to the discrete optimum.

The last static example to be given here appears in [66].This paper gives a heuristic-based approach to the prob-lem by using extractable data and synchronization re-quirements of the different subtasks. The three primaryheuristics used are:

1) loss of parallelism,2) synchronization,3) data sources.

The way in which loss of parallelism is used is to assigntasks to nodes one at a time in order to affect the least lossof parallelism based on the number of units required forexecution by the task currently under consideration. Thesynchronization constraints are phrased in terms of firingconditions which are used to describe precedence rela-tionships between subtasks. Finally, data source infor-mation is used in much the same way a functional pro-gram uses precedence relations between parallel portionsof a computation which take the roles of varying classesof suppliers of variables to other subtasks. The final heu-ristic algorithm involves weighting each of the previousheuristics, and combining them. A distinguishing featureof the algorithm is its use of a greedy approach to find asolution, when at the time decisions are made, there canbe no guarantee that a decision is optimal. Hence, an op-timal solution would more carefully search the solutionspace using a back track or branch and bound method, aswell as using exact optimization criterion instead of theheuristics suggested.

B. Global Dynamic

Among the dynamic solutions presented in the litera-ture, the majority fit into the general category of physi-cally distributed, cooperative, suboptimal, heuristic.There are, however, examples for some of the otherclasses.

First, in the category of physically nondistributed, oneof the best examples is the experimental system developedfor the Cm* architecture—Medusa [44]. In this system,the functions of the operating system (e.g., file system,

scheduler) are physically partitioned and placed at differ-ent places in the system. Hence, the scheduling functionis placed at a particular place and is accessed by all usersat that location.

Another rare example exists in the physically distrib-uted noncooperative class. In this example [27], randomlevel-order scheduling is employed at all nodes indepen-dently in a tightly coupled MIMD machine. Hence, theoverhead involved in this algorithm is minimized since noinformation need be exchanged to make random deci-sions. The mechanism suggested is thought to work bestin moderate to heavily loaded systems since in these cases,a random policy is thought to give a reasonably balancedload on all processors. In contrast to a cooperative solu-tion, this algorithm does not detect or try to avoid systemoverloading by sharing loading information among pro-cessors, but makes the assumption that it will be underheavy load most of the time and bases all of its decisionson that assumption. Clearly, here, the processors are notnecessarily concerned with the utilization of their own re-sources, but neither are they concerned with the effecttheir individual decisions will have on the other proces-sors in the system.

It should be pointed out that although the above twoalgorithms (and many others) are given in terms relatingto general-purpose distributed processing systems, thatthey do not strictly adhere to the definition of distributeddata processing system as given in [17].

In [57], another rare example exists in the form of aphysically distributed, cooperative, optimal solution in adynamic environment. The solution is given for the two-processor case in which critical load factors are calculatedprior to program execution. The method employed is touse a graph theoretical approach to solving for load fac-tors for each process on each processor. These load fac-tors are then used at run time to determine when a taskcould run better if placed on the other processor.

The final class (and largest in terms of amount of ex-isting work) is the class of physically distributed, coop-erative, suboptimal, heuristic solutions.

In [S3] a solution is given which is adaptive, load bal-ancing, and makes one-time assignments of jobs to pro-cessors. No a priori assumptions are made about the char-acteristics of the jobs to be scheduled. One majorrestriction of these algorithms is the fact that they onlyconsider assignment of jobs to processors and once a jobbecomes an active process, no reassignment of processesis considered regardless of the possible benefit. This isvery defensible, though, if the overhead involved in mov-ing a process is very high (which may be the case in manycircumstances). Whereas this solution cannot exactly beconsidered as a bidding approach, exchange of informa-tion occurs between processes in order for the algorithmsto function. The first algorithm (a copy of which residesat each host) compares its own busyness with its estimateof the busyness of the least busy host. If the differenceexceeds the bias (or threshold) designated at the currenttime, one job is moved from the job queue of the busier

13

Page 14: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

host to the less busy one. The second algorithm allowseach host to compare itself with all other hosts and in-volves two biases. If the difference exceeds biasl but notbias2, then one job is moved. If the difference exceedsbias2, then two jobs are moved. There is also an upperlimit set on the number of jobs which can move at oncein the entire system. The third algorithm is the same asalgorithm one except that an antithrashing mechanism isadded to account for the fact that a delay is present be-tween the time a decision is made to move a job, and thetime it arrives at the destination. All three algorithms hadan adaptive feature added which would turn off all partsof the respective algorithm except the monitoring of loadwhen system load was below a particular minimumthreshold. This had the effect of stopping processorthrashing whenever it was practically impossible to bal-ance the system load due to lack of work to balance. Inthe high load case, the algorithm was turned off to reduceextraneous overhead when the algorithm could not affectany improvment in the system under any redistribution ofjobs. This last feature also supports the notion in the non-cooperative example given earlier that the load is usuallyautomatically balanced as a side effect of heavy loading.The remainder of the paper focuses on simulation resultsto reveal the impact of modifying the biasing parameters.

The work reported in [6] is an example of an algorithmwhich employs the heuristic of load-balancing, and prob-abilistically estimates the remaining processing times ofprocesses in the system. The remaining processing timefor a process was estimated by one of the following meth-ods:

memoryless: Re(t) « E{S}

past repeats: Re(t) = t

distribution: Re(t) = E{S - t\S > t}

optimal: Re(t) = R(t)

where R(t) is the remaining time needed given that t sec-onds have already elapsed, S is the service time randomvariable, and Re(t) is the scheduler's estimate of R(t).The algorithm then basically uses the first three methodsto predict response times in order to obtain an expecteddelay measure which in turn is used by pairs of processorsto balance their load on a pairwise basis. This mechanismis adopted by all pairs on a dynamic basis to balance thesystem load.

Another adaptive algorithm is discussed in [52] and isbased on the bidding concept. The heuristic mentionedhere utilizes prior information concerning the knowncharacteristics of processes such as resource require-ments, process priority, special resource needs, prece-dence constraints, and the need for clustering and distrib-uted groups. The basic algorithm periodically evaluateseach process at a current node to decide whether to trans-mit bid requests for a particular process. The bid requestsinclude information needed for contractor nodes to makedecisions regarding how well they may be able to execute

the process in question. The manager receives bids andcompares them to the local evaluation and will transferthe process if the difference between the best bid and thelocal estimate is above a certain threshold. The key to thealgorithm is the formulation of a function to be used in amodified McCulloch-Pitts neuron. The neuron (imple-mented as a subroutine) evaluates the current performanceof individual processes. Several different functions wereproposed, simulated, and discussed in this paper. Theadaptive nature of this algorithm is in the fact that it dy-namically modifies the number of hops that a bid requestis allowed to travel depending on current conditions. Themost significant result was that the information regardingprocess clustering and distributed groups seems to havehad little impact on the overall performance of the sys-tem.

The final example to be discussed here [55] is based ona heuristic derived from the area of Bayesian decision the-ory [33]. The algorithm uses no a priori knowledge re-garding task characteristics, and is dynamic in the sensethat the probability distributions which allow maximizingdecisions to be made based on the most likely current stateof nature are updated dynamically. Monitor nodes makeobservations every p seconds and update probabilities.Every d seconds the scheduler itself is invoked to approx-imate the current state of nature and make the appropriatemaximizing action. It was found that the parameters/? andd could be tuned to obtain maximum performance for aminimum cost.

IV. DISCUSSION

In this section, we will attempt to demonstrate the ap-plication of the qualitative description tool presented ear-lier to a role beyond that of classifying existing systems.In particular, we will utilize two behavior characteris-tics—performance and efficiency, in conjunction with theclassification mechanism presented in the taxonomy, toidentify general qualities of scheduling systems which willlend themselves to managing large numbers of proces-sors. In addition, the uniform terminology presented willbe employed to show that some earlier-thought-to-be-syn-onymous notions are actually distinct, and to show thatthe distinctions are valuable. Also, in at least one case,two earlier-thought-to-be-different notions will be shownto be much the same.

A. Decentralized Versus Distributed SchedulingWhen considering the decision-making policy of a

scheduling system, there are two fundamental compo-nents—responsibility and authority. When responsibilityfor making and carrying out policy decisions is sharedamong the entities in a distributed system, we say that thescheduler is distributed. When authority is distributed tothe entities of a resource management system, we call thisdecentralized. This differentiation exists in many otherorganizational structures. Any system which possessesdecentralized authority must have distributed responsibil-

14

Page 15: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

ity, but it is possible to allocate responsibility for gath-ering information and carrying out policy decisions, with-out giving the authority to change past or make futuredecisions.

B. Dynamic Versus Adaptive Scheduling

The terms dynamic scheduling and adaptive schedulingare quite often attached to various proposed algorithms inthe literature, but there appears to be some confusion asto the actual difference between these two concepts. Themore common property to find in a scheduler (or resourcemanagement subsystem) is the dynamic property. In a dy-namic situation, the scheduler takes into account the cur-rent state of affairs as it perceives them in the system.This is done during the normal operation of the systemunder a dynamic and unpredictable load. In an adaptivesystem, the scheduling policy itself reflects changes in itsenvironment—the running system. Notice that the differ-ence here is one of level in the hierarchical solution to thescheduling problem. Whereas a dynamic solution takesenvironmental inputs into account when making its deci-sions, an adaptive solution takes environmental stimuliinto account to modify the scheduling policy itself.

C. The Resource/Consumer Dichotomy in PerformanceAnalysis

As is the case in describing the actions or qualitativebehavior of a resource management subsystem, the per-formance of the scheduling mechanisms employed maybe viewed from either the resource or consumer point ofview. When considering performance from the consumer(or user) point of view, die metric involved is often oneof minimizing individual program completion times—re-sponse. Alternately, the resource point of view also con-siders the rate of process execution in evaluating perfor-mance, but from the view of total system throughput. Incontrast to response, throughput is concerned with seeingthat all users are treated fairly and that all are makingprogress. Notice that the resource view of maximizing re-source utilization is compatible with the desire for maxi-mum system throughput. Another way of stating this,however, is that all users, when considered as a singlecollective user, are treated best in this environment ofmaximizing system throughput or maximizing resourceutilization. This is the basic philosophy of load-balancingmechanisms. There is an inherent conflict, though, intrying to optimize both response and throughput.

D. Focusing on Future Directions

In this section, the earlier presented taxonomy, in con-junction with two terms used to quantitatively describesystem behavior, will be used to discuss possibilities fordistributed scheduling in the environment of a large sys-tem of loosely coupled processors.

In previous work related to the scheduling problem, thebasic notion of performance has been concerned withevaluating the way in which users* individual needs arebeing satisfied. The metrics most commonly applied are

response and throughput [23]. While these terms accu-rately characterize the goals of the system in terms of howwell users are served, they are difficult to measure duringthe normal operation of a system. In addition to this prob-lem, the metrics do not lend themselves well to directinterpretation as to the action to be performed to increaseperformance when it is not at an acceptable level.

These metrics are also difficult to apply when analysisor simulation of such systems is attempted. The reasonfor this is that two important aspects of scheduling arenecessarily intertwined. These two aspects are perfor-mance and efficiency. Performance is the part of a sys-tem's behavior that encompasses how well the resourceto be managed is being used to the benefit of all users ofthe system. Efficiency, though, is concerned with theadded cost (or overhead) associated with the resourcemanagement facility itself. In terms of these two criteria,we may think of desirable system behavior as that whichhas the highest level of performance possible, while in-curring the least overhead in doing it. Clearly, the exactcombination of these two which brings about the most de-sirable behavior is dependent on many factors and in manyways resembles the space/time tradeoff present in com-mon algorithm design. The point to be made here is thatsimultaneous evaluation of efficiency and performance isvery difficult due to this inherent entanglement. What wesuggest is a methodology for designing scheduling sys-tems in which efficiency and performance are separatelyobservable.

Current and future investigations will involve studies tobetter understand the relationships between performance,efficiency, and their components as they effect quantita-tive behavior. It is hoped that a much better understandingcan be gained regarding the costs and benefits of alter-native distributed scheduling strategies.

V. CONCLUSION

This paper has sought to bring together the ideas andwork in the area of resource management generated in thelast 10 to 15 years. The intention has been to provide asuitable framework for comparing past work in the areaof resource management, while providing a tool for clas-sifying and discussing future work. This has been donethrough the presentation of common terminology and ataxonomy on the mechanisms employed in computer sys-tem resource management. While the taxonomy could beused to discuss many different types of resource manage-ment, the attention of the paper and included exampleshave been on the application of the taxonomy to the pro-cessing resource. Finally, recommendations regardingpossible fruitful areas for future research in the area ofscheduling in large scale general-purpose distributedcomputer systems have been discussed.

As is the case in any survey, there are many pieces ofwork to be considered. It is hoped that the examples pre-sented fairly represent the true state of research in thisarea, while it is acknowledged that not all such exampleshave been discussed. In addition to the references at the

15

Page 16: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

end of this paper, the Appendix contains an annotatedbibliography for work not explicitly mentioned in the textbut which have aided in the construction of this taxonomythrough the support of additional examples. The exclu-sion of any particular results has not been intentional norshould it be construed as a judgment of the merit of thatwork. Decisions as to which papers to use as exampleswere made purely on the basis of their applicability to thecontext of the discussion in which they appear.

APPENDIX

ANNOTATED BIBLIOGRAPHY

Application of Taxonomy to Examples from Literature

This Appendix contains references to additional exam-ples not included in Section III as well as abbreviated de-scriptions of those examples discussed in detail in the textof the paper. The purpose is to demonstrate the use of thetaxonomy of Section II in classifying a large number ofexamples from the literature.

[1] G. R. Andrews, D. P. Dobkin, and P. J. Downey,"Distributed allocation with pools of servers," inACM SIGACT-SIGOPS Symp. Principles of Distrib-uted Computing, Aug. 1982, pp. 73-83.

Global, dynamic, distributed (however in a lim-ited sense), cooperative, suboptimal, heuristic, bid-ding, nonadaptive, dynamic reassignment.

[2] J. A. Bannister and K. S. Trivedi, "Task allocationin fault-tolerant distributed systems," Acta Inform.,vol. 20, pp. 261-281, 1983.

Global, static, suboptimal, approximate, mathe-matical programming.

[3] F. Berman and L. Snyder, "On mapping parallel al-gorithms into parallel architectures," in 1984 Int.Conf Parallel Proc, Aug. 1984, pp. 307-309.

Global, static, optimal, graph theory.[4] S. H. Bokhari, "Dual processor scheduling with dy-

namic reassignment," IEEE Trans. Software Eng.,vol. SE-5, no. 4, pp. 326-334, July 1979.

Global, static, optimal, graph theoretic.[5] , "A shortest tree algorithm for optimal assign-

ments across space and time in a distributed proces-sor system," IEEE Trans. Software Eng., vol. SE-7, no. 6, pp. 335-341, Nov. 1981.

Global, static, optimal, mathematical program-ming, intended for tree-structured applications.

[6] R. M. Bryant and R. A. Finkel, "A stable distrib-uted scheduling algorithm," in Proc. 2nd Int. Conf.Dist. Comp.f Apr. 1981, pp. 314-323.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, probabilistic, load-bal-ancing.

[7] T. L. Casavant and J. G. Kuhl, "Design of aloosely-coupled distributed multiprocessing net-work," in 1984 Int. Conf. Parallel Proc, Aug.1984, pp. 42-45.

Global, dynamic, physically distributed, cooper-

ative, suboptimal, heuristic, load-balancing, bid-ding, dynamic reassignment.

[8] L. M. Casey, "Decentralized scheduling," Austra-lian Comput. J., vol. 13, pp. 58-63, May 1981.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, load-balancing.

[9] T. C. K. Chou and J. A. Abraham, "Load balancingin distributed systems," IEEE Trans. Software Eng.,vol. SE-8, no. 4, pp. 401-412, July 1982.

Global, static, optimal, queueing theoretical.[10] T. C. K. Chou and J. A. Abraham, "Load redistri-

bution under failure in distributed systems," IEEETrans. Comput., vol. C-32, no. 9, pp. 799-808,Sept. 1983.

Global, dynamic (but with static parings of sup-porting and supported processors), distributed, co-operative, suboptimal, provides 3 separate heuristicmechanisms, motivated from fault recovery aspect.

[11] Y. C. Chow and W. H. Kohler, "Models for dy-namic load balancing in a heterogeneous multipleprocessor system," IEEE Trans. Comput., vol. C-28, no. 5, pp. 354-361, May 1979.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, load-balancing, (part ofthe heuristic approach is based on results fromqueueing theory).

[12] W. W. Chu et al., "Task allocation in distributeddata processing," Computer, vol. 13, no. 11, pp.57-69, Nov. 1980.

Global, static, optimal, suboptimal, heuristic,heuristic approached based on graph theory andmathematical programming are discussed.

[13] K. W. Doty, P. L. McEntire, and J. G. O'Reilly,"Task allocation in a distributed computer system,"in IEEEInfoCom, 1982, pp. 33-38.

Global, static, optimal, mathematical program-ming (nonlinear spatial dynamic programming).

[14] K. Efe, "Heuristic models of task assignmentscheduling in distributed systems," Computer, vol.15, pp. 50-56, June 1982.

Global, static, suboptimal, heuristic, load-balanc-ing.

[15] J. A. B. Fortes and F. Parisi-Presicce, "Optimallinear schedules for the parallel execution of algo-rithms," in 7954 Int. Conf. Parallel Proc, Aug.1984, pp. 322-329.

Global, static, optimal, uses results from mathe-matical programming for a large class of data-de-pendency driven applications.

[16] A. Gabrielian and D. B. Tyler, "Optimal object al-location in distributed computer systems," in Proc4th Int. Conf. Dist. Comp. Systems, May 1984, pp.84-95.

Global, static, optimal, mathematical program-ming, uses a heuristic to obtain a solution close tooptimal, employs backtracking to find optimal onefrom that.

[17] C. Gao, J. W. S. Liu, and M. Railey, "Load bal-

16

Page 17: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

ancing algorithms in homogeneous distributed sys-tems," in 1984 Int. Conf. Parallel Proc, Aug.1984, pp. 302-306.

Global, dynamic, distributed, cooperative, sub-optimal, heuristic, probabilistic.

[18] W. Huen et al., "TECHNEC, A network computerfor distributed task control," in Proc. 1st RockyMountain Symp. Microcomputers, Aug. 1977, pp.233-237.

Global, static, suboptimal, heuristic.[19] K. Hwang et al., "A Unix-based local computer

network with load balancing," Computer, vol. 15,no. 4, pp. 55-65, Apr. 1982.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, load-balancing.

[20] D. Klappholz and H. C. Park, "Parallelized processscheduling for a tightly-coupled MIMD machine,"in 1984 Int. Conf. Parallel Proc., Aug. 1984, pp.315-321.

Global, dynamic, physically distributed, non-cooperative.

[21] C. P. Kruskal and A. Weiss, "Allocating inde-pendent subtasks on parallel processors extended ab-stract," in 7954 Int. Conf. Parallel Proc, Aug.1984, pp. 236-240.

Global, static, suboptimal, but optimal for a set ofoptimistic assumptions, heuristic, problem stated interms of queuing theory.

[22] V. M. Lo, '"Heuristic algorithms for task assign-ment in distributed systems," in Proc. 4th Int. Conf.Dist. Comp. Systems, May 1984, pp. 30-39.

Global, static, suboptimal, approximate, graphtheoretic.

[23] , "Task assignment to minimize completiontime," in 5th Int. Conf Distributed Computing Sys-tems, May 1985, pp. 329-336.

Global, static, optimal, mathematical program-ming for some special cases, but in general is sub-optimal, heuristic using the LPT algorithm.

[24] P. Y. R. Ma, E. Y. S. Lee, and J. Tsuchiya, "Atask allocation model for distributed computing sys-tems," IEEE Trans. Comput., vol. C-31, no. 1, pp.41-47, Jan. 1982.

Global, static, optimal, mathematical program-ming (branch and bound).

[25] S. Majumdar and M. L. Green, "A distributed realtime resource manager," in Proc. IEEE Symp. Dis-tributed Data Acquisition, Computing and Control,1980, pp. 185-193.

Global, dynamic, distributed, cooperative, sub-optimal, heuristic, load balancing, nonadaptive.

[26] R. Manner, * 'Hardware task/processor scheduling ina polyprocessor environment," IEEE Trans. Corn-put., vol. C-33, no. 7, pp. 626-636, July 1984.

Global, dynamic, distributed control and respon-sibility, but centralized information in hardware onbus lines. Cooperative, optimal, (priority) load bal-ancing.

[27] L. M. Ni and K. Hwang, "Optimal load balancingfor a multiple processor system," in Proc. Int. ConfParallel Proc, 1981, pp. 352-357.

Global, static, optimal, mathematical program-ming.

[28] L. M. Ni and K. Abani, "Nonpreemptive load bal-ancing in a class of local area networks," in Proc.Comp. Networking Symp., Dec. 1981, pp. 113-118.

Global, dynamic, distributed, cooperative, opti-mal and suboptimal solutions given—mathematicalprogramming, and adaptive load balancing, respec-tively.

[29] J. Ousterhout, D. Scelza, and P. Sindhu, "Medusa:An experiment in distributed operating system struc-ture," Commun. ACM, vol. 23, no. 2f pp. 92-105,Feb. 1980.

Global, dynamic, physically nondistributed.[30] M. L. Powell and B. P. Miller, "Process migration

in DEMOS/MP," in Proc. 9th Symp. OperatingSystems Principles (OS Review), vol. 17, no. 5, pp.110-119, Oct. 1983.

Global, dynamic, distributed, cooperative, sub-optimal, heuristic, load balancing but no specific de-cision rule given.

[31] C. C. Price and S. Krishnaprasad, "Software allo-cation models for distributed computing systems,"in Proc. 4th Int. Conf Dist. Comp. Systems, May1984, pp. 40-48.

Global, static, optimal, mathematical program-ming, but also suggest heuristics.

[32] C. V. Ramamoorthy et al., "Optimal schedulingstrategies in a multiprocessor system," IEEE Trans.Comput., vol. C-21, no. 2, pp. 137-146, Feb. 1972.

Global, static, optimal solution presented forcomparison with the heuristic one also presented.Graph theory is employed in the sense that it usestask precedence graphs.

[33] K. Ramamritham and J. A. Stankovic, "Dynamictask scheduling in distributed hard real-time sys-tems," in Proc. 4th Int. Conf Dist. Comp. Systems,May 1984, pp. 96-107.

Global, dynamic, distributed, cooperative, sub-optimal, heuristic, bidding, one-time assignments (areal time guarantee is applied before migration).

[34] J. Reif and P. Spirakis, "Real-time resource allo-cation in a distributed system," in ACM SIGACT-SIGOPS Symp. Principles of Distributed Comput-ing, Aug. 1982, pp. 84-94.

Global, dynamic, distributed, noncooperative,probabilistic.

[35] S. Sahni, "Scheduling multipipeline and multipro-cessor computers," in 1984 Int. Conf Parallel Pro-cessing, Aug. 1984, pp. 333-337.

Global, static, suboptimal, heuristic.[36] T. G. Saponis and P. L. Crews, "A model for de-

centralized control in a fully distributed processingsystem," in Fall COMPCON, 1980, pp. 307-312.

Global, static, suboptimal, heuristic based on load

17

Page 18: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

balancing. Also intended for applications of the na-ture of coupled recurrence systems.

[37] C. C. Shen and W. H. Tsai, "A graph matchingapproach to optimal task assignment in distributedcomputing systems using a minimax criterion,"IEEE Trans. Compute vol. C-34, no. 3, pp. 197-203, Mar. 1985.

Global, static, optimal, enumerative.[38] J. A. Stankovic, "The analysis of a decentralized

control algorithm for job scheduling utilizing Bayes-ian decision theory,'9 in Proc. Int. Conf. ParallelProc, 1981, pp. 333-337.

Global, dynamic, distributed, cooperative, sub-optimal, heuristic, one-time assignment, probabilis-tic.

[39] , "A heuristic for cooperation among decentral-ized controllers," in IEEE INFOCOM 1983, Apr.1983, pp. 331-339.

Global, dynamic, distributed, cooperative, sub-optimal, heuristic, one-time assignment, probabilis-tic.

[40] J. A. Stankovic and I. S. Sidhu, "An adaptive bid-ding algorithm for processes, clusters and distrib-uted groups," in Proc. 4th Int. Conf. Dist. Comp.Systems, May 1984, pp. 49-59.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, adaptive, bidding, ad-ditional heuristics regarding clusters and distributedgroups.

[41] J. A. Stankovic, "Simulations of three adaptive, de-centralized controlled, job scheduling algorithms,"Comput. Networks, vol. 8, no. 3, pp. 199-217, June1984.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, adaptive, load-balanc-ing, one-time assignment. Three variants of thisbasic approach given.

[42] , "An application of Bayesian decision theoryto decentralized control of job scheduling," IEEETrans. Comput., vol. C-34, no. 2, pp. 117-130,Feb. 1985.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic based on results fromBayesian decision theory.

[43] , "Stability and distributed scheduling algo-rithms," in Proc. ACM Nat. Conf., New Orleans,Mar. 1985.

Here there are two separate algorithms specified.The first is a Global, dynamic, physically distrib-uted, cooperative, heuristic, adaptive, dynamicreassignment example based on stochastic learningautomata. The second is a Global, dynamic, physi-cally distributed, cooperative, heuristic, bidding,one-time assignment approach.

[44] H. S. Stone, "Critical load factors in two-processordistributed systems," IEEE Trans. Software Eng.,vol. SE-4, no. 3, pp. 254-258, May 1978.

Global, dynamic, physically distributed, cooper-ative, optimal, (graph theory based).

[45] H. S. Stone and S. H. Bokhari, "Control of distrib-uted processes," Computer, vol. 11, pp. 97-106,July 1978.

Global, static, optimal, graph theoretical.[46] H. Sullivan and T. Bashkow, "A large-scale ho-

mogeneous, fully distributed machine—I," in Proc.4th Symp. Computer Architecture, Mar. 1977, pp.105-117.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, bidding.

[47] A. M. VanTilborg and L. D. Wittie, "Wave sched-uling—Decentralized scheduling of task forces inmulticomputer," IEEE Trans. Comput., vol. C-33,no. 9, pp. 835-844, Sept. 1984.

Global, dynamic, distributed, cooperative, sub-optimal, heuristic, probabilistic, adaptive. Assumestree-structured (logically) task-forces.

[48] R. A. Wagner and K. S. Trivedi, "Hardware con-figuration selection through discretizing a continu-ous variable solution," in Proc. 7th IFIP Symp.Comp. Performance Modeling, Measurement andEvaluation, Toronto, Canada, 1980, pp. 127-142.

Global, static, suboptimal, approximate, mathe-matical programming.

[49] Y. T. Wang and R. J. T. Morris, "Load sharing indistributed systems," IEEE Trans. Comput., vol. C-34, no. 3, pp. 204-217, Mar. 1985.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, one-time assignment,load-balancing.

[50] M. O. Ward and D. J. Romero, "Assigning paral-lel-executable, intercommunicating subtasks to pro-cessors," in 1984 Int. Conf. Parallel Proc, Aug.1984, pp. 392-394.

Global, static, suboptimal, heuristic.[51] L. D. Wittie and A. M. Van Tilborg, "MICROS, a

distributed operating system for MICRONET, a re-configurable network computer," IEEE Trans.Comput., vol. C-29, no. 12, pp. 1133-1144, Dec.1980.

Global, dynamic, physically distributed, cooper-ative, suboptimal, heuristic, load-balancing (alsowith respect to message traffic).

REFERENCES

[1] A. K. Agrewala, S. K. Tripathi, and Q. Ricart, "Adaptive routingusing a virtual waiting time technique," IEEE Trans. Software Eng.,vol. SE-8, no. 1, pp. 76-81, Jan. 1982.

[2] J. A. Bannister and K. S. Trivedi, "Task allocation in fault-tolerantdistributed systems,*' Acta Inform., vol. 20, pp. 261-281, 1983.

[3] J. F. Bartlett, "A nonstop kernel,*' in Proc. 8th Symp. OperatingSystems Principles, Dec. 1981, pp. 22-29.

[4] S. H. Bokhari, "Dual processor scheduling with dynamic reassign-ment,*' IEEE Trans. Software Eng., vol. SE-5, no. 4, pp. 326-334,July 1979.

[5] S. H. Bokhari, MA shortest tree algorithm for optimal assignmentsacross space and time in a distributed processor system," IEEE Trans.Software Eng., vol. SE-7, no. 6, pp. 335-341, Nov. 1981.

[6] R. M. Bryant and R. A. Finkel, "A stable distributed scheduling al-gorithm," in Proc. 2nd Int. Conf. Dist. Comp., Apr. 1981, pp. 314-

[7] E. S. Buffa, Modern Production Management, Sth ed. New York:Wiley, 1977.

18

Page 19: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

[8] T. L. Casavant and J. G. Kuhl, "Design of a loosely-coupled distrib-uted multiprocessing network/* in 1984 Int. Conf. Parallel Proc,Aug. 1984, pp. 42-45.

[9] L. M. Casey, "Decentralized scheduling/* Australian Comput. J.,vol. 13, pp. 58-63, May 1981.

[10] T. C. K. Chou and J. A. Abraham, "Load balancing in distributedsystems,'* IEEE Trans. Software Eng., vol. SE-8, no. 4, pp. 401-412, July 1982.

[11] Y. C. Chow and W. H. Kohler, "Models for dynamic load balancingin a heterogeneous multiple processor system,** IEEE Trans. Corn-put., vol. C-28, no. 5, pp. 354-361, May 1979.

[12] E. G. Coffman and P. J. Denning, Operating Systems The-ory. Engiewood Cliffs, NJ: Prentice-Hall, 1973.

[13] R. W. Conway, W. L. Maxwell, and L. W. Miller, Theory of Sched-uling. Reading, MA: Addison-Wesley, 1967.

[14] K. W. Doty, P. L. Me En tire, and J. G. O'Reilly, "Task allocationin a distributed computer system,** in IEEE InfoCom, 1982, pp. 33-38.

[15] K. Efe, "Heuristic models of task assignment scheduling in distrib-uted systems/* Computer, vol. 15, pp. 50-56, June 1982.

[16] C. S. Ellis, J. A. Feldman, and J. E. Heliotis, "Language constructsand support systems for distributed computing/* in ACM SIGACT-SIGOPS Symp. Principles of Distributed Computing, Aug. 1982, pp.1-9.

[17] P. H. Enslow Jr., "What is a "distributed** data processing system/*Computer, vol. 11, no. 1, pp. 13-21, Jan. 1978.

[18] J. R. Evans et aL, Applied Production and Operations Manage-ment. St. Paul, MN: West, 1984.

[19] I. Flores, OSMVT. Boston, MA: Allyn and Bacon, 1973.[20] M. J. Flynn, "Very high-speed computing systems/' Proc. IEEE,

vol. 54, pp. 1901-1909, Dec. 1966.[21] A. Gabrielian and D. B. Tyler, "Optimal object allocation in distrib-

uted computer systems/* in Proc. 4th Int. Conf. Dist. Comp. Sys-tems, May 1984, pp. 84-95.

[22] M. J. Gonzalez, "Deterministic processor scheduling,** ACM Com-put. Surveys, vol. 9, no. 3, pp. 173-204, Sept. 1977.

[23] H. Hellerman and T. F. Conroy, Computer System Perfor-mance. New York: McGraw-Hill, 1975.

[24] Y. Ho, "Team decision theory and information structures,** Proc.IEEE, vol. 68, no. 6, pp. 644-654, June 1980.

[25] E. D. Jensen, "The Honeywell experimental distributed processor—An overview/* Computer, vol. 11, pp. 28-38, Jan. 1978.

[26] A. K. Jones et aL, "StarOS, a multiprocessor operating system forthe support of task forces,** in Proc. 7th Symp. Operating SystemPrin., Dec. 1979, pp. 117-127.

[27] D. Klappholz and H. C. Park, "Parallelized process scheduling foratightly-coupled MIMD machine,** in 1984 Int. Conf. Parallel Proc,Aug. 1984, pp. 315-321.

[28] L. Kleinrock, Queuing Systems, Vol. 2: Computer Applica-tions. New York: Wiley, 1976.

[29] L. Kleinrock and A. Nilsson, "On optimal scheduling algorithms fortime-shared systems,** J. ACM, vol. 28, no. 3, pp. 477-486, July1981.

[30] C. P. Kruskal and A. Weiss, "Allocating independent subtasks onparallel processors extended abstract,** in 1984 Int. Conf. ParallelProc, Aug. 1984, pp. 236-240.

[31] R. E. Larsen, Tutorial: Distributed Control. New York: IEEE Press,1979.

[32] G. Le Lann, Motivations, Objectives and Characterizations of Dis-tributed Systems (Lecture Notes in Computer Science, Vol.105). New York: Springer-Verlag, 1981, pp. 1-9.

[33] B. W. Lindgren, Elements of Decision Theory. New York: Mac-Millan, 1971.

[34] V. M. Lo, "Heuristic algorithms for task assignment in distributedsystems/* in Proc 4th Int. Conf. Dist. Comp. Systems, May 1984,pp. 30-39.

[35] P. Y. R. Ma, E. Y. S. Lee, and J. Tsuchiya, "A task allocation modelfor distributed computing systems/1 IEEE Trans. Comput., vol. C-31, no. 1, pp. 41-47, Jan. 1982.

[36] R. Manner, "Hardware task/processor scheduling in a polyprocessorenvironment/* IEEE Trans. Comput., vol. C-33, no. 7, pp. 626-636,July 1984.

[37] P. L. McEntire, J. G. O'Reilly, and R. E. Larson, Distributed Com-puting: Concepts and Implementations. New York: IEEE Press,1984.

[38] E. Mishkin and L. Braun Jr., Adaptive Control Systems. New York:McGraw-Hill, 1961.

[39] K. Narendra, "Learning automata—A survey/* IEEE Trans. Syst.,Man, Cybern., vol. SMC-4, no. 4, pp. 323-334, July 1974.

19

[40] L. M. Ni and K. Hwang, "Optimal load balancing strategies for amultiple processor system,** in Proc Int. Conf. Parallel Proc., 1981,pp. 352-357.

[41] L. M. Ni and K. Abani, "Nonpreemptive load balancing in a classof local area networks,** in Proc Comp. Networking Symp., Dec.1981, pp.113-118.

[42] L. M. Ni, K. Hwang, "Optimal load balancing in a multiple proces-sor system with many job classes,** IEEE Trans. Software Eng., vol.SE-11, no. 5, pp. 491-496, May 1985.

[43] N. J. Nilsson, Principles of Artificial Intelligence. Palo Alto, CA:Tioga, 1980.

[44] J. Ousterhout, D. Scelza, and P. Sindhu, "Medusa: An experimentin distributed operating system structure,** Commun. ACM, vol. 23,no. 2, pp. 92-105, Feb. 1980.

[45] G. Popek et aL, "LOCUS: A network transparent, high reliabilitydistributed system,** in Proc. 8th Symp. O.S. Principles, Dec. 1981,pp. 169-177.

[46] M. L. Powell and B. P. Miller, "Process migration in DEMOS/MP,**in Proc 9th Symp. Operating Systems Principles (OS Review), vol.17, no. 5, pp. 110-119, Oct. 1983.

[47] C. C. Price and S. Krishnaprasad, "Software allocation models fordistributed computing systems/* in Proc 4th Int. Conf. Dist. Comp.Systems, May 1984, pp. 40-48.

[48] C. Shen and W. Tsai, "A graph matching approach to optimal taskassignment in distributed computing systems using a minimax crite-rion/* IEEE Trans. Comput., vol. C-34, no. 3, pp. 197-203, Mar.1985.

[49] R. G. Smith, "The contract net protocol: High-level communicationand control in a distributed problem solver/* IEEE Trans. Comput.,vol. C-29, no. 12, pp. 1104-1113, Dec. 1980.

[50] M. H. Solomon and R. A. Finkel, "The ROSCOE distributed oper-ating system/* in Proc. 7th Symp. O.S. Principles, Dec. 1979, pp.108-114.

[51] J. A. Stankovic et aL, "An evaluation of the applicability of differentmathematical approaches to the analysis of decentralized control al-gorithms,** in Proc IEEE COMPSAC82, Nov. 1982, pp. 62-69.

[52] J. A. Stankovic and I. S. Sidhu, "An adaptive bidding algorithm forprocesses, clusters and distributed groups/' in Proc 4th Int. Conf.Dist. Comp. Systems, May 1984, pp. 49-59.

[53] J. A. Stankovic, "Simulations of three adaptive, decentralized con-trolled, job scheduling algorithms/* Comput. Networks, vol. 8, no.3, pp. 199-217, June 1984.

[54] , "A perspective on distributed computer systems,** IEEE Trans.Comput., vol. C-33, no. 12, pp. 1102-1115, Dec. 1984.

[55] J. A. Stankovic, "An application of Bayesian decision theory to de-centralized control of job scheduling/* IEEE Trans. Comput., vol.C-34, no. 2, pp. 117-130, Feb. 1985.

[56] J. A. Stankovic et aL, "A review of current research and criticalissues in distributed system software,** IEEE Comput. Soc Distrib-uted Processing Tech. Committee Newslett., vol. 7, no. 1, pp. 14-47, Mar. 1985.

[57] H. S. Stone, "Critical load factors in two-processor distributed sys-tems,** IEEE Trans. Software Eng., vol. SE-4, no. 3, pp. 254-258,May 1978.

[58] H. S. Stone and S. H. Bokhari, "Control of distributed processes,**Computer, vol. 11, pp. 97-106, July 1978.

[59] H. Sullivan and T. Bashkow, "A large-scale homogeneous, fully dis-tributed machine—II,*' in Proc. 4th Symp. Computer Architecture,Mar. 1977, pp. 118-124.

[60] A. S. Tanenbaum, Computer Networks. Engiewood Cliffs, NJ:Prentice-Hall, 1981.

[61] D. P. Tsay and M. T. Liu, "MIKE: A network operating system forthe distributed double-loop computer network,** IEEE Trans. Soft-ware Eng., vol. SE-9, no. 2, pp. 143-154, Mar. 1983.

[62] D. C. Tsichritzis and P. A. Bernstein, Operating Systems. NewYork: Academic, 1974.

[63] K. Vairavan and R. A. DeMillo, "On the computational complexityof a generalized scheduling problem/' IEEE Trans. Comput., vol. C-25, no. 11, pp. 1067-1073, Nov. 1976.

[64] R. A. Wagner and K. S. Trivedi, "Hardware configuration selectionthrough discretizing a continuous variable solution/' in Proc 7th 1FIPSymp. Comp. Performance Modeling, Measurement and Evaluation,Toronto, Canada, 1980, pp. 127-142.

[65] Y. T. Wang and R. J. T. Morris, "Load sharing in distributed sys-tems,** IEEE Trans. Comput., vol. C-34, no. 3, pp. 204-217, Mar.1985.

[66] M. O. Ward and D. J. Romero, "Assigning parallel-executable, in-tercommunicating subtasks to processors/* in 1984 Int. Conf. Par-allel Proc, Aug. 1984, pp. 392-394.

Page 20: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

[67] L. D. Wittie and A. M. Van Tilborg. "MICROS: A distributed op- Jon G. Kuhl (S'76-M*79) received the M.S. degree in electrical anderating system for MICRONET, a reconfigurable network com- computer engineering and the Ph.D. degree in computer science from theputer,'* IEEE Trans. Compute vol C-29. no. 12, pp. 1133-1144, University of Iowa, Iowa City, in 1977 and 1980, respectively.Dec. 1980. He is an Associate Professor in the Department of Electrical and

Computer Engineering at the University of Iowa. His primary researchinterests are in distributed systems, parallel processing, and fault-tolerant

Thomas L. Casavant (S'85-'86) received the B.S. degree in computer computing. His other research interests include computer architecture, graphscience and the M.S. and Ph.D. degrees in electrical and computer theory, and computer communications,engineering from the University of Iowa, Iowa City, in 1982, 1983, and 1986,respectively.

He is currently an Assistant Professor of Electrical Engineering at PurdueUniversity, West Lafayette, IN. His research interests include computerarchitecture, operating systems, distributed systems, and performanceanalysis.

Dr. Casavant is a member of the IEEE Computer Society and theAssociation for Computing Machinery.

20

Page 21: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Multiprocessor Scheduling with the Aid of NetworkFlow AlgorithmsHAROLD S. STONE, MEMBER, IEEE

Abstract-In a distributed computing system a modular programmust have its modules assigned among the processors so as to avoidexcessive interprocessor communication while taking advantage ofspecific efficiencies of some processors in executing some programmodules. In this paper we show that this program module assignmentproblem can be solved efficiently by making use of the well-knownFord-Fulkerson algorithm for finding maximum flows in commoditynetworks as modified by Edmonds and Karp, Dinic, and Karzanov.A solution to the two-processor problem is given, and extensions tothree and /i-processors are considered with partial results given with-out a complete efficient solution.

Index Terms-Computer networks, cutsets, distributed computers,Ford-Fulkerson algorithm, load balancing, maximum flows.

I. INTRODUCTION

DISTRIBUTED processing has been a subject of recentinterest due to the availability of computer networks

such as the Advanced Research Projects Agency Network(ARPANET), and to the availability of microprocessorsfor use in inexpensive distributed computers. Fuller andSiewiorek [8] characterize distributed computer systems interms of a coupling parameter such that array computers andmultiprocessors are tightly coupled, and computers linkedthrough ARPANET are loosely coupled. In loosely coupledsystems the cost of interprocessor communication is suffi-ciently high to discourage the execution of a single programdistributed across several computers in the network. Never-theless, this has been considered for ARPANET by Thomasand Henderson [17],Kahn [12] , and Thomas [16] .

In this paper we focus on the type of distributed systemthat Fuller and Siewiorek treat as systems with intermediatecoupling. A primary example of this type of system is themultiprocessor interface message processor for ARPANETdesigned by Bolt, Beranek, and Newman (Heart et al. [10]).Two-processor distributed systems are widely used in theform of a powerful central processor connected to a terminal-oriented satellite processor. Van Dam [18] and Foley et al.[7] describe two-processor systems in which program modulesmay float from processor to processor at load time or duringthe execution of a program. The ability to reassign programmodules to different processors in a distributed system isessential to make the best use of system resources as programschange from one computation phase to another or as systemload changes.

Manuscript received November 7, 1975; revised July 9, 1976. Thiswork was supported in part by the National Science Foundation underGrant DCR 74-20025.

The author is with the Department of Electrical and ComputerEngineering, University of Massachusetts, Amherst, MA 01002.

In this paper we treat the problem of assigning programmodules to processors in a distributed system. There are twokinds of costs that must be considered in such an assignment.In order to reduce the cost of interprocessor communication,the program modules in a working set should be coresident ina single processor during execution of that working set. Toreduce the computational cost of a program, program modulesshould be assigned to processors on which they run fastest.The two kinds of assignments can be incompatible. Theproblem is to find an assignment of program modules toprocessors that minimizes the collective costs due to inter-processor communication and to computation. We show howto make such an assignment efficiently by using methods ofFord and Fulkerson [6] , Dinic [3] , Edmonds and Karp [4] ,and Karzanov [13] that have been developed for maximizingflows in commodity networks. The two-processor assignmentproblem can be stated as a commodity flow problem withsuitable modifications. We show how to construct a graph forthe ^-processor problem for which a minimal cost cut is aminimal cost partition of the graph into n disjoint subgraphs.We give partial results for finding the minimal cost cut but,unfortunately, an efficient solution has not yet been obtained.

In Section II of this paper we discuss the computer modelin more detail. Section HI reviews the essential aspects ofcommodity flow problems. The main results of this paperappear in Section IV, in which we show how to solve thetwo-processor problem, and in Section V, in which we con-sider the /i-processor problem. A brief summary with anenumeration of several questions for future research appearsin the final section.

II. THE MULTIPROCESSOR MODEL

We use a model of a multiprocessor based on the multi-processor system at Brown University [18] , [15]. In thismodel, each processor is an independent computer with fullmemory, control, and arithmetic capability. Two or moreprocessors are connected through a data link or high-speedbus to create a multiprocessor system. The processors neednot be identical; in fact, the system cited above has a System/360 computer linked to a microprogrammable minicomputer.This much of the description of the model fits many systems.The distinguishing feature of the multiprocessor under dis-cussion is the manner in which a program executes. In essence,each program in this model is a serial program, for whichexecution can shift dynamically from processor to processor.The two processors may both be multiprogrammed, and mayexecute concurrently on different programs, but may notexecute concurrently on the same program.

A program is partitioned into functional modules some of

Reprinted from IEEE Trans, on Software Eng., vol. SE-3, no. 1, Jan. 1977, pp. 85-93.

21

Page 22: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Ml en PI

(MI.M2) INTERMODULE REFERENCE

M2 on P2

( M 2 , M I ) INTERMODULEREFERENCE

M3 on PITOTALRUNTIME

Fig. 1. Module Ml calls module Ml on a distributed computer system.

which are assigned to particular processors, the remainder ofwhich are permitted to "float" from processor to processorduring program execution. Some modules have a fixed assign-ment because these modules depend on facilitites within theirassigned processor. The facilities might be high-speed arith-metic capability, access to a particular data base, the need fora large high-speed memory, access to a specific peripheraldevice, or the need for any other facility that might be as-sociated with some processor and not with every processor.

When program execution begins, the floating modules aregiven temporary assignments to processors, assignments thatreflect the best guess as to where they should reside formaximum computation speed. As execution progresses, thefloating modules are free to be reassigned so as to improveexecution speed and to reflect the changing activity of theprogram. Here we presume that interprocessor communica-tion incurs relatively high overhead, whereas computationsthat make no calls to other processors incur zero additionaloverhead. Fig. 1 shows the sequence of events that occurwhen module Ml on processor PI calls module Ml on pro-cessor P2. The program state shifts from processor PI toprocessor P2, and returns to processor PI when module Mlreturns control to Ml. Instead of transferring state to P2, itmay be better to colocate Ml and Ml on the same computer.The choice depends on the number of calls between Ml andMl, and on the relationship of Ml and Ml to other modules.

The advantage of this type of approach over other forms ofmultiprocessing is that it takes advantage of program locality.When activity within a program is within one locality, in idealcircumstances all the activity can be forced to reside withinone processor, thereby eliminating conflicts due to excessiveuse of shared resources. The locality need not be knownbeforehand, because program modules tend to float to pro-cessors in which their activity is highest. Another type ofmultiprocessor is exemplified by dump (Wulf and Bell [19])in which up to 16 minicomputers and 16 memories are linkedtogether through a crossbar. The coupling among processorsin this system is very tight because potentially every memoryfetch accesses memory through the crossbar. Conflicts arepotentially high because two or more processors may attempt

Fig. 2. Commodity flow network.

to access the same memory module simultaneously for anextended period of time.

In the present model, we eliminate the costly crossbar, thedegradation on every memory access due to delays throughthe crossbar, and the potential for conflicts on every memoryaccess to further degrade memory access. If this model ismore effective than the crossbar architecture of C.mmp, it isbecause the costly interprocessor calls incurred in practiceoccur rarely due to the ability to assign program working setsto a single processor. Whether or not this is the case has notbeen settled. The question of the relative effectiveness of thisarchitecture and the crossbar architecture has barely beeninvestigated at this writing. The memory assignment algorithmdescribed in the following sections indicates that it is possibleto control a distributed computer of the type under study herereasonably efficiently, thereby opening the door to furtherand deeper studies of this idea.

HI. MAXIMUM NETWORK FLOWS AND MINIMUM CUTSETS

In this section we review the commodity flow problem forwhich Ford and Fulkerson formulated a widely used algorithm[6]. The algorithm is reasonably fast in practice, but theoriginal formulation of the algorithm is subject to ratherinefficient behavior in pathological cases. Edmonds and Karp[4] have suggested several different modifications to theFord-Fulkerson algorithm so as to eliminate many of theinefficiencies, at least for the pathological examples, and toobtain improved worst-case bounds on the complexity of thealgorithm. Dinic [3] and Karzanov [13] have derived otherways to increase speed.

In this section we shall describe the problem solved by theFord-Fulkerson algorithm as modified by Edmonds and Karp,but we shall refer the reader to the literature for descriptionsof the various implementations of the algorithm. The impor-tant idea is that we can treat an algorithm for the solution ofthe maximum flow problem as a "black box" to solve themodule assignment problem. We need not know exactly whatalgorithm is contained in the black box, provided that weknow the implementation is computationally efficient forour purposes.

The maximum flow problem is a problem involving a com-modity network graph. Fig. 2 shows the graph of such anetwork.

The nodes labeled 5 j , S2, and S3 are source nodes, and thenodes labeled S4 , S$9 and Ss are sink nodes. Between thesesubsets of nodes lie several interior nodes with the entirecollection of nodes linked by weighted branches. Sourcenodes represent production centers, each theoretically capable

22

Page 23: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

to

Fig. 3. Flow in a commodity flow network.

of producing an infinite amount of a specific commodity.Sink nodes represent demand centers, each of which canabsorb an infinite amount of the commodity. The branchesrepresent commodity transport linkages, with the weight ofa branch indicating the capacity of the corresponding link.

A commodity flow in this network is represented byweighted directed arrows along the branches of the network,with the weight of the arrow indicating the amount of theflow on that branch, and the direction of the arrow indicatingthe direction of the commodity flow. Fig. 3 shows a com-modity flow for the graph in Fig. 2. Each arrow in Fig. 3carries a pair of numbers, the first of which is the capacityof that branch and the second of which is the actual flow onthat branch. A feasible commodity flow in this network isa commodity flow originating from the source nodes andending at the sink nodes such that: 1) at each intermediatenode, the sum of the flows into the node is equal to the sumof the flows out of the node; 2) at each sink node the netflow into the nodes is nonnegative, and at each source nodethe net flow directed out of the node is nonnegative; and 3)the net flow in any branch in the network does not exceedthe capacity of that branch. Note that the flow in Fig. 3 isa feasible flow according to this definition. The three con-straints in this definition guarantee that interior nodes areneither sources nor sinks, that source nodes and sink nodesare indeed sources and sinks, respectively, and that eachbranch is capable of supporting the portion of the flow as-signed to it.

The value of a commodity flow is the sum of the net flowsout of the source nodes of the network. Because the net flowinto the network must equal the net flow out of the network,the value of a commodity flow is equal to the sum of netflows into the sink nodes. The value of the flow in Fig. 3 is18. A maximum flow is a feasible flow whose value is maxi-mum among all feasible flows. Fig. 4 shows a maximum flowfor the network in Fig. 2.

The maximum flow in Fig. 4 is related to a cutset of thenetwork. A cutset of a commodity network is a set of edgeswhich when removed disconnects the source nodes from thesink nodes. No proper subset of a cutset is a cutset. Notethat branches <5lf A), (B, E), (B, D), and (C, E) form a cutsetof the graph in Fig. 4. The weight of a cutset is equal to thesum of the capacities of the branches in the cutset. Theweight of the above cutset is 24, which is equal to the valueof the maximum flow. This is not a coincidence, becausecentral to the Ford-Fulkerson algorithm is the followingtheorem.

Fig. 4. Maximum flow and minimum cut in a commodity flow network.

Fig. 5. Intermodule-connection graph.

Max-flow, Min-cut Theorem (Ford and Fulkerson [6]):The value of a maximum flow in a commodity network isequal to the weight of a minimum weight cutset of thatnetwork.

The proof of this theorem and a good tutorial descriptionof algorithms for finding a maximum flow and minimumweight cutset appear in Ford and Fulkerson [6], A very cleartreatment of both the Ford-Fulkerson algorithm and theEdmonds-Karp modifications appear in Even [5]. At thispoint we note that the commodity flow problem as describedcan be solved in a time bounded from above by the fifthpower of the number of nodes in the graph. All of the vari-ations of the maximum flow algorithm of interest computeboth a maximum flow in the graph and find a minimumweight cutset. We shall make use of this fact in solving themodule assignment problem because each possible assignmentcorresponds to a cutset of a commodity graph, and the op-timum assignment corresponds to a minimum weight cutset.

IV. THE SOLUTION TO THE TWO -PROCESSOR ASSIGNMENT

PROBLEM

In this section we show how the maximum-flow algorithmfinds an optimal partition of a modular program that runs ona two-processor system. In the following section we showhow this algorithm generalizes to systems with three or moreprocessors.

To use the maximum flow algorithm we develop a graphicalmodel of a modular program. Fig. 5 shows a typical examplein which each node of the graph represents a module and thebranches of the graph represent intermodule linkages. Themodules should be viewed as program segments which eithercontain executable instructions plus local data or containglobal data accessible to other segments. The weights on the

23

Page 24: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

TABLE I

Module P.j Run Time

5

2

4

6

5

-

?2 Run Time

10

-

4

3

2

4

branches indicate the cost of intermodule references when themodules are assigned to different computers. We assume thatthe cost of an intermodule reference is zero when the refer-ence is made between two modules assigned to the samecomputer.

The cost function used to compute the branch weights mayvary depending on the nature of the system. Initially wechoose to minimize the absolute running time of a program,without permitting dynamic reassignments. We modify theconstraints later. The weight of a branch under this assump-tion is the total time charged to the intermodule referencesrepresented by the branch. Thus if k references between twomodules occur during the running of a program and eachreference takes t seconds when the modules are assigned todifferent computers, then the weight of the branch repre-senting these references is kt.

The graph in Fig. 5 captures the notion of the costs forcrossing boundaries between processors. This is only part ofthe assignment problem. We must also consider the relativerunning time of a module on different processors. One pro-cessor may have a fast floating-point unit, or a faster memorythan another processor, and this may bias the assignment ofmodules. Table I gives the cost of running the modules ofthe program in Fig. 5 on each of two processors. The symbol°° in the table indicates an infinite cost, which is an artificeto indicate that the module cannot be assigned to the pro-cessor. Since our objective in this part of the discussion is tominimize the total absolute running time of a program, thecosts indicated in Table I give the total running time of eachmodule on each processor.

In this model of a distributed computing system, there isno parallelism or multitasking of module execution withina program. Thus the total running time of a program consistsof the total running time of the modules on their assignedprocessors as given in Table I plus the cost of intermodulereferences between modules assigned to different processors.Note that an optimum assignment must take into consider-ation both the intermodule reference costs and the costs ofrunning the modules themselves. For the running example,if we assume that B must be assigned to Px, and F must beassigned to P2, then the optimum way of minimizing theintermodule costs alone is to view B and F as source andsink, respectively, of a commodity-flow network. The min-imum cut is the minimum intermodule cost cut, and thisassigns By Q D, and E to Px, and A and F to P2. On the other

hand, an optimum way to minimize only the running timeof the individual modules is to assign A, Bt and C to Pt andA £, and FtoP2. But neither of these assignments minimizethe total running time.

To minimize the total running time, we modify the moduleinterconnection graph so that each cutset in the modifiedgraph corresponds in a one-to-one fashion to a moduleassignment and the weight of the cutset is the total cost forthat assignment. With this modification, we can solve amaximum flow problem on the modified graph. The min-imum weight cutset obtained from this solution determinesthe module assignment, and this module assignment is optimalin terms of total cost.

We modify the module interconnection graph as follows.1) Add nodes labeled St and S2 that represent processors

Px and P2y respectively. St is the unique source node andS2

is the unique sink node.2) For each node other than S% and S2i add a branch from

that node to each of St and S2. The weight of the branch toSx carries the cost of executing the corresponding moduleon P2y and the weight of the branch to S2 carries the cost ofexecuting the module on Px. (The reversal of the subscriptsis intentional.)

The modified graph is a commodity flow network of thegeneral type exemplified by the graph in Fig. 2. Each cutsetof the commodity flow graph partitions the nodes of thegraph into two disjoint subsets, with St and S2 in distinctsubsets. We associate a module assignment with each cutsetsuch that if the cutset partitions a node into the subset con-taining 5 | , then the corresponding module is assigned toprocessor Px. Thus the cut shown in Fig. 6 corresponds tothe assignment of A9 B9 and C to Px and D, E9 and FtoP2.

With this association of cutsets to module assignments it isnot difficult to see that module assignments and cutsets ofthe commodity flow graph are in one-to-one correspondence.(The one-to-one correspondence depends on the fact thateach interior node is connected directly to a source and sink,for otherwise, a module assignment might correspond to asubset of edges that properly contains a cutset.) The followingtheorem enables us to use a maximum flow algorithm to finda minimum cost assignment.

Theorem: The weight of a cutset of the modified graph isequal to the cost of the corresponding module assignment.

Proof: A module assignment incurs two types of costs.One cost is from intermodule references from processor toprocessor. The other cost incurred is the cost of running eachmodule on a specific processor. The cutset corresponding toa module assignment contains two types of branches. Onetype of branch represents the cost of intermodule referencesfor modules in different processors, and a particular assign-ment. All costs due to such references contribute to theweight of the corresponding cutset, and no other intermodulereferences contribute to the weight of the cutset.

The second type of branch in a cutset is a branch from aninternal node to a source or sink node. If an assignmentplaces a module in processor Pu then the branch betweenthat node and S2 is in the cutset, and this contributes a costequal to the cost of running that module on P\, because the

24

Page 25: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Fig. 6. Modified module-interconnection graph and a cut that deter-mines a module assignment.

Fig. 7. Minimum cost cut.

branch to S2 carries the Pi running time cost. Similarly, thecost of assigning a module to P2 is reflected by adding thecost of running that module on P2 to the weight of the cutset.

Thus the weight of a cutset accounts for all costs due to itscorresponding assignment, and no other costs contribute tothe weight. This proves the theorem.

The theorem indicates that an optimal assignment can befound by running a maximum flow algorithm on the modifiedgraph. A maximum flow algorithm applied to the graphshown in Fig. 6 produces the minimum weight cutset shownin Fig. 7. The corresponding module assignment is differentfrom the assignment that minimizes the cost of intermodulereferences and the assignment that minimizes the individualrunning time costs, and its total cost is lower than the totalcost of either of the two other assignments.

At this point the basic essentials for treating the moduleassignment problem as a maximum flow problem are clear.There remain a number of details concerning the practicalimplementation of the algorithm that merit discussion.

The running example indicates how to select an optimumstatic assignment that minimizes total running time. Wementioned earlier that it makes sense to change assignmentsdynamically to take advantage of local behavior of programsand the relatively infrequent changes in program locality. To

solve the dynamic assignment problem we essentially have tosolve a maximum flow problem at each point in time duringwhich the working set of a program changes. Fortunately,the dynamic problem is no harder than the static one, exceptfor the need to solve several maximum flow problems insteadof a single one. The only additional difficulty in dynamicassignments is detecting a change in the working set of aprogram. Since a control program must intervene to performintermodule transfers across processor boundaries, it shouldmonitor such transfers, and use changes in the rate and natureof such transfers as a signal that the working set has changed.Thus we can reasonably expect to solve the dynamic assign-ment problem if it is possible to solve a static assignmentproblem for each working set.

The major difficulty in solving a static assignment problemis obtaining the requisite data for driving the maximum flowalgorithm. It is not usually practical to force the user tosupply these data, nor is it completely acceptable to usecompiler generated estimates. Some of the data can begathered during program execution. The cost of each invo-cation of a module on a particular processor can be measuredby a control program, and it usually measures this anyway aspart of the system accounting. However, we need to knowthe cost of running a module on each processor to computean optimal assignment, and we certainly cannot ship a moduleto every other processor in a system for a time trial to deter-mine its relative running time.

A reasonable approximation is to assume that the runningtime of a module on processor Pi is a fixed constant timesthe running time of that module on processor P2 where theconstant is determined in advance as a measure of the relativepower of the processors without taking into considerationthe precise nature of the program to be executed. Under theseassumptions if we can gather data about intermodule references,we can obtain sufficient data to drive the maximum flowalgorithm. If after making one or more assignments a moduleis executed on different computers, sufficient additional in-formation can be obtained to refine initial estimates of rela-tive processor performance. The refined data should be usedin determining new assignments as the data are collected.

How do we collect data concerning intermodule references?Here the collection of data follows a similar philosophy asfor running time measurements. Initially an analysis of thestatic program should reveal where the intermodule referencesexist, and these in turn can be assumed to be of equal weightto determine an initial assignment. We assume that we auto-matically measure the intermodule references across processorboundaries because all such references require control programassistance. In measuring these references we obtain new datathat refine the original estimates. If as a result of the refine-ment of these data we reassign modules, then we obtain newdata about intermodule links that further refine the data,which in turn permit a more accurate appraisal of a minimumcost assignment.

At this writing the control methodology described here hasbeen implemented by J. Michel and R. Burns on the systemdescribed by Stabler [15] and van Dam [18]. That systemgathers the requisite statistics in real time in a suitable form

25

Page 26: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

TABLE II

Fig. 8. Module-interconnection graph.

for input to the algorithm. It is too early to say how effectivethe statistics gathering and automatic reassignment processesare in performing load balancing, but it is safe to say that theability to gather suitable statistics automatically has beendemonstrated.

In closing this section we take up one last subject, that ofconsidering objective functions other than total running time.There are many suitable cost functions one may wish to use.For example, instead of absolute time, one may choose tominimize dollars expended. For this objective function, theintermodule reference costs are measured in dollars per trans-fer, and the running time costs of each module are measuredin dollars for computation time on each processor, taking intoaccount the relative processor speeds and the relative costsper computation on each processor. Many other usefulobjective functions can be met by choosing the cost functionappropriately. We should also point out that generalizationsof the maximum flow algorithm are applicable to moduleassignment problems under more complex cost measures.The most notable maximum flow problem generalization isthe selection of a maximum flow with minimum cost. Forthis problem each flow is associated with both a flow valueand a cost. The algorithm selects among several possiblemaximum flows to return the one of minimum cost. Theequivalent problem for the module assignment problem is tofind an assignment that achieves fastest computation timeand incurs the least dollar cost of all such assignments.

The fact that the two-processor assignment problem ismapped into a commodity flow problem for solution suggeststhat the flow maximized in the commodity flow problemcorresponds to some physical entity flowing between thetwo-processors in the two-processor assignment problem.There is no such correspondence, however, since the maximalflow value corresponds to time in a two-processor assignment,and not to information flow.

V. EXTENSION TO THREE OR MORE PROCESSORS

In this section we show how the module assignments tothree or more processors can be accomplished by using theprinciples described in the previous section. We first obtaina suitable generalization of the notion of cutset. Then wedescribe a procedure to construct a modified graph of aprogram such that its cutsets are in one-to-one correspon-dence with the multiprocessor cutsets, and the value of eachcutset is equal to the cost of the corresponding assignment.Finally we consider how to solve the generalized multipro-cessor flow problem, and obtain partial results but no efficientsolution.

Let us take as a running example the three-processor pro-gram shown in Fig. 8 with the running times for each pro-

Module

A

B

C

D

E

P1 Time

4

m

m

10

4

P2 Time

m

6

-

7

7

P3T1me

*

-

7

5

3

Fig. 9. Cut representing a module assignment to three processors.

cessor given in Table II. Since we have to assign the nodes tothree rather than to two processors, we need to generalizethe notion of cutset. Let us designate the source and sinknodes of a commodity network to be distinguished nodes,and we say they are distinguished of type source or typesink. For the /i-processor problem we shall have n types ofdistinguished nodes. This leads naturally to the followingdefinition.

Definition: A cutset in a commodity flow graph with ntypes of nodes is a subset of edges that partitions the nodesof the graph into n disjoint subsets, each of which containsall of the distinguished nodes of a single type plus a possiblyempty collection of interior nodes. No proper subset of acutset is also a cutset.

A cutset for the network of Fig. 8 appears in Fig. 9. Weshall deal with networks in which there is a single distinguishednode of each type, and this node represents the processor towhich the interior nodes associated with it are assigned.

Proceeding as before we modify the intermodule referencegraph of a program to incorporate the relative running timecosts of each module on each processor. Again we add abranch from each interior node to each distinguished nodeas in the two-processor case. The weight on each such branchis computed by a formula explained below and exemplifiedin Fig. 10. The weights are selected so that, as in the two-processor case, the value of a cutset is equal to total runningtime.

For simplicity Fig. 10 does not show the branches fromnodes A, B, and C to nodes to which they are not assigned.Suppose that module D runs in time T§ on processor Ph

/= 1, 2, 3. Then the branch from node D to distinguishednode Sx carries the weight (T2 + T3 - T^H, and like-wise the branches to nodes S2 and S3 carry the weights(r , + r 3 - r2)/2, and (r, + T2 - r3)/2, respectively. Underthis weight assignment, if D is assigned to processor Pu thearcs to S2 and 53 are cut, and their weights total to Tt, therunning time of D on P\.

26

Page 27: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Fig. 10. Modified module-interconnection graph for a three-processorassignment.

CUT VALUE• T,

Fig. 11. TWo possible assignments of module D in an n-processorsystem.

This idea generalizes naturally to ^-processors. The runningtime of D on P\ contributes to the weight of the branchesfrom D to every distinguished node £/, i = 1,2, • • • , n. Itscontribution to the branch to Si is -(w- 2)Ti/(n- 1). Itscontribution to the branch to Sh i'* 1, is Txl{n - 1). If D isassigned to S\9 then n- \ branches are cut, each of whichcontributes Ti/(n - 1) to the cutset, giving a net contributionof 7*1. If D is assigned to St, i # 1 , then n-2 branches con-tribute Ti/(n-l) to the cutset weight and the branch to St

contributes -(n-2)Til(n-l) for a net contribution of zero.This is shown graphically in Fig. 11. Consequently, underthe graph modification scheme described here, we obtainthe desired property that the weight of a cutset is equal tothe cost of the corresponding module assignment.

One problem with this scheme is that some individual edgesof the graph may have a negative capacity, and this cannotbe treated by maximum flow algorithms. This problem caneasily be overcome, however. Suppose that among thebranches added to node D is an arc with negative weight-H>, and this is the most negative of the weights of thebranches added to node D. Then increase the weights ofall branches added to D by the amount W+ 1, and we claimthat no branch has negative weight after this change. More-over, every cut that isolates D from a distinguished nodebreaks precisely (M - 1) of the branches added to D, con-tributing a value to the cutset of (n - 1) (H>+ 1) plus the runtime of D on the processor corresponding to the cut. Theterm (n - 1) (W+ 1) is a constant independent of the assign-ment so that an assignment that minimizes the cutset weightin the present graph is an assignment that finds a minimumtime solution of the original problem.

At this point we come to the question of finding a minimumcutset in an ^-processor graph. The solution can be found

Fig. 12. Two cutsets in a graph.

by exhaustive enumeration but the computational complexityof such an approach is quite unattractive. It seems naturalthat the ^-processor problem can be reduced to several two-processor flow problems, and can be attacked efficiently inthis way. In the remainder of this section we show that atwo-processor flow can give information about the minimalcut in an n-processor graph, but we are unable to produce acomplete efficient algorithm.

Specifically, consider what happens when we run a two-processor flow from S\ to the subset {Si: 2 < i < w } , wherethe nodes in the subset are all sink nodes for the flow. Thistwo-processor flow produces a cutset that associates somenodes with S%, and the remainder of the nodes in the graphto the subset of n - 1 distinguished nodes. Does this flowgive any information about the minimum cut in the n-processorgraph? Indeed it does, as is shown by the following theorem.The proof technique is similar to the proof technique usedby Gomory and Hu [9] and Hu [11].

Theorem: Let node A be associated with distinguished node•Si by a two-processor flow algorithm. Then A is associatedwith S\ in a minimum cost partition of the ^-processor graph.

Proof: Without loss of generality, suppose thai A is associ-ated with Si by the two-processor flow algorithm, and that itmust be associated with S2 in a minimum cost partition. Weprove the theorem by showing that A can be moved from S2

to Si in the minimum cost partition without altering the costof the partition. Fig. 12 shows the cutset I that associatesA with Si when the two-processor flow is run, and the cutsetII that associates A with S2 in the minimum cost partition.These cutsets cross each other, thus dividing the graph intofour disjoint regions. Let us denote the four regions as Si,S2,A, and X according to the nodes appearing in these regionsin Fig. 12. (Region X may be empty, but this will not upsetthe proof.) Let c(U, V) denote the sum of the weights ofall branches between two regions U and V.

Since II is a minimal cut the value of II does not exceed thevalue of a cut that fails to include A with S2 - Thus,

). (1)

From this we find that c(A9Si)<c(S2fA) - c(A9X)9 andsince all costs are nonnegative we may add 2c(A9X) to the

27

Page 28: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

right-hand side of the inequality and obtain

c(A,Sl)<c(S2,A) + c(A,X). (2)

By hypothesis the algorithm associates node A with Sx,with a cost for cut I equal to c(Si,X) + c(SitS2) +c(A9X) + c(S2,A). However, if cut I veers slightly toexclude node A, and otherwise remains the same, the costof the new cut is c(5j,Jlf) + c(Si,S2) + c(A9Sx). SinceI is a minimal cost cut, we must have

c(A ,Si) > c(S2 9A) + c(A ,X). (3)

From (2) and (3) we find that the inequality in (3) can bechanged to equality. Since (3) holds with equality, by sub-stituting (3) into (1) we find 2c(A,X)<0, which must holdwith equality since all costs are nonnegative. Then (1) holdswith equality. Thus cut II can be altered to exclude node Afrom 52's subset and include A with Si's subset withoutchanging the cost of partition. This proves the theorem.

The previous theorem suggests that a two-processor algo-rithm may be used several times to find a minimum ^-processorcutset. There are some difficulties in extending the theorem,however, that have left the ^-processor problem still unsolved.Among the difficulties are the following.

1) The theorem states that a node associated with a dis-tinguished node by a two-processor flow belongs with thatnode in the minimum n-processor cutset. Unfortunately, itis easy to construct examples in which a node that belongswith a particular distinguished node in a minimum ^-processorcutset fails to be associated with that node by a two-processorflow.

2) Suppose a two-processor flow is run that results in theassignment of one or more nodes to a particular distinguishednode. Let these nodes and the corresponding distinguishednode be removed from the graph, and run a new two-processorflow from some other distinguished node S{ to all of the otherdistinguished nodes. In the cut found by this algorithm thenodes associated with St need not be associated with 5/ in aminimum cost n-processor partition. In other words, thetheorem does not apply when graph reduction is performed.

We conjecture that at most n2 two-processor flows arenecessary to find the minimum cost partition for ^-processorproblems, since there are only n(n-\)/2 different flows fromone distinguished node to another distinguished node. Theseflows should somehow contain all the information requiredto find a minimal cost ^-processor partition. It is possiblethat only n two-processor flows are required to solve theproblem since Gomory and Hu [9] have shown that thereare only n-\ independent two-terminal flows in an rt-terminalnetwork. This problem remains open at present.

VI. SUMMARY AND CONCLUSIONS

The two algorithms presented here provide for the assign-ment of program modules to two processors to minimize thecost of a computation on a distributed computer system. Thealgorithm uses a maximum flow algorithm as a subroutine sothe complexity of the module assignment is dependent uponthe implementation of the maximum flow algorithm used.Fortunately, the maximum flow algorithm is generally effi-

cient and there are various modifications of the algorithmthat take advantage of special characteristics of the moduleto obtain increased efficiency (see Dink [3],Karzanov [13]).To obtain truly optimal assignments, the costs for intermoduletransfers and relative running times have to be known. How-ever, if good estimates are available, these can be used toobtain near-optimal assignments that are satisfactory in apragmatic sense.

One may choose to use the assignment algorithm in a staticsense, that is, to find one assignment that holds for the life-time of a program, and incurs least cost. We believe it ismore reasonable to reassign modules dynamically during acomputation at the points where working sets change. Eachdynamic assignment then is chosen to be optimal for a givenworking set. Dynamic identification of working sets and theidentification of times at which a working set changes is stilla subject of much controversy with proposals favoring par-ticular schemes [2] or disfavoring those schemes [14]. Pro-gress in this area will in turn lead to progress in the abilityto make dynamic module assignments in a distributed pro-cessor system.

The model presented here is highly simplified and idealized,but it is useful in real systems. Poley et al. [7] can use ouralgorithms in place of their backtracking algorithms to domodule reassignment in their distributed computer systems.We suspect that the maximum flow approach is more efficientthan backtracking because worst-case performance of back-tracking has a much greater complexity than maximum flowalgorithm complexity. However, the actual performance oftheir algorithm may be quite different from worst-case per-formance, and could have a small average complexity, perhapslower than the average complexity of maximum flowalgorithms. No data on actual running times appears inFoley's report, so there is no information on which to baseestimates of relative running times.

There are a number of open problems related to the researchreported here. We mention just a few of them here.

1) If the minimum cost module assignment is not unique,then what additional criteria are useful in selecting the mostdesirable minimum cost assignment? Given such criteria, thisform of the problem can be solved by using efficient algo-rithms to find a maximum flow of minimal cost. Such algo-rithms are described by Ford and Fulkerson [6] and EdmondsandKarp[4].

2) If a program is divided into tasks that can execute simul-taneously under various precedence constraints, how canmodules be assigned so as to minimize the cost of compu-tation? This differs from the multiprocessor schedulingproblem studied by Coffman and Graham [1] and by othersin that there is no cost incurred in that model for interpro-cessor references.

3) If the various processors in distributed computer systemsare each multiprogrammed, and queue lengths become ex-cessive at individual processors, how might modules be reas-signed to minimize costs of computation over severalprograms?

4) Given that a module reassignment incurs a processor-to-processor communication cost, how might the cost of

28

Page 29: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

reassigning a module be factored into the module assignment

problem?

Since distributed computer systems are still in early stages

of development it is not clear which one of the research ques-

tions listed here will emerge to become important questions to

solve for distributed computer systems as they come of age.

The implementation of the methodology described here on the

system at Brown University suggests that automatic load

balancing among different processors can be done. We hope

that the present and future research will show not only the

possibility of load balancing but that it can be done efficiently

and that load balancing is an efficient method for tapping

the power of a distributed computer system.

ACKNOWLEDGMENT

The author is deeply indebted to Professor Andries van Dam

for providing the inspiration and motivation for the research,

and to J. Michel and R. Burns for implementing the ideas

described here on the ICOPS system at Brown University.

Discussions with Professor W. Kohler, S. Bokhari, and P. Jones

provided additional stimulation that contributed to the

research.

[12] R. E. Kahn, "Resource-sharing computei communicationsnetworks," Proc IEEE, vol. 60, pp. 1397-1407, Nov. 1972.

[13] A. V. Karzanov, "Determining the maximal flow in a networkby the method of preflows," Soviet Math. Doklady, vol. 15no. 2 ,pp.434-437,1974.

[14] B. G. Prieve, "Using page residency to select the working setparameter," Commun. Ass. Comput. Mach., vol. 16, pp. 619-620, Oct. 1973.

[15] G. M. Stabler, "A system for interconnected processing," Ph.D.dissertation, Brown Univ., Providence, RI, Oct. 1974.

[16] R. H. Thomas, "A resource sharing executive for the ARPANET,"in Proc. 1973 Nat. Comput. Conf, AFIPS Conf. Proc, vol. 42.Montvale, NJ: AFIPS Press, 1973.

[17] R. H. Thomas and D. Henderson, "MeRoss-A. multi-computerprogramming system," in Proc. 1972 Spring Joint Comput.Conf., AFIPS Conf. Proc, vol. 40. Montvale, NJ: AFIPS Press,1972.

[18] A. van Dam, "Computer graphics and its applications," FinalReport, NSF Grant GJ-28401X, Brown University, May 1974.

[19] W. A. Wulf and C. G. Bell, "C.mmp-A multi-miniprocessor,"in Proc. 1972 Fall Joint Comput. Conf, AFIPS Conf Proc,vol. 41 , Part II. Montvale, NJ: AFIPS Press, 1972, pp. 765-777.

R E F E R E N C E S

[1] E. G. Coffman, Jr., and R. L. Graham, "Optimal scheduling fortwo-processor systems," Acta Informatica, vol. 1, pp. 200-213,1972.

[2] P. J. Denning, "Properties of the working set mode," Commun.Ass. Comput. Mach., vol. 11, pp. 323-333, May 1968.

[3] E. A. Dinic, "Algorithm for solution of a problem of maximumflow in a network with power estimation," Soviet Math. Doklady,vol. 11, no. 5, pp. 1277-1280,1970.

[4] J. Edmonds and R. M. Karp, "Theoretical improvements inalgorithm efficiency for network flow problems," / . Ass. Comput.Mach., vol. 19, pp. 248-264, Apr. 1972.

[5] S. Even, Algorithmic Combinatorics. New York: Macmillan,1973.

[6] L. R. Ford, Jr., and D. R. Fulkerson, Flows in Networks. Prince-ton, NJ: Princeton Univ. Press, 1962.

[7] J. D. Foley et al., "Graphics system modeling," Rome Air Devel-opment Center, Final Rep. Contract F30602-73-C-0249, Rep.RADC-TR-211, Aug. 1974.

[8] S. H. Fuller and D. P. Siewiorek, "Some observations on semi-conductor technology and the architecture of large digital mod-ules," Computer, vol. 6, pp. 14-21, Oct. 1973.

[9] R. E. Gomory and T. C. Hu, "Multiterminal network flows,"/ . SIAM, vol. 9, pp. 551-570, Dec. 1961.

[10] F. E. Heart et al., "A new minicomputer/multiprocessor for theARPA network," in Proc. 1973 Nat. Comput. Conf., AFIPSConf. Proc, vol. 42. Montvale, NJ: AFIPS Press, 1973.

[11] T. C. Hu, Integer Programming and Network Flows. Reading,MA: Addison-Wesley, 1970.

Harold S. Stone (S'61-M'63) received the B.S. degree from PrincetonUniversity, Princeton, NJ, in 1960 and the M.S. and Ph.D. degrees from theUniversity of California, Berkeley, in 1961 and 1963, respectively.

While at the University of California he was a National ScienceFoundation Fellow and Research Assistant in the Digital ComputerLaboratory. From 1963 until 1968 he was with Stanford Research Institute,and from 1968 until 1974 he was Associate Professor of Electrical andComputer Science at Stanford University. He is currently Professor ofElectrical and Computer Engineering at the University of Massachusetts,Amherst. He has recently been engaged in research in parallel computation,computer architecture, and advanced memory system organization. In the pasthe has performed research in several areas including combinatorialalgorithms, operating systems, and switching theory. He has authored overthirty technical publications, and is an author, coauthor, or editor of five textbooks in computer science. He has also been a Visiting Lecturer at theUniversity of Chile, the Technical University of Berlin, and the University ofSao Paulo, and has held a NASA Research Fellowship at NASA AmesResearch Center.

Dr. Stone is a member of Sigma Xi and Phi Beta Kappa. He has served asTechnical Editor of Computer, and as a member of the Governing Board ofthe IEEE Computer Society.

29

Page 30: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Load Distributing forLocally DistributedSystems

Niranjan G. Shivaratri, Phillip Krueger, and Mukesh Singhal

Ohio State University

Load-distributingalgorithms can improve

a distributed system'sperformance by

judiciouslyredistributing the

workload among itsnodes. This article

describes load-distributing algorithms

and compares theirperformance.

he availability of low-cost microprocessors and advances in communica-tion technologies has spurred considerable interest in locally distributedsystems. The primary advantages of these systems are high performance,

availability, and extensibility at low cost. To realize these benefits, however,system designers must overcome the problem of allocating the considerableprocessing capacity available in a locally distributed system so that it is used to itsfullest advantage.

This article focuses on the problem of judiciously and transparently redistribut-ing the load of the system among its nodes so that overall performance is maxi-mized. We discuss several key issues in load distributing for general-purposesystems, including the motivations and design trade-offs for load-distributingalgorithms. In addition, we describe several load-distributing algorithms andcompare their performance. We also survey load-distributing policies used inexisting systems and draw conclusions about which algorithm might help inrealizing the most benefits of load distributing.

Issues in load distributing

We first discuss several load-distributing issues central to understanding itsintricacies. In this article, we use the terms computer, processor, machine, work-station, and node interchangeably.

Motivation. A locally distributed system consists of a collection of autonomouscomputers connected by a local area communication network. Users submit tasksat their host computers for processing. As Figure 1 shows, the random arrival oftasks in such an environment can cause some computers to be heavily loaded whileother computers are idle or only lightly loaded. Load distributing improvesperformance by transferring tasks from heavily loaded computers, where serviceis poor, to lightly loaded computers, where the tasks can take advantage of

Reprinted from Computer, vol. 25, no. 12, Dec. 1992, pp. 33-44.

30

Page 31: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Figure 1. Dis-tributed system

without loaddistributing.

Lightly loaded Moderately loaded

Heavily loaded Moderately loaded

computing capacity that would other-wise go unused.

If workloads at some computers aretypically heavier than at others, or ifsome processors execute tasks moreslowly than others, the situation shownin Figure 1 is likely to occur often. Theusefulness of load distributing is not soobvious in systems in which all proces-sors are equally powerful and have equal-ly heavy workloads over the long term.However, Livny and Melman1 haveshown that even in such a homogeneousdistributed system, at least one comput-er is likely to be idle while other com-puters are heavily loaded because ofstatistical fluctuations in the arrival oftasks to computers and task-service-timerequirements. Therefore, even in a ho-mogeneous distributed system, systemperformance can potentially be im-proved by appropriate transfers of work-load from heavily loaded computers(senders) to idle or lightly loaded com-puters (receivers).

What do we mean by performance?A widely used performance metric isthe average response time of tasks. Theresponse time of a task is the time elapsedbetween its initiation and its comple-tion. Minimizing the average responsetime is often the goal of load distrib-uting.

Dynamic, static, and adaptive algo-rithms. Load-distributing algorithmscan be broadly characterized as dy-namic, static, or adaptive. Dynamic load-distributing algorithms use system-state

information (the loads at nodes), at leastin part, to make load-distributing deci-sions, while static algorithms make nouse of such information.

Decisions are hardwired in static load-distributing algorithms using a prioriknowledge of the system. For example,under a simple "cyclic splitting" algo-rithm, each node assigns the ith task itinitiates to node i mod N> where N is thenumber of nodes in the system. Alter-natively, a probabilistic algorithm as-signs a task to node i with probability phwhere the probabilities are determinedstatically according to factors such asthe average task-initiation rate and ex-ecution rate for each node. Each ofthese algorithms can potentially makepoor assignment decisions. Because theydo not consider node states when mak-ing such decisions, they can transfer atask initiated at an otherwise idle nodeto a node having a serious backlog oftasks.

Dynamic algorithms have the poten-tial to outperform static algorithms byusing system-state information to im-prove the quality of their decisions. Forexample, a simple dynamic algorithmmight be identical to a static algorithm,except that it would not transfer anarriving task if the node where it arrivedwas idle. A more sophisticated dynamicalgorithm might also take the state ofthe receiving node into account, possi-bly transferring a task to a node only ifthe receiving node was idle. A still moresophisticated dynamic algorithm mighttransfer an executing task if it was shar-

ing a node with another task and someother node became idle. Essentially,dynamic algorithms improve perfor-mance by exploiting short-term fluctua-tions in the system state. Because theymust collect, store, and analyze stateinformation, dynamic algorithms incurmore overhead than their static coun-terparts, but this overhead is often wellspent. Most recent load-distributing re-search has concentrated on dynamic al-gorithms, and they will be our focus forthe remainder of this article.

Adaptive load-distributing algorithmsare a special class of dynamic algorithms.They adapt their activities by dynami-cally changing their parameters, or eventheir policies, to suit the changing sys-tem state. For example, if some load-distributing policy performs better thanothers under certain conditions, whileanother policy performs better underother conditions, a simple adaptive al-gorithm might choose between thesepolicies based on observations of thesystem state. Even when the system isuniformly so heavily loaded that no per-formance advantage can be gained bytransferring tasks, a nonadaptive dy-namic algorithm might continue oper-ating (and incurring overhead). To avoidoverloading such a system, an adaptivealgorithm might instead curtail its load-distributing activity when it observesthis condition.

Load. A key issue in the design ofdynamic load-distributing algorithms isidentifying a suitable load index. A loadindex predicts the performance of a taskif it is executed at some particular node.To be effective, load index readings tak-en when tasks initiate should correlatewell with task-response times. Load in-dexes that have been studied and usedinclude the length of the CPU queue,the average CPU queue length oversome period, the amount of availablememory, the context-switch rate, thesystem call rate, and CPU utilization.Researchers have consistently foundsignificant differences in the effective-ness of such load indexes — and thatsimple load indexes are particularly ef-fective. For example, Kunz2 found thatthe choice of a load index has consider-able effect on performance, and thatthe most effective of the indexes wehave mentioned is the CPU queue length.Furthermore, Kunz found no perfor-mance improvement over this simplemeasure when combinations of these

31

Page 32: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

load indexes were used. It is crucial thatthe mechanism used to measure load beefficient and impose minimal overhead.

Preemptive versus nonpreemptivetransfers. Preemptive task transfers in-volve transferring a partially executedtask. This operation is generally expen-sive, since collecting a task's state (whichcan be quite large or complex) is oftendifficult. Typically, a task state consistsof a virtual memory image, a processcontrol block, unread I/O buffers andmessages, file pointers, timers that havebeen set, and so on. Nonpreemptive tasktransfers, on the other hand, involveonly tasks that have not begun execu-tion and hence do not require transfer-ring the task's state. In both types oftransfers, information about the envi-ronment in which the task will executemust be transferred to the remote node.This information may include the user'scurrent working directory and the priv-ileges inherited by the task. Nonpre-emptive task transfers are also calledtask placements. Artsy and Finkel3 andDoughs and Ousterhout4 contain de-tailed discussions of issues in preemp-tive task transfer.

Centralization. Dynamic load-distrib-uting algorithms differ in their degreeof centralization. Algorithms can becentralized, hierarchical, fully decen-

tralized, or some combination of these.Algorithms with some centralized com-ponents are potentially less reliable thanfully decentralized algorithms, since thefailure of a central component may causethe entire system to fail. A solution tothis problem is to maintain redundantcomponents, which can become activewhen the previously active componentfails. A second weakness of centralizedalgorithms is not so easily remedied: Acentral component is potentially a bot-tleneck, limiting load distribution. Whilehierarchical algorithms can alleviateboth problems, the complete solutionlies in fully decentralized algorithms.

Components of a load-distributingalgorithm. Typically, a dynamic load-distributing algorithm has four compo-nents: a transfer policy, a selection poli-cy, a location policy, and an informationpolicy.

Transfer policy. A transfer policy de-termines whether a node is in a suitablestate to participate in a task transfer,either as a sender or a receiver. Manyproposed transfer policies are thresholdpolicies.1-57 Thresholds are expressed inunits of load. When a new task origi-nates at a node, the transfer policy de-cides that the node is a sender if the loadat that node exceeds a threshold Tv Onthe other hand, if the load at a node falls

below T2, the transfer policy decidesthat the node can be a receiver for aremote task. Depending on the algo-rithm, T, and T2 may or may not havethe same value.

Alternatives to threshold transferpolicies include relative transfer poli-cies. Relative policies consider the loadof a node in relation to loads at othersystem nodes. For example, a relativepolicy might consider a node to be asuitable receiver if its load is lower thanthat of some other node by at least somefixed 5. Alternatively, a node might beconsidered a receiver if its load is amongthe lowest in the system.

Selection policy. Once the transferpolicy decides that a node is a sender, aselection policy selects a task for trans-fer. Should the selection policy fail tofind a suitable task to transfer, the nodeis no longer considered a sender.

The simplest approach is to selectone of the newly originated tasks thatcaused the node to become a sender.Such a task is relatively cheap to trans-fer, since the transfer is nonpreemptive.

A selection policy considers severalfactors in selecting a task:

(1) The overhead incurred by thetransfer should be minimal. Forexample, a small task carries lessoverhead.

Load sharing versus load balancing

Dynamic load-distributing algorithms can be further clas-sified as being load-sharing or toad-balancing algorithms.The goal of a load-sharing algorithm is to maximize the rateat which a distributed system performs work when work isavailable. To do so, load-sharing algorithms strive to avoidunshared states*: states in which some computer lies idlewhile tasks contend for service at some other computer.

If task transfers were instantaneous, unshared statescould be avoided by transferring tasks only to idle comput-ers. Because of the time required to collect and package atask's state and because of communication delays, trans-fers are not instantaneous. The lengthy unshared statesthat would otherwise result from these delays can be par-tially avoided through anticipatory transfers,1 which aretransfers from overloaded to lightly loaded computers, un-der the assumption that lightly loaded computers are likelyto become idle soon. The potential performance gain ofthese anticipatory transfers must be weighed against theadditional overhead they incur.

Load-balancing algorithms also strive to avoid unsharedstates, but go a step beyond load sharing by attempting toequalize the loads at all computers. Krueger and Livny2

have shown that load balancing can potentially reduce themean and standard deviation of task response times, rela-tive to load-sharing algorithms. Because load balancingrequires a higher transfer rate than load sharing, however,the higher overhead incurred may outweigh this potentialperformance improvement.

References

1. M. Livny and M. Melman, "Load Balancing In HomogeneousBroadcast Distributed Systems," Proc. ACM Computer NetworkPerformance Symp., 1982, pp. 47-55. Proceedings printed as aspecial Issue of ACM Performance Evaluation Rev., Vol. 11, No.1, 1982, pp. 47-55.

2. P. Krueger and M. Livny, The Diverse Objectives of DistributedScheduling Policies," Proc. Seventh InVI Conf. Distributed Com-puting Systems, IEEE CS Press, Los Alamltos, Calif., Order No.801 (microfiche only), 1987, pp. 242-249.

32

Page 33: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

(2) The selected task should be longlived so that it is worthwhile toincur the transfer overhead.

(3) The number of location-depen-dent system calls made by the se-lected task should be minimal.Location-dependent calls are sys-tem calls that must be executedon the node where the task origi-nated, because they use resourcessuch as windows, the clock, or themouse that are only at that node.4*8

Location policy. The location poli-cy's responsibility is to find a suitable"transfer partner" (sender or receiver)for a node, once the transfer policy hasdecided that the node is a sender orreceiver.

A widely used decentralized policyfinds a suitable node through polling: Anode polls another node to find outwhether it is suitable for load sharing.Nodes can be polled either serially or inparallel (for example, multicast). A nodecan be selected for polling on a randombasis,5-6 on the basis of the informationcollected during the previous polls,1-7 oron a nearest neighbor basis. An alterna-tive to polling is to broadcast a queryseeking any node available for loadsharing.

In a centralized policy, a node con-tacts one specified node called a coordi-nator to locate a suitable node for loadsharing. The coordinator collects infor-mation about the system (which is theresponsibility of the information poli-cy), and the transfer policy uses thisinformation at the coordinator to selectreceivers.

Information policy. The informationpolicy decides when information aboutthe states of other nodes in the system isto be collected, from where it is to becollected, and what information is col-lected. There are three types of infor-mation policies:

(1) Demand-driven policies. Underthese decentralized policies, a node col-lects the state of other nodes only whenit becomes either a sender or a receiver,making it a suitable candidate to ini-tiate load sharing. A demand-driveninformation policy is inherently a dy-namic policy, as its actions depend onthe system state. Demand-driven poli-cies may be sender, receiver, or sym-metrically initiated. In sender-initiatedpolicies, senders look for receivers to

Using detailed stateinformation does not

always significantly aidsystem performance.

which they can transfer their load. Inreceiver-initiated policies, receivers so-licit loads from senders. A symmetrical-ly initiated policy is a combination ofboth: Load-sharing actions are triggeredby the demand for extra processing pow-er or extra work.

(2) Periodic policies. These policies,which may be either centralized or de-centralized, collect information period-ically. Depending on the informationcollected, the transfer policy may de-cide to transfer tasks. Periodic informa-tion policies generally do not adapt theirrate of activity to the system state. Forexample, the benefits resulting from loaddistributing are minimal at high systemloads because most nodes in the systemare busy. Nevertheless, overheads dueto periodic information collection con-tinue to increase the system load andthus worsen the situation.

(3) State-change-driven policies. Un-der state-change-driven policies, nodesdisseminate information about theirstates whenever their states change by acertain degree. A state-change-drivenpolicy differs from a demand-drivenpolicy in that it disseminates informa-tion about the state of a node, ratherthan collecting information about othernodes. Under centralized state-change-driven policies, nodes send state infor-mation to a centralized collection point.Under decentralized state-change-driven policies, nodes send informationto peers.

Stability: We first informally describetwo views of stability: the queuing the-oretic perspective and the algorithmicperspective. According to the queuingtheoretic perspective, when the long-termarrival rate of work to a system is great-er than the rate at which the system canperform work, the CPU queues growwithout bound. Such a system is termedunstable. For example, consider a load-distributing algorithm performing ex-cessive message exchanges to collectstate information. The sum of the load

due to the external work arriving andthe load due to the overhead imposedby the algorithm can become higherthan the service capacity of the system,causing system instability.

On the other hand, an algorithm canbe stable but still cause a system toperform worse than the same systemwithout the algorithm. Hence, we needa more restrictive criterion for evaluat-ing algorithms — the effectiveness of analgorithm. A load-distributing algorithmis effective under a given set of condi-tions if it improves performance rela-tive to a system not using load distribut-ing. An effective algorithm cannot beunstable, but a stable algorithm can beineffective.

According to the algorithmic perspec-tive, if an algorithm can perform fruit-less actions indefinitely with nonzeroprobability, the algorithm is unstable.For example, consider processor thrash-ing: The transfer of a task to a receivermay increase the receiver's queue lengthto the point of overloading it, necessi-tating the transfer of that task to yetanother node. This process may repeatindefinitely. In this case, a task movesfrom one node to another in search of alightly loaded node without ever receiv-ing any service. Casavant and Kuhl9 dis-cuss algorithmic instability in detail.

Example algorithms

During the past decade, many load-distributing algorithms have been pro-posed. In the following sections, we de-scribe several representative algorithmsthat have appeared in the literature. Theyillustrate how the components of load-distributing algorithms fit together andshow how the choice of components af-fects system stability. We discuss theperformance of these algorithms in the"Performance comparison" section.

Sender-initiatedalgorithms

Under sender-initiated algorithms,load-distributing activity is initiated byan overloaded node (sender) trying tosend a task to an underloaded node(receiver). Eager, Lazowska, and Zahor-jan6 studied three simple, yet effective,fully distributed sender-initiated algo-rithms.

33

Page 34: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Transfer policy. Each of the algo-rithms uses the same transfer policy, athreshold policy based on the CPU queuelength. A node is identified as a senderif a new task originating at the nodemakes the queue length exceed a thresh-old T. A node identifies itself as a suit-able receiver for a task transfer if ac-cepting the task will not cause the node'squeue length to exceed T.

Selection policy. All three algorithmshave the same selection policy, con-sidering only newly arrived tasks fortransfer.

Location policy. The algorithms dif-fer only in their location policies, whichwe review in the following subsections.

Random. One algorithm has a simpledynamic location policy called random,which uses no remote state informa-tion. A task is simply transferred to anode selected at random, with no infor-mation exchange between the nodes toaid in making the decision. Useless tasktransfers can occur when a task is trans-ferred to a node that is already heavilyloaded (its queue length exceeds 7).

An issue is how a node should treat atransferred task. If a transferred task istreated as a new arrival, then it canagain be transferred to another node,providing the local queue length ex-ceeds T. If such is the case, then irre-spective of the average load of the sys-tem, the system will eventually enter astate in which the nodes are spending alltheir time transferring tasks, with notime spent executing them. A simplesolution is to limit the number of timesa task can be transferred. Despite itssimplicity, this random location policyprovides substantial performance im-provements over systems not using loaddistributing.6 The "Performance com-parison" section contains examples ofthis ability to improve performance.

Threshold. A location policy can avoiduseless task transfers by polling a node(selected at random) to determinewhether transferring a task would makeits queue length exceed T (see Figure2). If not, the task is transferred to theselected node, which must execute thetask regardless of its state when the taskactually arrives. Otherwise, anothernode is selected at random and is polled.To keep the overhead low, the numberof polls is limited by a parameter called

the poll limit. If no suitable receivernode is found within the poll limit polls,then the node at which the task originat-ed must execute the task. By avoidinguseless task transfers, the threshold pol-icy provides a substantial performanceimprovement over the random locationpolicy.6 Again, we will examine this im-provement in the "Performance com-parison" section.

Shortest. The two previous approach-es make no effort to choose the bestdestination node for a task. Under theshortest location policy, a number ofnodes (poll limit) are selected at ran-dom and polled to determine their queuelength. The node with the shortest queueis selected as the destination for tasktransfer, unless its queue length is great-er than or equal to T. The destinationnode will execute the task regardless ofits queue length when the transferredtask arrives. The performance improve-ment obtained by using the shortest lo-cation policy over the threshold policywas found to be marginal, indicatingthat using more detailed state informa-tion does not necessarily improve sys-tem performance significantly.6

Information policy. When either theshortest or the threshold location policyis used, polling starts when the transferpolicy identifies a node as the sender ofa task. Hence, the information policy isdemand driven.

Stability. Sender-initiated algorithmsusing any of the three location policies

cause system instability at high systemloads. At such loads, no node is likely tobe lightly loaded, so a sender is unlikelyto find a suitable destination node. How-ever, the polling activity in sender-initi-ated algorithms increases as the taskarrival rate increases, eventually reach-ing a point where the cost of load shar-ing is greater than its benefit. At a moreextreme point, the workload that can-not be offloaded from a node, togetherwith the overhead incurred by polling,exceeds the node's CPU capacity andinstability results. Thus, the actions ofsender-initiated algorithms are not ef-fective at high system loads and causesystem instability, because the algo-rithms fail to adapt to the system state.

Receiver-initiatedalgorithms

In receiver-initiated algorithms, load-distributing activity is initiated from anunderloaded node (receiver), which triesto get a task from an overloaded node(sender). In this section, we describe analgorithm studied by Livny and Mel-man,1 and Eager, Lazowska, and Zahor-jan5 (see Figure 3).

Transfer policy. The algorithm'sthreshold transfer policy bases its deci-sion on the CPU queue length. Thepolicy is triggered when a task departs.If the local queue length falls below thethreshold T9 then the node is identifiedas a receiver for obtaining a task from a

Task arrives

Select node I w/randomly |

No

Queue thetask locally

Yes

No

Figure 2. Sender-initiated load sharing using a threshold location policy.

34

Page 35: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Task departureat/

Select node |/ randomly

Transfer Itask toy-

Stop

Figure 3. Receiver-initiated load sharing.

node (sender) to be determined by thelocation policy. A node is identified tobe a sender if its queue length exceedsthe threshold T.

Selection policy. The algorithm con-siders all tasks for load distributing, andcan use any of the approaches discussedunder "Selection policy" in the "Issuesin load distributing" section.

Location policy. The location policyselects a node at random and polls it todetermine whether transferring a taskwould place its queue length below thethreshold level. If not, then the pollednode transfers a task. Otherwise, an-other node is selected at random, andthe procedure is repeated until either anode that can transfer a task (a sender)is found or a static poll limit number oftries has failed to find a sender.

A problem with the location policy isthat if all polls fail to find a sender, thenthe processing power available at a re-ceiver is completely lost by the systemuntil another task originates locally atthe receiver (which may not happen fora long time). The problem severely af-fects performance in systems where onlya few nodes generate most of the systemworkload and random polling by re-ceivers can easily miss them. The reme-dy is simple: If all the polls fail to find asender, then the node waits until anoth-er task departs or for a predeterminedperiod before reinitiating the load-distributing activity, provided the nodeis still a receiver.7

Information policy. The information

policy is demand driven, since pollingstarts only after a node becomes a re-ceiver.

Stability. Receiver-initiated algo-rithms do not cause system instabilitybecause, at high system loads, a receiv-er is likely to find a suitable senderwithin a few polls. Consequently, pollsare increasingly effective with increas-ing system load, and little waste of CPUcapacity results.

A drawback. Under the most widelyused CPU scheduling disciplines (suchas round-robin and its variants), a new-ly arrived task is quickly provided aquantum of service. In receiver-initiat-ed algorithms, the polling starts when anode becomes a receiver. However, thesepolls seldom arrive at senders just afternew tasks have arrived at the sendersbut before these tasks have begun exe-cuting. Consequently, most transfers arepreemptive and therefore expensive.Sender-initiated algorithms, on the oth-er hand, make greater use of nonpre-emptive transfers, since they can ini-tiate load-distributing activity as soonas a new task arrives.

An alternative to this receiver-initi-ated algorithm is the reservation algo-rithm proposed by Eager, Lazowska,and Zahorjan.5 Rather than negotiatean immediate transfer, a receiver re-quests that the next task to arrive benonpreemptively transferred. Upon ar-rival, the "reserved" task is transferredto the receiver if the receiver is still areceiver at that time. While this algo-rithm does not require preemptive task

transfers, it was found to performsignificantly worse than the sender-initiated algorithms.

Symmetrically initiatedalgorithms

Under symmetrically initiated algo-rithms,10 both senders and receivers ini-tiate load-distributing activities for tasktransfers. These algorithms have theadvantages of both sender- and receiv-er-initiated algorithms. At low systemloads, the sender-initiated componentis more successful at finding underload-ed nodes. At high system loads, thereceiver-initiated component is moresuccessful at finding overloaded nodes.However, these algorithms may alsohave the disadvantages of both sender-and receiver-initiated algorithms. Aswith sender-initiated algorithms, poll-ing at high system loads may result insystem instability. As with receiver-initiated algorithms, a preemptive tasktransfer facility is necessary.

A simple symmetrically initiated al-gorithm can be constructed by combin-ing the transfer and location policiesdescribed for sender-initiated and re-ceiver-initiated algorithms.

Adaptive algorithms

A stable symmetrically initiated adap-tive algorithm. The main cause of sys-tem instability due to load sharing in thepreviously reviewed algorithms is indis-criminate polling by the sender's nego-tiation component. The stable symmet-rically initiated algorithm7 uses theinformation gathered during polling (in-stead of discarding it, as the previousalgorithms do) to classify the nodes inthe system as sender Ioverloaded, receiv-er!underloaded, or OK (nodes havingmanageable load). The knowledge aboutthe state of nodes is maintained at eachnode by a data structure composed of asenders list, a receivers list, and an OKlist. These lists are maintained using anefficient scheme: List-manipulative ac-tions, such as moving a node from onelist to another or determining to whichlist a node belongs, impose a small andconstant overhead, irrespective of thenumber of nodes in the system. Conse-quently, this algorithm scales well tolarge distributed systems.

35

Page 36: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

Initially, each node assumes that ev-ery other node is a receiver. This state isrepresented at each node by a receiverslist containing all nodes (except the nodeitself), and an empty senders list andOK list.

Transfer policy. The threshold trans-fer policy makes decisions based on theCPU queue length. The transfer policyis triggered when a new task originatesor when a task departs. The policy usestwo threshold values — a lower thresh-old and an upper threshold—to classifythe nodes. A node is a sender if itsqueue length is greater than its upperthreshold, a receiver if its queue lengthis less than its lower threshold, and OKotherwise.

Location policy. The location policyhas two components: the sender-initiat-ed component and the receiver-initiatedcomponent. The sender-initiated com-ponent is triggered at a node when itbecomes a sender. The sender polls thenode at the head of the receivers list todetermine whether it is still a receiver.The polled node removes the sendernode ID from the list it is presently in,puts it at the head of its senders list, andinforms the sender whether it is cur-rently a receiver, sender, or OK. Onreceipt of this reply, the sender trans-fers the new task if the polled node hasindicated that it is a receiver. Other-wise, the polled node's ID is removedfrom the receivers list and is put at thehead of the OK list or the senders listbased on its reply.

Polling stops if a suitable receiver isfound for the newly arrived task, if thenumber of polls reaches a poll limit (aparameter of the algorithm), or if thereceivers list at the sender node be-comes empty. If polling fails to find areceiver, the task is processed locally,though it may later be preemptivelytransferred as a result of receiver-initiated load sharing.

The goal of the receiver-initiated com-ponent is to obtain tasks from a sendernode. The nodes polled are selected inthe following order:

(1) Head to tail in the senders list. Themost up-to-date information isused first.

(2) Tail to head in the OK list. Themost out-of-date information isused first in the hope that thenode has become a sender.

(3) Tail to head in the receivers list.Again, the most out-of-date in-formation is used first.

The receiver-initiated component istriggered at a node when the node be-comes a receiver. The receiver polls theselected node to determine whether it isa sender. On receipt of the message, thepolled node, if it is a sender, transfers atask to the polling node and informs itof its state after the task transfer. If thepolled node is not a sender, it removesthe receiver node ID from the list it ispresently in, puts it at the head of thereceivers list, and informs the receiverwhether the polled node is a receiver orOK. On receipt of this reply, the receiv-er node removes the polled node IDfrom whatever list it is presently in andputs it at the head of its receivers list orOK list, based on its reply.

Polling stops if a sender is found, ifthe receiver is no longer a receiver, or ifthe number of polls reaches a static polllimit.

Selection policy. The sender-initiatedcomponent considers only newly arrivedtasks for transfer. The receiver-initiat-ed component can use any of the ap-proaches discussed under "Selectionpolicy" in the "Issues in load distribut-ing" section.

Information policy. The informationpolicy is demand driven, as polling startswhen a node becomes either a sender ora receiver.

Discussion. At high system loads, theprobability of a node's being under-loaded is negligible, resulting in unsuc-cessful polls by the sender-initiated com-ponent. Unsuccessful polls result in theremoval of polled node IDs from re-ceivers lists. Unless receiver-initiatedpolls to these nodes fail to find senders,which is unlikely at high system loads,the receivers lists remain empty. Thisscheme prevents future sender-initiat-ed polls at high system loads (which aremost likely to fail). Hence, the sender-initiated component is deactivated athigh system loads, leaving only receiv-er-initiated load sharing (which is effec-tive at such loads).

At low system loads, receiver-initiat-ed polls are frequent and generally fail.These failures do not adversely affectperformance, since extra processing ca-pacity is available at low system loads.

In addition, these polls have the posi-tive effect of updating the receivers lists.With the receivers lists accurately re-flecting the system's state, future send-er-initiated load sharing will generallysucceed within a few polls. Thus, byusing sender-initiated load sharing atlow system loads, receiver-initiated loadsharing at high loads, and symmetrical-ly initiated load sharing at moderateloads, the stable symmetrically initiat-ed algorithm achieves improved perfor-mance over a wide range of system loadsand preserves system stability.

A stable sender-initiated adaptivealgorithm. This algorithm7 uses the send-er-initiated load-sharing component ofthe previous approach but has a modi-fied receiver-initiated component toattract future nonpreemptive task trans-fers from sender nodes. An importantfeature is that the algorithm performsload sharing only with nonpreemptivetransfers, which are cheaper than pre-emptive transfers. The stable sender-initiated algorithm is very similar to thestable symmetrically initiated algorithm.In the following, we point out only thedifferences.

In the stable sender-initiated algo-rithm, the data structure (at each node)of the stable symmetrically initiated al-gorithm is augmented by an array calledthe state vector. Each node uses thestate vector to keep track of which list(senders, receivers, or OK) it belongs toat all the other nodes in the system. Forexample, statevector[nodeid] says towhich list node i belongs at the nodeindicated by nodeid. As in the stablesymmetrically initiated algorithm, theoverhead for maintaining this data struc-ture is small and constant, irrespectiveof the number of nodes in the system.

The sender-initiated load sharing isaugmented with the following step:When a sender polls a selected node,the sender's state vector is updated toshow that the sender now belongs to thesenders list at the selected node. Like-wise, the polled node updates its statevector based on the reply it sent to thesender node to reflect which list it willbelong to at the sender.

The receiver-initiated component isreplaced by the following protocol:When a node becomes a receiver, itinforms only those nodes that are misin-formed about its current state. The mis-informed nodes are those nodes whosereceivers lists do not contain the receiv-

36

Page 37: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

er's ID. This information is available inthe state vector at the receiver. Thestate vector at the receiver is then up-dated to reflect that it now belongs tothe receivers list at all those nodes thatwere misinformed about its current state.

There are no preemptive transfers of

partly executed tasks here. The sender-initiated load-sharing component willdo any task transfers, if possible, on thearrival of a new task. The reasons forthis algorithm's stability are the same asfor the stable symmetrically initiatedalgorithm.

Performancecomparison

In this section, we discuss the generalperformance trends of some of the ex-ample algorithms described in the pre-

Example systems

Here we review several working load-distributing algo-rithms.

V-system. The V-system1 uses a state-change-driven in-formation policy. Each node broadcasts (or publishes) itsstate whenever its state changes significantly. State informa-tion consists of expected CPU and memory utilization andparticulars about the machine itself, such as its processortype and whether it has a floating-point coprocessor. Thebroadcast state information is cached by all the nodes. If thedistributed system is large, each machine can cache infor-mation about only the best N nodes (for example, only thosenodes having unused or underused CPU and memory).

The V-system's selection policy selects only newly arrivedtasks for transfer. Its relative transfer policy defines a nodeas a receiver if it is one of the M most lightly loaded nodes inthe system, and as a sender if it is not. The decentralized lo-cation policy locates receivers as follows: When a task ar-rives at a machine, it consults the local cache and constructsthe set containing the M most lightly loaded machines thatcan satisfy the task's requirements. If the local machine isone of the M machines, then the task is scheduled locally.Otherwise, a machine is chosen randomly from the set andis polled to verify the correctness of the cached data. Thisrandom selection reduces the chance that multiple machineswill select the same remote machine for task execution. Ifthe cached data matches the machine's state (within a de-gree of accuracy), the polled machine is selected for execut-ing the task. Otherwise, the entry for the polled machine isupdated and the selection procedure is repeated. In practice,the cache entries are quite accurate, and more than threepolls are rarely required.1

The V-system's load index is the CPU utilization at a node.To measure CPU utilization, a background process that peri-odically increments a counter is run at the lowest prioritypossible. The counter is then polled to see what proportionof the CPU has been idle.

Sprite. The Sprite system2 is targeted toward a worksta-tion environment. Sprite uses a centralized state-change-driven information policy. Each workstation, on becoming areceiver, notifies a central coordinator process. The locationpolicy is also centralized: To locate a receiver, a workstationcontacts the central coordinator process.

Sprite's selection policy is primarily manual. Tasks must bechosen by users for remote execution, and the workstationon which these tasks reside is identified as a sender. Sincethe Sprite system is targeted for an environment in whichworkstations are individually owned, it must guarantee the

availability of the workstation's resources to the workstationowner. To do so, it evicts foreign tasks from a workstationwhenever the owner wishes to use the workstation. Duringeviction, the selection policy is automatic, and Sprite selectsonly foreign tasks for eviction. The evicted tasks are re-turned to their home workstations.

In keeping with its selection policy, the transfer policyused in Sprite is not completely automated:

(1) A workstation is automatically identified as a senderonly when foreign tasks executing at that workstation mustbe evicted. For normal transfers, a node is identified as asender manually and implicitly when the transfer is request-ed.

(2) Workstations are identified as receivers only for trans-fers of tasks chosen by the users. A threshold-based policydecides that a workstation is a receiver when the worksta-tion has had no keyboard or mouse input for at least 30 sec-onds and the number of active tasks is less than the numberof processors at the workstation.

The Sprite system designers used semiautomated selec-tion and transfer policies because they felt that the benefitsof completely automated policies would not outweigh the im-plementation difficulties.

To promote fair allocation of computing resources, Spritecan evict a foreign process from a workstation to allow theworkstation to be allocated to another foreign process underthe following conditions: If the central coordinator cannotfind an idle workstation for a remote execution request andit finds that a user has been allocated more than his fairshare of workstations, then one of the heavy user's process-es is evicted from a workstation. The freed workstation isthen allocated to the process that had received less than itsfair share. The evicted process may be automatically trans-ferred elsewhere if idie workstations become available.

For a parallelized version of Unix "make," Sprite's design-ers have observed a speedup factor of five for a systemcontaining 12 workstations.

Condor. Condor3 is concerned with scheduling long-run-ning CPU-intensive tasks (background tasks) only. Condoris designed for a workstation environment in which the totalavailability of a workstation's resources is guaranteed to theuser logged in at the workstation console (the owner).

Condor's selection and transfer policies are similar toSprite's in that most transfers are manually initiated by us-ers. Unlike Sprite, however, Condor is centralized, with aworkstation designated as the controller. To transfer a task,

37

Page 38: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

vious sections. In addition, we comparetheir performance with that of a systemthat performs no load distributing (asystem composed of n independent M/M/l systems) and that of an ideal systemthat performs perfect load distributing(no unshared states) without incurring

any overhead in doing so (an M/M/Ksystem). The results we present are fromsimulations of a distributed system con-taining 40 nodes, interconnected by a10-megabit-per-second token ring com-munication network.

For the simulation we made the fol-

lowing assumptions: Task interarrivaltimes and service demands are indepen-dently exponentially distributed, and theaverage task CPU service demand isone time unit. The size of a pollingmessage is 16 bytes, and the CPU over-head to either send or receive a polling

a user links it with a special system-call library and places itin a local queue of background tasks. The controller's dutyis to find idle workstations for these tasks. To accomplishthis, Condor uses a periodic information policy. The control-ler polls each workstation at two-minute intervals to find idleworkstations and workstations with background tasks wait-ing. A workstation is considered idle only when the ownerhas not been active for at least 12.5 minutes. The controllerqueues information about background tasks. If it finds anidle workstation, it transfers a background task to that work-station.

If a foreign background task is being served at a worksta-tion, a local scheduler at that workstation checks for localactivity from the owner every 30 seconds. If the owner hasbeen active since the previous check, the local schedulerpreempts the foreign task and saves its state. If the worksta-tion owner remains active for five minutes or more, the for-eign task is preemptively transferred back to the workstationat which it originated. The task may be transferred later toan idle workstation if one is located by the controller.

Condor's scheduling scheme provides fair access to com-puting resources for both heavy and light users. Fair alloca-tion is managed by the "up-down" algorithm, under whichthe controller maintains an index for each workstation. Ini-tially the indexes are set to zero. They are updated periodi-cally in the following manner: Whenever a task submitted bya workstation is assigned to an idle workstation, the index ofthe submitting workstation is increased. If, on the otherhand, the task is not assigned to an idle workstation, the in-dex is decreased. The controller periodically checks to see ifany new foreign task is waiting for an idle workstation. If atask is waiting, but no idle workstation is available and someforeign task from the lowest priority (highest index value)workstation is running, then that foreign task is preemptedand the freed workstation is assigned to the new foreigntask. The preempted foreign task is transferred back to theworkstation at which it originated.

Stealth. The Stealth Distributed Scheduler4 differs from V-system, Sprite, and Condor in the degree of cooperation thatoccurs between load distributing and local resource alloca-tion at individual nodes. Like Condor and Sprite, Stealth istargeted for workstation environments in which the availabili-ty of a workstation's resources must be guaranteed to itsowner. While Condor and Sprite rely on preemptive trans-fers to guarantee availability, Stealth accomplishes this taskthrough preemptive allocation of local CPU, memory, andfile-system resources.

A number of researchers and practitioners have noted that

even when workstations are being used by their owners,they are often only lightly utilized, leaving large portions oftheir processing capacities available. The designers ofStealth4 observed that over a network of workstations, thisunused capacity represents a considerable portion of thetotal unused capacity in the system — often well over half.

To exploit this capacity, Stealth allows foreign tasks toexecute at workstations even while those workstations areused by their owners. Owners are insulated from these for-eign tasks through prioritized local resource allocation.Stealth includes a prioritized CPU scheduler, a unique pri-oritized virtual memory system, and a prioritized file-systemcache. Through these means, owners' tasks get the re-sources they need, while foreign tasks get only the leftoverresources (which are generally substantial). In effect,Stealth replaces an expensive global operation (preemptivetransfer) with a cheap local operation (prioritized alloca-tion). By doing so, Stealth can simultaneously increase theaccessibility of unused computing capacity (by exploitingunderused workstations, as well as idle workstations) andreduce the overhead of load distributing.

Under Stealth, task selection is fully automated. It takesinto account the availability of CPU and memory resources,as well as past successes and failures with transferringsimilar tasks under similar resource-availability conditions.The remainder of Stealth's load-distributing policy is identi-cal to the stable sender-initiated adaptive policy discussedin the "Example algorithms" section of the main text. Be-cause it does not need preemptive transfers to assure theavailability of workstation resources to their owners, Stealthcan use relatively cheap nonpreemptive transfers almostexclusively. Preemptive transfers are necessary only to pre-vent starvation of foreign tasks.

References

1. M. Stumm, "The Design and Implementation of a DecentralizedScheduling Facility for a Workstation Cluster," Proc. Second Conf.Computer Workstations, IEEE CS Press, Los Alamitos, Calif., OrderNo. 810, 1988, pp. 12-22.

2. F. Douglis and J. Ousterhout, "Transparent Process Migration: De-sign Alternatives and the Sprite Implementation," Software — Prac-tice and Experience, Vol. 21, No. 8, Aug. 1991, pp. 757-785.

3. M.J. Litzkow, M. Livny, and M.W. Mutka, "Condor — A Hunter ofIdle Workstations," Proc. Eighth Int'l Conf. Distributed ComputingSystems, IEEE CS Press, Los Alamitos, Calif., Order No. 865,1988, pp. 104-111.

4. P. Krueger and R. Chawla, The Stealth Distributed Scheduler,"Proc. 11th int'l Conf. Distributed Computing Systems, IEEE CSPress, Los Alamitos, Calif., Order No. 2144, 1991, pp. 336-343.

38

Page 39: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

message is 0.003 time units. A nonpre-emptive task transfer incurs a CPU over-head of 0.02 time units, and a preemp-tive transfer incurs a 0.1 time unitoverhead. Transfer overhead is dividedevenly between the sending and the re-ceiving nodes. The amount of informa-tion that must be communicated for anonpreemptive transfer is 8 Kbytes,while a preemptive transfer requires200 Kbytes.

While the specific performance val-ues we present are sensitive to theseassumptions, the performance trendswe observe are far less sensitive andendure across a wide range of distribut-ed systems. Errors in the results wepresent are less than 5 percent at the 90percent confidence level.

Figure 4 plots the performance of thefollowing:

• M/M/l, a distributed system thatperforms no load distributing;

• a sender-initiated algorithm with arandom location policy, assumingthat a task can be transferred atmost once;

• a sender-initiated algorithm with athreshold location policy;

• a symmetrically initiated algorithm(sender- and receiver-initiated al-gorithms combined);

• a stable sender-initiated algorithm;• a receiver-initiated algorithm;• a stable symmetrically initiated al-

gorithm; and•M/M/K, a distributed system that

performs ideal load distributing with-out incurring overhead for load dis-tributing.

A fixed threshold of T = upper thresh-old = lower threshold = 1 was used foreach algorithm.

For these comparisons, we assumed asmall fixed poll limit (5). A small limit issufficient: If P is the probability that aparticular node is below threshold, thenthe probability that a node below thresh-old is first encountered on the rth poll isP(l - P)'"1.6 (This result assumes thatnodes are independent, a valid assump-tion if the poll limit is small relative tothe number of nodes in the system.) Forlarge F, this expression decreases rap-idly with increasing L The probability ofsucceeding on the first few polls is high.For small P, the quantity decreases moreslowly. However, since most nodes are

above threshold, the improvement insystemwide response time that will re-sult from locating a node below thresh-old is small. Quitting the search afterthe first few polls does not carry a sub-stantial penalty.

Main result. The ability of load dis-tributing to improve performance is in-tuitively obvious when work arrives atsome nodes at a greater rate than atothers, or when some nodes have fasterprocessors than others. Performanceadvantages are not so obvious when allnodes are equally powerful and haveequal workloads over the long term.Figure 4a plots the average task re-sponse time versus offered system loadfor such a homogeneous system undereach load-distributing algorithm. Com-paring M/M/l with the sender-initiatedalgorithm (random location policy), wesee that even this simple load-distribut-ing scheme provides a substantial per-formance improvement over a systemthat does not use load distributing. Con-siderable further improvement in per-formance can be gained through simplesender-initiated (threshold locationpolicy) and receiver-initiated load-

fi —

5 -

.i 4H

3 -

2 -

1 -

I I I I I I I I5 10 15 20 25 30 35 40

(b)

- A A- M/M/1- A A- M/M/K- a - a - Receiver initiated

- Sender-initiated with random location policySender-initiated with threshold location policySymmetrically initiated

- • - - • • - Stable sender initiated- o - - -o - Stable symmetrically initiated

Figure 4. Average response time versus system load (a) and number of load-generating machines (b).

39

Page 40: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

sharing schemes. The performance ofthe best algorithm — the stable sym-metrically initiated algorithm — ap-proaches that of M/M/K, though thisoptimistic lower bound can never bereached, since it assumes no load-distri-bution overhead.

Receiver- versus sender-Initiated loadsharing. Figure 4a shows that the send-er-initiated algorithm with a thresholdlocation policy performs marginallybetter than the receiver-initiated algo-rithm at light to moderate system loads,while the receiver-initiated algorithmperforms substantially better at highsystem loads (even though the preemp-tive transfers it uses are much moreexpensive than the nonpreemptive trans-fers used by the sender-initiated algo-rithm). Receiver-initiated load sharingis less effective at low system loads be-cause load sharing is not initiated at thetime that one of the few nodes becomesa sender, and thus load sharing oftenoccurs late.

In robustness, the receiver-initiatedpolicy has an edge over the sender-initiated policy. The receiver-initiatedpolicy performs acceptably over theentire system load spectrum, whereasthe sender-initiated policy causes sys-tem instability at high loads. At suchloads, the receiver-initiated policy main-tains system stability because its pollsgenerally find busy nodes, while pollsdue to the sender-initiated policy aregenerally ineffective and waste resourcesin efforts to find underloaded nodes.

Symmetrically initiated load sharing.This policy takes advantage of its send-er-initiated load-sharing component atlow system loads, its receiver-initiatedcomponent at high system loads, andboth at moderate system loads. Hence,its performance is better than or match-es that of the sender-initiated algorithmwith threshold location policy at all lev-els of system load, and is better thanthat of the receiver-initiated policy atlow to moderate system loads. Never-theless, this policy also causes systeminstability at high system loads becauseof the ineffective polling by its sender-initiated component at such loads.

Stable load-sharing algorithms. Theperformance of the stable symmetrical-ly initiated algorithm matches that ofthe best of the algorithms at low systemloads and offers substantial improve-

ments at high loads (greater than 0.85)over all the nonadaptive algorithms. Thisperformance improvement results fromits judicious use of the knowledge gainedby polling. Furthermore, this algorithmdoes not cause system instability.

The stable sender-initiated algorithmyields as good or better performancethan the sender-initiated algorithm withthreshold location policy, with markedimprovement at loads greater than 0.6,and yields better performance than thereceiver-initiated policy for system loadsless than 0.85. And it does not causesystem instability. While it is not asgood as the stable symmetrically initiat-ed algorithm, it does not require expen-sive preemptive task transfers.

Heterogeneous workload. Heteroge-neous workloads are common in dis-tributed systems.8 Figure 4b plots meanresponse time against the number ofload-generating nodes in the system.All system workload is assumed to ini-tiate at this subset of nodes, with noneoriginating at the remaining nodes. Asmaller subset of load-generating nodesindicates a higher degree of heteroge-neity.

We assume a system load of 0.85.Without load distributing, the systembecomes unstable even at low levels ofheterogeneity under this load. Whilewe do not plot these results, instabilityoccurs for M/M/l when the number ofload-generating nodes is less than orequal to 33.

Among the load-distributing algo-rithms, Figure 4b shows that the re-ceiver-initiated algorithm becomesunstable at a much lower degree of het-erogeneity than any other algorithm.The instability occurs because randompolling is unlikely to find a sender whenonly a few nodes are senders. The send-er-initiated algorithm with a thresholdlocation policy also becomes unstableat relatively low levels of heterogene-ity. As fewer nodes receive all the sys-tem load, they must quickly transfertasks. But the senders become over-whelmed as random polling results inmany wasted polls.

The symmetrically initiated algorithmalso becomes unstable, though at high-er levels of heterogeneity, because ofineffective polling. It outperforms thereceiver- and sender-initiated algorithmsbecause it can transfer tasks at a higherrate than either. The stable sender-initiated algorithm remains stable for

higher levels of heterogeneity thanthe sender-initiated algorithm with athreshold location policy because it isable to poll more effectively. Its even-tual instability results from the absenceof preemptive transfers, which preventssenders from transferring existing taskseven after they learn about receivers.Thus senders become overwhelmed.

The sender-initiated algorithm with arandom location policy, the simplestalgorithm of all, performs better thanmost algorithms at extreme levels ofheterogeneity. By simply transferringtasks from the load-generating nodes torandomly selected nodes without anyregard to their status, it essentially bal-ances the load across all nodes in thesystem, thus avoiding instability.

Only the stable symmetrically initiat-ed algorithm remains stable for all lev-els of heterogeneity. Interestingly, itperforms better with increasing hetero-geneity. As heterogeneity increases,senders rarely change their states andwill generally be in the senders lists atthe nonload-generating nodes. The non-load-generating nodes will alternatebetween the OK and receiver states andappear in the OK or receivers lists at theload-generating nodes. With the listsaccurately representing the system state,nodes are often successful in findingpartners.

Over the past decade, the modeof computing has shifted frommainframes to networks of

computers, which are often engineer-ing workstations. Such a networkpromises higher performance, betterreliability, and improved extensibilityover mainframe systems. The total com-puting capacity of such a network canbe enormous. However, to realize theperformance potential, a good load-distributing scheme is essential.

We have seen that even the simplestload-distributing algorithms have a greatdeal of potential to improve perfor-mance. Simply transferring tasks thatarrive at busy nodes to randomly cho-sen nodes can improve performanceconsiderably. Performance is improvedstill more if potential receiving nodesare first polled to determine whetherthey are suitable as receivers. Anothersignificant performance benefit can begained, with little additional complexi-ty, by modifying such an algorithm topoll only the nodes most likely to be

40

Page 41: Chapter 1 Introduction to Scheduling and Load Balancingciciani/DIDATTICA/... · dynamic scheduling (often referred to as dynamic load balancing). 1.1 Static scheduling In static scheduling,

suitable receivers. Each of these algo-rithms can be designed to use nonpre-emptive transfers exclusively. As a re-sult, all carry relatively low overhead insoftware development time, mainte-nance time, and execution overhead.Among these algorithms, an algorithmsuch as the stable sender-initiated algo-rithm plotted in Figure 4 provides goodperformance over a wide range of con-ditions for all but the most "extreme"systems.

By extreme systems we mean systemsthat may experience periods duringwhich a few nodes generate very heavyworkloads. Under such conditions, aload-distributing algorithm that usespreemptive transfers may be necessary.We recommend an algorithm such asthe stable symmetrically initiated algo-rithm, which can initiate transfers fromeither potential sending or potentialreceiving nodes, and targets its polls tonodes most likely to be suitable part-ners in a transfer. Such an algorithmprovides larger performance improve-ments —over a considerably wider rangeof conditions — than any other algo-rithm discussed in this article. •

AcknowledgmentsWe are deeply grateful to the referees,

whose comments helped to improve thepresentation. Portions of this material arebased on work supported by the NationalScience Foundation under Grant No. CCR-8909072.

References1. M. Livny and M. Melman, "Load Balanc-

ing in Homogeneous Broadcast Distrib-uted Systems," Proc. ACM Computer Net-work Performance Symp., 1982, pp. 47-55.Proceedings printed as a special issue ofA CM Performance Evaluation Rev., Vol.11, No. 1,1982, pp. 47-55.

2. T. Kunz, "The Influence of DifferentWorkload Descriptions on a HeuristicLoad Balancing Scheme," IEEE Trans.Software Eng., Vol. 17, No. 7, July 1991,pp. 725-730.

3. Y. Artsy and R. Finkel, "Designing aProcess Migration Facility: The Char-lotte Experience," Computer, Vol. 22,No. 9, Sept. 1989, pp. 47-56.

4. F. Doughs and J. Ousterhout, "Trans-parent Process Migration: Design Alter-natives and the Sprite Implementation,"Software—Practice and Experience, Vol.21, No. 8, Aug. 1991, pp. 757-785.

5. D.L. Eager, E.D. Lazowska, and J. Za-horjan, "A Comparison of Receiver-Initiated and Sender-Initiated AdaptiveLoad Sharing," Performance Evaluation,Vol. 6, No. 1, Mar. 1986, pp. 53-68.

6. D.L. Eager, E.D. Lazowska, and J. Zahor-jan, "Adaptive Load Sharing in Homo-geneous Distributed Systems," IEEETrans. Software Eng., Vol. 12, No. 5, May1986, pp. 662-675.

7. N.G. Shivaratri and P. Krueger, "TwoAdaptive Location Policies for GlobalScheduling," Proc. 10th Int'l Conf. Dis-tributed Computing Systemst IEEE CSPress, Los Alamitos, Calif., Order No.2048,1990, pp. 502-509.

8. P. Krueger and R. Chawla, "The StealthDistributed Scheduler," Proc. 11th Int'lConf. Distributed Computing Systems,IEEE CS Press, Los Alamitos, Calif.,Order No. 2144,1991, pp. 336-343.

9. T.L. Casavant and J.G. Kuhl, "Effects ofResponse and Stability on Scheduling inDistributed Computing Systems," IEEETrans. Software Eng., Vol. 14, No. 11,Nov. 1988, pp. 1,578-1,587.

10. P. Krueger and M. Livny, "The DiverseObjectives of Distributed SchedulingPolicies," Proc. Seventh Int'l Conf. Dis-tributed Computing Systems, IEEE CSPress, Los Alamitos, Calif., Order No.801 (microfiche only), 1987, pp. 242-249.

puter science from Villanova University in1983. He is a member of the IEEE ComputerSociety.

Niranjan G. Shivaratri is a PhD student inthe Department of Computer and Informa-tion Science at Ohio State University. From1983 to 1987, he worked as a systems pro-grammer for the Unisys Corporation, con-centrating on network and operating sys-tems software development. His researchinterests include distributed systems andperformance modeling. He and MukeshSinghal coauthored Advanced Concepts inOperating Systems, to be published byMcGraw-Hill.

Shivaratri received a BS degree in elec-trical engineering from Mysore University,India, in 1979, and an MS degree in corn-

Phillip Krueger is an assistant professor ofcomputer science at Ohio State University.He directs the Stealth Distributed SchedulerProject at Ohio State, focusing on the designand construction of a distributed schedulertargeted for workstation-based distributedsystems. His research interests include oper-ating systems, concurrent and distributedsystems, real-time systems, simulation, andperformance analysis.

Krueger received his BS degree in physics,and his MS and PhD degrees in computerscience from the University of Wisconsin -Madison. He is a member of the IEEE Com-puter Society and the ACM.

Mukesh Singhal has been a member of thefaculty of the Department of Computer andInformation Science at Ohio State Universi-ty since 1986 and is currently an associateprofessor. His research interests include dis-tributed systems, distributed databases, andperformance modeling. He and NiranjanShivaratri coauthored Advanced Conceptsin Operating Systems, to be published byMcGraw-Hill. He also served as co-guesteditor of the August 1991 special issue ofComputer on distributed computing sys-tems.

Singhal received a bachelor of engineer-ing degree in electronics and communicationengineering with high distinction from theUniversity of Roorkee, India, in 1980, and aPhD in computer science from the Universi-ty of Maryland in 1986.

Readers can contact the authors at theDept. of Computer and Information Science,Ohio State University, Columbus, OH 43210.Their e-mail addresses are {niran philksinghal}@cis.ohio-state.edu.

41