Weitere ähnliche Inhalte
Mehr von Ijarcsee Journal
Mehr von Ijarcsee Journal (20)
Kürzlich hochgeladen (20)
20 26
- 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, India
Abstract 1. Its ability to make more cost-effective
Grid computing can be defined as applying use of a given amount of computer
the 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 can't
computer processing cycles or access to large be approached without an enormous
amounts 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 resources
challenge. The task scheduling problem is the of many computers can be
problem of assigning the tasks in the system cooperatively and perhaps
in a manner that will optimize the overall Synergistically harnessed and managed as
performance of the application, while collaboration toward a common objective.
assuring the correctness of the result. Each Grid computing can be used to compute large
day new algorithms are proposed for number of tasks on the resources which are
assigning tasks to the resources. This is also a geographically remotely located. Task
boon for the grid computing. In this paper we scheduling is a challenging problem in grid
use the technique of Particle Swarm computing environment. Many parallel
Optimization (PSO) with SPV (Shortest applications consist of multiple computational
position value) rule to solve the task components. While the execution of some of
scheduling problem in grid computing. The these components or tasks depends on the
aim of using this technique is use the given completion of other tasks, others can be
resources optimally and assign the task to the executed at the same time, which increases
resources 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 the
better algorithm when applied to resource dynamic scheduling of jobs to the
allocation and disk scheduling in grid geographically distributed computing
computing. resources. They provide an introduction of
computational grids followed by a brief
Keywords: Grid scheduling; PSO with SPV
description of the three nature’s heuristics
rule; 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 schedule
Grid computing is a network that is not in jobs at both system level and application
the same place but distributed resources such level.
as computers, peripherals, switches, M Aggrawal et al [3] presented a Genetic
instruments, and data. Grid computing Algorithm based scheduler. The proposed
appears to be a promising trend for three scheduler used in both the intra-grid of a large
reasons: organization and in a research grid consisting
20
All Rights Reserved © 2012 IJARCSEE
- 2. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
of large clusters, connected through a high because now inefficient resource allocation
bandwidth dedicated network. can greatly hamper the efficiency and
Shanshan Song et al[4] proposed a new throughput of the scheduler.
Space-Time Genetic Algorithm (STGA) for To formulate the problem, define Ta
trusted job scheduling in which they consider a={1,2,3,…X } as x independent tasks
three security-driven heuristic modes: secure, permutation and Rb b={1,2,3,…y } as y
risky and f -risky. computing resources. Suppose that the
Lee Wang et al [5] developed a heuristic processing time Pa,b for task a computing on
based approach to matching and scheduling in b resource is known. The completion time
heterogeneous computing environment. F(x) represents the total cost time of
Lin 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 resource
PSO 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 as
follows. In section 2 the issues related to task F(x)=ΣΣPa,b * Mab (1)
scheduling is discussed. In section 3 particle
swarm algorithm is introduced. In section 4 Subject to
we implement PSO with SPV rule for grid Σ Mab=1,∀ b∈ T , (2)
task scheduling problem. In section 5 we see
the 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 of
hardware and software that can be used to III. PARTICLE SWARM
solve complex computational problems. The OPTIMIZATION
resource in a computational grid can be
anything 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 and
are used for printing a set a documents. The cognitive behavior by Kennedy and Eberhart
overall 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-dimensional
process 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-dimensional
situation where there are more tasks than the optimization problem. Each solution's fitness
available resources. Consider a scenario is based on a performance function related to
wherein there are x, x={1,2,3,4,........X} tasks the optimization problem being solved. The
to be done and there are y, y={1,2,3,4.......Y} movement of the particles is influenced by
resources 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. As
resources. a result of iteration-to- iteration information,
In such a situation if we have y>x then the particle stores in its memory the best
there is no reason for developing new solution visited so far, called pbest , and
algorithms for task scheduling because then experiences an attraction towards this solution
resources can be allocated to the tasks on first as it traverses through the solution search
come first serve basis.But if y<x then we need space. As a result of the particle-to-particle
to develop new algorithms for task scheduling interaction, the particle stores in its memory
21
All Rights Reserved © 2012 IJARCSEE
- 3. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
the best solution visited by any particle, and Eberhart, 1998). The resulting velocity update
experiences an attraction towards this equation becomes:
solution, called gbest , as well. The first and
second factors are called cognitive and social
components, respectively. After each vid = w * vid + c1 r1( pid - xid) + c2r2( pgd -xid)
iteration, the pbest and gbest are updated for
each particle if a better or more dominating (6)
solution (in terms of fitness) is found. This
process continues, iteratively, until either the Eberhart and Shi (2000) indicate that the
desired result is converged upon, or it is optimal strategy is to initially set w to 0.9 and
determined that an acceptable solution cannot reduce it linearly to 0.4, allowing initial
be found within computational limits. For an exploration followed by acceleration toward
n-dimensional search space, the ith particle of an improved global optimum.
the swarm is represented by an n-dimensional
vector, Xi= (xi1 ,xi2 .....xin )T . The velocity of IV. PROPOSED METHODOLOGY
this particle is represented by another n-
dimensional vector Vi = (vi1; vi2...... vin )T . In this paper we have proposed a solution for
The previously best visited position of the ith grid scheduling using PSO with SPV rule. For
particle 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 to
swarm. The velocity of the ith particle is optimization problem. In this case first we
updated using the velocity update equation formulate the grid scheduling problem
given 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. PSO
and the position is updated using
with SPV rule algorithm is based on
population (candidate solution) and each
xid= 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 of
is the size of the swarm; c1 and c2 are tasks and a set of resources as input and a
constants, called cognitive and social scaling sequence, which informs that which task is to
parameters respectively (usually, c1 = c2 ; r1 , be operated on which resource and in which
r2 are random numbers, uniformly distributed order as output. PSO with SPV rule is based
in [0, 1]). Equations (4) and (5) are the initial on population concept and each individual in
version of PSO algorithm. A constant, Vmax, is population represents a solution, in case of
used to arbitrarily limit the velocities of the grid scheduling problem, solution is a
particles 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 individual
weight was developed to better control of PSO with SPV rule.
exploration and exploitation. The motivation Grid task scheduling problem is a discrete
was to be able to eliminate the need for Vmax . optimization problem. In the proposed
The inclusion of an inertia weight (w) in the solution continuous version of PSO is used
particle swarm optimization algorithm was instead of discrete version. To change the
first 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. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
Using the SPV (shortest position value) rule Table1: Values of position vector, sequence
continuous 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 4
task and value as an initial sequence from the
possible set of sequences to find optimal 1 -0.65 0 0
sequence. Position vector Xid={x1,x2,x3,......xd} 2 2.90 4 4
where i is the particular individual and d 3 5.46 7 2
represents the dimension index, is calculated 4 1.25 3 3
using PSO. The position vector of each
particle makes transformation about the 5 4.87 6 1
continuous position. Smallest position value 6 -0.48 1 1
i.e. SPV rule is used to find a permutation 7 0.39 2 2
corresponding position Xid. The position 8 6.0 8 3
vector Xid has continuous values. By using the 9 3.28 5 0
SPV rule this continuous position value can
be converted to discrete value permutation VI. FITNESS FUNCTION
Sid=[si1, si2,…….sid].Sidis the sequence of task
of i particle in the processing order with After representation of each individual we
respect to the d dimension. have to calculate fitness value of each
Set of resources is represented by individual. On the basis of fitness value we
Rlm={r1,r2,r3......ry}, where l represents a determine the optimal solution. In case of grid
particle/ sequence and m represents the tasks scheduling problem optimal solution is the
which 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. ALGORITHM
Resource id is given to each resource so that
they can be easily differentiated from one Grid scheduling using PSO with SPV Rule
other. Such as r1 is the resource id of first
resource. For e.g. if we have 10 tasks which To solve the grid scheduling problem we have
are 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 by
SPV rules, the continuous position convert to selecting random starting sequences from the
a permutation of sequences Sid, which is a set of x! Sequences; where x is the total
sequence 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 each
is={4.83,-0.55,1.90,3.46,1.05,2.87,- particle, according to equation. After that we
0.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 and
Equation (7) is then used to determine the then their resources are calculated. This
associated resources for the calculated tasks sequence, along with its resource is then used
in the sequence. We can calculate the to find the fitness value of each individual of
resource set as {4, 0, 4, 2, 3, 1, 1, 2, 3, 0} each particle of the population. Algorithm 1 is
The table1 represents the dimension values of the proposed algorithm for the grid
position vector Xid , sequence Sid and Set of scheduling problem.
resource Rlm.
23
All Rights Reserved © 2012 IJARCSEE
- 5. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
Algorithm for Grid Scheduling using PSO maximum function evaluation, which is
20,000 in our experiment. The fourth control
with 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 obtained
Compute fitness of initialized particle by our algorithm. To test the efficiency of our
Compute global best algorithm results of PSO with SPV rule is
End for s compared with Genetic algorithm (GA)
[Update Phase] results. In a grid scheduling task we already
Repeat have the information about the number of
For 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 to
Update particles using PSO update equation complete a task. We just need to find the
A 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 as
Compute fitness of updated particle varying the number of tasks and then we
if needed update historical information for compared our results with that of GA. In
global best(Pg) particular, we have taken three cases in which
endfor s we have taken different number of resources
untill(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 control
parameters which are used for its efficient Table2: Execution time calculated by GA and
working. Hence, there are some controls PSO with SPV rule for17 tasks by 5 resources
parameters for PSO with SPV rule also. We
did an extensive literature survey and carried Genetic Particle Swarm
out our own experiments for determining the Algorithm Optimization with
values of these control parameters. From this (GA) Shortest Position
we found that the values which we have taken Value (PSO with
in this experiment are standard values and SPV)
they are also suitable for this experiment. 3078.0 3074.0
The first control Parameter is Maximum
function evaluation and the value of this
parameter 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 we
have taken its value to be 40. Another control The sequence generated by our proposed PSO
parameter 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. ISSN: 2277 – 9043
International Journal of Advanced Research in Computer Science and Electronics Engineering
Volume 1, Issue 5, July 2012
Experiment 2: Here, we are assuming there From the table 2, table 3, table 4, it is clear
are 10 resources and 27 tasks. The execution that PSO with SPV rule takes less execution
time (in units) taken by GA and PSO with time than the GA algorithm.
SPV rule are:
X. CONCLUSION
Table3: Execution time calculated by GA and
PSO with SPV rule for27 tasks by 10 It can be concluded from the results that
resources 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 till
The 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 apply
14, 4, 15, 12, 6, 16, 20, 11, 22, 25, 19, 21. other types of nature inspired algorithms to
the grid scheduling problem, comparing their
The sequence generated by our proposed PSO results with the ones accomplished by the
with 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. REFERENCES
16, 21, 23, 20, 25.
[1] Foster and C. Kesselman (editors), The
Experiment 3: Here, we are assuming there Grid: Blueprint for a Future Computing
are 12 resources and 30 tasks. The execution
Infrastructure, Morgan Kaufman
time (in units) taken by GA and PSO with
Publishers, USA, 1999.
SPV rule are:
[2] Abraham, R. Buyya and B. Nath, Nature's
Table4: Execution time calculated by GA and Heuristics for Scheduling Jobs on
PSO with SPV rule for 30 tasks by 12 Computational Grids, The 8th IEEE
resources 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 19th
The sequence generated by our proposed PSO Annual International Symposium on High
with SPV rule is: 11, 22, 0, 29, 1, 25, 24, 17, Performance Computing Systems and
26, 9, 2, 15, 6, 4, 19, 21, 7, 18, 28, 8, 10, 3, Application (HPCS’05),pp.209-215, May
13, 27, 23, 5, 16, 14, 20, 12. 2005.
25
All Rights Reserved © 2012 IJARCSEE
- 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