1、 I 摘要摘要 Flash 存储器由于具有存储容量大、体积小、掉电数据不丢失以及可多次擦 写等优点,已逐步取代其它半导体存储器件而广泛应用于MP3、存储卡、手机、 PDA 等移动电子产品中。通用文件系统不能直接应用于Flash 存储器,需要通 过闪存转换层将Flash 模拟为一个磁盘设备。 本文针对目前广泛应用的NAND Flash存储器, 通过在Flash 控制器固件中设 计并实现闪存转换层将Flash 存储器模拟为磁盘设备, 进而在NAND Flash上建立 性能稳定的FAT 文件系统。 论文分析了Flash 文件系统的结构及实现形式, 深入 研究了NAND Flash存储管理技术,包括地
2、址映射、损耗均衡算法、垃圾回收策 略、坏块管理、掉电保护及加密存储,并提出将Flash 存储管理技术分层实现的 软件结构,旨在研究和开发一套实用的可用于加密存储的NAND Flash 存储管理 模块,并在实际产品中得到应用。 论文所做的主要工作包括以下几个方面:(1)研究了Flash 文件系统的结 构及实现形式。(2)设计了适用于大容量NAND Flash 的NFTL 块映射机制。 (3)研究损耗均衡算法和垃圾回收策略,提出基于阈值控制的损耗均衡算法设 计,提高NAND Flash使用寿命。(4)设计NAND Flash掉电保护及坏块管理机 制,提高存储可靠性。(5)研究并实现了闪存设备的加密
3、存储,给出了基于密 码认证的加密存储设计,将存储空间划分为普通区和加密区,使用加密区存储加 密文件。 关键词关键词:NAND Flash Flash文件系统 闪存转换层 损耗均衡 II Abstract Nowadays, flash memory is prevailing in many mobile devices such as MP3 players,flash memory cards, cell phones and PDAs due to its non- volatility, solid-state reliability, small and lightweight pa
4、ckage, low-power consumption, etc. Common file systems can not be directly applied to flash memory, so the Flash Translation Layer (FTL) should be designed to allow file system to read and write to flash memory device in the same way as disk drive. Aiming at the widely used NAND flash memory, a FTL
5、is designed and implemented, so the FAT file system is created on NAND flash. Specially, the NAND flash memory storage management issues are deeply researched, including address mapping, wear-leveling algorithm, garbage collection policy, power-off recovery, bad block management, and so on. As well
6、as much more emphases are taken on the problem of identifying user and data security, encrypted-storage mechanism is designed and implemented. Additionally, this paper proposes layered software architecture of flash memory storage management and intends to research and develop a software module for NAND Flash memory, which is obtained application in the actual product. The following achievements are made in this dissertation: (1) The architecture of flash file system and its implementation fo