genetic algorithms for task scheduling problem j. parallel distrib. comput. (2010) fatma a. omara,...

51
Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona M. Arafa 111/06/21 1 Shang-Chi Wu

Upload: wilfred-daniels

Post on 20-Jan-2018

222 views

Category:

Documents


1 download

DESCRIPTION

Introduction The goal of a task scheduler –Assign tasks to available processors –The overall execution length is minimized Algorithms with duplication –Duplication Scheduling Heuristic (DSH) algorithm Algorithms without duplication –Modified Critical Path (MCP) algorithm 2016/3/113

TRANSCRIPT

Page 1: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Genetic algorithms for task scheduling problem

J. Parallel Distrib. Comput. (2010)Fatma A. Omara, Mona M. Arafa

112/05/14 1

Shang-Chi Wu

Page 2: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Outline

• Introduction• The Standard Genetic Algorithm (SGA)• The Critical Path Genetic Algorithm

(CPGA)• The Task Duplication Genetic Algorithm

(TDGA)• Performance evaluation• Conclusions112/05/14 2

Page 3: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Introduction

• The goal of a task scheduler– Assign tasks to available processors – The overall execution length is minimized

• Algorithms with duplication– Duplication Scheduling Heuristic (DSH)

algorithm• Algorithms without duplication

– Modified Critical Path (MCP) algorithm

112/05/14 3

Page 4: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Introduction

• Recently, several GAs have been developed for solving the task scheduling problem

• Two genetic algorithms– Critical Path Genetic Algorithm (CPGA)– Task Duplication Genetic Algorithm (TDGA)

112/05/14 4

Page 5: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Introduction

• Critical Path Genetic Algorithm(CPGA)– use the idle time of the processors efficiently– reschedule the critical path nodes to reduce

their start time– concerned with satisfying the load balance

• Task Duplication Genetic Algorithm (TDGA)– Minimize the communication overheads

112/05/14 5

Page 6: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The model for task scheduling problem

112/05/14 6

• Directed Acyclic Graph (DAG)Entry node

Exit node

Communication cost

Computation cost

Critical Path(CP)

Page 7: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The model for task scheduling problem

112/05/14 7

• Communication cost– Ex : c ( t1, t5 ) = 1– Ex : c ( t1, t5 ) = 0 if t1 and t5 are scheduled

on the same processor• A node ti is scheduled to processor P

– start time : ST(ti , P)– finish time : FT(ti , P )

• Schedule length – max{FT(ti , P )} across all processors

Communication cost

Page 8: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The Standard Genetic Algorithm (SGA)

112/05/14 8

• The parent task that maximizes the above expression is called the favorite predecessors of ti – favpred(ti, Pj)

• The Data Arrival Time (DAT) of ti at processor Px is defined as :

DAT = max { FT(tk, Pj) + c(tk, ti) } , k=1…No_parent

Page 9: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• Example

The Standard Genetic Algorithm (SGA)

112/05/14 9

DAT = max { FT(tk, Pj) + c(ti, tk) } ,k=1…No_parent

Page 10: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The SGA implementation

112/05/14 10

• The chromosome is divided into two sections– mapping sections– scheduling sections

Page 11: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• The initial population is constructed randomly.– The first part of the chromosome (i.e.

mapping) is chosen randomly from 1 to No_Processor

– The second part (i.e. the schedule) is generated randomly

Genetic formulation of SGA

112/05/14 11

Page 12: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• Fitness function– The main objective of the scheduling

problem is to minimize the schedule length of a schedule

Genetic formulation of SGA

112/05/14 12

Fitness function = ( a / S_Length )

Page 13: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The pseudo code of The Task Schedule using SGA

112/05/14 13

Page 14: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The pseudo code of The Task Schedule using SGA

112/05/14 14

DAGchromosome

3 processors

Page 15: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Genetic formulation of SGA

112/05/14 15

RT[P1] =0RT[P2] =0RT[P3] =0

LT={t1, t2, t3, t4, t6, t5, t7, t8, t9 }

Page 16: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Genetic formulation of SGA

112/05/14 16

LT={t1, t2, t3, t4, t6, t5, t7, t8, t9 }

16

ST[t1] = 0FT[t1] = 0+2 =2RT[P3] = 2

Page 17: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Genetic formulation of SGA

112/05/14

LT={ t2, t3, t4, t6, t5, t7, t8, t9 }

ST[t2] = 2FT[t2] = 2+3 =5RT[P3] = 5

Page 18: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Genetic formulation of SGA

112/05/14 18

S_Length = 26

Page 19: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Crossover operator

112/05/14 19

Page 20: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Crossover operator

112/05/14 20

Page 21: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• It is applied to the first part of the chromosome mapping sections

• A random integer number called the crossover point is generated from 1 to No_Tasks

Crossover map

112/05/14 21

Page 22: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• The chromosome is divided into two sections– mapping sections– scheduling sections

Crossover map

112/05/14 22

Page 23: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• It is applied to the second part of the chromosome– a random point is chosen– Pass the left segment from the chrom1 to

the offspring– Construct the right fragment of the offspring

according to the order of the right segment of chrom2

Order crossover

112/05/14 23

Page 24: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Order crossover

112/05/14 24

Pass the left segment

Page 25: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Mutation operator

112/05/14 25

Page 26: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• The same principles and operators which are used in the SGA algorithm have been used in the CPGA algorithm

• In the initial population the second part(schedule) of the chromosome can be constructed– The schedule part is constructed randomly as

in SGA– The schedule part is constructed using ALAP

The Critical Path Genetic Algorithm (CPGA)

112/05/14 26

Page 27: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

ALAP(As Late as Possible)

112/05/14 27

node n1 n2 n3 n4 n5 n6 n7 n8 n9ALAP 0 8 9 8 18 13 12 13 22

Page 28: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• Example

Reuse idle time modification

112/05/14 28

Page 29: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Priority of CPNs modification

112/05/14 29

Page 30: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Load balance modification

112/05/14 30

• Obtain the minimum schedule length and, in the same time, the load balance is satisfied

• The execution time of processor Pj is denoted by E_time[Pj] – –

Page 31: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• Example

Load balance modification

112/05/14 31

Page 32: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

112/05/14 32

maximum fitness value

the average fitness value

the fitness value of the best chromosome for the crossover

the fitness value of the chromosome to be mutated

positive real constants less than 1

Page 33: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• If the idle time slots of a waiting processor could be effectively used by identifying some tasks and redundantly allocating them in these slots, the execution time of the parallel program could be further reduced

The Task Duplication Genetic Algorithm (TDGA)

112/05/14 33

Page 34: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• A vector of order pairs (t, p) which indicates that task t is assigned to processor p

Genetic formulation of the TDGA

112/05/14 34

Page 35: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• Heuristic Duplication– the initial population is initialized with

randomly generated chromosomes, while each chromosome consists of exactly one copy of each task

– After that, a duplication technique is applied by a function

Initial population

112/05/14 35

Page 36: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Computing a b-level

112/05/14 36

Page 37: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The pseudo code of the Duplication_Process function

112/05/14 37

Page 38: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• Two point crossover operator is used• Two points are randomly chosen and

the partitions between the points are exchanged between two chromosomes to form two offspring

Crossover operator

112/05/14 38

Page 39: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Mutation operator

112/05/14 39

Page 40: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Performance evaluation

112/05/14 40

• Considered the task graphs with random communication costs between 1 and a specified maximum communication delay (MCD)

• The population size is considered to be 200, and the number of generations is considered to be 500 generations

Page 41: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• Normalized Schedule Length (NSL)

• Speedup– T(1) : the time required for executing a

program on a uniprocessor computer– T(P) : the time required for executing the

same program on a parallel computer with P processors

The developed CPGA evaluation

112/05/14 41

Page 42: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• The MCP algorithm computes at first the ALAPs of all the nodes, then creates a ready list containing ALAP times of the nodes in an ascending

• highest priority node in the list is picked up and assigned to a processor

The MCP algorithm

112/05/14 42

Page 43: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

112/05/14 43

The developed CPGA evaluation

Page 44: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The developed CPGA evaluation

112/05/14 44

Page 45: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The DSH Algorithm

112/05/14 45

Page 46: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The DSH Algorithm

112/05/14 46

Page 47: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The developed TDGA evaluation

112/05/14 47

Page 48: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

The developed TDGA evaluation

112/05/14 48

Page 49: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• The Critical Path Genetic algorithm(CPGA)– Based on rescheduling the critical path nodes

(CPNs) in the chromosome through different generations

– two modifications have been added• use the idle time of the processors efficiently• concerned with satisfying the load balance

– The experimental studies show that the CPGA always outperforms the MCP algorithm in most cases

Conclusions

112/05/14 49

Page 50: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

• The Task Duplication Genetic Algorithm (TDGA)– Based on task duplication techniques to

overcome the communication overhead – The experimental studies show that the TDGA

algorithm outperforms the DSH algorithm in most cases

Conclusions

112/05/14 50

Page 51: Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona…

Thank you for your listening 

112/05/14 51