2012 IR&D Annual Report

Wear Leveling in an Embedded Flash File System, 10-R8275

Principal Investigators
Sue Baldor
Robert Klar
Scott Miller

Inclusive Dates:  12/19/11 – 04/27/12

Background — This project evaluated a NAND-based flash wear-leveling algorithm in the context of typical flight software file system usage. Flash memories originally developed for the consumer market have revolutionized mass storage for space-based applications. However, flash memory cells can wear out quickly if erased frequently, degrading certain memory regions of the device enough to require replacement (not a viable option on-orbit). An algorithm was implemented that targeted the FAT filesystem – a filesystem readily available in many real-time operating systems. This algorithm was evaluated based on the number of erases per groups of clusters on the target mass memory device.

Approach — Traditionally, wear-leveling is implemented in either the hardware device or within file system software. Our approach implements wear-leveling algorithms within the device driver for the target device, the Multi-Mission Mass Memory Module (M4) mass memory board. Doing this allows us to make use of some of the features provided by the hardware design without paying the price of high overhead found in higher-level software solutions. The wear-leveling algorithm contains two main components: the logical-to-physical table (LPT) cluster mapping component and the reclamation component. The LPT maps the requested logical clusters to physical clusters on the device. Reclamation erases clusters that have been marked as free and periodically moves old clusters to new less-used locations. The number of device erases is used to determine where new data is written and where old clusters are relocated.

Evaluation of the performance of the wear-leveling solution occurs within the context of file system operation. To facilitate evaluation, we created a hierarchical driver structure utilizing the VxWorks extended block device (XBD) interface, which provides a framework for file system integration. Using the XBD interface, the device is mapped into a FAT file system. Erase statistics provide a mechanism to determine the evenness of wear as large files are written to the file system.

Accomplishments — Wear-leveling statistics collected during this work were used to evaluate the algorithm. Preliminary results show that while the algorithm shows promise for effectively managing wear on the target device, some modifications will still be necessary. Primarily, the algorithm, as implemented, displays a tendency to favor the first half of the device while neglecting clusters on the remainder of the device. Future work will be required to examine and fix this issue.

Benefiting government, industry and the public through innovative science and technology
Southwest Research Institute® (SwRI®), headquartered in San Antonio, Texas, is a multidisciplinary, independent, nonprofit, applied engineering and physical sciences research and development organization with 9 technical divisions.