# US 10,310,739 B2 · Memory management method, memory control circuit unit and memory storage device

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 10,310,739 B2
- Document ID: US10310739B2
- Status: Granted
- Kind: B2
- Application number: 15/690,286
- Filed: 2017-08-30
- Published: 2019-01-10
- Granted: 2019-06-04
- Earliest claimed: 2017-07-07
- Assignees: Phison Electronics Corp.
- Applicants: Phison Electronics Corp.
- Inventors: Chien-Wen Chen; Che-Yueh Kuo
- Web page: https://patentgrep.com/patent/US10310739B2

## CPC

- G06F 3/061: {Improving I/O performance}
- G06F 3/0608: {Saving storage space on storage systems}
- G06F 3/0652: {Erasing, e.g. deleting, data cleaning, moving of data to a wastebasket}
- G06F 3/0655: {Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices}
- G06F 3/0659: {Command handling arrangements, e.g. command buffers, queues, command scheduling}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 3/064: {Management of blocks}
- G06F 2212/1016: Performance improvement
- G06F 2212/1044: Space efficiency improvement
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A memory management method is provided according to an exemplary embodiment of the disclosure. The method includes: obtaining a valid data parameter based on a valid data amount of valid data stored in a plurality of physical erasing units, and obtaining a first threshold value based on the valid data parameter. The method also includes: obtaining a first determination parameter based on a number of a plurality of first physical erasing units, and the first physical erasing units are physical erasing units being programmed for storing data by using a single-page programming mode. The method further includes: performing a garbage collection operation if the first determination parameter is greater than the first threshold value.

## Claims

### Claim 1

A memory management method for a rewritable non-volatile memory module having a plurality of physical erasing units, the memory management method comprising:
receiving a write command from a host system;
obtaining a valid data parameter based on a valid data amount of valid data stored in at least a part of the physical erasing units;
obtaining a first threshold value and a second threshold value based on the valid data parameter;
obtaining a first determination parameter based on a number of a plurality of first physical erasing units among the physical erasing units, wherein the first physical erasing units are programmed for storing data by using a single-page programming mode, and each memory cell of a physical erasing unit programmed by using the single-page programming mode stores one data bit;
performing a garbage collection operation if the first determination parameter is greater than the first threshold value;
obtaining a second determination parameter based on a number of a plurality of second physical erasing units among the physical erasing units, wherein the second physical erasing units are not to be stored data; and
if the second determination parameter is less than the second threshold value, programming data corresponding to the write command into a third physical erasing unit among the second physical erasing units by using a multi-page programming mode, wherein each memory cell of a physical erasing unit programmed by using the multi-page programming mode stores a plurality of data bits.

### Claim 2 (depends on 1)

The memory management method according to claim 1, wherein the step of obtaining the valid data parameter based on the valid data amount of the valid data stored in the at least a part of the physical erasing units comprises:
dividing the valid data amount by a predetermined capacity to calculate a valid number corresponding to the valid data to obtain the valid data parameter.

### Claim 3 (depends on 2)

The memory management method according to claim 2, wherein the predetermined capacity is a data capacity of a physical erasing unit programmed by using a multi-page programming mode, and each memory cell of a physical erasing unit programmed by using the multi-page programming mode stores a plurality of data bits.

### Claim 4 (depends on 1)

The memory management method according to claim 1, wherein the step of obtaining the first threshold value based on the valid data parameter comprises:
subtracting a calculation parameter by the valid data parameter and a first predetermined parameter to obtain the first threshold value, wherein the calculation parameter corresponds to a number of the physical erasing units.

### Claim 5 (depends on 1)

The memory management method according to claim 1, wherein the step of performing the garbage collection operation is performed in a background execution mode.

### Claim 6 (depends on 1)

The memory management method according to claim 1, further comprising:
if the valid data parameter is less than the second threshold value, programming the data corresponding to the write command into the third physical erasing unit by using the multi-page programming mode.

### Claim 7 (depends on 6)

The memory management method according to claim 6, further comprising:
if the second determination parameter is not less than the second threshold value and the valid data parameter is not less than the second threshold value, programming the data corresponding to the write command into the third physical erasing unit by using the single-page programming mode.

### Claim 8 (depends on 1)

The memory management method according to claim 1, wherein the second threshold value is less than the first threshold value, and a difference value between the first threshold value and the second threshold value is equal to a predetermined difference value.

### Claim 9 (depends on 1)

The memory management method according to claim 1, wherein the step of obtaining the second threshold value based on the valid data parameter comprises:
subtracting a calculation parameter by the valid data parameter and a second predetermined parameter to obtain the second threshold value, wherein the calculation parameter corresponds to a number of the physical erasing units.

### Claim 10

A memory control circuit unit, configured to control a re writable non-volatile memory module, wherein the memory control circuit unit comprises:
a host interface, configured to be connected to a host system;
a memory interface, configured to be connected to the rewritable non-volatile memory module having a plurality of physical erasing units; and
a memory management circuit, connected to the host interface and the memory interface,
wherein the memory management circuit is configured to receive a write command from the host system,
wherein the memory management circuit is further configured to obtain a valid data parameter based on a valid data amount of valid data stored in at least a part of the physical erasing units,
wherein the memory management circuit is further configured to obtain a first threshold value and a second threshold value based on the valid data parameter,
wherein the memory management circuit is further configured to obtain a first determination parameter based on a number of a plurality of first physical erasing units among the physical erasing units, wherein the first physical erasing units are programmed for storing data by using a single-page programming mode, and each memory cell of a physical erasing unit programmed by using the single-page programming mode stores one data bit,
wherein the memory management circuit is further configured to perform a garbage collection operation if the first determination parameter is greater than the first threshold value,
wherein the memory management circuit is further configured to obtain a second determination parameter based on a number of a plurality of second physical erasing units among the physical erasing units, wherein the second physical erasing units are not to be stored data,
wherein the memory management circuit is further configured to program data corresponding to the write command into a third physical erasing unit among the second physical erasing units by using a multi-page programming mode if the second determination parameter is less than the second threshold value, wherein each memory cell of a physical erasing unit programmed by using the multi-page programming mode stores a plurality of data bits.

### Claim 11 (depends on 10)

The memory control circuit unit according to claim 10, wherein in the operation of obtaining the valid data parameter based on the valid data amount of the valid data stored in the at least a part of the physical erasing units, the memory management circuit is further configured to divide the valid data amount by a predetermined capacity to calculate a valid number corresponding to the valid data to obtain the valid data parameter.

### Claim 12 (depends on 10)

The memory control circuit unit according to claim 10, wherein in the operation of obtaining the first threshold value based on the valid data parameter, the memory management circuit is further configured to subtract a calculation parameter by the valid data parameter and a first predetermined parameter to obtain the first threshold value, wherein the calculation parameter corresponds to a number of the physical erasing units.

### Claim 13 (depends on 10)

The memory control circuit unit according to claim 10, wherein the memory management circuit is further configured to program the data corresponding to the write command into the third physical erasing unit by using the multi-page programming mode if the valid data parameter is less than the second threshold value.

### Claim 14 (depends on 13)

The memory control circuit unit according to claim 13, wherein the memory management circuit is further configured to program the data corresponding to the write command into the third physical erasing unit by using the single-page programming mode if the second determination parameter is not less than the second threshold value and the valid data parameter is not less than the second threshold value.

### Claim 15 (depends on 10)

The memory control circuit unit according to claim 10, wherein the second threshold value is less than the first threshold value, and a difference value between the first threshold value and the second threshold value is equal to a predetermined difference value.

### Claim 16 (depends on 10)

The memory control circuit unit according to claim 10, wherein in the operation of obtaining the second threshold value based on the valid data parameter, the memory management circuit is further configured to subtract a calculation parameter by the valid data parameter and a second predetermined parameter to obtain the second threshold value, wherein the calculation parameter corresponds to a number of the physical erasing units.

### Claim 17

A memory storage device, comprising:
a connection interface unit, configured to be connected to a host system;
a rewritable non-volatile memory module, having a plurality of physical erasing units; and
a memory control circuit unit, connected to the connection interface unit and the rewritable non-volatile memory module,
wherein the memory control circuit unit is configured to receive a write command from the host system,
wherein the memory control circuit unit is further configured to obtain a valid data parameter based on a valid data amount of valid data stored in at least a part of the physical erasing units,
wherein the memory control circuit unit is further configured to obtain a first threshold value and a second threshold value based on the valid data parameter,
wherein the memory control circuit unit is further configured to obtain a first determination parameter based on a number of a plurality of first physical erasing units among the physical erasing units, wherein the first physical erasing units are programmed for storing data by using a single-page programming mode, and each memory cell of a physical erasing unit programmed by using the single-page programming mode stores one data bit,
wherein the memory control circuit unit is further configured to perform a garbage collection operation if the first determination parameter is greater than the first threshold value,
wherein the memory control circuit unit is further configured to obtain a second determination parameter based on a number of a plurality of second physical erasing units among the physical erasing units, wherein the second physical erasing units are not to be stored data,
wherein the memory control circuit unit is further configured to program data corresponding to the write command into a third physical erasing unit among the second physical erasing units by using a multi-page programming mode if the second determination parameter is less than the second threshold value, wherein each memory cell of a physical erasing unit programmed by using the multi-page programming mode stores a plurality of data bits.

### Claim 18 (depends on 17)

The memory storage device according to claim 17, wherein in the operation of obtaining the valid data parameter based on the valid data amount of the valid data stored in the at least a part of the physical erasing units, the memory control circuit unit is further configured to divide the valid data amount by a predetermined capacity to calculate a valid number corresponding to the valid data to obtain the valid data parameter.

### Claim 19 (depends on 17)

The memory storage device according to claim 17, wherein in the operation of obtaining the first threshold value based on the valid data parameter, the memory control circuit unit is further configured to subtract a calculation parameter by the valid data parameter and a first predetermined parameter to obtain the first threshold value, wherein the calculation parameter corresponds to a number of the physical erasing units.

### Claim 20 (depends on 17)

The memory storage device according to claim 17, wherein the memory control circuit unit is further configured to program the data corresponding to the write command into the third physical erasing unit by using the multi-page programming mode if the valid data parameter is less than the second threshold value.

### Claim 21 (depends on 20)

The memory storage device according to claim 20, wherein the memory control circuit unit is further configured to program the data corresponding to the write command into the third physical erasing unit by using the single-page programming mode if the second determination parameter is not less than the second threshold value and the valid data parameter is not less than the second threshold value.

### Claim 22 (depends on 17)

The memory storage device according to claim 17, wherein in the operation of obtaining the second threshold value based on the valid data parameter, the memory control circuit unit is further configured to subtract a calculation parameter by the valid data parameter and a second predetermined parameter to obtain the second threshold value, wherein the calculation parameter corresponds to a number of the physical erasing units.
