Research Article

Virtual Machine Replica Placement Using a Multiobjective Genetic Algorithm

Algorithm 3

f(d): total distance between VMs and its replica.
Input: S, V, Distance
Output: tolDistance
tolDistance = 0
for i: = 0 to V − 1 do
PrimaryPM = S[i]
Replica = getReplicas (i)
for j: = 0 to length (Replica)−1 do
ReplicaIndex = Replica[j]
ReplicaPM = S[ReplicaIndex]
tolDistance = tolDistance + Distance [PrimaryPM, ReplicaPM]
end
end
return (tolDistance)