WEAR LEVELING METHOD, AND STORAGE SYSTEM AND CONTROLLER USING THE SAME
First Claim
1. A wear leveling method, adapted to a flash memory of a storage system, wherein the flash memory comprises a plurality of physical blocks grouped into at least a data area and a spare area, the wear leveling method comprising:
- setting a first predetermined threshold value as a wear-leveling start value;
randomly generating a random number as a memory erased count, wherein the random number is less than the wear-leveling start value;
counting the memory erased count each time when the physical blocks are erased; and
determining whether the memory erased count is less than the wear-leveling start value, wherein a physical blocks switching is performed between the data area and the spare area when the memory erased count is not less then the wear-leveling start value.
1 Assignment
0 Petitions
Accused Products
Abstract
A wear leveling method for a flash is provided, wherein the flash memory includes a plurality of physical blocks grouped into at least a data area and a spare area. The method includes setting a first predetermined threshold value as a wear-leveling start value and randomly generating a random number as a memory erased count, wherein the random number is smaller than the wear-leveling start value. The method also includes counting the memory erased count each time when the physical blocks are erased and determining whether the memory erased count is smaller than the wear-leveling start value, wherein a physical blocks switching is performed between the data area and the spare area when the memory erased count is not smaller then the wear-leveling start value. Accordingly, it is possible to uniformly use the physical blocks, so as to effectively prolong a lifetime of the store system.
-
Citations
20 Claims
-
1. A wear leveling method, adapted to a flash memory of a storage system, wherein the flash memory comprises a plurality of physical blocks grouped into at least a data area and a spare area, the wear leveling method comprising:
-
setting a first predetermined threshold value as a wear-leveling start value; randomly generating a random number as a memory erased count, wherein the random number is less than the wear-leveling start value; counting the memory erased count each time when the physical blocks are erased; and determining whether the memory erased count is less than the wear-leveling start value, wherein a physical blocks switching is performed between the data area and the spare area when the memory erased count is not less then the wear-leveling start value. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10)
-
-
11. A controller, adapted to a storage system having a flash memory, wherein the flash memory comprises a plurality of physical blocks grouped into at least a data area and a spare area, the controller comprising:
-
a micro-processing unit; a flash memory interface module, coupled to the micro-processing unit; a host interface module, coupled to the micro-processing unit; a buffer memory, coupled to the micro-processing unit; and a memory management module, coupled to the micro-processing unit, and having a plurality of machine commands that can be executed by the micro-processing unit for executing a plurality of wear leveling steps to the flash memory, the wear leveling steps comprise; setting a first predetermined threshold value as a wear-leveling start value; randomly generating a random number as a memory erased count, wherein the random number is less than the wear-leveling start value; counting the memory erased count each time when the physical blocks are erased; and determining whether the memory erased count is less than the wear-leveling start value, wherein a physical blocks switching is performed between the data area and the spare area when the memory erased count is not less then the wear-leveling start value. - View Dependent Claims (12, 13, 14, 15, 16, 17)
-
-
18. A storage system, comprising:
-
a flash memory, having a plurality of physical blocks grouped into at least a data area and a spare area; a connector; and a controller, electrically connected to the flash memory and the connector, the controller executing a plurality of machine commands of a memory management module to execute a plurality of wear leveling steps, and the wear leveling steps comprising; setting a first predetermined threshold value as a wear-leveling start value; randomly generating a random number as a memory erased count, wherein the random number is less than the wear-leveling start value; counting the memory erased count each time when the physical blocks are erased; and determining whether the memory erased count is less than the wear-leveling start value, wherein a physical blocks switching is performed between the data area and the spare area when the memory erased count is not less then the wear-leveling start value. - View Dependent Claims (19, 20)
-
Specification