# US 2023/0409219 A1 · Storage device and method of operating the same

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

- Number: US 2023/0409219 A1
- Document ID: US20230409219A1
- Status: Published application
- Kind: A1
- Application number: 18/066,248
- Filed: 2022-12-14
- Published: 2023-12-21
- Earliest claimed: 2022-06-16
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: HEESEOK EUN; SOO-YOUNG JI
- Web page: https://patentgrep.com/patent/US20230409219A1

## CPC

- G06F 3/061: {Improving I/O performance}
- G06F 3/064: {Management of blocks}
- G06F 3/0604: {Improving or facilitating administration, e.g. storage management}
- G06F 3/0631: {by allocating resources to storage systems}
- G06F 3/0644: {Management of space entities, e.g. partitions, extents, pools}
- G06F 3/0679: {Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]}
- G06F 3/0688: {Non-volatile semiconductor memory arrays}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A storage device includes a non-volatile memory including a plurality of namespaces including a plurality of logical blocks; and a storage controller configured to, for each of the plurality of namespaces, check a capacity that is a number of allocable logical blocks, among the plurality of logical blocks, and a size that is a sum of a number of currently allocated logical blocks, among the plurality of logical blocks, and the number of allocable logical blocks, detect a first namespace, among the plurality of namespaces, by using the capacity and the size, and provide at least a portion of the allocable logical blocks of a second namespace, among the plurality of namespaces, to the first namespace.

## Claims

### Claim 1

A storage device, comprising:
a non-volatile memory including a plurality of namespaces including a plurality of logical blocks, and
a storage controller configured to, for each of the plurality of namespaces, check a capacity that is a number of allocable logical blocks, among the plurality of logical blocks, and a size that is a sum of a number of currently allocated logical blocks, among the plurality of logical blocks, and a number of allocable logical blocks, detect a first namespace, among the plurality of namespaces, by using the capacity and the size, and provide at least a portion of the allocable logical blocks of a second namespace, among the plurality of namespaces, to the first namespace.

### Claim 2 (depends on 1)

The storage device of claim 1, wherein:
the storage controller sets a first ratio of the size of each of the plurality of namespaces to a first threshold, and detects a namespace having a capacity that is less than the first threshold, among the plurality of namespaces, as the first namespace.

### Claim 3 (depends on 2)

The storage device of claim 2, wherein:
the storage controller determines the number of at least the portion of the allocable logical blocks of the second namespace so that the capacity of the second namespace except for at least the portion of the allocable logical blocks of the second namespace maintains at least the first threshold of the second namespace.

### Claim 4 (depends on 2)

The storage device of claim 2, wherein:
the storage controller determines the number of at least the portion of the allocable logical blocks of the second namespace so that the capacity of the first namespace to which at least the portion of the allocable logical blocks of the second namespace is provided is greater than or equal to the first threshold.

### Claim 5 (depends on 2)

The storage device of claim 2, wherein:
the storage controller sets a second ratio of the size of each of the plurality of namespaces to a second threshold, and detect a namespace having a capacity greater than or equal to the second threshold, among the plurality of namespaces, as the second namespace.

### Claim 6 (depends on 5)

The storage device of claim 5, wherein:
the first ratio is less than the second ratio.

### Claim 7 (depends on 5)

The storage device of claim 5, wherein:
when the capacity of the first namespace is greater than or equal to the second threshold, the storage controller returns at least a portion of the allocable logical blocks of the first namespace to the second namespace.

### Claim 8 (depends on 7)

The storage device of claim 7, wherein:
the storage controller secures the allocable logical block of the first namespace by performing garbage collection on the first namespace.

### Claim 9 (depends on 7)

The storage device of claim 7, wherein:
when the capacity of the second namespace is less than the first threshold, the storage controller detects whether the capacity of the first namespace is greater than or equal to the second threshold.

### Claim 10 (depends on 7)

The storage device of claim 7, wherein:
when the capacity of the second namespace is less than the first threshold, even after returning at least the portion of the allocable logical blocks of the first namespace to the second namespace, the storage controller provides at least a portion of allocable logical blocks of a third namespace, among the plurality of namespaces, to the second namespace.

### Claim 11 (depends on 1)

The storage device of claim 1, wherein:
when the storage controller receives an identification command for the plurality of namespaces from an external source, the storage controller outputs information on the capacity and information on the size of each of the plurality of namespaces.

### Claim 12 (depends on 1)

The storage device of claim 1, wherein:
the plurality of namespaces includes a plurality of third namespaces allocated to a plurality of virtual machines and a fourth namespace shared by the plurality of virtual machines, and
the storage controller determines the second namespace preferentially from among the fourth namespaces over the third namespace.

### Claim 13 (depends on 12)

The storage device of claim 12, further comprising:
a buffer memory having a plurality of memory areas allocated to the plurality of virtual machines,
wherein the storage controller monitors quality of service (QoS) of the plurality of virtual machines to comply with QoS requirements of the plurality of virtual machines, and reconfigures free space of the plurality of memory areas according to the monitored QoS.

### Claim 14

A method of operating a storage device, the method comprising:
checking, for each of a plurality of namespaces including a plurality of logical blocks, a capacity that is a number of allocable logical blocks, among the plurality of logical blocks, and a size that is a sum of a number of currently allocated logical blocks, among the plurality of logical blocks, and the number of allocable logical blocks;
detecting a first namespace, among the plurality of namespaces, by using the capacity and the size; and
providing at least a portion of the allocable logical blocks of a second namespace, among the plurality of namespaces, to the first namespace.

### Claim 15 (depends on 14)

The method of claim 14, wherein:
the detecting of the first namespace includes:
setting a first ratio of the size of each of the plurality of namespaces to a first threshold; and
detecting a namespace having a capacity that is less than the first threshold, among the plurality of namespaces, as the first namespace.

### Claim 16 (depends on 14)

The method of claim 14, further comprising:
setting a second ratio of the size of each of the plurality of namespaces to a second threshold; and
detecting a namespace having a capacity greater than or equal to the second threshold, among the plurality of namespaces, as the second namespace.

### Claim 17 (depends on 16)

The method of claim 16, further comprising:
determining whether a capacity of the first namespace provided with at least the portion of the allocable logical blocks of the second namespace is greater than or equal to the second threshold;
when the capacity of the first namespace is greater than or equal to the second threshold, securing the allocable logical block of the first namespace by performing garbage collection on the first namespace; and
returning at least a portion of the allocable logical blocks of the first namespace to the second namespace.

### Claim 18

A storage system, comprising:
a host device configured to execute a plurality of virtual machines; and
a storage device including a plurality of namespaces allocated to a plurality of virtual machines, and configured to adjust a size of each of the plurality of namespaces based on a number of allocable logical blocks in each of the plurality of namespaces and a number of currently allocated logical blocks in each of the plurality of namespaces.

### Claim 19 (depends on 18)

The storage system of claim 18, wherein:
the storage device further includes a shared namespace shared by the plurality of virtual machines, and adjusts the size of each of the plurality of namespaces by using an allocable logical block of the shared namespace.

### Claim 20 (depends on 18)

The storage system of claim 18, wherein:
the storage device further includes a plurality of memory areas allocated to the plurality of virtual machines, and monitors quality of service (QoS) of the plurality of virtual machines to comply with QoS requirements of the plurality of virtual machines, and reconfigures free space of the plurality of memory areas allocated to the plurality of virtual machines according to the monitored QoS.
