The present invention provides a method for static wear leveling in non-violate storage device.
The life time of a storage device is based on the block erasure count. If a block's erasure count is over a limitation, the block will be broken and not able to program correct data.
An objective of this invention is providing a method for static wear leveling in non-violate storage device, which is capable of balancing all blocks' erasure count to avoid most blocks having smaller erasure count and several blocks having larger erasure count to shorten the life time of the device.
To achieve above objectives, A method for static wear leveling in non-violate storage device is disclosed, and the steps of the method are comprising:
Further features and advantages of the present invention will become apparent to those of skill in the art in view of the detailed description of preferred embodiments which follows, when considered together with the attached drawings and claims.
All the objects, advantages, and novel features of the invention will become more apparent from the following detailed descriptions when taken in conjunction with the accompanying drawings.
Referring now to the drawings where like characteristics and features among the various figures are denoted by like reference characters.
Please refer to
The steps for the process of a method for static wear leveling in non-violate storage device according to the present invention are:
A special block, which is called erasure count block, is set to record the erasure counts of all physical blocks. If a controller issues the erase command to a physical block, the controller will add one to erasure count corresponding to an address of each physical block.
Another block, which is called occupied count block, is set to record occupied count of all physical blocks. The occupied count means how many times controller issues an erase command to erase other blocks and didn't erase this using block. If the controller issues an erase command to a physical block, the controller will add one to all occupied counts of the using physical blocks except the erasing block. The controller will reset the occupied count of the erasing block to zero.
The controller will store some kinds of queue in the flash memory, the non-violate device (ex. SRAM):
Please refer to
High erasure count free queue will record block number and the corresponding erasure count. Free queue will record block number and the corresponding erasure count. High occupied count queue will record block number, the corresponding occupied count and corresponding erasure count. Least erasure count data block queue will record block number and the corresponding erasure count.
The wear leveling trigger is the difference between the highest erasure count of free block and the least erasure count of using block. In
The next block number “70” has the second highest occupied count and lower erasure count. It is a good candidate to be picked to swap data. The controller will pick a free block with the highest erasure count in high erasure count block free queue. In
Therefore, the method according to this invention is capable of balancing all blocks' erasure count to avoid most blocks having smaller erasure count and several blocks having larger erasure count to shorten the life time of the device.
Although the invention has been explained in relation to its preferred embodiment, it is not used to limit the invention. It is to be understood that many other possible modifications and variations can be made by those skilled in the art without departing from the spirit and scope of the invention as hereinafter claimed.
Number | Name | Date | Kind |
---|---|---|---|
8700839 | Chang et al. | Apr 2014 | B2 |
20030046487 | Swaminathan | Mar 2003 | A1 |
20040177212 | Chang et al. | Sep 2004 | A1 |
20070208904 | Hsieh et al. | Sep 2007 | A1 |
20110138109 | Liu et al. | Jun 2011 | A1 |
20110231594 | Sugimoto et al. | Sep 2011 | A1 |
20110246705 | Mudama et al. | Oct 2011 | A1 |
20120036312 | Feldman et al. | Feb 2012 | A1 |
20120089768 | Mothilal | Apr 2012 | A1 |
Number | Date | Country | |
---|---|---|---|
20140019669 A1 | Jan 2014 | US |