# US 2021/0240613 A1 · Memory system and operating method thereof

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

- Number: US 2021/0240613 A1
- Document ID: US20210240613A1
- Status: Published application
- Kind: A1
- Application number: 17/000,509
- Filed: 2020-08-24
- Published: 2021-08-05
- Earliest claimed: 2020-02-05
- Assignees: SK hynix Inc.
- Applicants: SK hynix Inc.
- Inventors: Hyeong Ju Na
- Web page: https://patentgrep.com/patent/US20210240613A1

## CPC

- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/0238: {Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory}
- G06F 2212/1016: Performance improvement
- G06F 2212/1044: Space efficiency improvement
- 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 system may include a memory device including a plurality of memory blocks and a controller suitable for determining whether to change from a normal mode to a dirty mode based on a size of free space of a host a sum of an amount of restoration of garbage collection for victim blocks and a size of all free blocks in the memory device. In the dirty mode, the controller controls the memory device to perform a garbage collection operation on the victim blocks at a frequency greater than frequency at which a garbage collection operation is performed in the normal mode.

## Claims

### Claim 1

A memory system comprising:
a memory device comprising a plurality of memory blocks; and
a controller suitable for determining whether to change from a normal mode to a dirty mode based on a size of free space of a host and a sum of an amount of restoration of garbage collection for victim blocks and a size of all free blocks in the memory device, and
wherein, in the dirty mode, the controller controls the memory device to perform a garbage collection operation on the victim blocks at a frequency greater than the frequency at which a garbage collection operation is performed in the normal mode.

### Claim 2 (depends on 1)

The memory system of claim 1, wherein the amount of restoration of garbage collection is a size of a space restorable when the garbage collection operation is performed on the victim blocks until user data is programmed into all empty pages in the free blocks.

### Claim 3 (depends on 1)

The memory system of claim 1, wherein the size of the free space of the host is a difference between an initial capacity of the memory device and a size of valid pages in the memory device.

### Claim 4 (depends on 1)

The memory system of claim 1, wherein the controller:
classifies the memory blocks into a plurality of groups corresponding to respective valid page ratio ranges, and
arranges the groups in ascending order of their valid page ratio ranges.

### Claim 5 (depends on 4)

The memory system of claim 4, wherein the controller:
detects, as the victim blocks, memory blocks in a first group corresponding to a lowest valid page ratio range,
updates the victim blocks by adding, to the victim blocks, memory blocks, in a second group, when a total count of invalid pages for the victim blocks are less than or equal to a first threshold.

### Claim 6 (depends on 1)

The memory system of claim 1, wherein:
the controller calculates the amount of restoration of garbage collection by multiplying an amount of restoration per unit garbage collection by an estimated garbage collection count,
the amount of restoration per unit garbage collection is a size of a space restorable by performing a single garbage collection operation on the victim blocks, and
the estimated garbage collection count is the number of garbage collection operations performed until user data is fully programmed into empty pages in all of the free blocks.

### Claim 7 (depends on 6)

The memory system of claim 6, wherein:
the controller calculates the amount of restoration per unit garbage collection by dividing a size corresponding to the total number of invalid pages by a required garbage collection operation count, and
the required garbage collection operation count is the number of garbage collection operations necessary to move all valid data in the victim blocks.

### Claim 8 (depends on 7)

The memory system of claim 7, wherein:
the controller calculates the required garbage collection operation count by dividing a size of the valid data in the victim blocks by a garbage collection throughput, and
the garbage collection throughput is a size of data movable by a single garbage collection operation performed by the memory device.

### Claim 9 (depends on 6)

The memory system of claim 6, wherein the controller calculates the estimated garbage collection count by dividing a size of the free blocks by the frequency of execution of the garbage collection operation in the dirty mode.

### Claim 10 (depends on 1)

The memory system of claim 1, wherein the controller:
controls the memory device to perform the garbage collection operation whenever user data having a size corresponding to a second threshold is programmed into the memory blocks, and
increases the frequency of execution of the garbage collection operation by decreasing the second threshold, when the controller enters the dirty mode.

### Claim 11

An operating method of a memory system comprising:
determining whether to change from a normal mode to a dirty mode based on a size of free space of a host and a sum of an amount of restoration of garbage collection for victim blocks and a size of all free blocks in a memory device; and
performing, in the dirty mode, a garbage collection operation on the victim blocks at a frequency greater than the frequency at which a garbage collection operation is performed in the normal mode.

### Claim 12 (depends on 11)

The operating method of claim 11, wherein the amount of restoration of garbage collection is a size of a space restorable when the garbage collection operation is performed on the victim blocks until user data is programmed into all empty pages in the free blocks.

### Claim 13 (depends on 11)

The operating method of claim 11, wherein the size of the free space of the host is a difference between an initial capacity of the memory device and a size of valid pages in the memory device.

### Claim 14 (depends on 11)

The operating method of claim 11, further comprising:
classifying the memory blocks, included in the memory device, into a plurality of groups corresponding to respective valid page ratio ranges, and
arranging the groups in ascending order of their valid page ratio ranges.

### Claim 15 (depends on 14)

The operating method of claim 14, further comprising:
detecting, as the victim blocks, memory blocks in a first group corresponding to a lowest valid page ratio range,
updating the victim blocks by adding, to the victim blocks, memory blocks, in a second group, when a total count of invalid pages for the victim blocks are less than or equal to a first threshold.

### Claim 16 (depends on 11)

The operating method of claim 11, further comprising calculating the amount of restoration of garbage collection by multiplying an amount of restoration per unit garbage collection by an estimated garbage collection count,
wherein the amount of restoration per unit garbage collection is a size of a space restorable by performing a single garbage collection operation on the victim blocks, and
wherein the estimated garbage collection count is the number of garbage collection operations performed until user data is fully programmed into empty pages included in all of the free blocks.

### Claim 17 (depends on 16)

The operating method of claim 16, wherein:
the calculating of the amount of the restoration of garbage collection comprises calculating the amount of restoration per unit garbage collection by dividing a size corresponding to the number of invalid pages by a required garbage collection operation count,
the required garbage collection operation count is the number of garbage collection operations necessary to move all valid data in the victim blocks,
the calculating of the amount of restoration of garbage collection further comprises calculating the required garbage collection operation count by dividing a size of the valid data in the victim blocks by a garbage collection throughput, and
the garbage collection throughput is a size of data movable by the single garbage collection operation performed by the memory device.

### Claim 18 (depends on 16)

The operating method of claim 16, wherein the calculating of the amount of restoration of garbage collection comprises calculating the estimated garbage collection count by dividing a size of the free blocks by the frequency of execution of the garbage collection operation in the dirty mode.

### Claim 19 (depends on 11)

The operating method of claim 11, further comprising:
performing the garbage collection operation whenever user data having a size corresponding to a second threshold is programmed into the memory blocks, and
increasing the frequency of execution of the garbage collection operation by decreasing the second threshold, when the controller enters the dirty mode.

### Claim 20

A memory system comprising:
a memory device including a plurality of memory blocks; and
a controller, coupled to the memory device, suitable for:
performing a normal garbage collection operation in a normal mode at a first rate;
determining whether to change from the normal mode to a dirty mode based on the number of valid pages, the number of free blocks and a restoration amount associated with the normal garbage collection operation; and
performing, in the dirty mode, a dirty garbage collection operation at a second rate greater than the first rate.
