hasso-plattner-institut für softwaresystemtechnik gmbh an der universität potsdam multiprocessor...

23
HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms for Multiprocessor Scheduling [1] May, 22 2006 Stefan Hüttenrauch

Upload: robert-hughes

Post on 28-Mar-2015

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

Multiprocessor Scheduling

Integrating List Heuristics into genetic Algorithms for

Multiprocessor Scheduling [1]

May, 22 2006

Stefan Hüttenrauch

Page 2: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 2

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Roadmap

Part I – Introduction The problem to be solved Heuristics in general

Genetic algorithms List heuristics

Part II – Integrating list heuristics into genetic algorithms One genetic algorithm in detail Integrating a list heuristic Results and comparisons

Page 3: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

Part I – Introduction

The problem to be solved

Heuristics in general Genetic algorithms (GA) List heuristics (LH)

Page 4: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 4

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Introduction – The Problem to be solved

Computer with a set P of m processors Set T of n tasks with precedence order Schedule S assigns tasks to processors in a

specific order

Goal: find schedule with smallest makespan

T1

T2 T5

T4T3

T6

T7

T8

acyclic digraph

feasible schedule for m=2

T1 T2

T3 T4 T5

T6 T7

T8

Refs: [1][3]

Page 5: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 5

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Heuristics in general

Consistent algorithms for optimization problems

Has strategy of searching in set of all feasible solutions

No guarantee for optimal solution

Examples: Generic algorithms (meta heuristics) List heuristics

Refs: [4]

Page 6: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 6

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Heuristics in general – Genetic Algorithms

History Developed by John H. Holland in mid-1960’s Imitate nature’s evolution processes

Comparison to trad. optimization methods Explore greater range of possible solutions Use probabilistic transition rules

Disadvantages Finding the best solution is not necessarily given

Refs: [1][2][3]

Page 7: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 7

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Heuristics in general – Genetic Algorithms cond.

Genetic Algorithms consists of:

String representation (genes)

Initial population

Fitness function

Genetic operators and a stochastic assignment

Refs: [1][3]

Page 8: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 8

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Heuristics in general – List Heuristics

In contrast to GA:

Schedule is build step by step

Use knowledge about the problem and about what happened in the steps before to find better solution

One example is the “critical path/most immediate successors first” (CP/MISF) list heuristic

Refs: [1][5]

Page 9: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

Part II – Integrating list heuristics into genetic algorithms

One genetic algorithm in detail

Integrating a list heuristic

Results and comparisons

Page 10: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 10

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Individual: set s of m strings for m processors String: ordered set of tasks scheduled to Pj

Precedence relations among tasks satisfied Every task is present && appears only ones

One GA Details – String Representation

T1

T2 T5

T4T3

T6

T7

T8

s1

s2

one individualT1 T2

T3 T4 T5

T6 T7

T8

0 0

1 1 1

2 2

3

Refs: [1][3]

Page 11: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 11

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

One GA Details – initial Population

How to define feasible individuals Define height-ordering on task set T

in each string sj: height(th) ≤ height(ti)

with th and ti in sj && h < i

Only a necessary condition may not find optimal schedule

How to define that ordering height(ti) random with plp(ti) < height(ti) < pls(ti)

plp(ti)… max path length between t1 and immediate predecessor of ti

pls(ti)… max path length between t1 and immediate successor of ti

Refs: [1][3]

Page 12: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 12

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

One GA Details – initial Population cond.

Algorithm to create initial population1. Compute height for every task in task graph TG2. Separate tasks according to their height (set G(h))3. For all m-1 processors do 4.

4. Form schedule for a processora. For every G(hi) in G(h) create random number r with

0 ≤ r ≤ |G(hi)|

b. Pick r tasks of G(hi) assigning them to current processor

c. Delete assigned tasks from G(hi)

5. Assign remaining tasks to the last processor

Refs: [1][3]

Page 13: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 13

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

One GA Details – Fitness Function

For evaluation of search nodes (individuals)

Controls genetic operators

Here: finishing time FT of a schedule S FT(S) = max ftp(Pj)

for all j in {0, 1,…, m}ftp(Pj)… finishing time of last task in Pj

m… number of processors

Refs: [1][3]

Page 14: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 14

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Genetic Algorithms – genetic Operators

Reproduction Clone individuals and assign them to new population

Do it (number of individuals in population) times Clone individual with highest fitness value

Crossover Partition of strings Pair-wise exchange of parts of the strings

Do it (number of individuals in population) / 2 times

Mutation Random alternation of a string with small probability

Exchange two tasks with same height within one string Do it (number of individuals in population) times

Refs: [1][3]

Page 15: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 16

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Population size = 10, max. number of iterations = 1500 Reproduction One crossover (5 times, with probability propCros = 1) One mutation (10 times, with probability propMut = 0.05) Replace individual with smallest fitness value

One GA Details – genetic Operators – Animation

Population 1 Population 2Population 1Population 1

Page 16: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 17

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

One GA Details – Problems

Initial population In average pi has more tasks than pi+1

No uniform distribution due to initial population generation scheme.

Crossover Some feasible solution cannot be generated Derives from height-ordering

Refs: [1]

Page 17: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 18

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Integrating a List Heuristic – initial Population

Basis also a task digraph

Iterative method Determine free tasks Randomly choose one and assign it to a free

processor

Tasks not necessarily in height-order

Refs: [1]

Page 18: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 19

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Integrating a List Heuristic – Crossover

Determine partitions V1 and V2 Remember the genetic algorithm decision based

on heights of tasks Now take a digraph with dependencies from original

tasks digraph and the two schedules and a nice algorithm

Perform the crossover V1 remains the same in s1 and s1’ as in GA For V2 use CP/MISF list heuristic

Choose task with smallest introduction date first (CP) If several possibilities choose task with more successors

(MISF)Refs: [1][5]

Page 19: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 21

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Integrating a List Heuristic – Mutation

Also choose one individual (as in GA)

Sort the tasks according to their precedence constraints Take task with smallest introduction date

Also use CP/MISF assign it to a randomly chosen processor

Refs: [1]

Page 20: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 22

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Results and Comparisons

Better initial population

Shorter makespan better quality of solutions

But: longer execution time

Refs: [1]

Page 21: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 23

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

Results and Comparisons cond.

DigraphCP/MISFparallelsolution

Genetic Algorithm Integrated solution

parallelsolution

execution time

parallel solution

execution time

1 medium 988 332 24 69 3766

1 large 2810 1168 111 181 21935

2 medium 360 326 11 116 849

2 large 1681 1511 73 274 18505

3 medium 1452 933 31 166 9230

3 large 2038 1251 64 223 15068

4 medium 871 548 41 110 13338

4 large 1158 722 85 110 33191

Synthetic diagraphs generated with ANDES-Synth 1. Bellford 2. Diamond1 3. Diamond3 4 Diamond4

Refs: [1]

16 processors

Page 22: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

Integrating List Heuristics intogenetic Algorithms for

Multiprocessor Scheduling [1]

I thank you for your attention

¿ Questions ?

[email protected]

Page 23: HASSO-PLATTNER-INSTITUT für Softwaresystemtechnik GmbH an der Universität Potsdam Multiprocessor Scheduling Integrating List Heuristics into genetic Algorithms

Multiprocessor SchedulingProf. Dr. Lars Lundberg 25

HASSO-PLATTNER-INSTITUTfür Softwaresystemtechnik GmbH an der Universität Potsdam

May, 22nd 2006Stefan Hüttenrauch

References

[1] R.C. Corrêa, A. Ferreira, and P. Rebreyend. Integration list heuristics into genetic algorithms for multiprocessor scheduling. 8th IEEE Symposium on Parallel and Distributed Processing , 1996.

[2] John H. Holland. Genetic Algorithms. http://www.econ.iastate.edu/tesfatsi/holland.GAIntro.htm, April 2006.

[3] E. Hou, N. Ansari, and H. Ren. A genetic algorithm for multiprocessor Scheduling. IEEE Transactions on Parallel and Distributed Systems, 5(2):113-120, Feb. 1994.

[4] J. Hromkomvič. Algorithmics for Hard Problems. Springer Verlag, 2001.[5] A. Doboli, P. Eles. Scheduling under Data and Control Dependencies for

Heterogeneous Architectures. ICCD '98: Proceedings of the International Conference on Computer Design, 1998.