Optimal task allocation in distributed systems by graph matching and state space search

https://doi.org/10.1016/S0164-1212(98)10088-2Get rights and content

Abstract

We consider the problem of finding an optimal allocation of tasks onto processors of a distributed computing system. The processors need not have any particular inter-connection structure. We consider two models, one in which no precedence relations exist between tasks, and another in which there are precedence relations between tasks. Each task causes two types of costs to be incurred by the processor to which it is allocated – the execution cost of the task (which varies from processor to processor in a heterogeneous system), and communication cost when the task has to communicate with other tasks which are not allocated to the same processor.

The aim of the task allocation (problem) is to minimize the total turnaround time of all tasks put together. This problem is known to be NP-hard when there are more than three processors. We use a state space search technique – the A* algorithm to obtain an optimal allocation. We propose a method to reduce the number of nodes generated in the state space search tree. We compare our algorithm for the optimal task allocation problem with that of similar existing algorithms, and show its effectiveness by performing extensive simulations over a wide range of parameters.

Introduction

Distributed computing systems have become very popular these days due to the rapid decline in hardware costs. There are two main reasons why one would opt for a distributed system. First, it makes good economic sense to share a number of resources among many users rather than have each of these resources be duplicated at every site. The other reason is that there are many applications which would normally take a long time to finish execution on one processor. If these applications could be divided into a number of tasks and executed in parallel on different processors, there would be a tremendous improvement in performance. However, to exploit the latter advantage, the tasks have to be assigned carefully to suitable processors. A task takes a certain amount of time to execute on a particular processor. (In a heterogeneous system, it varies from processor to processor.) It is called the execution cost of the task on a particular processor. A task also has to send intermediate data to other tasks and exchange control messages, and so a communication cost is incurred, which again varies depending on the capacities of links between processors. The task allocation problem (also referred to as task assignment problem) is concerned with allocating the tasks to processors in a cost-effective manner, i.e. the goal is to minimize the turnaround time of the processors. (By turnaround time of a processor, we mean the total time the processor takes to complete the work allotted to it. It includes both execution time and communication time.) Achieving this goal requires a balance between two conflicting criteria. Assigning all tasks to one or two processors may appear to be the best way to eliminate communication costs. But this means one processor would be heavily loaded; if the tasks are distributed on as many processors as possible, the load on each processor would be more evenly balanced, but at the same time it increases communication costs. Hence there is a trade-off involved.

Our work concentrates on determining an optimal task allocation that leads to minimum turnaround time possible. This is known to be an NP-hard problem when there are more than two processors (Stone, 1977). Solution techniques for the task allocation problem in distributed computing systems can be classified into three broad categories: graph-theoretic methods (Bokhari, 1979; Bokhari, 1981; Stone, 1977; Stone, 1978; Stone and Bokhari, 1978), integer 0–1 programming techniques (Chern et al., 1989; Chu et al., 1980) and heuristic methods (Efe, 1982; Lo, 1982). Shen and Tsai (1985) formulated task assignment as a graph-matching problem and used a state-space search method (A* algorithm) to solve it. Their model considered communicating tasks, but did not take into account precedence relations between tasks. Wang and Tsai (1988) extended the model to include precedence relations also. Chen and Yur (1990) used the same model but better heuristics to estimate the cost of assignment at each node in the search tree. Ramakrishnan et al. (1993) proposed a hybrid strategy, incorporating max-flow/min-cut techniques used by Stone (1977) to solve the assignment problem considered by Shen and Tsai (1985). In this paper, we propose a technique whereby the state space search can be drastically reduced by allocating independent tasks last. Sinclair (1987) had followed a similar approach, but there the model had it's aim as to minimize the sum of total costs at all processors combined. In our case it is not a straightforward matter to incorporate task independence properties because our goal is to minimize the turnaround time of the maximum loaded processor. We have successfully incorporated the techniques which exploit task independence properties in both models, the one originally proposed by Shen and Tsai (1985) which does not take into account precedence relations between tasks, and also the extended model of Wang and Tsai (1988) which considers precedence relations between tasks. Henceforth the two models will be referred to as Model A and Model B, respectively. To demonstrate the effectiveness of our proposed algorithms (for Model A and Model B), extensive experimental studies were conducted and the algorithms were compared with the above mentioned algorithms (Shen and Tsai, 1985; Wang and Tsai, 1988). For Model A, the comparison was with Shen and Tsai's algorithm (Shen and Tsai, 1985) and with A* algorithm such that h(x)=0. For Model B the comparison was with Wang and Tsai's algorithm (Wang and Tsai, 1988), the two algorithms proposed by Chen and Yur (1990), and again with A algorithm such that h(x)=0. Statistics were taken after varying different parameters such as number of processors, number of tasks, average execution to communication cost ratio, and shapes of the task graphs.

The remainder of this paper is organized as follows. In Section 2the assumptions are stated first and then the problem is defined, paying particular attention to the cost function. Section 3reviews graph matching and state space search using A algorithm. It briefly describes the existing algorithms (mentioned above) and also explains how our algorithms improve the existing algorithms. Illustrative examples are shown in Section 4. Section 5presents the experimental results. Finally, some concluding remarks are made in Section 6.

Section snippets

Assumptions and problem statement

The task allocation problem we consider in this paper has the same assumptions as those in Shen and Tsai (1985) while dealing with Model A, and those in Wang and Tsai (1988) and Chen and Yur (1990) while dealing with Model B.

Graph matching model and state space search

Let G1=(V1,E1) and G2=(V2,E2) be two graphs where V1 and V2 are the vertex sets, and E1 and E2 the corresponding edge sets. G1 is said to match G2 if there exists a mapping (possibly many-to-one) M:V1V2 such that if (a,b) is in E1 then there exists an edge in E2 connecting M(a) to M(b).

In our model the task graph forms G1 and the processor graph forms G2. The task graph shows the communication between various tasks whereas the processor graph shows the connectivity of processors in the system.

Illustrative examples

Two illustrative examples are presented here, one for model A and another for Model B. For Model A, the same example as given in Shen and Tsai's paper (1985) is reproduced here. The task and processor graphs are shown in Fig. 1Fig. 2, respectively. Table 1 contains the inter-task communication costs (they are independent of processor assignments in this example), where Table 2 contains the execution costs of tasks at various processors. The optimal assignment for this example is 1 → C,2 → C, 3

Experimental results

To demonstrate that our methods improve performance, the various algorithms were implemented as C programs and they were run on Sparc Classics over a wide range of parameters.

For Model A, our algorithm and Shen and Tsai's algorithm (Shen and Tsai, 1985) were tried out on 900 examples. The parameters we studied were as follows: Number of processors in the system, n (3–5), number of tasks m (4–8), ratio of average execution cost to average communication cost i.e. P:C ratio (5:1, 1:1, 1:5), and

Conclusions

In this paper we have looked at the problem of optimal allocation of tasks onto processors in a distributed computing system. We considered two models, one in which the task graph consisted of communicating tasks with no precedence relations, whereas in the second model, precedence relations were also present. In both models, no specific connection structure was assumed for the processors. The former model was the same as considered by Shen and Tsai (1985) and the latter model was the same as

Ajith Tom P. obtained a B.Tech. in computer science and engineering from Calicut University, India in 1993, and an M.S. in computer science and engineering from the Indian Institute of Technology Madras, in 1996. Since May, he has been working as a software engineer at Motorola India Electronics Ltd., Bangalore.

C. Siva Ram Murthy obtained the B.Tech. degree in electronics and communications engineering from Regional Engineering College, Warangal, in 1982, M.Tech. in computer engineering from

References (16)

  • M.S. Chern et al.

    An LC branch and bound algorithm for module assignment problem

    Information Processing Letters

    (1989)
  • S.H. Bokhari

    Dual processor scheduling with dynamic reassignment

    IEEE Transactions on Software Engineering

    (1979)
  • S.H. Bokhari

    A shortest tree algorithm for optimal assignments across space and time in a distributed processor system

    IEEE Transactions on Software Engineering

    (1981)
  • Chen, G.H., Yur, J.S., 1990. A branch and bound with underestimates algorithm for the task assignment problem with...
  • Chu, W.W., Holloway, L.J., Lan. M.T., Efe, K., 1980. Task allocation in distributed data processing. Computer, pp....
  • K. Efe

    Heuristic models of task assignment scheduling in distributed systems

    Computer

    (1982)
  • Garey, M.R., Johnson, D.S., 1979. Computers and Intractability: A Guide to the Theory of NP-Completeness, Freeman, San...
  • V.M. Lo

    Heuristic algorithms for task assignment in distributed systems

    IEEE Transactions on Computers

    (1982)
There are more references available in the full text version of this article.

Cited by (0)

Ajith Tom P. obtained a B.Tech. in computer science and engineering from Calicut University, India in 1993, and an M.S. in computer science and engineering from the Indian Institute of Technology Madras, in 1996. Since May, he has been working as a software engineer at Motorola India Electronics Ltd., Bangalore.

C. Siva Ram Murthy obtained the B.Tech. degree in electronics and communications engineering from Regional Engineering College, Warangal, in 1982, M.Tech. in computer engineering from Indian Institute of Technology (IIT), Kharagpur, in 1984, and Ph.D. in computer science from Indian Institute of Science (IISc), Bangalore, in 1988. From March 1988 to September 1988 he worked as a Scientific Officer in the Supercomputer Education and Research Centre at IISc. He subsequently joined IIT Madras as a Lecturer of Computer Science and Engineering. He became an Assistant Professor in August 1989 and is currently an Associate Professor at the same place. He has held visiting positions at German National Research Centre for Information Technology (GMD), Sankt Augustin, Germany, University of Washington, Seattle, USA, and University of Stuttgart, Germany. He is a recipient of the Seshagiri Kaikini Medal for the best Ph.D. thesis and also of the Indian National Science Academy Medal for Young Scientists.

View full text