非揮發性記憶體(Non-volatile memory)有望取代動態隨機存取記憶 體(Dynamic Random Access Memory)和 NAND 快閃記憶體,成為下一代的 主要記憶體和二級存儲裝置。儘管目前因為 NVM 的壽命限制,使它無法成 為主流的主記憶體,但非揮發性記憶體的大存儲容量和高單元密度,使其成 為二級存儲裝置,或是作為 NAND 快閃記憶體之上硬體快取的理想選擇。 隨著非揮發性記憶體在二級主要記憶體和虛擬記憶體系統中的使用增加,重新評估當前的虛擬記憶體管理策略至關重要,因為現有的策略通常未能最大化非揮發性記憶體的優勢。多層單元(Multi-level-cell)非揮發性記憶體支援多種寫入模式,具有不同的成本和數據保留時間。有效的虛擬記憶體管理應該考慮到程序的類型,以選擇最佳的寫入模式,從而最小化非揮發性記憶體的能耗。具體而言,它應根據精確 (precise) 和近似 (approxi mate) 程序的特性選擇相應的寫入模式。 本研究介紹了 eSwap,一種性能高效的交換機制,選擇適當的寫入模式 和錯誤校正碼(Error-correction code)成本,以管理多層單元非揮發性 記憶體上的精確和近似程序。實驗結果表明,與最先進的解決方案相比,eS wap 能夠提高 20% 的能耗和 40% 的系統性能。 ;Non-volatile memory (NVM) is poised to replace Dynamic Random Access Memory (DRAM) and NAND flash memory as the next-generation main memory and secondary storage. Despite current lifetime limitations that hinder its immediate use as main memory, NVM’s large storage capacity and high cell density make it ideal for secondary memory or as a hardware cache on top of NAND flash memory. As NVM usage grows in secondary main memory and virtual memory systems, reevaluating current virtual memory management strategies is crucial, as they often fail to maximize NVM’s benefits. Multi-level-cell (MLC) NVM supports various writing modes with different costs and data retention times. Effective virtual memory management should consider the type of process to select the optimal writing mode, thus minimizing NVM energy consumption. Specifically, it should differentiate between precise and approximate processes when writing to MLC NVM. This study introduces eSwap, a performance-efficient swapping mechanism that chooses the appropriate writing mode and error-correction code (ECC) cost for managing precise and approximate processes on MLC NVM. Experimental results indicate that eSwap enhances energy consumption and system performance by 20\% and 40\%, respectively, compared to state-of-the-art solutions.