Research Article

VR-Cluster: Dynamic Migration for Resource Fragmentation Problem in Virtual Router Platform

Algorithm 3

Worst-fit mapping algorithm.
Input: migration of router instance
Output: whether or not execute it
Process:
()  ; = amount of VR;
()  while ()
()      if ()
()        sort F-idle list from largest to smallest;
()        return SUCESS;
()      
()  
()  for (; ; )
()    select ; //search the first resource block
()    while ()
()      if ()
()        move to ;
()        sort F-idle list from largest to smallest;
()        break;
()       
()     //determine whether or not VR-Cluster meets
()    while ()
()       if ()
()         sort F-idle list from largest to smallest;
()         return SUCESS;
()       
()    
()