Data storage device and operating method for dynamically executing garbage-collection process
AssigneeSilicon Motion, Inc.
InventorKuan-Yu Ke
Life of this patent
Estimating the term…
Abstract
A data storage device for dynamically executing the garbage-collection process is provided which includes a flash memory and a controller. The flash memory includes a plurality of blocks wherein each of the blocks includes a plurality of pages. The controller is coupled to the flash memory and is utilized to execute the garbage-collection process on the flash memory according to a number of at least one spare block in the flash memory and the number of non-spare blocks corresponding to different ratios of effective pages. The garbage-collection process is utilized for merging at least two non-spare blocks to release at least one spare block.
Claims18
A data storage device for dynamically executing a garbage-collection process, comprising:
- a flash memory, comprising a plurality of blocks, wherein each of the blocks comprises a first number of pages, and the blocks comprise at least one non-spare block that has at least one effective page, and each non-spare block has a ratio of a second number of effective pages to the first number of pages in each non-spare block;
- and
- a controller, coupled to the flash memory, configured to execute the garbage-collection process on the flash memory according to a second number of the at least one spare block in the flash memory and a third number of the non-spare blocks in each of different sections that correspond to different ranges of the ratio of the at least one non-spare block, wherein the garbage-collection process is utilized for merging at least two non-spare blocks to obtain at least one spare block.
A data storage method for dynamically executing a garbage-collection process, wherein the data storage device comprises a flash memory and a controller, and the flash memory comprises a plurality of blocks, wherein each of the blocks comprises a first number of pages, and the blocks comprise at least one non-spare block that has at least one effective page, and each non-spare block has a ratio of a second number of effective pages to the first number of pages in each non-spare block, the data storage method comprising:
- calculating a second number of the at least one spare block of the flash memory;
- calculating a third number of non-spare blocks in each of different sections that correspond to different ranges of the ratio of the at least one non-spare block;
- and
- executing the garbage-collection process on the flash memory according to the second number of the at least one spare block in the flash memory and a third number of the non-spare blocks in each of different sections that correspond to different ranges of the ratio of the at least one non-spare block for merging at least two non-spare blocks to obtain at least one spare block.
Dependencies are inferred from the claim text.