Skip to Main Content
Flash memory adopts out-of-place update scheme to solve the erase-before-write constraint of flash memory and the free space of flash memory could be used up. Therefore, garbage collection policy is needed to reclaim garbage and obtain free space. The cleaning cost and the degree of wear-leveling are two primary concerns of garbage collection policy. To achieve these two design principles, we propose an efficient least-first garbage collection policy called LFGC to improve durability for flash memory. LFGC links all the dirty blocks by a list in order of the number of erase operations of each block and divides the list into two regions, which are resident region and candidate region. LFGC introduces an efficient victim block selection method to improve the durability for flash memory and prevent increasing the cleaning cost. An efficient cold-detection scheme is also introduced to identify hot valid page and cold valid page when the copy operation happens during the garbage collection policy. Experimental results show that our proposed LFGC outperforms existing garbage collection policies in terms of the number of copy operations, the number of erase operations, and the degree of wear-leveling.