Research Article

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

Algorithm 2

Best-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 smallest to largest;
()      return SUCESS;
()   
()   
()  for (; ; )
()    select ; //search the first resource block
()    while ()
()      if ()
()        move to ;
()        sort F-idle list from smallest to largest;
()        break;
()      
()      //determine whether or not VR-Cluster meets
()    while ()
()      if ()
()       sort F-idle list from smallest to largest;
()       return SUCESS;
()      
()    
()