Open Access book

The


Introduction
Grid computing enables access to geographically and administratively dispersed networked resources and delivers functionality of those resources to individual users.Grid computing systems are about sharing computational resources, software and data at a large scale.The main issue in grid system is to achieve high performance of grid resources.It requires techniques to efficiently and adaptively allocate tasks and applications to available resources in a large scale, highly heterogeneous and dynamic environment.
In order to understand grid systems, three terms are reviewed as shown below: 1. Virtualization: The Virtualization term in grids refers to seamless integration of geographically distributed and heterogeneous systems, which enables users to use the grid services transparently.Therefore, they should not be aware of the location of !" !" Fig. 1.Two virtual organizations are formed by combining a three real organizations computing resources and have to submit their service request at just one point of entry to the grid system.Foster introduced the concept of Virtual Organization (VO) (Foster et al., 2001).He defines VO as a "dynamic collection of multiple organizations providing flexible, secure, coordinated resource sharing".Figure 1 shows three actual organizations with both computational and data resources to share across organizational boundaries.Moreover, the same figure forms two VOs, A and B, each of them can have access to a subset of resources in each of the organizations (Moallem, 2009).Virtualization is a mechanism that improves the usability of grid computing systems by providing environment customization to users.2. Heterogeneity: The organizations that form part of VO may have different resources such as hardware, operating system and network bandwidth.Accordingly, VO is considered as a collection of heterogeneous resources of organizations.3. Dynamism: In the grid system, organizations or their resources can join or leave VO depending on their requirements or functional status.
Grid systems provide the ability to perform higher throughput computing by usage of many networked computers to distribute process execution across a parallel infrastructure.Nowadays, organizations around the world are utilizing grid computing in such diverse areas as collaborative scientific research, drug discovery, financial risk analysis, product design and 3−D seismic imaging in the oil and gas industry (Dimitri et al., 2005).
Interestingly, task scheduling in grid has been paid a lot of attention over the past few years.The important goal of task scheduling is to efficiently allocate tasks as fast as possible to avialable resources in a global, heterogeneous and dynamic environment.Kousalya pointed out that the grid scheduling consists of three stages: First, resource discovery and filtering.Second, resource selection and scheduling according to certain objective.Third, task submission.The third stage includes the file staging and cleanup (Kousalya & Balasubramanie, 2009;2008).High performance computing and high throughput computing are the two different goals of grid scheduling algorithm.The main aim of the high performance computing is to minimize the execution time of the application.Allocation of resources to a large number of tasks in grid computing environment presents more difficulty than in conventional computational environments.
The scheduling problem is well known NP-complete (Garey & Johnson, 1979).It is a combinatorial optimization problem by nature.Many algorithms are proposed for task scheduling in grid environments.In general, the existing heuristic mapping can be divided into two categories (Jinquan et al., 2005): First, online mode, where the scheduler is always in ready mode.Whenever a new task arrives to the scheduler, it is immediately allocated to one of the existing resources required by that task.Each task is considered only once for matching and scheduling.
Second, batch mode, the tasks and resources are collected and mapped at prescheduled time.This mode takes better decision because the scheduler knows the full details of the available tasks and resources.This chapter proposes a heuristic algorithm that falls in batch mode Jinquan et al. (2005).
However, this chapter studies the problem of minimizing makespan, i.e., the total execution time of the schedule in grid environment.The proposed Mutation-based Simulated Annealing (MSA) algorithm is proved to have high performance computing scheduling algorithm.MSA algorithm will be studied for random and Expected Time to Compute (ETC) Models.

Related works
One salient issue in grid is to design efficient schedulers, which will be used as a part of middleware services to provide efficient planning of users' tasks to grid resources.Various scheduling approaches that were suggested in classical parallel systems literature are adopted for the grid systems with appropriate modifications.Although these modifications made them suitable for execution in grid environment, these approaches failed to deliver on the performance factor.For this reason, Genetic Algorithm (GA) and Simulated Annealing (SA) algorithm, among others, used to solve difficulties of task scheduling in grid environment.They gave reasonable solutions comparing with classical scheduling algorithms.GA solutions for grid scheduling are addressed in several works (Abraham et al., 2000;Carretero & Xhafa, 2006;Abraham et al., 2008;Martino & Mililotti, 2002;Martino, 2003;Y. Gao et al., 2005).These studies ignored how to speed up convergence and shorten the search time of GA.
Furthermore, SA algorithm was studied in previous works Fidanova (2006);Manal et al. (2011).These works show important results and high quality solutions indicating that SA is a powerful technique and can be used to solve grid scheduling problem.Moreover, Jadaan, in Jadaan et al. (2009;2010;2011), exposed the importance of rank in GA.
The authors Wook& Park (2005) proved that both GA and SA algorithms have complementary strengths and weaknesses, accordingly, they proposed a new SA-selection to enhance GA performance to solve combinatorial optimization problem.The population size which they use is big that makes time consumed by algorithm large, specially when problem size increases.While Kazem tried to solve a static task scheduling problem in grid computing using a modified SA (Kazem et al., 2008).Prado propose a fuzzy scheduler obtained by means of evolving a fuzzy scheduler to improve the overall response time for the entire workflow (Prado et al., 2009).Rules of this evolutionary fuzzy system is obtained using genetic learning process based on Pittsburgh approach.
Wael proposed an algorithm that minimizes makespan, flowtime and time to release as well as it maximizes reliability of grid resources (Wael & Ramachandram, 2011).It takes transmission time and waiting time in resource queue into account.It uses stochastic universal sampling selection and single exchange mutation to outperform other GAs. Lee et al. (2011) provided Hierarchical Load Balanced Algorithm (HLBA) for Grid environment.He used the system load as a parameter in determining a balance threshold.the scheduler adapts the balance threshold dynamically when the system load changes.The loads of resource are CPU utilization, network utilization and memory utilization.
P.K. Suri & Singh Manpreet (2010) proposed a Dynamic Load Balancing Algorithm (DLBA) which performs an intra-cluster and inter cluster load balancing.Intra-cluster load balancing is performed depending on the Cluster Manager (CM).CM decides whether to start the local balancing based on the current workload of the cluster which is estimated from the resources below it.Inter-cluster load balancing is done when some CMs fail to balance their workload.In this case, the tasks of the overloaded cluster will be transferred to another cluster which is underloaded.In order to check the cluster overloading, they introduced a balanced threshold.
If the load of cluster is larger than balanced threshold, load balancing will be executed.The value of balanced threshold is fixed.Therefore, the balanced threshold is not appropriate for the dynamic characteristics in the grid system.Chang et al. (2009) introduced Balanced Ant Colony Optimization algorithm (BACO) to choose suitable resources to execute tasks according to resources status.The pheromone 91 Task Scheduling in Grid Environment Using Simulated Annealing and Genetic Algorithm www.intechopen.comupdate functions perform balancing to the system load.While local pheromone update function updates the status of the selected resource after tasks assignment.Global pheromone update the status of each resource for all tasks after completion of all tasks.
In this chapter MSA maintains two solutions at a time, and it uses single exchange mutation operator as well as random-MCT heuristic (demonstrated in subsection 5.2).
Previous works, namely, Wael et al. (2009c;b;a) considered the minimization of the makespan using GA based on Rank Roullete Wheel Selection (RRWSGA).They use standard deviation of fitness function as a termination condition of the algorithm.The aim of using standard deviation is to shorten the the time consumed by the algorithm with taking into account reasonable performance of Computing resources (97%).
Yin introduced GA which used standard deviation less than (0.1) as stopping criterion to limit the number of iterations of GA (Yin et al., 2007).This algorithm has drawbacks such as low quality solutions ( almost same as low quality solutions of standard GA ), generating initialization population randomly (even though the time consumed by algorithm is small comparing with standard GA), and mutation depends on exchange of every gene in the chromosome.This mutation will destroy the good information in subsequent chromosomes in next generations.In order to illustrate the usefulness of this work, next section explains the motivation behind it.

Motivation
The motivation of this chapter is to develop a grid scheduling algorithm that can introduce a high utilization of grid resources, speed up convergence to the optimal or sub-optimal solution, shorten time consumed by algorithm as much as possible, improve load balancing of grid resources to the best optimization level, and minimize the schedule length, i.e., makespan.
The quality of solution produced by Yin's algorithm for grid scheduling is low.In other words, Yin proposed GA where mutation with all genes of chromosome are changed (Yin et al., 2007).This type of mutation is not always suitable to solve complex optimization problem such as grid task scheduling.It destroys the information in the chromosomes and does not help to find the optimal or near-optimal solution for the problem at hand.Moreover, the population's initialization of Yin's algorithm is generated randomly without using any heuristic in initialization phase of GA.The heuristics allow GA to search closer to the optimal solution area reducing the time consumed by an algorithm to reach the reasonable level of solution.
The four subfigures 2(a), 2(b), 2(c) and 2(d) show that the single exchange mutation (two genes exchanges), represented by dashed curves, approaches the optimal solution faster than the all genes changed mutation, represented by straight curves, in terms of the number of generations.Furthermore, subfigures 2(c) and 2(d) highlight the importance of using heuristic algorithm random-MCT (demonstrated in subsection 5.2) at the initialization stage of GA.
In this chapter, two models are introduced in term of random initialization of tasks and resources.3) which consists of 1000 tasks and 50 resources with one/two point(s) crossover, with/without Random-MCT, and two/all genes exchanged.high.Figure 3 shows the relationships among RM and ETC models, on one hand, and both algorithms RGSGCS and MSA, on the another hand.

Problem formulation
For any problem formulation is fundamental issue which help to understand the problem at hand.This chapter considers a grid with sufficient arriving tasks to GA for scheduling.Let N be the total number of tasks to be scheduled and W i , where i = 1, 2, ••• , N, be the workload of

93
Task Scheduling in Grid Environment Using Simulated Annealing and Genetic Algorithm www.intechopen.comeach task in number of cycles.The workload of tasks can be obtained by analyzing historical data, such as determining the data size of a waiting task.Let M be the total number of computing resources and CP j , where j = 1, 2, ••• , M, be the computing capacity of each resource expressed in number of cycles per unit time.The Expected Execution Time EET ij of task T i on resource R j is defined in the following formula:

Rank Genetic Scheduler for Grid Computing Systems (RGSGCS) algorithm
GA is a robust search technique that allows a high-quality solution to be derived from a large search space in polynomial time, by applying the principle of evolution.In other words, GA is used to solve optimization problems by imitating the genetic process of biological organisms (Goldberg, 1989).In GA, a potential solution to a specific problem is represented as a chromosome containing a series of genes.A set of chromosomes make up population.GA evolves the population, that generates an optimal solution, using selection, crossover and mutation operators.
Therefore, GA combines the exploitation of best solutions from past searches with the exploration of new regions of the solution space.Any solution in the search space of the problem is represented by a chromosome.
RGSGCS is GA for solving task scheduling in grid environment.It is presented in the algorithm 2 and the flowchart 5, ( (Wael et al., 2010) and (Wael et al., 2011)).
In order to successfully apply RGSGCS to solve the problem at hand, one needs to determine the following : 1.The representation of possible solutions, or the chromosomal encoding.2. The fitness function which accurately represents the value of the solution.3. Genetic operators (i.e., selection, crossover, Mutation and Elitism) which have to be used and the parameter values (population size, probability of applying operators, maximum number of generatons, etc.), which are suitable.
The main steps in RGSGCS are as follows:

Chromosome representation of RGSGCS algorithm
In GA, a chromosome is represented by a series of genes.Each gene, in turn, represents an index of computing resource R j as shown below:

Population initialization of RGSGCS algorithm
One of the important steps in GA is initialization of population.This initialization supports GA to find best solutions within the available search space.In this step, in GA, if bad solutions are generated randomly, the algorithm provides bad solutions or local optimal solutions.To overcome the posed problem, generating individuals using well-known heuristics in the initial step of the algorithm is required.These heuristics generate near-optimal solutions and the meta-heuristic algorithm combines these solutions in order to obtain better final solutions.
Scheduling heuristics such as Min-Min, Minimum Completion Time (MCT), Minimum Execution Time (MET) (Braun et al., 2001), are proposed for independent tasks.Most of these heuristics are based on the following two assumptions.
First, the expected execution time EET ij is deterministic and does not vary with time.
Second, each task has exclusive use of the resource.Traditional MCT heuristic assigns each task to the resource that completes it earliest.The new algorithm, Random-MCT, is described below: For the first tasks in the grid, which their number equals to total resources number in the grid, the resources are assigned randomly.The remaining tasks in the grid are assigned according to earliest finishing time.Where RT j is the Ready Time of resource j.
The time complexity of Random-MCT heuristic is O(M.N).After completion of RGSGCS's initialization, the evaluation phase is introduced.for all resources R j in the grid do 3: find resource R p randomly for T i 5: attach T i to R p 6: end for 7: end for 8: for remaining tasks T i in the grid do 9: for all resources R j in the grid do 10: find resource R p which will finish T i earliest (elitism) Select the members of the combined population based on minimum fitness, to make the population P of the next generation.9: end for

The evaluation phase of RGSGCS algorithm
The evaluation phase evaluates the quality of resulted schedule depending on a fitness equation.The fitness equation must be devised to determine the quality of a given chromosome instance and always returns a single numerical value.In this chapter, the fitness function is the makespan, i.e., the minimum completion time of the last finishing task.In other words, makspan is the schedule length.The main goal is to maximize the throughput of the grid by minimizing makespan through an intelligent load balancing.The makespan is calculated using the equations 3 and 4.While the fitness function is expressed as in equation 5.

Rank Roulette Wheel Selection (RRWS) of RGSGCS algorithm
This phase chooses chromosomes from a population for later breeding (crossover).RRWS combines the advantages of two types of selections, namely, Rank Selection (RS) and Roulette Wheel Selection (RWS).

Roulette Wheel Selection (RWS) of GA
GA uses proportional selection.The population of the next generation is determined by n independent random experiments; the probability that chromosome xi is selected from the pool (x1, x2, ••• , xm) to be a member of the next generation at each experiment is given by the following equation: This process is also called roulette wheel selection.Where each chromosome of the population is represented by a slice that is directly proportional to the chromosome's fitness.A selection step is a spin of the wheel, which in the long run tends to eliminate the least fit population chromosomes.Figure 6 (a) explains the selection method of (RWS) (Obitko, 1998).A roulette wheel where are placed all chromosomes in the population, every chromosome has its place big accordingly to its fitness function.The procedure now is to assign to each chromosome a part of roulette wheel then spin the wheel n time to select n individuals.

Rank Selection (RS) of GA
RWS has problem when the fitness value differs very much.In RS (as shown in figure 6 (b)) the worst value has fitness value equals to 1, the second worst value equals to 2, •••, etc, and the best will have fitness value equals to N (Obitko, 1998).
Therefore, the RGSGCS's selection process is accomplished by applying RRWS (Wael et al., 2009c;Jadaan et al., 2009), RRWS orders the chromosome's fitness values of population in ascending order, and save this order in array, say Rank.After that, it associates the probability shown in equation( 7) with each individual chromosome, calculates cumulative proportion of each chromosome, and selects solutions from the population by repeated random sampling based on cumulative proportion.
RRWS determines how many and which individuals will be kept in the next generation.Next, crossover operator and mutation operator are explained.

Two-point crossover operator of RGSGCS algorithm
Two-point crossover operator (figure 7) controls how to exchange genes between individuals.Two chromosomes are selected randomly from mating pool.Where the middle part in each chromosome is reversed between two parent chromosomes.It is applied to the chromosomes from selection phase.After that, the mutation operator allows for random gene alteration of Fig. 7. Two-Point Crossover Operator an individual.

Single exchange mutation operator of RGSGCS algorithm
In this phase, single exchange mutation operator (figure 8) is applied to the output of crossover phase.Mutation operator exchanges only two genes according to a mutation rate P m .It is useful to avoid premature convergence of GA.

Elitism of RGSGCS algorithm
Besides the standard genetic operators (i.e., crossover and mutation operators).The elitism Phase is used finally to preserve the best candidates for the next generation, so that the algorithm always converges to the global optimum.It combines the parent population with the modified population (the candidates generated by crossover and Mutation operators), and takes the best chromosomes.After this phase, the algorithm continues to the next iteration.
The algorithm terminates after it reaches the maximum generations number.

Mutation based simulated annealing algorithm for minimizing makespan in grid computing systems (MSA)
SA is a global optimization technique.It derived from the concept of metallurgy which crystallizes the liquid to the required temperature.Traditional SA, as shown in figure 9 (Akella, 2009), explores globally, spending more time in regions which on average have fitter solutions.In the later stages, the search is confined to a small area, and SA optimizes within that area.In these final stages, it is similar to local search.
Instead of population which is used in GA, two solutions are maintained in MSA algorithm at a time.
Interestingly, MSA works iteratively keeping two tentative chromosomes at every iteration.
For the first iteration, single exchange mutation operator is applied to initial chromosome, with different genes to produce two new solutions.For the remaining iterations, First chromosome is generated from the previous one by applying single exchange mutation operator to it, while the second chromosome is generated by applying single exchange mutation operator to initial chromosome (generated by Random-MCT algorithm 1), and each one either replaces it or not depending on acceptance criterion.The acceptance criterion works as follows: the old and the new solutions have an associated makespan Makespan, determined by a fitness function.If the new solution is better than the old one, then it will replace it, if it is worse, it replaces it with probability P.This probability depends on the difference between their Makespan values and control parameter T named temperature.This acceptance criterion provides a way of escaping from local minimum.Therefore, the probability of moving to the new solution decreases exponentially as its fitness gets worse, and also temperature gets lower.Usually temperature is gradually decreased so that uphill movements (for minimization problem) become less and less as the run progresses.

99
Task Scheduling in Grid Environment Using Simulated Annealing and Genetic Algorithm www.intechopen.comIn single exchange mutation operator, it picks up two genes of a chromosome selected randomly, then exchanges resource indices between them if these indices are not the same vaue (Wael et al., 2011).The MSA algorithm is described by algorithm 3.In the traditional SA, Generate chromosome s1 ∈ Neighbor(s) by using Single Exchange mutation.

6:
Apply using Single Exchange mutation on initial chromosome s to generate chromosome s2.

8:
for l = 1to2do 9: ∆=exp( only one neighborhood solution is created in each temperature.The main difference between MSA and traditional SA is that MSA creates two neighborhood solutions in each temperature using single exchange mutation, and selects one of them according to the probability and the fitness function.Applying this modification to the traditional SA causing MSA algorithm to find better solutions in less average time.Note that in table 2 stopping criterion is refered as the total number of Neighbours.A sNeighbours increases, more solutions will be evaluated and larger areas of the search space may be searched.This enhances MSA chances to find the global optimum. In order to make additional comparison with other algorithms, Min-Min algorithm is chosen as a benchmark because most related works evaluated this algorithm (Wael et al., 2011).The idea of algorithm Min-Min is as follows: calculate the shortest execution time of every task, select the shortest task to match a resource, then delete the task.Repeat the steps until all tasks finished.This algorithm takes O(N 2 .M) time.While computational time complexity of MSA algorithm is expressed as O(M.N+Q.M.N)o rO ( Q.M.N), where Q is total number of MSA iterations.

Performance analysis of RGSGCS and MSA
In order to measure the final schedule of both algorithms MSA, and RGSGCS, the following parameters are used: First, Load Balancing Factor LBF, which is in the following equation: Note that LBF measures load balancing of an algorithm's solution, when LBF minimizes, algorithm's quality is better.Finally, when LBF equals to zero the load balancing of algorithm's solution is optimal.MSA algorithm needs to spend very less time to come up with an optimal solution.Second, average resource utilization is given by the following equation: Where m = 1, 2, ••• , M. However, according to the simulation results, it is proved that MSA is effective in speeding up convergence while providing an optimal result.

Simulation results Of RGSGCS and MSA
The simulation results of algorithms RGSGCS, MSA and Min-Min of RM are shown in table 3 for eight different experiments.The reason of testing experimenting is to explore the dynamic behavior of grid environment.For the experiment 1, workloads of tasks are (6,12,16,20,24,28,30,36,40,42,48,52,60) cycles, and the computing capacities of resources are 3, 2) Cycle Per Unit Time(CPUT).The computing capacities of resources, experiments 2 to 8 in the table 3, diverse randomly from 2 to 8 CPUT for each resource.Furthrmore, the workload of tasks ranges randomly from 10 to 150 cycles.The parameters of MSA and RGSGCS are listed in table 2. MSA, Min-Min and RGSGCS are simulated using MATLAB.In table 3, the values of makespan, average time and both algorithms RGSGCS and MSA are compiled together for purpose of comparison.Table 3 and figures( 10 (a), (b) and (c) ) lay out that: The average gains in time of MSA expressed as percentages are 97.66%,91.03%, 96.83%, 89.6%, 93.35%, 90.95%, 92% and 92.29% for experiments 1 upto 8 respectively.Hence the total average gain in time for all the experiments is 92.964%.[6.4-29.56]and [0-8.12]respectively.

RGSGCS algorithm
From results discussed above, it can be concluded that MSA algorithm dynamically optimizes output schedule closer to global optimal solution.
Note that the MSA algorithm outperforms RGSGCS algorithm within very less time to run the algorithm.Depending on SA algorithm and random-MCT heuristic, MSA algorithm is powerful when it is compared with RGSGCS algorithm, while RGSGCS algorithm has less convergence to the optimal solution.
The results of the comparison among algorithms RGSGCS , Min-Min and MSA in each experiment in the table 3, prove that MSA algorithm provides an effective way to enhance the search performance, because it obtains an optimal schedule within a short time along with high resource utilization.
Notably, the solutions of MSA algorithm are high quality and can be used for realistic scheduling in grid environment.The simulation results are consistent with the performance analysis in section 8, which clarifies that the improvement to the evolutionary process is reasonable and effective.

Improvment in time consumed by algorithm of RGSGCS and MSA
According to the table 3, two genes exchanged in single exchange mutation has shown good performance in both algorithms RGSGCS and MSA.Moreover, the times taken by both algorithms RGSGCS and MSA are still big, and it is useful to get reasonable results along with less time consumed by algorithms RGSGCS and MSA.One way to do this is to assign 102 Grid Computing -Technology and Applications, Widespread Coverage and New Horizons www.intechopen.com3. Table 4 dispays new values of solution for both algorithms MSA and RGSGCS.This table provides the results of MSA algorithm for two different termination criterions, namely T < e −300 for MSA (1) and T < e −50 for MSA (2).Note that, in tables 3, 4, MR denotes reduction in makespan, which is difference between makespan values for both algorithms RGSGCS and MSA.Two experiments 9 and 10 are added to ensure scalability of both algorithms MSA and RGSGCS.

ETC model
The Expected Time to Compute (ETC) model is another model can also test performance of MSA algorithm.Interestingly, ETC matrix model allows to capture important characteristics of task scheduling.For example, ETC model introduces possible inconsistencies among tasks and resources in grid system by assigning a large value to ETC(t, m) to indicate that task t is incompatible with resource m.
Moreover, ETC matrix considers three factors: task heterogeneity, resource heterogeneity and consistency.The task heterogeneity depends upon the various execution times of the   instances depend upon the above three factors as task heterogeneity, resource heterogeneity and consistency.Instances are labeled as u-x-yyzz where: 3. yy -is used to indicate the heterogeneity of the tasks(hi-high, lo-low).4. zz -is used to indicate the heterogeneity of the resources (hi-high, lo-low).
All the instances consist of 512 tasks and 16 resources.This Model is studied for the following algorithms: 1. GANoX algorithm is the same algorithm 2, but without using crossover operator.Single exchange mutation is used at probability of mutation equals to one.2. PRRWSGA algorithm is the same algorithm 2, probability of crossover equals to 0.8, probability of Mutation equals to 0.01, and full chromosome will be altered.3. MSA-ETC is the same algorithm 3. Initial chromosome can be taken as the best run of 1000 runs of the algorithm 1.Moreover, stopping criterion which is used equals to (M × N × 20); 4. Min-Min algorithm is pointed out in section 7.
Maximum Generation is 1000 and Population Size is 50 for both algorithms GANoX and PRRWSGA.It can be seen from figures 11 (a), (b) and (c), and table 5, that MSA-ETC has superior performance on all remaining algorithms, namely, Min-Min, GANoX, and PRRWSGA, in terms of LBF, Makespan, ResourceUtilization, and time taken by the algorithm.Saving in average time is about 90%, except when it is compared with Min-Min.As a result, MSA-ETC has less time complexity when it is compared with both algorithms GANoX and PRRWSGA.In the study, the algorithm is designed and compared to different grid environments.Using MSA-ETC it can get good workload balancing results.
The proposed MSA-ETC algorithm can consistently find better schedules for several benchmark problems as compared to other techniques in the literature.

Conclusion
This chapter studies problem of minimizing makespan in grid environment.The MSA algorithm introduces a high throughput computing scheduling algorithm.Moreover, it provides solutions for allocation of independent tasks to grid computing resources, and speeds up convergence.As a result load balancing for MSA algorithm is higher than RGSGCS algorithm, and the gain of MSA algorithm in average time consumed by an algorithm is higher than RGSGCS algorithm for both RM and ETC models, which makes MSA algorithm very high QoS and more preferable for realistic scheduling in grid environment.
The initialization of MSA algorithm plays important role to find a good solution and to reduce the time consumed by algorithm.
Furthermore, the improvments on the performance of MSA algorithm, and RGSGCS, give another salient feature, which reduces the time consumed by algorithm to the low reasonable level.
Regarding MSA algorithm for ETC Model, MSA algorithm superior performance among other algorithms along with resource utilization and load balancing factor values.

107
Task Scheduling in Grid Environment Using Simulated Annealing and Genetic Algorithm www.intechopen.com

Fig. 2 .
Fig. 2. Makespan results of experiment 8 (mentioned in table3) which consists of 1000 tasks and 50 resources with one/two point(s) crossover, with/without Random-MCT, and two/all genes exchanged.

Fig. 3 .
Fig. 3.The relationship among RM/ETC model and the RGSGCS/MSA

Fig. 5 .
Fig. 4. Task-Resource Representation for the Grid Task Scheduling Problem

95
Task Scheduling in Grid Environment Using Simulated Annealing and Genetic Algorithm www.intechopen.comAlgorithm 1 Random-MCT 1: for Ti = 1 to M tasks in the grid do 2: Initial Population P of size N1 using Random-MCT (algorithm 1).2: for g = 1toMaximumGenerations do 3:Calculate the fitness of each chromosome using equations (3 Fig. 6.Example of Roulette Wheel Selection and Rank Selection

Table 2 .
Parameters used in RGSGCS/MSA MSA algorithm has reduction in makespan value equals to eighteen (18) when it is compared with algorithm Min-Min and equals to three (3) when it is compared with algorithm RGSGCS.Moreover, LBF values of algorithms MSA, Min-Min and RGSGCS are in ranges [0-1.53], Fig. 10.Simulation Results of Random model probability of crossover, probability of mutation, ppopulation size and maximum generations number to the values 1 , 1, 50 and 1000, respectively in the experiments in table3.Table4dispays new values of solution for both algorithms MSA and RGSGCS.This table provides the results of MSA algorithm for two different termination criterions, namely T < e −300 for MSA(1) and T < e −50 for MSA(2).Note that, in tables 3, 4, MR denotes reduction in makespan, which is difference between makespan values for both algorithms RGSGCS and MSA.Two experiments 9 and 10 are added to ensure scalability of both algorithms MSA and RGSGCS.
tasks.The two possible values are defined high and low.Similarly the resource heterogeneity depends on the running time of a particular task across all the resources and again has two values: high and low. the real scheduling, three different ETC consistencies are possible.They are consistent, inconsistent and semi-consistent.The instances of benchmark problems are classified into twelve (12) different types of ETC matrices, they are generated from model of Braun(Braun  et al., 2001).Each type is obtained by calculating the average value of makespan of ten runs of each algorithm except Min-Min algorithm which it runs just once by default.The LBF values of ETC model Fig. 11.Simulation Results of ETC model LBF0.5379-0.03850.0025-0.0000850.03-0.00080.14-0.002ResourceUtilization 0.8365-0.9630.9975-0.99990.971-0.9990.876-0.99Table5.Simulation Results of ETC Model of Min-Min, MSA-ETC, GANoX, and PRRWSGA the time complexity of GANoX algorithm and PRRWSGA algorithm is O(Q.PS.M.N), and for MSA-ETC algorithm is O(Q.M.N).

Table 1 .
Time complexity analysis of RGSGCS algorithm Time complexity analysis of RGSGCS algorithm can be analyzed step by step as shown in table 1.From table 1 time complexity of RGSGCS algorithm is expressed as: O(Q.PS.N.M).Where PS is population size, and Q is Maximum number of iterations of RGSGCS algorithm.PS + PS.log(PS)) RGSGCS algorithm O(Q.PS.N.M) Neighbours is reached 22: return s * , and best Makespan(s * ) // Where Makespan is makespan value of candidate chromosome.

Table 3 .
Simulation Results of MSA, Min-Min and RGSGCS with probability of crossover, probability of mutation, population size and maximum generations number values taken from

Table 4 .
Simulation Results of MSA and RGSGCS with probability of crossover, probability of mutation, population size and maximum generations number equal to1,1,50and1000, respectively.