Genetic Algorithm
Basically genetic algorithm has used for optimization purpose. Using GA we can optimized the
best resource during the scheduling. Required input for GA memory as well as CPU load. On the
basis of those parameters GA can optimize all VM’s dynamically.
Input: set of test instances which having own weight and label C[c[i]….c[n]] here is CPU load
an memory load
Output: Optimized and classified instance with descending order.
Step 1: Read each instance form pop
n
c=∑
k=0
( pop[k ])
❑ …….(1)
If(c%2==0) then cros[i]
Else cros[i]+1
NewCh[]=crossover(cros[i],cros[i+1])
n
Step 2: Nc=∑
j =0
( Newch[
❑
j] )
…… (2)
AftMut[] = Mutate(Nc)
Step 3: Calculate fitness
n n
f (x)=∑ AftMut [i] ∑
i=0 j=0
( Train[
❑
j] )
…… (3)
Step 4: Calculate Fitness
F [] =f(x)/ sum f(x) ….. (4)
Step 5: Sort Newpop with descending order