Research Article
Dynamic Placement of Virtual Machines with Both Deterministic and Stochastic Demands for Green Cloud Computing
Algorithm 1
The procedures to judge whether a PM
is a candidate for server consolidation.
Procedure MigPlan = JudgeMigratable | (1) Initialize as the set of VMs on server at time instant | (2) . size | (3) for to do | (4) According to MEAGLE, search for the Host for , where . | (5) if Host | (6) MigPlan = [MigPlan; Host] | (7) Update the usage state of Host after is placed on it. | (8) else | (9) ; | (10) | (11) if | (12) /*In , there exists more than one VM without directly-deployed servers. | (13) ; | (14) return MigPlan | (15) end if | (16) end if | (17) end for | (18) if | (19) /*In , there is only one VM without directly-deployed servers. | (20) if , , can be placed on | after an original VM on is migrated into , then | (21) Update MigPlan | (22) else if , , , can be placed on | after two original VMs on are respectively migrated into and , then | (23) Update MigPlan | (24) else if , , can be placed on | after an original VM on is exchanged with a VM on , then | (25) Update MigPlan | (26) else | (27) | (28) return MigPlan | (29) end if | (30) end if | (31) return MigPlan |
|