A wear leveling algorithm manages the uneven “wear” on the sectors of a flash media memory by distributing the writes through many sectors of the flash media. Integrated into the firmware of the flash disk controller, the wear leveling algorithm is transparent to the overlying file system by keeping track of a map between the logical sectors and the physical sectors of the flash media. In the ideal case, a wear-leveling algorithm will result in all the sectors of the flash media reaching their endurance limit nearly simultaneously, maximizing the usable lifetime of the flash media. With the use of aging mechanisms, it is possible to warn the user when endurance limits are reached and to proactively backup the contents before it is lost for good.
Dynamic Wear Leveling
Dynamic wear leveling is an algorithm by which the controller recycles the programmed blocks with the blocks in the reserved spare block list. Once the host intended to overwrite a certain block, the first block in the reserved spare block list would be used to replace that certain block, and that certain block would be erased and put into the reserved spare block list. Although dynamic wear leveling has great improvement on wear leveling, the endurance increase is constrained by its nature. Updates and recycling of blocks and pages only happen to those blocks that are free or occupied by frequently updated data. If the host keeps writing data on a certain block, the reserved spare block are used frequently, and other data blocks are not used at all, the worst case would happen as all of reserved spare blocks would be worn out sooner than the rest of blocks.
Advanced Wear Leveling
The objective of advanced wear leveling is to prevent any frequently updated data from staying at the static area so that wear leveling could be evenly applied to all blocks. Static areas contain any data that does not change, and are ignored by dynamic wear leveling. Such static data may include operating system files, table look-ups, executable files, and etc. advanced wear leveling frequently replaces blocks in this area with block in the hot area, and thus each block in all areas has the same probability to be used.
Global Wear Leveling
The objective of global wear leveling is to prevent any frequently updated data from staying at dynamic wear leveling ignored static area where no frequent data update so that wear leveling could be evenly applied to all blocks. Such static data may include operating system files, table look-ups, executable files, and etc. Global wear leveling spreads the program/erase count evenly on all the blocks, and the timing to perform global wear leveling is user configurable as a ware leveling frequency. The flash controller increase a wear leveling counter whenever a block is erase is done. If the counter hits the defined wear leveling frequency, the controller begins to perform block swapping by checking if the indicated erase count of the block is less than the average erase count. If less, it means that block is a less frequently used block and it is suitable to swap with the block in reserved spare block list since reserved spare blocks are generally more frequently utilized. If the erase count of the checked block is higher than average, then the controller will move on checking the next block until another less frequently used block is found. As a result, each block in all areas will have the same probability in erase count.
If you like to download the white paper, please Contact Us.