540 likes | 679 Views
Genetic algorithms for task scheduling problem. J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona M. Arafa. Shang-Chi Wu. Outline. Introduction The Standard Genetic Algorithm (SGA) The Critical Path Genetic Algorithm (CPGA) The Task Duplication Genetic Algorithm (TDGA)
E N D
Genetic algorithms for task scheduling problem J. Parallel Distrib. Comput. (2010) Fatma A. Omara, Mona M. Arafa Shang-Chi Wu
Outline • Introduction • The Standard Genetic Algorithm (SGA) • The Critical Path Genetic Algorithm (CPGA) • The Task Duplication Genetic Algorithm (TDGA) • Performance evaluation • Conclusions
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
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)
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
The model for task scheduling problem • Directed Acyclic Graph (DAG) Entry node Critical Path(CP) Communication cost Computation cost Exit node
The model for task scheduling problem • 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) • 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(ti, tk) } , • k=1…No_parent
The Standard Genetic Algorithm (SGA) DAT = max { FT(tk, Pj) + c(ti, tk) } ,k=1…No_parent • Example
The SGA implementation • The chromosome is divided into two sections • mapping sections • scheduling sections
Genetic formulation of SGA • 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 • Fitness function • The main objective of the scheduling problem is to minimize the schedule length of a schedule Fitness function = ( a / S_Length )
The pseudo code of The Task Schedule using SGA 3 processors DAG chromosome
Genetic formulation of SGA LT={t1, t2, t3, t4, t6, t5, t7, t8, t9 } RT[P1] =0 RT[P2] =0 RT[P3] =0
Genetic formulation of SGA LT={t1, t2, t3, t4, t6, t5, t7, t8, t9 } ST[t1] = 0 FT[t1] = 0+2 =2 RT[P3] = 2 16
Genetic formulation of SGA LT={t2, t3, t4, t6, t5, t7, t8, t9 } ST[t2] = 2 FT[t2] = 2+3 =5 RT[P3] = 5
Genetic formulation of SGA S_Length = 26
Crossover map • 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 • The chromosome is divided into two sections • mapping sections • scheduling sections
Order crossover • 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 Pass the left segment
The Critical Path Genetic Algorithm (CPGA) • 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
Reuse idle time modification • Example
Load balance modification • 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]
Load balance modification • Example
the fitness value of the best chromosome for the crossover maximum fitness value positive real constants less than 1 the average fitness value the fitness value of the chromosome to be mutated
The Task Duplication Genetic Algorithm (TDGA) • 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
Genetic formulation of the TDGA • A vector of order pairs (t, p) which indicates that task t is assigned to processor p
Initial population • 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
Crossover operator • 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
Performance evaluation • 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
The developed CPGA evaluation • 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 MCP algorithm • 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
Conclusions • 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 • 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