Research Article
A Unified Algorithm for Virtual Desktops Placement in Distributed Cloud Computing
Algorithm 2
Modified first fit decreasing algorithm (MFFD).
Input: : numbers of BCs | : feasible DC set for BC and | : cost matrix of each DC as illustrated in Figure 1 | : VMs set for BC | Output: solution encoding | (1) for do | (2) Sort DCs in according to their capacity. Bigger DC | is selected with higher probability and denote the sorted | sequence as | (3) for do | (4) while () and (exists not be searched) do | (5) Find smallest-cost-PM cluster with the largest | capacity. Suppose there are total PMs in this | cluster | (6) Sort these PMs in non-increase capacity (21) and (22) | order as | (7) for do | (8) Select the biggest non-assigned VM from | and put it into until is full | (9) ∖VMs assigned to ) | (10) if then | (11) break | (12) end if | (13) end for | (14) end while | (15) if then | (16) break | (17) end if | (18) end for | (19) if () and (all is searched) then | (20) There is overflow, return FAILURE | (21) end if | (22) end for | (23) Encoding the solution as according to Section 4.1 |
|