Research Article

Learning Based Genetic Algorithm for Task Graph Scheduling

Algorithm 3

Schedule length.
  For each task in a chromosome Do
    Set its reference count equal to the number of immediate parents of the task, in the task graph corresponding
     to the chromosome.
  For each processor Pi  Do
    Set its local timer si to zero.
    Add execution time of processor’s first task to si.
  Set the global timer S to one.
  Repeat
     For each processor Pi  Do  
         Read the value of timer si of Pi.
         If  S = si  Then
           Reduce one from the reference count of each child of the task.
           Set EST of each child of the task that are not assigned to Pi, to:
           Max (Current EST of the child, Sum of si and communication cost between the tasks)
           Take next task of Pi from the chromosome.
           Add the sum of S and execution time of the task to si.
         If  EST of the task is bigger than S  or  reference count of task is not zero Then
           add one unit of time to si.
         Add one unit of time to the global timer S.
       Until all the tasks are scheduled.
  makespan = the maximum value of the timers, si, of all processors, Pi, as the fitness of the chromosome.