Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara,...

Post on 20-Jan-2018

222 views 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 of Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara,...

Genetic algorithms for task scheduling problem

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

112/05/14 1

Shang-Chi Wu

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

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

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

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

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)

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

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

• Example

The Standard Genetic Algorithm (SGA)

112/05/14 9

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

The SGA implementation

112/05/14 10

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

• 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

• 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 )

The pseudo code of The Task Schedule using SGA

112/05/14 13

The pseudo code of The Task Schedule using SGA

112/05/14 14

DAGchromosome

3 processors

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 }

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

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

Genetic formulation of SGA

112/05/14 18

S_Length = 26

Crossover operator

112/05/14 19

Crossover operator

112/05/14 20

• 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

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

Crossover map

112/05/14 22

• 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

Order crossover

112/05/14 24

Pass the left segment

Mutation operator

112/05/14 25

• 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

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

• Example

Reuse idle time modification

112/05/14 28

Priority of CPNs modification

112/05/14 29

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] – –

• Example

Load balance modification

112/05/14 31

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

• 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

• 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

• 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

Computing a b-level

112/05/14 36

The pseudo code of the Duplication_Process function

112/05/14 37

• 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

Mutation operator

112/05/14 39

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

• 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

• 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

112/05/14 43

The developed CPGA evaluation

The developed CPGA evaluation

112/05/14 44

The DSH Algorithm

112/05/14 45

The DSH Algorithm

112/05/14 46

The developed TDGA evaluation

112/05/14 47

The developed TDGA evaluation

112/05/14 48

• 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

• 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

Thank you for your listening 

112/05/14 51