20 26


Published on

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total Views
On Slideshare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

20 26

  1. 1. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012 Grid Scheduling Using PSO with SPV Rule Kuldeep Kaur M.TECH(CSE) Department of Computer Science and Engineering Baby2impressive@yahoo.co.in Lovely Professional University, Punjab, India Mr. Sudhanshu Prakash Tiwari Department of Computer Science and Engineering Lovely Professional University, Punjab, IndiaAbstract 1. Its ability to make more cost-effectiveGrid computing can be defined as applying use of a given amount of computerthe resources of many computers in a network resources.to a problem which requires a great number of 2. It is a way to solve problems that cantcomputer processing cycles or access to large be approached without an enormousamounts of data. However, in the field of grid amount of computing power.computing scheduling of tasks is a big 3. Because it suggests that the resourceschallenge. The task scheduling problem is the of many computers can beproblem of assigning the tasks in the system cooperatively and perhapsin a manner that will optimize the overall Synergistically harnessed and managed asperformance of the application, while collaboration toward a common objective.assuring the correctness of the result. Each Grid computing can be used to compute largeday new algorithms are proposed for number of tasks on the resources which areassigning tasks to the resources. This is also a geographically remotely located. Taskboon for the grid computing. In this paper we scheduling is a challenging problem in griduse the technique of Particle Swarm computing environment. Many parallelOptimization (PSO) with SPV (Shortest applications consist of multiple computationalposition value) rule to solve the task components. While the execution of some ofscheduling problem in grid computing. The these components or tasks depends on theaim of using this technique is use the given completion of other tasks, others can beresources optimally and assign the task to the executed at the same time, which increasesresources efficiently. The simulated results parallelism of the problem.show that PSO with SPV rule proves to be a Abraham et al and Braun et al [1] address thebetter algorithm when applied to resource dynamic scheduling of jobs to theallocation and disk scheduling in grid geographically distributed computingcomputing. resources. They provide an introduction of computational grids followed by a briefKeywords: Grid scheduling; PSO with SPV description of the three nature’s heuristicsrule; SPV Rule; Tasks; Resources namely Genetic Algorithm (GA), Simulated Annealing (SA) and Tabu Search (TS). I. INTRODUCTION Yang gao et al [2] proposed two algorithms that use the predictive models to scheduleGrid computing is a network that is not in jobs at both system level and applicationthe same place but distributed resources such level.as computers, peripherals, switches, M Aggrawal et al [3] presented a Geneticinstruments, and data. Grid computing Algorithm based scheduler. The proposedappears to be a promising trend for three scheduler used in both the intra-grid of a largereasons: organization and in a research grid consisting 20 All Rights Reserved © 2012 IJARCSEE
  2. 2. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012of large clusters, connected through a high because now inefficient resource allocationbandwidth dedicated network. can greatly hamper the efficiency andShanshan Song et al[4] proposed a new throughput of the scheduler.Space-Time Genetic Algorithm (STGA) for To formulate the problem, define Tatrusted job scheduling in which they consider a={1,2,3,…X } as x independent tasksthree security-driven heuristic modes: secure, permutation and Rb b={1,2,3,…y } as yrisky and f -risky. computing resources. Suppose that theLee Wang et al [5] developed a heuristic processing time Pa,b for task a computing onbased approach to matching and scheduling in b resource is known. The completion timeheterogeneous computing environment. F(x) represents the total cost time ofLin Jian Ning et al [6] scheduling-algorithm completion.based on genetic algorithm (GA) is addressed. The objective is to find an permutation In this paper simulated results prove that matrix m = (Mab) , with Mab =1 if resourcePSO with SPV rule proves to be better when a performs task b and if otherwise, Mab=0,it is applied for resource allocation in the field which minimizes the total costs.of grid computing. This paper is organized asfollows. In section 2 the issues related to task F(x)=ΣΣPa,b * Mab (1)scheduling is discussed. In section 3 particleswarm algorithm is introduced. In section 4 Subject towe implement PSO with SPV rule for grid Σ Mab=1,∀ b∈ T , (2)task scheduling problem. In section 5 we seethe simulation result of work done in section Mab∈ { 0,1}, ∀ a∈ R, b∈ T (3)4. The minimal F(x) represents the length of schedule whole tasks working on available II. TASK SCHEDULING ISSUES IN resources. The scheduling constraints (2) GRID COMPUTING guarantee that each task is assigned to exactly one resource. Computational grid can be combination ofhardware and software that can be used to III. PARTICLE SWARMsolve complex computational problems. The OPTIMIZATIONresource in a computational grid can beanything which can be used to solve the given The particle swarm optimization algorithm,problem. For example a set of printers which originally introduced in terms of social andare used for printing a set a documents. The cognitive behavior by Kennedy and Eberhartoverall objective of task scheduling is to (1995), solves problems in many fields,minimize the completion time and to utilize especially engineering and computer science.the resources effectively and usually it is easy The individuals, called particles henceforth,to get the information about the ability to are flown through the multi-dimensionalprocess data of the available resource. search space with each particle representing a The problem of task scheduling arises in a possible solution to the multi-dimensionalsituation where there are more tasks than the optimization problem. Each solutions fitnessavailable resources. Consider a scenario is based on a performance function related towherein there are x, x={1,2,3,4,........X} tasks the optimization problem being solved. Theto be done and there are y, y={1,2,3,4.......Y} movement of the particles is influenced byresources available. With the condition that two factors using information from iteration-the task is not allowed to be migrated between to-iteration as well as particle-to-particle. Asresources. a result of iteration-to- iteration information, In such a situation if we have y>x then the particle stores in its memory the bestthere is no reason for developing new solution visited so far, called pbest , andalgorithms for task scheduling because then experiences an attraction towards this solutionresources can be allocated to the tasks on first as it traverses through the solution searchcome first serve basis.But if y<x then we need space. As a result of the particle-to-particleto develop new algorithms for task scheduling interaction, the particle stores in its memory 21 All Rights Reserved © 2012 IJARCSEE
  3. 3. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012the best solution visited by any particle, and Eberhart, 1998). The resulting velocity updateexperiences an attraction towards this equation becomes:solution, called gbest , as well. The first andsecond factors are called cognitive and socialcomponents, respectively. After each vid = w * vid + c1 r1( pid - xid) + c2r2( pgd -xid)iteration, the pbest and gbest are updated foreach particle if a better or more dominating (6)solution (in terms of fitness) is found. Thisprocess continues, iteratively, until either the Eberhart and Shi (2000) indicate that thedesired result is converged upon, or it is optimal strategy is to initially set w to 0.9 anddetermined that an acceptable solution cannot reduce it linearly to 0.4, allowing initialbe found within computational limits. For an exploration followed by acceleration towardn-dimensional search space, the ith particle of an improved global optimum.the swarm is represented by an n-dimensionalvector, Xi= (xi1 ,xi2 .....xin )T . The velocity of IV. PROPOSED METHODOLOGYthis particle is represented by another n-dimensional vector Vi = (vi1; vi2...... vin )T . In this paper we have proposed a solution forThe previously best visited position of the ith grid scheduling using PSO with SPV rule. Forparticle is denoted as Pi = (pi1, pi2,........pin )T . solving any optimization problem we have to`g is the index of the best particle in the first formulate the problem according toswarm. The velocity of the ith particle is optimization problem. In this case first weupdated using the velocity update equation formulate the grid scheduling problemgiven by according to PSO algorithm. Next subsection describes how we formulate the grid scheduling problem.vid = vid +c1r1( pid - xid) + c2r2( pgd -xid) V. REPRESENTATION(4) To solve the problem, representation of the individual and fitness value is required. PSOand the position is updated using with SPV rule algorithm is based on population (candidate solution) and eachxid= xid + vid population have its own fitness value according to which it is compared from(5) others, so we have to first represent the grid scheduling problem in terms of PSO with where d = 1, 2....n ; i = 1; 2....S , where S SPV rule.In grid scheduling, we have a set ofis the size of the swarm; c1 and c2 are tasks and a set of resources as input and aconstants, called cognitive and social scaling sequence, which informs that which task is toparameters respectively (usually, c1 = c2 ; r1 , be operated on which resource and in whichr2 are random numbers, uniformly distributed order as output. PSO with SPV rule is basedin [0, 1]). Equations (4) and (5) are the initial on population concept and each individual inversion of PSO algorithm. A constant, Vmax, is population represents a solution, in case ofused to arbitrarily limit the velocities of the grid scheduling problem, solution is aparticles and improve the resolution of the sequence of tasks which are to be performed.search. Further, the concept of an inertia So we have to first formulate each individualweight was developed to better control of PSO with SPV rule.exploration and exploitation. The motivation Grid task scheduling problem is a discretewas to be able to eliminate the need for Vmax . optimization problem. In the proposedThe inclusion of an inertia weight (w) in the solution continuous version of PSO is usedparticle swarm optimization algorithm was instead of discrete version. To change thefirst reported in the literature in 1998 (Shi and continuous version to real version for grid task scheduling problem SPV rule is used. 22 All Rights Reserved © 2012 IJARCSEE
  4. 4. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012Using the SPV (shortest position value) rule Table1: Values of position vector, sequencecontinuous position generated by PSO is and set of resources.converted to discrete value. Dimension Xid Sid Rlm We represent dimension as a number of 0 7.83 9 4task and value as an initial sequence from thepossible set of sequences to find optimal 1 -0.65 0 0sequence. Position vector Xid={x1,x2,x3,......xd} 2 2.90 4 4where i is the particular individual and d 3 5.46 7 2represents the dimension index, is calculated 4 1.25 3 3using PSO. The position vector of eachparticle makes transformation about the 5 4.87 6 1continuous position. Smallest position value 6 -0.48 1 1i.e. SPV rule is used to find a permutation 7 0.39 2 2corresponding position Xid. The position 8 6.0 8 3vector Xid has continuous values. By using the 9 3.28 5 0SPV rule this continuous position value canbe converted to discrete value permutation VI. FITNESS FUNCTIONSid=[si1, si2,…….sid].Sidis the sequence of taskof i particle in the processing order with After representation of each individual werespect to the d dimension. have to calculate fitness value of each Set of resources is represented by individual. On the basis of fitness value weRlm={r1,r2,r3......ry}, where l represents a determine the optimal solution. In case of gridparticle/ sequence and m represents the tasks scheduling problem optimal solution is thewhich are assigned to a resource. After Sid, set minimization the value of equation.of resources is calculated using equation (7). Our main objective is to minimize the fitness value, an individual who have the minimum Rlm=Sid mod M (7) fitness value is considered as the optimal solution. i.e. value of task set mod Total resources VII. ALGORITHMResource id is given to each resource so thatthey can be easily differentiated from one Grid scheduling using PSO with SPV Ruleother. Such as r1 is the resource id of firstresource. For e.g. if we have 10 tasks which To solve the grid scheduling problem we haveare to be performed on 5 available resources used the Particle Swarm Optimization (PSO)then we have dimension value as 10.Based on with SPV rule. We set an initial population bySPV rules, the continuous position convert to selecting random starting sequences from thea permutation of sequences Sid, which is a set of x! Sequences; where x is the totalsequence of task simplified by the particle Xid. number of tasks. After getting the initial Position vector Xid is calculated using PSO particle we calculate fitness value of eachis={4.83,-0.55,1.90,3.46,1.05,2.87,- particle, according to equation. After that we0.28,0.19,4.0,2.28} calculate best among the entire particle and Then using SPV rule transformation of set it as an initial global best.position vector Xid to Sid, we have Sid value as PSO update equation is used to update old{9,0, 4, 7,3,6,1,2,8,5}. population and generate new sequences andEquation (7) is then used to determine the then their resources are calculated. Thisassociated resources for the calculated tasks sequence, along with its resource is then usedin the sequence. We can calculate the to find the fitness value of each individual ofresource set as {4, 0, 4, 2, 3, 1, 1, 2, 3, 0} each particle of the population. Algorithm 1 isThe table1 represents the dimension values of the proposed algorithm for the gridposition vector Xid , sequence Sid and Set of scheduling problem.resource Rlm. 23 All Rights Reserved © 2012 IJARCSEE
  5. 5. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012Algorithm for Grid Scheduling using PSO maximum function evaluation, which is 20,000 in our experiment. The fourth controlwith SPV Rule parameter is Dimension and it depends upon the number of tasks. The next control parameter is the value of c1 & c2 which we[Initialsation Phase] have taken as 1.14. And w (Inertia weight) is For s=0 to Swarm size do also a control parameter and we have taken its For d=0 to dimension size do value as 0.7. Randomly initialize particle Using SPV rule a task sequence is Compute resource for that IX. EXPERIMENTAL RESULTS particle/sequence generated End for d In this section we analyze the result obtainedCompute fitness of initialized particle by our algorithm. To test the efficiency of ourCompute global best algorithm results of PSO with SPV rule isEnd for s compared with Genetic algorithm (GA)[Update Phase] results. In a grid scheduling task we alreadyRepeat have the information about the number ofFor s=0 to each swarm size do resources, number of tasks, and the amount of For d=0 to problem dimension do time that will be taken by a resource toUpdate particles using PSO update equation complete a task. We just need to find theA new sequence is generated using SPV rule sequence which will provide us the optimal Compute resources for that sequence results. We conducted the experiment by end for d varying the number of resources as well asCompute fitness of updated particle varying the number of tasks and then weif needed update historical information for compared our results with that of GA. Inglobal best(Pg) particular, we have taken three cases in whichendfor s we have taken different number of resourcesuntill(stopping criteria is not met) and tasks. Experiment 1: Here, we are assuming there are 5 resources and 17 tasks. Following are VIII. EXPERIMENTAL SETUP the execution time (in units) taken by PSO with SPV and GA.For every algorithm there are some controlparameters which are used for its efficient Table2: Execution time calculated by GA andworking. Hence, there are some controls PSO with SPV rule for17 tasks by 5 resourcesparameters for PSO with SPV rule also. Wedid an extensive literature survey and carried Genetic Particle Swarmout our own experiments for determining the Algorithm Optimization withvalues of these control parameters. From this (GA) Shortest Positionwe found that the values which we have taken Value (PSO within this experiment are standard values and SPV)they are also suitable for this experiment. 3078.0 3074.0 The first control Parameter is Maximumfunction evaluation and the value of thisparameter we have taken in our experiment as The sequence generated by GA is: 14, 8, 0,20,000. The next parameter in our experiment 16, 4, 13, 6, 1, 3, 9, 11, 15, 12, 10, 5, 7, 2.is maximum number of population and wehave taken its value to be 40. Another control The sequence generated by our proposed PSOparameter is number of runs and we have with SPV rule is: 4, 12, 7, 14, 2, 13, 6, 8, 10,taken its value in our experiment as 30. It 15, 1, 0, 9, 3, 5, 16, 11.must be noted that each run contains 24 All Rights Reserved © 2012 IJARCSEE
  6. 6. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012Experiment 2: Here, we are assuming there From the table 2, table 3, table 4, it is clearare 10 resources and 27 tasks. The execution that PSO with SPV rule takes less executiontime (in units) taken by GA and PSO with time than the GA algorithm.SPV rule are: X. CONCLUSIONTable3: Execution time calculated by GA andPSO with SPV rule for27 tasks by 10 It can be concluded from the results thatresources proposed PSO with SPV rule performs better than the GA algorithm. The procedure followed in grid scheduling consists of the Genetic Particle Swarm generation of the population according to the Algorithm (GA) Optimization with algorithm, then the task sequence and Shortest Position resources associated with the task sequence Value (PSO with SPV) are generated and the positions, task sequence 5365.0 5357.0 and resource set are updated and then the globally best position or sequence is calculated. It is repeated again and again tillThe sequence generated by GA the maximum number of function evaluation.is:24,9,7,2,26,0,8,13,3, 18, 10, 1, 23, 5, 17, As future work we have the intention to apply14, 4, 15, 12, 6, 16, 20, 11, 22, 25, 19, 21. other types of nature inspired algorithms to the grid scheduling problem, comparing theirThe sequence generated by our proposed PSO results with the ones accomplished by thewith SPV rule is: 14, 19, 1, 9, 0, 7, 24, 6, 8, PSO with SPV rule.10, 15, 5, 13, 12, 26, 4, 11, 2, 22, 18, 17, 3, XI. REFERENCES16, 21, 23, 20, 25. [1] Foster and C. Kesselman (editors), TheExperiment 3: Here, we are assuming there Grid: Blueprint for a Future Computingare 12 resources and 30 tasks. The execution Infrastructure, Morgan Kaufmantime (in units) taken by GA and PSO with Publishers, USA, 1999.SPV rule are: [2] Abraham, R. Buyya and B. Nath, NaturesTable4: Execution time calculated by GA and Heuristics for Scheduling Jobs onPSO with SPV rule for 30 tasks by 12 Computational Grids, The 8th IEEEresources International Conference on Advanced Computing and Genetic Particle Swarm Communications(ADCOM 2000), pp. 45- Algorithm Optimization with 52, December 2000. (GA) Shortest Position Value (PSO with [3] Y. Gao, H.Q Rong and J.Z. Huang, SPV) Adaptive grid job scheduling with genetic 6081.0 5834.0 algorithms, [4] Future Generation Computer Systems Elsevier, pp.151-161,2005.The sequence generated by GA is: 28, 14, 20,25, 10, 7, 17, 4, 9, 22, 6, 11, 24, 18, 0, 29, 15, [5] M. Aggarwal, R.D. Kent and A. Ngom,1, 26, 12, 13, 19, 29, 5, 3, 27, 2, 21, 16, 8. Genetic Algorithm Based Scheduler for Computational Grids, in Proc. of the 19thThe sequence generated by our proposed PSO Annual International Symposium on Highwith SPV rule is: 11, 22, 0, 29, 1, 25, 24, 17, Performance Computing Systems and26, 9, 2, 15, 6, 4, 19, 21, 7, 18, 28, 8, 10, 3, Application (HPCS’05),pp.209-215, May13, 27, 23, 5, 16, 14, 20, 12. 2005. 25 All Rights Reserved © 2012 IJARCSEE
  7. 7. ISSN: 2277 – 9043 International Journal of Advanced Research in Computer Science and Electronics Engineering Volume 1, Issue 5, July 2012[6] S. Song, Y. Kwok, and K. Hwang, Computation, Piscataway, pp. 69-73, Security-Driven Heuristics and A Fast 1998. Genetic Algorithm for Trusted Grid Job [14] R. C. Eberhart and Y. Shi, Comparing Scheduling, in Proc. of 19th IEEE inertia weights and constriction factors in International Parallel and Distributed particle swarm optimization Congress on Processing Symposium (IPDPS’05), Evolutionary Computing, vol. 1, pp. 84- pp.65-74, April 2005. 88, 2000.[7] Lee Wang, Howard Jay Siegel, Vwani P. Roychowdhury, and Anthony A. Maciejewski, Task Matching and Scheduling in Heterogeneous Computing  Kuldeep Kaur received her Msc(IT) Environments Using a GeneticAlgorithm Degree from Guru Nanak Dav University, Based Approach, Journal of Parallel and Amritsar and M.TECH(CSE) Degree from Distributed Computing , Citeseer47, pp.8- Lovely Professional University in 2010 and 22, 1997 2012 respectively. Her Research Interests[8] Zhang, L.; Chen, Y.; Sun, R.; Jing, S. & include Grid Computing, Soft Yang, B. A task scheduling algorithm Computing,Software Engineering and based on pso for grid computing wireless network,etc. 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.  Mr.Sudhanshu Prakash Tiwari has done 67-74, 1998. M.TECH(CSE).He is assistant professor of[10] J. Kennedy and R. Eberhart, “Particle Department of Computer Science and swarm optimization”, in Proc. IEEE Engineering in Lovely Professional International Conference Neural University. 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 26 All Rights Reserved © 2012 IJARCSEE