**Determining the makespan**

The fitness value is based on the makespan of the workflow. In order to determine the makespan of a citizen, we have to calculate the timetable of the whole workflow. The algorithm for computing the timetable is presented in Algorithm 3. The start and stop time of the sub-job is determined by searching the resource reservation profile. The start and stop time of data transfer is determined by searching the bandwidth reservation profile. This procedure will satisfy Criteria 2 and 3 and 4.

After determining the timetable, we have a solution. With our sample workflow, the solution of the configuration 1 in Figure 6b including the timetable for sub-jobs and the time table for data transfer is presented in Table 3. The timetable for sub-jobs includes the RMS and the start, stop time of executing the sub-job. The timetable for data transfer includes the source and destination sub-jobs (S-D sj), source and destination RMS (S-D rms), and the start and stop time of performing the data transfer. The makespan of this sample solution is 64.

Sjs RMS start-stop S-D sj S-D rms start-stop 1 10-25 0-1 1-1 0-0 1 26-29 0-2 1-1 0-0 1 30-42 0-3 1-5 26-27 5 28-32 0-5 1-4 26-30 4 44-51 1-7 1-1 0-0 4 31-43 2-4 1-4 43-43 3 50-65 3-4 5-4 33-36 1 68-74 4-7 4-1 52-53

<sup>15</sup> w-TG: A Combined Algorithm to Optimize the Runtime

is replaced by another RMS in the candidate RMS set. It is noted that the probability of having a mutation with a child is low, ranging approximately from 0.5% to 1%. The final result is

3 4 5 3

2 1 2 6

2 3 3 4

4 2 5 6

2 3 1 4 2 3 4 6

4 2 3 2 5 5 3 6

2 3 1 4 2 3 4 6

4 2 3 2 5 5 1 6

Crossover point

Mutation point

We did several experiments with n-GA and the initial result was not satisfactory. The algorithm has long runtime and presents low quality solutions. We believe that the reason

Table 3. Sample solution timetable

of the Grid-Based Workflow Within an SLA Context

Fig. 7. Standard GA operations

**4.2 Elimination of the standard GA**

presented in Figure 7c.

5-4 4-4 0-0 5-6 4-3 44-49 6-7 3-1 66-67

(a)

(b)

(c)


Fig. 6. Sample of forming the initial population

**Algorithm 3** Determining timetable algorithm

1: **for** Each sub-job k following the assign sequence **do**


#### **Crossover and mutation**

Parents are selected according to the roulette wheel method. The fitness of each configuration = 1/*makespan*. Firstly, the sum *L* of all configuration fitness is calculated. Then, a random number *l* from the interval (0, *L*) is generated. Finally, we go through the population to sum the fitness *p*. When *p* is greater than *l*, we stop and return to the configuration where we were.

The crossover point is chosen randomly. For the purpose of demonstration, we use the sample workflow in Figure 2. Assume that we have a parents and a crossover point as presented in Figure 7a. The child is formed by copying from two parts of the parents. The result is presented in Figure 7b. The mutation point is chosen randomly. At the mutation point, *rj* of *si*

12 Will-be-set-by-IN-TECH

 3 2 6 2 1 2 5 4 3 3 1 2 1 3 2 5 5 3 5 4 2 6 4 4 6 3 5 6 5 6 2 5 4

1 1 1 5 4 4 3 1

3 3 2 6 2 1 2 5

2 4 3 3 1 2 1 3

4 2 5 5 3 5 4 2

5 6 4 4 6 3 5 6

1 5 6 2 5 4 3 4

2: Determine set of assigned sub-jobs Q, which having output data transfer to the sub-job

5: Search in reservation profile of link between RMS running sub-job k and RMS running sub-job i to determine start and end time of data transfer task with the start

8: Search in reservation profile of RMS running sub-job k to determine its start and end

Parents are selected according to the roulette wheel method. The fitness of each configuration = 1/*makespan*. Firstly, the sum *L* of all configuration fitness is calculated. Then, a random number *l* from the interval (0, *L*) is generated. Finally, we go through the population to sum the fitness *p*. When *p* is greater than *l*, we stop and return to the configuration where we were. The crossover point is chosen randomly. For the purpose of demonstration, we use the sample workflow in Figure 2. Assume that we have a parents and a crossover point as presented in Figure 7a. The child is formed by copying from two parts of the parents. The result is presented in Figure 7b. The mutation point is chosen randomly. At the mutation point, *rj* of *si*

4 3 sj4 sj6 4 sj5

1 sj7

> 1 2

> 3 4 5

> 6

1 1 1 5 sj0 sj1 sj2 sj3

a)

b)

k

6: **end for**

9: **end for**

**Crossover and mutation**

Fig. 6. Sample of forming the initial population

**Algorithm 3** Determining timetable algorithm

4: min\_st\_tran=end\_time of sub-job i +1

time with the start time > min\_st\_sj

3: **for** Each sub-job i in Q **do**

time > min\_st\_tran

1: **for** Each sub-job k following the assign sequence **do**

7: min\_st\_sj=max end time of all above data transfer +1


Table 3. Sample solution timetable

is replaced by another RMS in the candidate RMS set. It is noted that the probability of having a mutation with a child is low, ranging approximately from 0.5% to 1%. The final result is presented in Figure 7c.

Fig. 7. Standard GA operations
