20 All Rights Reserved © 2012 IJARCSEE
Grid Scheduling Using PSO with SPV Rule
Kuldeep Kaur M.TECH(CSE) Department of Computer Science and Engineering
[email protected] Lovely Professional University,Punjab, India
Mr. Sudhanshu Prakash Tiwari
Department of Computer Science and Engineering Lovely Professional University,Punjab, India
Abstract
Grid computing can be defined as applying the resources of many computers in a network to a problem which requires a great number of computer processing cycles or access to large amounts of data. However, in the field of grid computing scheduling of tasks is a big challenge. The task scheduling problem is the problem of assigning the tasks in the system in a manner that will optimize the overall performance of the application, while assuring the correctness of the result. Each day new algorithms are proposed for assigning tasks to the resources. This is also a boon for the grid computing. In this paper we use the technique of Particle Swarm Optimization (PSO) with SPV (Shortest position value) rule to solve the task scheduling problem in grid computing. The aim of using this technique is use the given resources optimally and assign the task to the resources efficiently. The simulated results show that PSO with SPV rule proves to be a better algorithm when applied to resource allocation and disk scheduling in grid computing.
Keywords: Grid scheduling; PSO with SPV rule; SPV Rule; Tasks; Resources
I. INTRODUCTION
Grid computing is a network that is not in the same place but distributed resources such
as computers, peripherals, switches,
instruments, and data. Grid computing appears to be a promising trend for three reasons:
1. Its ability to make more cost-effective use of a given amount of computer resources.
2. It is a way to solve problems that can't be approached without an enormous amount of computing power.
3. Because it suggests that the resources
of many computers can be
cooperatively and perhaps
Synergistically harnessed and managed as collaboration toward a common objective. Grid computing can be used to compute large number of tasks on the resources which are geographically remotely located. Task scheduling is a challenging problem in grid
computing environment. Many parallel
applications consist of multiple computational components. While the execution of some of these components or tasks depends on the completion of other tasks, others can be executed at the same time, which increases parallelism of the problem.
Abraham et al and Braun et al [1] address the
dynamic scheduling of jobs to the
geographically distributed computing
resources. They provide an introduction of computational grids followed by a brief description of the three nature’s heuristics namely Genetic Algorithm (GA), Simulated Annealing (SA) and Tabu Search (TS). Yang gao et al [2] proposed two algorithms that use the predictive models to schedule jobs at both system level and application level.
21 All Rights Reserved © 2012 IJARCSEE
of large clusters, connected through a high bandwidth dedicated network.
Shanshan Song et al[4] proposed a new Space-Time Genetic Algorithm (STGA) for trusted job scheduling in which they consider three security-driven heuristic modes: secure, risky and f -risky.
Lee Wang et al [5] developed a heuristic based approach to matching and scheduling in heterogeneous computing environment. Lin Jian Ning et al [6] scheduling-algorithm based on genetic algorithm (GA) is addressed. In this paper simulated results prove that PSO with SPV rule proves to be better when it is applied for resource allocation in the field of grid computing. This paper is organized as follows. In section 2 the issues related to task scheduling is discussed. In section 3 particle swarm algorithm is introduced. In section 4 we implement PSO with SPV rule for grid task scheduling problem. In section 5 we see the simulation result of work done in section 4.
II. TASK SCHEDULING ISSUES IN GRID COMPUTING
Computational grid can be combination of hardware and software that can be used to solve complex computational problems. The resource in a computational grid can be anything which can be used to solve the given problem. For example a set of printers which are used for printing a set a documents. The overall objective of task scheduling is to minimize the completion time and to utilize the resources effectively and usually it is easy to get the information about the ability to process data of the available resource.
The problem of task scheduling arises in a situation where there are more tasks than the available resources. Consider a scenario wherein there are x, x={1,2,3,4,...X} tasks to be done and there are y, y={1,2,3,4...Y} resources available. With the condition that the task is not allowed to be migrated between resources.
In such a situation if we have y>x then there is no reason for developing new algorithms for task scheduling because then resources can be allocated to the tasks on first come first serve basis.But if y<x then we need to develop new algorithms for task scheduling
because now inefficient resource allocation can greatly hamper the efficiency and throughput of the scheduler.
To formulate the problem, define Ta a={1,2,3,…X } as x independent tasks permutation and Rb b={1,2,3,…y } as y computing resources. Suppose that the processing time Pa,b for task a computing on b resource is known. The completion time F(x) represents the total cost time of completion.
The objective is to find an permutation matrix m = (Mab) , with Mab =1 if resource a performs task b and if otherwise, Mab=0, which minimizes the total costs.
F(x)=ΣΣPa,b * Mab (1)
Subject to
Σ Mab=1,∀b∈T , (2)
Mab∈{ 0,1}, ∀a∈R, b∈T (3)
The minimal F(x) represents the length of schedule whole tasks working on available resources. The scheduling constraints (2) guarantee that each task is assigned to exactly one resource.
III. PARTICLE SWARM OPTIMIZATION
22 All Rights Reserved © 2012 IJARCSEE
the best solution visited by any particle, and experiences an attraction towards this solution, called gbest , as well. The first and second factors are called cognitive and social
components, respectively. After each
iteration, the pbest and gbest are updated for each particle if a better or more dominating solution (in terms of fitness) is found. This process continues, iteratively, until either the desired result is converged upon, or it is determined that an acceptable solution cannot be found within computational limits. For an n-dimensional search space, the ith particle of the swarm is represented by an n-dimensional vector, Xi= (xi1 ,xi2 ...xin )T . The velocity of this particle is represented by another n-dimensional vector Vi = (vi1; vi2... vin )T . The previously best visited position of the ith particle is denoted as Pi = (pi1, pi2,...pin )T .
`g' is the index of the best particle in the swarm. The velocity of the ith particle is updated using the velocity update equation given by
vid = vid +c1r1( pid - xid) + c2r2( pgd -xid)
(4)
and the position is updated using
xid= xid + vid
(5)
where d = 1, 2....n ; i = 1; 2....S , where S is the size of the swarm; c1 and c2 are constants, called cognitive and social scaling parameters respectively (usually, c1 = c2 ; r1 ,
r2 are random numbers, uniformly distributed in [0, 1]). Equations (4) and (5) are the initial version of PSO algorithm. A constant, Vmax, is used to arbitrarily limit the velocities of the particles and improve the resolution of the search. Further, the concept of an inertia weight was developed to better control exploration and exploitation. The motivation was to be able to eliminate the need for Vmax . The inclusion of an inertia weight (w) in the particle swarm optimization algorithm was first reported in the literature in 1998 (Shi and
Eberhart, 1998). The resulting velocity update equation becomes:
vid = w * vid + c1 r1( pid - xid) + c2r2( pgd -xid)
(6)
Eberhart and Shi (2000) indicate that the optimal strategy is to initially set w to 0.9 and reduce it linearly to 0.4, allowing initial exploration followed by acceleration toward an improved global optimum.
IV. PROPOSED METHODOLOGY
In this paper we have proposed a solution for grid scheduling using PSO with SPV rule. For solving any optimization problem we have to first formulate the problem according to optimization problem. In this case first we formulate the grid scheduling problem according to PSO algorithm. Next subsection describes how we formulate the grid scheduling problem.
V. REPRESENTATION
To solve the problem, representation of the individual and fitness value is required. PSO with SPV rule algorithm is based on population (candidate solution) and each population have its own fitness value according to which it is compared from others, so we have to first represent the grid scheduling problem in terms of PSO with SPV rule.In grid scheduling, we have a set of tasks and a set of resources as input and a sequence, which informs that which task is to be operated on which resource and in which order as output. PSO with SPV rule is based on population concept and each individual in population represents a solution, in case of grid scheduling problem, solution is a sequence of tasks which are to be performed. So we have to first formulate each individual of PSO with SPV rule.
23 All Rights Reserved © 2012 IJARCSEE
Using the SPV (shortest position value) rule continuous position generated by PSO is converted to discrete value.
We represent dimension as a number of task and value as an initial sequence from the possible set of sequences to find optimal sequence. Position vector Xid={x1,x2,x3,...xd} where i is the particular individual and d represents the dimension index, is calculated using PSO. The position vector of each particle makes transformation about the continuous position. Smallest position value i.e. SPV rule is used to find a permutation corresponding position Xid. The position vector Xid has continuous values. By using the SPV rule this continuous position value can be converted to discrete value permutation Sid=[si1, si2,…….sid].Sidis the sequence of task of i particle in the processing order with respect to the d dimension.
Set of resources is represented by Rlm={r1,r2,r3...ry}, where l represents a particle/ sequence and m represents the tasks which are assigned to a resource. After Sid, set of resources is calculated using equation (7).
Rlm=Sid mod M (7)
i.e. value of task set mod Total resources
Resource id is given to each resource so that they can be easily differentiated from one other. Such as r1 is the resource id of first resource. For e.g. if we have 10 tasks which are to be performed on 5 available resources then we have dimension value as 10.Based on SPV rules, the continuous position convert to a permutation of sequences Sid, which is a sequence of task simplified by the particle Xid.
Position vector Xid is calculated using PSO
is={4.83,-0.55,1.90,3.46,1.05,2.87,-0.28,0.19,4.0,2.28}
Then using SPV rule transformation of position vector Xid to Sid, we have Sid value as {9,0, 4, 7,3,6,1,2,8,5}.
Equation (7) is then used to determine the associated resources for the calculated tasks in the sequence. We can calculate the resource set as {4, 0, 4, 2, 3, 1, 1, 2, 3, 0} The table1 represents the dimension values of position vector Xid , sequence Sid and Set of resource Rlm.
Table1: Values of position vector, sequence and set of resources.
VI. FITNESS FUNCTION
After representation of each individual we have to calculate fitness value of each individual. On the basis of fitness value we determine the optimal solution. In case of grid scheduling problem optimal solution is the minimization the value of equation.
Our main objective is to minimize the fitness value, an individual who have the minimum fitness value is considered as the optimal solution.
VII. ALGORITHM
Grid scheduling using PSO with SPV Rule
To solve the grid scheduling problem we have used the Particle Swarm Optimization (PSO) with SPV rule. We set an initial population by selecting random starting sequences from the set of x! Sequences; where x is the total number of tasks. After getting the initial particle we calculate fitness value of each particle, according to equation. After that we calculate best among the entire particle and set it as an initial global best.
PSO update equation is used to update old population and generate new sequences and then their resources are calculated. This sequence, along with its resource is then used to find the fitness value of each individual of each particle of the population. Algorithm 1 is the proposed algorithm for the grid scheduling problem.
Dimension Xid Sid Rlm
0 7.83 9 4
1 -0.65 0 0
2 2.90 4 4
3 5.46 7 2
4 1.25 3 3
5 4.87 6 1
6 -0.48 1 1
7 0.39 2 2
8 6.0 8 3
24 All Rights Reserved © 2012 IJARCSEE
Algorithm for Grid Scheduling using PSO
with SPV Rule
[Initialsation Phase] For s=0 to Swarm size do For d=0 to dimension size do
Randomly initialize particle
Using SPV rule a task sequence is
Compute resource for that
particle/sequence generated
End for d
Compute fitness of initialized particle Compute global best
End for s
[Update Phase] Repeat
For s=0 to each swarm size do
For d=0 to problem dimension do
Update particles using PSO update equation A new sequence is generated using SPV rule Compute resources for that sequence
end for d
Compute fitness of updated particle
if needed update historical information for global best(Pg)
endfor s
untill(stopping criteria is not met)
VIII. EXPERIMENTAL SETUP
For every algorithm there are some control parameters which are used for its efficient working. Hence, there are some controls parameters for PSO with SPV rule also. We did an extensive literature survey and carried out our own experiments for determining the values of these control parameters. From this we found that the values which we have taken in this experiment are standard values and they are also suitable for this experiment.
The first control Parameter is Maximum function evaluation and the value of this parameter we have taken in our experiment as 20,000. The next parameter in our experiment is maximum number of population and we have taken its value to be 40. Another control parameter is number of runs and we have taken its value in our experiment as 30. It must be noted that each run contains
maximum function evaluation, which is 20,000 in our experiment. The fourth control parameter is Dimension and it depends upon the number of tasks. The next control parameter is the value of c1 & c2 which we have taken as 1.14. And w (Inertia weight) is also a control parameter and we have taken its value as 0.7.
IX. EXPERIMENTAL RESULTS
In this section we analyze the result obtained by our algorithm. To test the efficiency of our algorithm results of PSO with SPV rule is compared with Genetic algorithm (GA) results. In a grid scheduling task we already have the information about the number of resources, number of tasks, and the amount of time that will be taken by a resource to complete a task. We just need to find the sequence which will provide us the optimal results. We conducted the experiment by varying the number of resources as well as varying the number of tasks and then we compared our results with that of GA. In particular, we have taken three cases in which we have taken different number of resources and tasks.
Experiment 1: Here, we are assuming there are 5 resources and 17 tasks. Following are the execution time (in units) taken by PSO with SPV and GA.
Table2: Execution time calculated by GA and PSO with SPV rule for17 tasks by 5 resources
Genetic Algorithm (GA)
Particle Swarm
Optimization with Shortest Position Value (PSO with SPV)
3078.0 3074.0
The sequence generated by GA is: 14, 8, 0, 16, 4, 13, 6, 1, 3, 9, 11, 15, 12, 10, 5, 7, 2.
25 All Rights Reserved © 2012 IJARCSEE
Experiment 2: Here, we are assuming there are 10 resources and 27 tasks. The execution time (in units) taken by GA and PSO with SPV rule are:
Table3: Execution time calculated by GA and PSO with SPV rule for27 tasks by 10 resources
Genetic
Algorithm (GA)
Particle Swarm
Optimization with
Shortest Position
Value (PSO with SPV)
5365.0 5357.0
The sequence generated by GA
is:24,9,7,2,26,0,8,13,3, 18, 10, 1, 23, 5, 17, 14, 4, 15, 12, 6, 16, 20, 11, 22, 25, 19, 21.
The sequence generated by our proposed PSO with SPV rule is: 14, 19, 1, 9, 0, 7, 24, 6, 8, 10, 15, 5, 13, 12, 26, 4, 11, 2, 22, 18, 17, 3, 16, 21, 23, 20, 25.
Experiment 3: Here, we are assuming there are 12 resources and 30 tasks. The execution time (in units) taken by GA and PSO with SPV rule are:
Table4: Execution time calculated by GA and PSO with SPV rule for 30 tasks by 12 resources
Genetic Algorithm (GA)
Particle Swarm
Optimization with Shortest Position
Value (PSO with
SPV)
6081.0 5834.0
The sequence generated by GA is: 28, 14, 20, 25, 10, 7, 17, 4, 9, 22, 6, 11, 24, 18, 0, 29, 15, 1, 26, 12, 13, 19, 29, 5, 3, 27, 2, 21, 16, 8.
The sequence generated by our proposed PSO with SPV rule is: 11, 22, 0, 29, 1, 25, 24, 17, 26, 9, 2, 15, 6, 4, 19, 21, 7, 18, 28, 8, 10, 3, 13, 27, 23, 5, 16, 14, 20, 12.
From the table 2, table 3, table 4, it is clear that PSO with SPV rule takes less execution time than the GA algorithm.
X. CONCLUSION
It can be concluded from the results that proposed PSO with SPV rule performs better than the GA algorithm. The procedure followed in grid scheduling consists of the generation of the population according to the algorithm, then the task sequence and resources associated with the task sequence are generated and the positions, task sequence and resource set are updated and then the globally best position or sequence is calculated. It is repeated again and again till the maximum number of function evaluation. As future work we have the intention to apply other types of nature inspired algorithms to the grid scheduling problem, comparing their results with the ones accomplished by the PSO with SPV rule.
XI. REFERENCES
[1] Foster and C. Kesselman (editors), The Grid: Blueprint for a Future Computing
Infrastructure, Morgan Kaufman
Publishers, USA, 1999.
[2] Abraham, R. Buyya and B. Nath, Nature's Heuristics for Scheduling Jobs on Computational Grids, The 8th IEEE International Conference on Advanced
Computing and
Communications(ADCOM 2000), pp. 45-52, December 2000.
[3] Y. Gao, H.Q Rong and J.Z. Huang, Adaptive grid job scheduling with genetic algorithms,
[4] Future Generation Computer Systems Elsevier, pp.151-161,2005.
26 All Rights Reserved © 2012 IJARCSEE
[6] S. Song, Y. Kwok, and K. Hwang, Security-Driven Heuristics and A Fast Genetic Algorithm for Trusted Grid Job Scheduling, in Proc. of 19th IEEE International Parallel and Distributed
Processing Symposium (IPDPS’05),
pp.65-74, April 2005.
[7] Lee Wang, Howard Jay Siegel, Vwani P.
Roychowdhury, and Anthony A.
Maciejewski, Task Matching and
Scheduling in Heterogeneous Computing Environments Using a GeneticAlgorithm Based Approach, Journal of Parallel and Distributed Computing , Citeseer47, pp.8-22, 1997
[8] Zhang, L.; Chen, Y.; Sun, R.; Jing, S. & Yang, B. A task scheduling algorithm based on pso for grid computing International Journal of Computational Intelligence Research, 4, 37-43, 2008.
[9] Nath B, Lim S, Bignall R J, A Genetic Algorithm For Scheduling Independent Jobs OnUniform Machines With Multiple
Objectives, Proceedings of the
International Conference on
Computational Intelligence and
Multimedia Applications, Australia, pp. 67-74, 1998.
[10]J. Kennedy and R. Eberhart, “Particle swarm optimization”, in Proc. IEEE
International Conference Neural
Networks, vol. 4, pp. 1942 – 1948, 1995.
[11]Lin JianNing and Wu HuiZhong
,Scheduling in Grid Computing
Environment Based onGenetic Algorithm, Journal of Computer Research and Development,pp.2195-2199,Vol.
4,No.12,Dec 2004.
[12]Wright, A. Genetic Algorithms for Real Parameter Optimization, Foun-dations of Genetic Algorithms, G. Rswlins(Ed.),
Morgen Kaufmann publishers, CA,
pp.205-218, 1991.
[13]Y. Shi and R. C. Eberhart, “A modified particle swarm optimizer”, in Proc. IEEE International Conference on Evolutionary
Computation, Piscataway, pp. 69-73, 1998.
[14]R. C. Eberhart and Y. Shi, Comparing inertia weights and constriction factors in particle swarm optimization Congress on Evolutionary Computing, vol. 1, pp. 84-88, 2000.
Kuldeep Kaur received her Msc(IT) Degree from Guru Nanak Dav University, Amritsar and M.TECH(CSE) Degree from Lovely Professional University in 2010 and 2012 respectively. Her Research Interests
include Grid Computing, Soft
Computing,Software Engineering and
wireless network,etc.
Mr.Sudhanshu Prakash Tiwari has done M.TECH(CSE).He is assistant professor of Department of Computer Science and
Engineering in Lovely Professional