Patent ID: 9274943
Filing Date: 2016-03-01
CPC Classification: G06F

Claim Text:
1. A storage unit management method, configured to manage a plurality of physical units in a rewritable non-volatile memory module, wherein the physical units are at least grouped into a data area and a spare area, the storage unit management method comprising: configuring a plurality of logical units for mapping to a part of the physical units; determining whether the rewritable non-volatile memory module contains cold data; performing a first wear-leveling procedure on the physical units when it is determined that the rewritable non-volatile memory module does not contain any cold data; and performing a second wear-leveling procedure on the physical units when it is determined that the rewritable non-volatile memory module contains the cold data, wherein the first wear-leveling procedure is to perform a physical unit exchange between the data area and the spare area every time a first time interval occurs, and the second wear-leveling procedure is to perform the physical unit exchange between the data area and the spare area every time a second time interval occurs, wherein when the physical unit exchange is performed between the data area and the spare area every time the second time interval occurs, a physical unit with the highest erase count is selected from all of the physical units belonging to the spare area for exchanging with the physical unit with the lowest erase count in the data area, wherein the physical units are at least grouped into a data area and a spare area, and the step of determining whether the rewritable non-volatile memory module contains the cold data comprises: recording a first memory erase count when the physical unit exchange is performed between the data area and the spare area, wherein the first memory erase count is a memory erase count of the rewritable non-volatile memory module at the time of a specific physical unit belonging to the spare area is exchanged to the data area; updating the memory erase count of the rewritable non-volatile memory module as the rewritable non-volatile memory module is in use; obtaining the memory erase count of the rewritable non-volatile memory module at the time of the specific physical unit is again associated to the spare area to serve as a second memory erase count; comparing a difference between the first memory erase count and the second memory erase count with a predetermined value; determining that the rewritable non-volatile memory module does not contain the cold data when the difference is smaller than or equal to the predetermined value; and determining that the rewritable non-volatile memory module contains the cold data when the difference is greater than the predetermined value.