于万钧 张海军 刘全



摘 要: 针对不同NAND闪存读写操作成本比例的不同,提出一种具有高效页面替换功能的EPRA算法。在内存中,每个受害者候选页被分成固定数量的闪存页面。 EPRA给每个受害者候选页分配权重值,在选择与修改页面时对权重进行调节,从候选页中选择具有最小权重值的页面作为受害者页。EPRA 算法把受害者页中分为热的闪存页和冷的闪存页,并把这些数据写到 NAND 闪存中不同空闲的块中。仿真实验结果表明,EPRA算法使用在不同种类的NAND闪存中时,性能优于现有的页面替换算法。
关键词: 页面替换算法; 权重值分配; NAND闪存存储; 受害者页
中图分类号: TN915?34; TP311 文献标识码: A 文章编号: 1004?373X(2017)16?0053?04
Abstract: In allusion to different cost ratios of read?write operation for different NAND flash memories, an EPRA algorithm with efficient page replacement function is proposed in this paper. Each victim candidate page in the internal storage is divided into a fixed number of flash pages. EPRA assigns a weighted value to each victim candidate page, and adjusts the weighted values in the process of page selection and modification. The page with least weighted value is selected in the candidate page as a victim page. EPRA divides the dirty flash pages into the hot dirty flash memory pages and cold ones, and writes the data in the different blocks in NAND flash memory. The trace?driven simulation resultes show that the EPRA algorithm is superior to the existing page replacement algorithms when it is used in different kinds of NAND flash memories.
Keywords: page replacement algorithm; weighted value allocation; NAND flash memory; victim page
0 引 言
近年来,闪存成为消费电子产品一种最重要的存储设备。闪存有许多诱人的特点,例如体积小、速度快、可抗震、高可靠性、重量轻、低功耗等。单个的NAND闪存芯片存储容量正在增加,且其价格不断下降。因此,越来越多的消费电子产品使用闪存取代磁盘[1]。
由于电子产品中主存储器空间有限,所以操作系统中应该包含页面替换算法,当空闲页的数量不足时,该算法能够获得空闲的页面。在假设磁盘I/O操作成本相等的情况下,人们研究了如何使磁盘页面命中率最大化的页面替换算法[2?4]。NAND闪存存在I/O操作成本不同和先擦后写的硬件约束,因此,传统的页面替换算法不适用于NAND闪存设备,有必要提出一种新的基于NAND闪存设备特点的页面替换算法。许多NAND页面替换算法假设写操作的成本远远高于读操作成本,优先驱除干净页,并非所有类型的NAND闪存都是这样的。……