Research Article

Virtual Machine Replica Placement Using a Multiobjective Genetic Algorithm

Algorithm 1

Repair solution.
Input: S
Output: S
count = 0;
for VMindex: = 0 to length (S)−1 do
if checkConstrains (VMindex, S [VMindex])==0 then
  UpdatedList [count] = VMindex;
  /Del the host of VM from the Solution/
  S[VMindex] = −1
  count ++;
end
end
for j: = 0 to count do
 VMindex = UpdatedList [j];
if HasReplica (VMindex)==1 then
  /Select the valid PM with the minimum distance with replicas/
  PMIndex = SelectPMMinDis (VMindex);
  S[VMindex] = PMIndex;
end
else
  /Sort descending the PM based on core capacity/
  PMList = SortDesPM (S)
  for k: = 0 to length (PMList) do
   PMIndex = PMList [k]/check its valid to add VM to PM/if checkvalidity (VMindex, PMIndex) then
    S[VMindex] = PMIndex;
    break
   end
  end
end
end