主权项 |
1. A data storage system, comprising:
a non-volatile memory array having a plurality of memory regions configured to store a plurality of data units, the plurality of memory regions comprising a first memory region, a second memory region, and a third memory region, each of the first, second, and third memory regions being defined as a memory unit configured to be garbage collected; and a controller configured to perform a garbage collection operation on the first memory region by at least:
identifying valid data units in the first memory region that contain valid data rather than invalid data;in response to determining that a first set of the valid data units has a first priority, designating the first set as data units to be copied to the second memory region, the first priority indicating that the valid data units of the first set are candidates for being erased from the non-volatile memory array during a subsequent garbage collection operation;in response to determining that a second set of the valid data units has a second priority different from the first priority, designating the second set as data units to be copied to the third memory region; andcopying the first set of the valid data units from the first memory region to the second memory region and the second set of the valid data units from the first memory region to the third memory region different from the second memory region,wherein the controller is further configured to perform the garbage collection operation on the first memory region by:
in response to determining that a third set of the valid data units has a third priority different from the first priority and the second priority, designating the third set as data units not to be copied to any memory region in the non-volatile memory array so that the third set of data units are erased when the first memory region is erased. |