# US 2021/0232499 A1 · Storage device for mapping virtual streams onto physical streams and 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/0232499 A1
- Document ID: US20210232499A1
- Status: Published application
- Kind: A1
- Application number: 16/243,795
- Filed: 2019-01-09
- Published: 2021-07-29
- Earliest claimed: 2018-03-28
- Assignees: Research & Business Foundation Sungkyunkwan University
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: HWANJIN YONG; JIN-SOO KIM
- Web page: https://patentgrep.com/patent/US20210232499A1

## CPC

- G06F 12/0246: {in block erasable memory, e.g. flash memory}
- G06F 12/0253: {Garbage collection, i.e. reclamation of unreferenced memory}
- G06F 12/0882: Page mode
- G06F 13/1668: {Details of memory controller}
- G06F 2212/1036: Life time enhancement
- G06F 2212/7201: Logical to physical mapping or translation of blocks or pages
- G06F 2212/7205: Cleaning, compaction, garbage collection, erase control
- G06F 2212/7208: Multiple device management, e.g. distributing data over multiple flash devices
- G06F 2212/7209: Validity control, e.g. using flags, time stamps or sequence numbers
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

A storage device includes a controller and nonvolatile memories. The controller receives write commands having virtual stream identifiers (IDs), receives discard commands having the virtual stream IDs, and determines a lifetime of write data to which each of the virtual stream IDs is assigned. The nonvolatile memories are accessed by the controller depending on physical stream IDs. The controller maps the virtual stream IDs and the physical stream IDs based on the lifetime of the write data.

## Claims

### Claim 1

A storage device comprising:
a controller that receives write commands having virtual stream identifiers (IDs), receives discard commands having the virtual stream IDs, and determines a lifetime of write data to which each of the virtual stream IDs is assigned; and
nonvolatile memories accessed by the controller depending on physical stream IDs, wherein
the controller maps the virtual stream IDs onto the physical stream IDs based on the lifetime of the write data.

### Claim 2 (depends on 1)

The storage device of claim 1, wherein a number of the virtual stream IDs is greater than a number of the physical stream IDs.

### Claim 3 (depends on 1)

The storage device of claim 1, wherein the controller includes:
a virtual stream lifetime identifier that calculates, as a first lifetime of first write data, a difference between: (1) a time at which the controller receives: (a) a first discard command having a first virtual stream ID among the virtual stream IDs or (b) a first overwrite command having the first virtual stream ID and (2) a time at which the first write data, to which the first virtual stream ID is assigned, are programmed to the nonvolatile memories; and
a virtual stream clustering manager that:
compares the first lifetime of the first write data with a lifetime of block data to which each of the physical stream IDs is assigned, and
maps the first virtual stream ID onto a first physical stream ID of the physical stream IDs based on a result of comparing the first lifetime with the lifetime of the block data.

### Claim 4 (depends on 3)

The storage device of claim 3, wherein:
the virtual stream lifetime identifier calculates, as a second lifetime of second write data, a difference between: (3) a time at which the controller receives: (c) a second discard command having a second virtual stream ID of the virtual stream IDs or (d) a second overwrite command having the second virtual stream ID and (4) a time at which second write data, to which the second virtual stream ID is assigned, are programmed to the nonvolatile memories, and
the virtual stream clustering manager:
compares the second lifetime of the second write data with the lifetime of the block data to which the physical stream IDs are respectively assigned, and
maps the second virtual stream ID onto the first physical stream ID or maps the second virtual stream ID onto a second physical stream ID of the physical stream IDs based on a result of comparing the second lifetime and the lifetime of the block data.

### Claim 5 (depends on 4)

The storage device of claim 4, wherein the virtual stream clustering manager:
maps the second virtual stream ID onto the first physical stream ID and clusters the second write data, the first write data, and first block data to which the first physical stream ID is assigned, or
maps the second virtual stream ID onto the second physical stream ID and clusters the second write data and second block data to which the second physical stream ID is assigned.

### Claim 6 (depends on 5)

The storage device of claim 5, wherein the virtual stream clustering manager:
maps the second virtual stream ID onto the first physical stream ID when a difference between a lifetime of the first block data and the second lifetime of the second write data is smaller than a difference between a lifetime of the second block data and the second lifetime of the second write data, or
maps the second virtual stream ID onto the second physical stream ID when a difference between the lifetime of the second block data and the second lifetime of the second write data is smaller than a difference between the lifetime of the first block data and the second lifetime of the second write data.

### Claim 7 (depends on 3)

The storage device of claim 3, wherein the virtual stream lifetime identifier determines the first lifetime of the first write data by: (i) determining lifetimes of logical pages of logical addresses included in both a first write command having the first virtual stream ID and one of the first discard command and the first overwrite command and (ii) calculating an average of the lifetimes of the logical pages.

### Claim 8 (depends on 3)

The storage device of claim 3, wherein the virtual stream clustering manager maps the first virtual stream ID onto the first physical stream ID whenever a reference time elapses.

### Claim 9 (depends on 1)

The storage device of claim 1, further comprising:
a buffer memory that stores a table of timestamps in which lifetimes of a write data set, to which the virtual stream IDs are assigned, are recorded, wherein
the controller adjusts a size of the table of timestamps depending on: (1) a number of channels connecting the nonvolatile memories with the controller, (2) a number of ways connected to each of the channels, (3) a number of planes in each of the nonvolatile memories, or (4) a ratio of a size of a physical page in each of the nonvolatile memories to a size of a logical page.

### Claim 10 (depends on 9)

The storage device of claim 9, wherein:
each of the nonvolatile memories includes a three-dimensional nonvolatile memory cell array, and
when each of memory cells of the three-dimensional nonvolatile memory cell array stores multiple bits, the controller adjusts the size of the table of timestamps depending on a number of the multiple bits.

### Claim 11

A storage device comprising:
nonvolatile memories; and
a controller that accesses the nonvolatile memories depending on a first physical stream identifier (ID) and a second physical stream ID, wherein the controller:
receives write commands having virtual stream IDs;
receives discard commands having the virtual stream IDs;
determines a lifetime of write data, to which each of the virtual stream IDs is assigned, based on the write commands and the discard commands; and
clusters the write data and one of first block data, to which the first physical stream ID is assigned, and second block data, to which the second physical stream ID is assigned, based on a first difference between: (1) the lifetime of the write data and (2) a lifetime of the first block data and a second difference between: (3) the lifetime of the write data and (4) a lifetime of the second block data.

### Claim 12 (depends on 11)

The storage device of claim 11, wherein the controller:
clusters the write data and the first block data when the first difference is smaller than the second difference; and
clusters the write data and the second block data when the second difference is smaller than the first difference.

### Claim 13 (depends on 11)

The storage device of claim 11, wherein:
the controller maps each of the virtual stream IDs onto one of the first physical stream ID and the second physical stream ID, based on the first difference and the second difference, and
a number of the virtual stream IDs is not less than 2.

### Claim 14 (depends on 13)

The storage device of claim 13, wherein the controller generates a mapping table indicating a relationship of the virtual stream IDs, the first physical stream ID, and the second physical stream ID.

### Claim 15 (depends on 11)

The storage device of claim 11, wherein the controller determines, as the lifetime of the write data, a difference between: (a) a time of receiving: (i) a discard command associated with the write data of the discard commands or (ii) an overwrite command associated with the write data of the write commands and (b) a time at which the write data are programmed to the nonvolatile memories.

### Claim 16

An operating method of a storage device, the method comprising:
receiving write commands having virtual stream identifiers (IDs) from a host;
receiving discard commands having the virtual stream IDs from the host;
determining a lifetime of write data to which each of the virtual stream IDs is assigned, based on the write commands and the discard commands;
mapping the virtual stream IDs onto physical stream IDs based on the lifetime of the write data; and
programming the write data to blocks which correspond to one of the physical stream IDs of nonvolatile memories, based on a mapping table indicating a relationship of the virtual stream IDs and the physical stream IDs.

### Claim 17 (depends on 16)

The method of claim 16, wherein the determining of the lifetime of the write data includes:
calculating a program time at which the write data are programmed to blocks, which correspond to a default physical stream ID of the physical stream IDs, of the nonvolatile memories regardless of the mapping table; and
calculating, as the lifetime of the write data, a difference between: (1) a time of receiving: (a) a discard command associated with the write data of the discard commands or (b) an overwrite command associated with the write data of the write commands and (b) the program time.

### Claim 18 (depends on 16)

The method of claim 16, wherein the mapping the virtual stream IDs onto the physical stream IDs includes:
calculating differences between the lifetime of the write data and lifetimes of a block data set to which the physical stream IDs are assigned; and
mapping the virtual stream IDs onto the physical stream IDs depending on a smallest difference of the differences.

### Claim 19 (depends on 18)

The method of claim 18, wherein a first difference between the lifetime of the write data and a lifetime of first block data to which the one of the physical stream IDs is assigned is smaller than a second difference between the lifetime of the write data and a lifetime of second block data to which another of the physical stream IDs is assigned.

### Claim 20 (depends on 16)

The method of claim 16, wherein the programming of the write data to the blocks of the nonvolatile memories includes performing garbage collection on the nonvolatile memories, based on the mapping table.

### Claim at position 21

21-29. (canceled)
