Patent ID: 11899573
Assignee: KIOXIA CORPORATION
Field: Computer technology (Electrical engineering)
Classification: CPC G  Y | IPC G

Claim 0:
1. A memory system, comprising:
a memory configured to store a number of valid data in each of a plurality of logical blocks and a number of valid data for each of a plurality of banks in each of the logical blocks; and
a controller configured to:
select logical blocks of garbage collection target candidates based on the numbers of valid data in the logical blocks;
calculate a maximum value among the numbers of valid data for the banks in each of the logical blocks of the garbage collection target candidates as a respective comparison value;
select one of the logical blocks of the garbage collection targets based on comparing the respective comparison values of the logical blocks of the garbage collection target candidates with each other;
add the number of valid data for each bank in each of the logical blocks to the number of valid data for each bank of one of the logical blocks of the garbage collection targets; and
determine a maximum value among the added numbers of valid data for the banks of each of the logical blocks as the comparison value;
wherein as the result of comparing the respective comparison values of the logical blocks of the garbage collection target candidates with each other, when there are a plurality of logical blocks of the garbage collection target candidates having a minimum comparison value, the controller selects, as the logical block of the garbage collection target, the logical block of one garbage collection target candidate among the logical blocks of the garbage collection target candidates having the minimum comparison value, and selects the logical blocks of other garbage collection target candidates as the logical block of the garbage collection target from the next time.