**6. The combined algorithm**

From the experiment results of the w-GA120 and w-Tabu algorithms, we have noted the following observations.


From these observations, we propose an other algorithm combining the w-GA120 and the w-Tabu algorithm. The new algorithm called w-TG is presented in Algorithm 6.

From the experiment data in Table 5, the runtime of the w-TG algorithm is from 4 to 10 seconds. We run the w-GA with 120 generations in all cases for two reasons.

• If the size of the workflow is large, increasing the number of generations will significantly increase the runtime of the algorithm. Thus, this runtime may exceed the acceptable range.

#### **Algorithm 6** w-TG algorithm

```
1: if the size of the workflow <= 20 then
2: Call w-GA120 to find solution a1
3: Call w-Tabu to find solution a2
4: a" ← better(a1, a2)
5: else
6: Call w-Tabu to find solution a"
7: end if
8: return a"
```
• If the size of the workflow is small, the algorithm has high probability of convergence within a small number of generations. The data in Table 4 also supports this idea.

To examine the performance of the w-TG algorithm, we do an extensive experiment in order to make a comparison with the w-GA and the w-Tabu algorithm. For this experiment, we keep the topology of 18 workflows as in the experiment in Section 4 but change the configuration of sub-jobs in each workflow. With each topology we created 5 different workflows. Thus, we have a total 90 different workflows.

Fig. 15. Performance comparison when the size of each workflow less than or equal to 32

an increase to 17%.

**7. Conclusion**

algorithm still has good performance.

of the Grid-Based Workflow Within an SLA Context

We make the average comparison with all 90 workflows, and the overall result of this is presented in Figure 15. As with the workflow having the number of sub-jobs more than 20, the quality of the w-TG algorithm is equal to the quality of the w-Tabu algorithm. Thus the better rate of the w-TG compared to the w-Tabu is reduced by about 9%. In contrast, as the quality of the w-GA algorithm is not as good with a workflow having the number of sub-jobs more than 20. Thus the worse rate of the w-GA algorithm compared to the w-TG algorithm is

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

We can also see that the performance of the w-GA120 compared to the w-Tabu in this experiment is not as high as in the experiment of Section 5.2. This means that the performance of the w-GA120 fluctuates with different scenarios. However, in any case, the combined

In this book chapter we presented the modified Genetic Algorithm and its combination with the w-Tabu algorithm to form a new algorithm called w-TG to solve the problem of optimizing runtime of the Grid-based workflows within the SLA context. In our work, the distinguishing characteristic is that each sub-job of a workflow can be either a sequential or parallel program. In addition, each grid service can handle many sub-jobs at a time and its resources are reserved. The w-Tabu algorithm creates a set of referent solutions, which distribute widely over the search space, and then searches around those points to find the local minimal solution. We proposed a special genetic algorithm to map workflow to the Grid resources called w-GA. In the w-GA algorithm, we applied many dedicated techniques for workflow within the crossover and mutation operations in order to improve the searching quality. The experiment showed that both the w-GA and the w-Tabu found solutions with great differing quality in some cases. When the size of the workflow is very big and the runtime of the w-GA and the w-Tabu to find out solution also reaches the limit, the quality of the w-GA is not as good as the w-Tabu algorithm. The combined algorithm can fix the disadvantage of the individual algorithms. Our performance evaluation showed that the combined algorithm created solution of equal or better quality than the previous algorithm

Those workflows are mapped to the RMSs using the w-GA, the w-Tabu and the w-TG algorithms. The *makespan* of the solution and the runtime of the algorithm are then recorded. From the experiment data, the runtime of all algorithms is from 1 to 12 seconds. The average performance of each algorithm is presented in Figure 14 and Figure 15.

Fig. 14. Performance comparison when the size of each workflow less than or equal to 20

Figure 14 presents the comparison of the average *makespan* in relative value when all the workflows in the experiment have the number of sub-job less than or equal to 20. We want to see the performance of the equal combination part of the w-TG algorithm. As can be seen from Figure 14, the w-TG algorithm has the highest performance. The w-TG algorithm found solutions 11% better than the w-Tabu algorithm and 12% better than the w-GA120 algorithm.

22 Will-be-set-by-IN-TECH

• If the size of the workflow is small, the algorithm has high probability of convergence within a small number of generations. The data in Table 4 also supports this idea.

To examine the performance of the w-TG algorithm, we do an extensive experiment in order to make a comparison with the w-GA and the w-Tabu algorithm. For this experiment, we keep the topology of 18 workflows as in the experiment in Section 4 but change the configuration of sub-jobs in each workflow. With each topology we created 5 different workflows. Thus, we

Those workflows are mapped to the RMSs using the w-GA, the w-Tabu and the w-TG algorithms. The *makespan* of the solution and the runtime of the algorithm are then recorded. From the experiment data, the runtime of all algorithms is from 1 to 12 seconds. The average

Fig. 14. Performance comparison when the size of each workflow less than or equal to 20

Figure 14 presents the comparison of the average *makespan* in relative value when all the workflows in the experiment have the number of sub-job less than or equal to 20. We want to see the performance of the equal combination part of the w-TG algorithm. As can be seen from Figure 14, the w-TG algorithm has the highest performance. The w-TG algorithm found solutions 11% better than the w-Tabu algorithm and 12% better than the w-GA120 algorithm.

performance of each algorithm is presented in Figure 14 and Figure 15.

**Algorithm 6** w-TG algorithm

4: *a*" ← *better*(*a*1, *a*2)

5: **else**

7: **end if** 8: return a"

1: **if** the size of the workflow <= 20 **then** 2: Call w-GA120 to find solution a1 3: Call w-Tabu to find solution a2

6: Call w-Tabu to find solution a"

have a total 90 different workflows.

Fig. 15. Performance comparison when the size of each workflow less than or equal to 32

We make the average comparison with all 90 workflows, and the overall result of this is presented in Figure 15. As with the workflow having the number of sub-jobs more than 20, the quality of the w-TG algorithm is equal to the quality of the w-Tabu algorithm. Thus the better rate of the w-TG compared to the w-Tabu is reduced by about 9%. In contrast, as the quality of the w-GA algorithm is not as good with a workflow having the number of sub-jobs more than 20. Thus the worse rate of the w-GA algorithm compared to the w-TG algorithm is an increase to 17%.

We can also see that the performance of the w-GA120 compared to the w-Tabu in this experiment is not as high as in the experiment of Section 5.2. This means that the performance of the w-GA120 fluctuates with different scenarios. However, in any case, the combined algorithm still has good performance.
