2005 (058) - Dynamic Task Scheduling Genetic Algorithm
2005 (058) - Dynamic Task Scheduling Genetic Algorithm
computing
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE
initialise population ulers for real-world distributed systems. Current dynamic
do{ GA schedulers have been shown to produce near optimal
crossover schedules in simulations [19, 20], although assumptions
random mutation that have been made limit their generality. For example, in-
selection stantaneous message passing [19], homogeneous process-
}while(stopping conditions not met) ing resources [19, 20], variable communications costs and
variable processing resources are not considered [19, 20].
return best individual
3. Scheduling Algorithm
Figure 1. Pseudo code for genetic algorithm
The algorithm we have developed is based on the
2. Genetic Algorithms and scheduling state-of-the-art homogeneous GA scheduler developed
by Zomaya et al. [19, 20]. We have created an algo-
There are many examples in the literature of artificial in- rithm which can adapt to varying resource environments
telligence techniques being applied to task scheduling [1, 8, and can produce near-optimal schedules. We wish to sched-
11, 14, 15, 17, 18, 19, 20]. Meta-heuristic search techniques ule an unknown total number of tasks for processing on a
such as GAs [7], tabu [6], and ant colony search [3] are most distributed system with a minimal total execution time, oth-
applicable to the task scheduling problem because we wish erwise known as makespan.
to quickly search for a near optimal schedule out of all pos- The processors of the distributed system are heteroge-
sible schedules. Good results have resulted from the use of neous. The available network resources between processors
GAs in task scheduling algorithms [1, 8, 11, 14, 15, 17, 19, in the distributed system can vary over time. The availabil-
20]. ity of each processor can vary over time (processors are not
A GA is a meta-heuristic search technique which allows dedicated can may have other tasks that partially use their
for large solution spaces to be partially searched in poly- resources). Tasks are indivisible, independent of all other
nomial time, by applying evolutionary techniques from na- tasks, arrive randomly, and can be processed by any proces-
ture [7]. GAs use historical information to exploit the best sor in the distributed system.
solutions from previous searches, known as generations, When tasks arrive they are placed in a queue of unsched-
along with random mutations to explore new regions of uled tasks. Batches of tasks from this queue are scheduled
the solution space. In general a GA repeats three steps (se- on processors during each invocation of the scheduler. Each
lection, crossover, and random mutations) as shown by the idle processor in the system requests a task to process from
pseudo code in Fig. 1. Selection according to fitness (effi- the scheduler, which it processes and returns. The sched-
ciency in our case) is a source of exploitation, and crossover uler contains a queue of future tasks for each processor, and
and random mutations promote exploration. when a request for work is received the task at the head of
A generation of a GA contains a population of individ- the corresponding queue is sent for processing. A proces-
uals, each of which correspond to a possible solution from sor does not contain a queue of tasks; because network re-
the search space. Each individual in the population is eval- sources are limited and processing resources are not ded-
uated with a fitness function to produce a value which in- icated, we wish to avoid repeatedly issuing the same task
dicates the goodness of a solution. Selection takes a certain multiple times, e.g., when a machine is switched off.
number of individuals in the population and brings them Each task has a resource requirement which is measured
forward to the next generation. Crossover takes pairs of in- in millions of floating point operations (MFLOPs). The
dividuals and uses parts of each to produce new individu- available processing resources, or execution rate, of each
als. Random mutations swaps parts of an individual to pre- processor is measured in MFLOPs per second, which we
vent the GA from getting caught in a local minimum. write as Mflop/s to avoid confusion. The execution rate is
Much work has been done on using GAs for static measured using Dongarra’s Linpack benchmark [4]. This is
scheduling [1, 8, 15, 18], where schedules are created be- a recognised standard used to benchmark systems for in-
fore runtime. However, the state of all tasks and system re- clusion in the list of Top 500 Supercomputers [16]. Avail-
sources must be known a priori and cannot change. This able processing and network resources vary over time, so
limits these schedulers to specific problems and systems. a smoothing function is used to minimise localised fluctua-
Dynamic GA schedulers [11, 19, 20] create schedules at tions, thus allowing for a more realistic processing environ-
runtime, with knowledge about the properties of the system ment. A single processor is dedicated to scheduling.
and tasks possibly not known in advance, allowing for vari- The queue of unscheduled tasks could contain a large
able system and task properties to be considered. Dynamic number of tasks and if all where to be scheduled at once, the
GA schedulers are thus more practical than static sched- scheduler could take a long time to find an efficient sched-
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE
3.3. Selection, Crossover and Mutation
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE
3.6. Smoothing Function
1
0.6
is updated. For the first i values of a sequence of values
a1 , a2 , . . ., this representative value would be denoted Γai ,
and defined recursively as Γai = Γai−1 + ν(ai − Γai−1 ),
0.5
0.4
where the smoothness of the sequence of representative val-
0.3
ues is controlled by ν ∈ [0, 1], and where we let Γa0 = a1 .
0.2
The function allows one to vary the influence of more re-
Pure GA
0.1 1 rebalance cent sequence values on the representative value, from no
50 rebalances
0
0 100 200 300 400 500 600 700 800 900 1000
influence (ν = 0) to complete dominance (ν = 1). The
No. of generations
smoothing function is employed in several instances in our
scheduler. In this paper, we describe the application of the
Figure 3. Average reduction in makespan af- smoothing function to the first i values of an arbitrary se-
ter each generation of the GA quence x1 , x2 , . . . with the notation Γxi .
100
come idle after sp = minM j=1 (δj /Pj ), where δj is the total
processing time in MFLOPs of the tasks waiting to be pro-
cessed by processor j, and M is the number of processors.
50
1/2
We choose Hp+1 = Γsp + 1 as a simple approxima-
0
tion of the optimal size for batch p + 1. Once a schedule has
0 2 4 6 8 10 12 14 16 18 20
No. of rebalances been assigned the batch size is recalculated.
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE
literature [1, 8, 9, 11, 14, 15, 17, 19, 20]. For these exper-
iments we will vary the communication costs and the task 0.7
PN
sizes. MM
MX
0.6
EF
LL
4.1. Other schedulers 0.5
ZO
RR
Efficiency
a number of well known batch and immediate mode heuris-
tic schedulers. An immediate mode scheduler only consid- 0.3
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE
10000 0.25
PN
9000
MM
8000 MX
0.2
EF
7000 LL
ZO
6000
0.15 RR
Efficiency
Time
5000
4000
0.1
3000
2000
0.05
1000
0
EF LL RR ZO PN MM MX
0
0 0.01 0.02 0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
1/mean communication cost
1500
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE
10000 14000
9000
12000
8000
7000 10000
6000
8000
Time
Time
5000
6000
4000
3000 4000
2000
2000
1000
0 0
EF LL RR ZO PN MM MX EF LL RR ZO PN MM MX
Figure 9. Makespan when task sizes are Figure 11. Makespan when task sizes have
uniformly distributed between 10 and 10000 a Poisson distributed with a mean of 100
MFLOPs. MFLOPs
10000
5000
queues within individuals perturbing this exploration.
4000
3000
We have tested our scheduler under various different sce-
2000 narios. To show the generality of our scheduler we used
1000 three different types of random distributions, each with
0
EF LL RR ZO PN MM MX
thousands of different randomly generated sets of tasks and
varying communication overheads.
Figure 10. Makespan when task sizes have The Figs. 5 through 11 show that our scheduler per-
a Poisson distributed with a mean of 10 forms better than the other schedulers. We can conclude that
MFLOPs our scheduler gives better performance over multiple differ-
ent scenarios and would give consistently better efficiency
in unknown conditions compared to the other techniques
ulers all perform well, whilst the immediate mode sched- tested in this study. Our scheduler estimates the communi-
ulers do not perform as well. cation costs between each client and server using historical
information, so it can create better schedules and reduce the
makespan. For the other schedulers, the effect of communi-
5. Conclusion cation is only considered after tasks or batches of tasks have
been scheduled, leading to less efficient solutions.
A scheduling algorithm has been developed to schedule
heterogeneous tasks onto heterogeneous processors in a dis- The algorithm proposed in this paper consistently uses
tributed computing system. It provides efficient schedules processors more efficiently than the current state-of-the-art
and adapts to varying resource availability (processing re- GA algorithms for the same problem. It is more suitable
sources and communication costs). The algorithm also fully for real-world use because it considers properties of dis-
utilises the dedicated processor running the scheduler. The tributed systems, such as variable communication costs and
GA employed a list scheduling heuristic to create a well- variable availability heterogeneous processors, which other
balanced randomised initial population. The fitness function algorithms for the task scheduling problem do not consider.
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE
6. Future work [12] I. M. Oliver, D. J. Smith, and J. Holland. A study of permuta-
tion crossover operators on the traveling salesman problem.
We intend to compare all of the schedulers in Sect. 4 on a In Proceedings of the Second International Conference on
general-purpose distributed system [10]. The system is cur- Genetic Algorithms on Genetic algorithms and their appli-
rently deployed on over 250 heterogeneous PCs and runs cation, pages 224–230. Lawrence Erlbaum Associates, Inc.,
problems from cryptography, bioinformatics, and biomedi- 1987.
cal engineering. This will allow us to test our scheduler un- [13] A. J. Page and T. J. Naughton. Framework for task
der real-world conditions. scheduling in heterogeneous distributed computing using ge-
netic algorithms. In 15th Artificial Intelligence and Cogni-
tive Science Conference, pages 137–146, Castlebar, Ireland,
7. Acknowledgement September 2004.
[14] H. J. Siegel, L. Wang, V. Roychowdhury, and M. Tan. Com-
Support is acknowledged from the Irish Research Coun- puting with heterogeneous parallel machines: advantages
cil for Science, Engineering, and Technology, funded by the and challenges. In Proceedings on Second International
National Development Plan. Symposium on Parallel Architectures, Algorithms, and Net-
works, pages 368–374, Beijing, China, June 1996.
References [15] M. D. Theys, T. D. Braun, H. J. Siegal, A. A. Maciejewski,
and Y.-K. Kwok. Mapping Tasks onto Distributed Hetero-
[1] I. Ahmad, Y.-K. Kwok, I. Ahmad, and M. Dhodhi. Schedul- geneous Computing Systems Using a Genetic Algorithm Ap-
ing parallel programs using genetic algorithms. In A. Y. proach, chapter 6, pages 135–178. John Wiley and Sons,
Zomaya, F. Ercal, and S. Olariu, editors, Solutions to Par- New York, USA, 2001.
allel and Distributed Computing Problems, chapter 9, pages [16] Top 500 Super Computers. http://www.top500.org.
231–254. John Wiley and Sons, New York, USA, 2001. [17] A. Y. Zomaya, M. Clements, and S. Olariu. A framework
[2] A. Chipperfield and P. Flemming. Parallel genetic al- for reinforcement-based scheduling in parallel processor sys-
gorithms. In A. Y. Zomaya, editor, Parallel and Dis- tems. IEEE Transactions on Parallel and Distributed Sys-
tributed Computing Handbook, pages 1118–1143. McGraw- tems, 9(3):249–260, March 1998.
Hill, New York, USA, first edition, 1996. [18] A. Y. Zomaya, R. C. Lee, and S. Olariu. An introduc-
[3] A. Colorni, M. Dorigo, and V. Maniezzo. Distributed opti- tion to genetic-based scheduling in parallel processor sys-
mization by ant colonies. In Proceedings of the First Eu- tems. In A. Y. Zomaya, F. Ercal, and S. Olariu, editors, Solu-
ropean Conference on Artificial Life, pages 134–142, Paris, tions to Parallel and Distributed Computing Problems, chap-
France, 1992. Elsevier. ter 5, pages 111–133. John Wiley and Sons, New York, USA,
[4] J. Dongarra, J. Bunch, C. Moler, and G. Stewart. LINPACK 2001.
Users Guide. SIAM, Philadelphia, USA, 1979. [19] A. Y. Zomaya and Y.-H. Teh. Observations on using ge-
[5] M. R. Garey and D. S. Johnson. Computers and Intractabil- netic algorithms for dynamic load-balancing. IEEE Trans-
ity: A Guide to the Theory of NP-Completeness. W. H. Free- actions on Parallel and Distributed Systems, 12(9):899–911,
man & Co., New York, NY, 1979. September 2001.
[6] F. Glover. Future paths for integer programming and links to [20] A. Y. Zomaya, C. Ward, and B. Macey. Genetic schedul-
artificial intelligence. Computers and Operations Research, ing for parallel processor systems: comparative studies and
13:533–549, May 1986. performance issues. IEEE Transactions on Parallel and Dis-
[7] J. H. Holland. Adaptation in Natural and Artificial Systems. tributed Systems, 10(8):795–812, August 1999.
MIT Press, Cambridge, MA, USA, 1992.
[8] E. Hou, N. Ansari, and H. Ren. A genetic algorithm for mul-
tiprocessor scheduling. IEEE Transactions on Parallel and
Distributed Systems, 5(2):113–120, February 1994.
[9] H. Kasahara and S.Narita. Practical multiprocessing
scheduling algorithms for efficient parallel processing. IEEE
Transactions on Computers, 33(11):1023–1029, November
1984.
[10] T. M. Keane. A general-purpose heterogeneous distributed
computing system. M.Sc. thesis, Department of Computer
Science National University of Ireland, Maynooth, Ireland,
2005.
[11] M. Maheswaran, S. Ali, H. J. Siegel, D. Hensgen, and R. F.
Freund. Dynamic mapping of a class of independent tasks
onto heterogeneous computing systems. Journal of Paral-
lel and Distributed Computing, 59(2):107–131, November
1999.
Proceedings of the 19th IEEE International Parallel and Distributed Processing Symposium (IPDPS’05)
1530-2075/05 $ 20.00 IEEE