论文部分内容阅读
闪存(Flash memory)普遍采取异地更新机制来提高写数据的效率,因此必须设计垃圾回收算法回收因数据更新产生的无效数据页,针对YAFFS2文件系统中垃圾回收算法搜索效率低,且未能较好地兼顾闪存磨损均衡度的问题,提出基于预搜索的自适应垃圾回收算法.该算法采用重叠的段搜索方式对闪存进行预搜索,根据预搜索确定的回收次数与写入数据量之比,自适应地采取不同的目标块选择策略进行回收.实验表明,算法能及时发现并回收符合条件的脏块,减少无效数据页长期占用闪存空间的现象,在提高垃圾回收效率的同时,提高了闪存磨损均衡度.
Therefore, it is necessary to design a garbage collection algorithm to recover invalid data pages generated due to data update. In view of the low search efficiency of the garbage collection algorithm in the YAFFS2 file system and the failure to do so, the flash memory generally adopts a remote update mechanism to improve the efficiency of writing data. The paper puts forward an adaptive garbage collection algorithm based on pre-search. This algorithm uses a pre-search of overlapping segments to pre-search the flash memory. According to the ratio of the number of times of recovery to the amount of data written, Adaptively adopt different target block selection strategies for recovery.Experiments show that the algorithm can detect and recover eligible dirty blocks in time to reduce the long-term use of flash memory space ineffective data pages in improving the garbage collection efficiency, while improving the flash memory wear Equilibrium