Research Article

MultiCache: Multilayered Cache Implementation for I/O Virtualization

Algorithm 3

Cache memory management.
()    for each chunk
()    if () then transfer to the host; end if
()    end for
()    / let sc be the current sector to be stored in the cache memory /
()    / let and be the chunk and segment numbers, respectively, selected from the cache memory table /
()    store sc to of ; ; update while reflecting value;
()    ++;
()    if (() and ) then
()    store and to the cache memory table as the next position in the cache memory; exit;
() end if
() / find the next empty chunk in the cache memory /
() search for such that ( and );
() store and 0 to the cache memory table as the next position in the cache memory;