Saturday, May 7, 2011

Anatomy of Linux flash file systems

Flash memory challenges in addition to the previously mentioned some restrictions, management flash devices also faces many challenges.

The three most important challenges are garbage collection, management, bad blocks and average read and write. Garbage collecting garbage collection is a collection of invalid block process (invalid block contains invalid data). Recycling process including valid data moved to the new block, and then erase invalid block so that it becomes available. If the file system of the available space is less, so often in the background this process (or as needed). Management of bad blocks used for a long time, flash devices will occur, or even from the factory will occur but cannot be used. If the flash actions (e.g. Erase) fails or a Write operation is not valid (via invalid error correction code found, ErrorCorrectionCode, ECC), to indicate that there is a bad block. Identify bad blocks, in the internal flash is bad block flag to a bad block table. Specific action depends on the device, but can be done by a group of independent reserved blocks to (different from ordinary block management). On bad blocks are processed in the process — whether it be the factory or in the use process — called bad block management. In some cases, you can pass an internal microcontroller implementation in hardware, file system for the upper layer is transparent. Average read and write to the previously mentioned flash devices belong to the attrition products: become a bad block previously, you can perform a limited number of repeated Erase operation (and therefore a bad block management must be marked). Average read and write algorithms to maximize the life of a flash. Average read and write has two forms: dynamic average read and write and static average read and write. Dynamic average read and write to the address block Erase cycle limit on the number of times. Dynamic average read and write algorithm is not a random block using available, but the average use of blocks, each block is used to obtain the same. Static average read and write algorithm to solve a more interesting question. In addition to maximize the number of times the Erase cycle, some flash devices in two Erase cycle is affected by maximizing Read cycle. This means that if the data in the block storage time is too long and read many times, the data will gradually consumption until lost. Static average read and write algorithm solves this problem because it can periodically move data to a new block.

No comments:

Post a Comment