Atsuo Kawaguchi, Shingo Nishioka, and Hiroshi Motoda Advanced Research laboratory, Hitachi, Ltd.
Abstract A flash memory device driver that supports a conventional UNIX file system transparently was designed. To avoid the limitations due to flash memory's restricted number of write cycles and its inability to be overwritten, this driver writes data to the flash memory system sequentially as a Log-structured File System (LFS) does and uses a cleaner to collect valid data blocks and reclaim invalid ones by erasing the corresponding flash memory regions. Measurements showed that the overhead of the cleaner has little effect on the performance of the prototype when utilization is low but that the effect becomes critical as the utilization gets higher, reducing the random write throughput from 222 Kbytes/s at 30% utilization to 40 Kbytes/s at 90% utilization. The performance of the prototype in the Andrew Benchmark test is roughly equivalent to that of the 4.4BSD Pageable Memory based File System (MFS).
Read Cycle Write Cycle Erase Cycle Cycles limit Sector size Power Consumption Price
80 - 150 ns 10 µs/byte 1 s/block 100 000 times 64 Kbytes 30 - 50 mA in an active state 20 - 100 µA in a standby state 10 - 30 $/MByte
Table 1. Flash memory characteristics. make it very attractive for mass storage in portable computers. In fact, flash memory in the form of an IC-card commonly replaces the HDD or is used for auxiliary storage in portable personal computers. Flash memory has two other disadvantages limiting its use in computer systems. One is that its content cannot be overwritten: it must be erased before new data can be stored. Unfortunately, this erase operation usually takes about one second. The other disadvantage is that the number of erase operations for a memory cell is limited, and upper limits on the order of 100 000 erasures are not unusual. An advantage of flash memory, however, is that its read speed is much greater than that of a HDD. The performance of flash memory in read operations is, in fact, almost equivalent to that of conventional DRAM. Our objective in the work described here was to explore the possibilities of using flash memory in file systems and to develop an experimental but practical flash memory based file system for UNIX. We used a log approach to ensure that new data was always written in a known location—so that the erase operation could be performed in advance.
Flash memory, a nonvolatile memory IC (Integrated Circuit) that can hold data without power being supplied, is usually a ROM (Read Only Memory) but its content is electrically erasable and rewritable. The term “flash” is used to indicate that it is a whole chip or a block of contiguous data bytes (We call this block an erase sector). Many kinds of flash memory products  are available, and their characteristics are summarized in Table 1†. Because flash memory is five to ten times as expensive per megabyte as hard disk drive (HDD) memory, it is not likely to become the main mass storage device in computers. Its light weight, low energy consumption, and shock resistance, however, † There is another type of flash memory that has much smaller erase sectors. (See Section 4.)
2. Design and Implementation
We have designed and implemented a flash memory device driver that emulates a HDD and supports a standard UNIX file system transparently. We chose the device driver approach for its simplicity.
(To Appear in USENIX ’95 Winter)
(Page Number will be erased in the final version)
Since flash memory can be accessed directly through a processor's memory bus, other approaches (such as tightly coupling a flash memory system and a buffer cache) might perform better by reducing memory-to-memory copy operations. Such an approach, however, would require a large number of kernel modification because flash memory's erase and write properties differ greatly from those of the...