KR20230025322A - Host, operating method of host and storage system - Google Patents

Host, operating method of host and storage system Download PDF

Info

Publication number
KR20230025322A
KR20230025322A KR1020220032949A KR20220032949A KR20230025322A KR 20230025322 A KR20230025322 A KR 20230025322A KR 1020220032949 A KR1020220032949 A KR 1020220032949A KR 20220032949 A KR20220032949 A KR 20220032949A KR 20230025322 A KR20230025322 A KR 20230025322A
Authority
KR
South Korea
Prior art keywords
host
key
data
index
commit
Prior art date
Application number
KR1020220032949A
Other languages
Korean (ko)
Inventor
김진수
심재훈
카를 조셉
Original Assignee
삼성전자주식회사
서울대학교산학협력단
성균관대학교산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성전자주식회사, 서울대학교산학협력단, 성균관대학교산학협력단 filed Critical 삼성전자주식회사
Priority to US17/817,714 priority Critical patent/US11880593B2/en
Publication of KR20230025322A publication Critical patent/KR20230025322A/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/235Update request formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • G06F16/219Managing data history or versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures
    • G06F16/2228Indexing structures
    • G06F16/2246Trees, e.g. B+trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2308Concurrency control
    • G06F16/2315Optimistic concurrency control
    • G06F16/2329Optimistic concurrency control using versioning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Abstract

According to one aspect of the technical idea of the present disclosure, a host comprises: an index tree which stores an index including information which identifies a versioning key contained in data stored on a storage device; and an index update buffer which stores an entry key included in entry requested data and the versioning key corresponding to the entry key. The host, when preset update conditions are met, updates the versioning key stored in the index update buffer to the index tree. In addition, the host, when recovery of the index update buffer is necessary, sets up a recovery section in the index tree which includes data corresponding to an unupdated versioning key, divides the recovery section and distributes the same to a plurality of threads, reads data included in the recovery section from the storage device through the plurality of threads, and recovers the index update buffer by inserting at least part of read data into the index update buffer. Accordingly, the index update buffer can be recovered more quickly.

Description

호스트, 호스트의 동작 방법 및 스토리지 시스템{HOST, OPERATING METHOD OF HOST AND STORAGE SYSTEM}Host, operating method of host and storage system {HOST, OPERATING METHOD OF HOST AND STORAGE SYSTEM}

본 개시의 기술적 사상은 호스트에 관한 것으로서, 상세하게는 키-밸류(Key-Value) 쌍을 이용하여 데이터를 처리하는 스토리지 장치와 통신하는 호스트에 관한 것이다.The technical concept of the present disclosure relates to a host, and more particularly, to a host communicating with a storage device that processes data using a key-value pair.

스토리지 장치는 블록 스토리지(Block Storage), 파일 스토리지(File Storage), 및 오브젝트 스토리지로 분류될 수 있다. 블록 스토리지는 물리적 위치에 기초하여 데이터를 관리하고, 파일 스토리지는 논리적 순서(Logical Sequence)에 기초하여 데이터를 관리할 수 있다. 한편, 오브젝트 스토리지는 고유 식별자에 기초하여 데이터를 관리할 수 있다. 블록 스토리지 및 파일 스토리지는 텍스트 데이터의 양이 많은 경우에 유용한 반면, 오브젝트 스토리지는 소리 데이터, 영상 데이터 등과 같은 비정형 데이터의 양이 많은 경우에 효율적인 대안일 수 있다. 오브젝트 스토리지의 일 예로서, 키-밸류(Key-Value) 기반으로 데이터를 저장하는 키-밸류 스토리지가 있다.Storage devices may be classified into block storage, file storage, and object storage. Block storage can manage data based on physical location, and file storage can manage data based on logical sequence. Meanwhile, the object storage may manage data based on a unique identifier. While block storage and file storage are useful when there is a large amount of text data, object storage can be an efficient alternative when there is a large amount of unstructured data such as sound data and video data. As an example of object storage, there is a key-value storage that stores data based on key-value.

키-밸류 스토리지는 호스트로부터 수신한 명령에 기초하여, 기입 또는 독출 동작을 수행할 수 있다. 호스트는 키를 포함하는 독출 명령을 키-밸류 스토리지로 전송할 수 있고, 키-밸류 스토리지는 독출 명령에 응답하여 밸류를 호스트로 전송할 수 있다. 호스트는 독출하고자 하는 밸류에 대한 키를 인덱스를 통해 키를 저장하는 인덱스 트리를 통해 획득할 수 있다. 이때 호스트는 키-밸류 스토리지에 새로운 데이터가 기입될 때마다 인덱스 트리를 업데이트하지 않고, 다수의 데이터가 기입된 후 인덱스 트리를 한 번에 업데이트 할 수 있다. 이와 같은 상황에서, 호스트의 전원 공급이 갑자기 중단되는 것과 같은 상황이 발생하는 경우, 인덱스 트리에 업데이트되지 않은 데이터에 대한 복구가 필요하다.The key-value storage may perform a write or read operation based on a command received from the host. The host may transmit a read command including a key to the key-value storage, and the key-value storage may transmit a value to the host in response to the read command. The host can obtain a key for a value to be read through an index tree that stores the key through an index. In this case, the host may update the index tree at once after a large number of data is written, rather than updating the index tree every time new data is written to the key-value storage. In such a situation, when a situation such as a sudden power failure of the host occurs, data that is not updated in the index tree needs to be restored.

본 개시의 기술적 사상이 해결하려는 과제는, 인덱스 트리에 업데이트되지 않은 데이터를 보다 빠르게 복구할 수 있는 호스트를 제공하는 데 있다.An object to be solved by the technical idea of the present disclosure is to provide a host capable of more quickly restoring data that has not been updated in an index tree.

상기와 같은 목적을 달성하기 위하여, 본 개시의 기술적 사상의 일측면에 따른 키-밸류(Key-Value) 쌍을 이용하여 데이터를 처리하는 스토리지 장치와 통신하는 호스트는 상기 스토리지 장치에 저장된 데이터에 포함된 버저닝(versioning) 키를 식별하는 정보를 포함하는 인덱스를 저장하는 인덱스 트리 및 기입 요청된 데이터에 포함된 기입 키 및 상기 기입 키에 대응되는 상기 버저닝 키를 저장하는 인덱스 업데이트 버퍼를 포함하고, 상기 호스트는 미리 설정된 업데이트 조건이 충족되는 경우, 상기 인덱스 업데이트 버퍼에 저장된 상기 버저닝 키를 상기 인덱스 트리에 업데이트하고, 상기 호스트는 상기 인덱스 업데이트 버퍼에 대한 복구가 필요한 경우, 상기 인덱스 트리에 업데이트되지 않은 상기 버저닝 키에 대응되는 데이터가 포함된 복구 구간을 설정하고, 상기 복구 구간을 분할하여 복수의 스레드들로 분배하고, 상기 복수의 스레드들을 통해 상기 스토리지 장치로부터 상기 복구 구간에 포함된 데이터를 독출하고, 상기 독출된 데이터 중 적어도 일부를 상기 인덱스 업데이트 버퍼에 삽입함으로써 상기 인덱스 업데이트 버퍼를 복구하는 것을 특징으로 한다.In order to achieve the above object, a host communicating with a storage device that processes data using a key-value pair according to an aspect of the technical idea of the present disclosure is included in the data stored in the storage device. An index tree that stores an index including information identifying an updated versioning key, and an index update buffer that stores a write key included in write-requested data and the versioning key corresponding to the write key, , The host updates the versioning key stored in the index update buffer to the index tree when a preset update condition is satisfied, and the host updates the index tree when recovery of the index update buffer is required. A recovery period including data corresponding to the versioning key that has not been updated is set, the recovery period is divided and distributed to a plurality of threads, and the data included in the recovery period is transferred from the storage device through the plurality of threads. and restoring the index update buffer by inserting at least some of the read data into the index update buffer.

상기와 같은 목적을 달성하기 위하여, 본 개시의 기술적 사상의 일측면에 따른 키-밸류 쌍을 이용하여 데이터를 처리하는 스토리지 장치와 통신하며, 상기 스토리지 장치에 저장된 데이터에 포함된 버저닝 키를 식별하는 정보를 포함하는 인덱스를 저장하는 인덱스 트리와, 기입 요청된 데이터에 포함된 기입 키 및 상기 기입 키에 대응되는 상기 버저닝 키를 저장하는 인덱스 업데이트 버퍼를 포함하는 호스트의 동작 방법은 상기 호스트가 상기 인덱스 트리에 업데이트되지 않은 상기 버저닝 키에 대응되는 데이터가 포함된 복구 구간을 설정하는 단계, 상기 호스트가 상기 복구 구간을 분할하여 복수의 스레드들로 분배하는 단계, 상기 호스트가 상기 복수의 스레드들을 통해 상기 스토리지 장치로부터 상기 복구 구간에 포함된 데이터를 독출하는 단계 및 상기 호스트가 상기 독출된 데이터 중 적어도 일부를 상기 인덱스 업데이트 버퍼에 삽입함으로써 상기 인덱스 업데이트 버퍼를 복구하는 단계를 포함한다.In order to achieve the above object, communication is performed with a storage device that processes data using a key-value pair according to an aspect of the technical idea of the present disclosure, and a versioning key included in data stored in the storage device is identified. An operating method of a host including an index tree storing an index including information to be written, and an index update buffer storing a write key included in write-requested data and the versioning key corresponding to the write key. Setting a recovery section including data corresponding to the versioning key that has not been updated in the index tree; dividing the recovery section into a plurality of threads by the host; dividing the recovery section into a plurality of threads by the host; and restoring the index update buffer by inserting at least a part of the read data into the index update buffer by the host.

상기와 같은 목적을 달성하기 위하여, 본 개시의 기술적 사상의 일측면에 따른 스토리지 시스템은 키-밸류 쌍을 이용하여 데이터를 처리하는 스토리지 장치 및 메모리 및 프로세서를 포함하는 호스트를 포함하고, 상기 메모리는 상기 스토리지 장치에 저장된 데이터에 포함된 버저닝 키를 식별하는 정보를 포함하는 인덱스를 저장하는 인덱스 트리와, 기입 요청된 데이터에 포함된 기입 키 및 상기 기입 키에 대응되는 상기 버저닝 키를 저장하는 인덱스 업데이트 버퍼를 저장하고, 상기 프로세서는 미리 설정된 업데이트 조건이 충족되는 경우, 상기 인덱스 업데이트 버퍼에 저장된 상기 버저닝 키를 상기 인덱스 트리에 업데이트하고, 상기 프로세서는 상기 인덱스 업데이트 버퍼에 대한 복구가 필요한 경우, 상기 인덱스 트리에 업데이트되지 않은 상기 버저닝 키에 대응되는 데이터가 포함된 복구 구간을 설정하고, 상기 복구 구간을 분할하여 복수의 스레드들로 분배하고, 상기 복수의 스레드들을 통해 상기 스토리지 장치로부터 상기 복구 구간에 포함된 데이터를 독출하고, 상기 독출된 데이터 중 적어도 일부를 상기 인덱스 업데이트 버퍼에 삽입함으로써 상기 인덱스 업데이트 버퍼를 복구하는 것을 특징으로 한다.In order to achieve the above object, a storage system according to an aspect of the technical idea of the present disclosure includes a storage device for processing data using a key-value pair, and a host including a memory and a processor, the memory comprising: Storing an index tree that stores an index including information identifying a versioning key included in data stored in the storage device, and a write key included in write-requested data and the versioning key corresponding to the write key An index update buffer is stored, and the processor updates the versioning key stored in the index update buffer to the index tree when a preset update condition is satisfied, and the processor updates the index update buffer when recovery is required. , setting a recovery period including data corresponding to the versioning key that has not been updated in the index tree, dividing the recovery period and distributing it to a plurality of threads, and performing the recovery period from the storage device through the plurality of threads. The index update buffer may be restored by reading data included in a recovery period and inserting at least a part of the read data into the index update buffer.

본 개시의 기술적 사상의 호스트에 따르면, 복수의 스레드들을 이용하여 인덱스 업데이트 버퍼를 복구함으로써, 보다 빠르게 인덱스 업데이트 버퍼를 복구할 수 있다.According to a host of technical ideas of the present disclosure, the index update buffer can be recovered more quickly by restoring the index update buffer using a plurality of threads.

도 1은 본 개시의 일 실시예에 따른 스토리지 시스템을 나타내는 블록도이다.
도 2는 본 개시의 일 실시예에 따른 스토리지 장치를 나타내는 블록도이다.
도 3은 본 개시의 일 실시예에 따른 호스트가 기입 요청을 수신한 경우의 동작을 나타내는 순서도이다.
도 4는 본 개시의 일 실시예에 따른 호스트가 독출 요청을 수신한 경우의 동작을 나타내는 순서도이다.
도 5는 본 개시의 일 실시예에 따른 호스트의 인덱스 트리를 나타내는 도면이다.
도 6은 본 개시의 일 실시예에 따른 호스트의 인덱스 트리가 업데이트되는 방법을 나타내는 도면이다.
도 7은 본 개시의 일 실시예에 따른 호스트의 인덱스 업데이트 버퍼를 나타내는 도면이다.
도 8은 본 개시의 일 실시예에 따른 스토리지 장치에 저장된 메모리 블록의 일 예시를 나타내는 도면이다.
도 9는 본 개시의 일 실시예에 따른 스토리지 장치에 저장된 메모리 블록의 다른 예시를 나타내는 도면이다.
도 10은 본 개시의 다른 실시예에 따른 스토리지 장치에 저장된 메모리 블록의 또 다른 예시를 나타내는 도면이다.
도 11은 본 개시의 일 실시예에 따른 호스트의 동작 방법을 나타내는 순서도이다.
도 12는 본 개시의 다른 실시예에 따른 스토리지 시스템을 나타내는 도면이다.
도 13은 본 개시의 일 실시예에 따른 전자 장치를 나타내는 블록도이다.
1 is a block diagram illustrating a storage system according to an exemplary embodiment of the present disclosure.
2 is a block diagram illustrating a storage device according to an exemplary embodiment of the present disclosure.
3 is a flowchart illustrating an operation when a host receives a write request according to an embodiment of the present disclosure.
4 is a flowchart illustrating an operation when a host receives a read request according to an embodiment of the present disclosure.
5 is a diagram illustrating an index tree of a host according to an embodiment of the present disclosure.
6 is a diagram illustrating a method of updating an index tree of a host according to an embodiment of the present disclosure.
7 is a diagram illustrating an index update buffer of a host according to an embodiment of the present disclosure.
8 is a diagram illustrating an example of a memory block stored in a storage device according to an embodiment of the present disclosure.
9 is a diagram illustrating another example of a memory block stored in a storage device according to an embodiment of the present disclosure.
10 is a diagram illustrating another example of a memory block stored in a storage device according to another embodiment of the present disclosure.
11 is a flowchart illustrating a method of operating a host according to an embodiment of the present disclosure.
12 is a diagram illustrating a storage system according to another exemplary embodiment of the present disclosure.
13 is a block diagram illustrating an electronic device according to an embodiment of the present disclosure.

이하, 첨부한 도면을 참조하여 본 개시의 실시예에 대해 상세히 설명한다.Hereinafter, embodiments of the present disclosure will be described in detail with reference to the accompanying drawings.

도 1은 본 개시의 일 실시예에 따른 스토리지 시스템을 나타내는 블록도이다.1 is a block diagram illustrating a storage system according to an exemplary embodiment of the present disclosure.

도 1을 참조하면, 스토리지 시스템(10)은 스토리지 장치(100) 및 호스트(200)를 포함할 수 있다.Referring to FIG. 1 , a storage system 10 may include a storage device 100 and a host 200 .

본 개시의 일 실시예에서 스토리지 시스템(10)은 PC(personal computer), 데이터 서버, 네트워크-결합 스토리지, IoT(Internet of Things) 장치, 또는 휴대용 전자 기기로 구현될 수 있다. 휴대용 전자 기기는, 랩탑 컴퓨터, 이동 전화기, 스마트폰, 태블릿 PC, PDA(personal digital assistant), EDA(enterprise digital assistant), 디지털 스틸 카메라, 디지털 비디오 카메라, 오디오 장치, PMP(portable multimedia player), PND(personal navigation device), MP3 플레이어, 휴대용 게임 콘솔(handheld game console), e-북(e-book), 웨어러블 기기 등 중 어느 하나일 수 있다.In one embodiment of the present disclosure, the storage system 10 may be implemented as a personal computer (PC), a data server, a network-attached storage, an Internet of Things (IoT) device, or a portable electronic device. Portable electronic devices include laptop computers, mobile phones, smart phones, tablet PCs, personal digital assistants (PDAs), enterprise digital assistants (EDAs), digital still cameras, digital video cameras, audio devices, portable multimedia players (PMPs), and PNDs. It may be any one of a personal navigation device, an MP3 player, a handheld game console, an e-book, and a wearable device.

스토리지 장치(100)는 전자 장치에 내장되는 내부 메모리일 수 있다. 예를 들어, 스토리지 장치(100)는 SSD, 임베디드 UFS(Universal Flash Storage) 메모리 장치 또는 eMMC(embedded Multi-Media Card)일 수 있다. 일부 실시예들에서, 스토리지 장치(100)는 전자 장치에 착탈 가능한 외장 메모리일 수 있다. 예를 들어, 스토리지 장치(100)는 UFS 메모리 카드, CF(Compact Flash), SD(Secure Digital), Micro-SD(Micro Secure Digital), Mini-SD(Mini Secure Digital), xD(extreme Digital) 또는 메모리 스틱(Memory Stick)일 수 있다.The storage device 100 may be an internal memory embedded in an electronic device. For example, the storage device 100 may be an SSD, an embedded universal flash storage (UFS) memory device, or an embedded multi-media card (eMMC). In some embodiments, the storage device 100 may be an external memory removable from an electronic device. For example, the storage device 100 may include a UFS memory card, Compact Flash (CF), Secure Digital (SD), Micro Secure Digital (Micro-SD), Mini Secure Digital (Mini-SD), extreme Digital (xD), or It may be a memory stick.

본 개시의 일 실시예에서, 스토리지 장치(100)는 키-밸류 스토리지 장치 또는 키-밸류(Key-Value) 스토어(store)일 수 있고, 예를 들어, 키-밸류 SSD(Solid State Drive)일 수 있다. 키-밸류 스토리지 장치는 키-밸류 페어(pair)를 이용하여 데이터를 빠르고 간단하게 처리하는 장치이다. 여기서, "키-밸류 페어"는 유일성을 가지는 키와, 상기 키에 대응하는 데이터인 밸류의 쌍이며, "튜플(tuple)" 또는 "키-밸류 튜플"이라고 지칭할 수 있다. 또한, 키-밸류 페어는 딕셔너리(dictionary), 해시(hash)로 칭해지는 자료 구조인 연관 배열의 저장, 검색 관리를 위해 설계된 데이터 스토리지 패러다임을 의미할 수 있고, 키-밸류 페어에서, 키는 파일 네임(file name), URI(Uniform Resource Identifier), 필드(field) 또는 해시와 같은 임의의 스트링(string)으로 표시되고, 밸류는 이미지, 사용자 선호 파일 또는 문서와 같은 임의의 종류의 데이터일 수 있다. 이때 키와 밸류의 사이즈는 가변적이며, 예를 들어, 밸류의 사이즈는 밸류에 포함되는 데이터에 따라 변경될 수 있다.In one embodiment of the present disclosure, the storage device 100 may be a key-value storage device or a key-value store, for example, a key-value solid state drive (SSD). can A key-value storage device is a device that quickly and simply processes data using a key-value pair. Here, a "key-value pair" is a pair of a key having uniqueness and a value that is data corresponding to the key, and may be referred to as a "tuple" or a "key-value tuple". In addition, a key-value pair may mean a data storage paradigm designed for storage and search management of an associative array, which is a data structure called a dictionary or hash, and in a key-value pair, a key is a file Represented as an arbitrary string such as a file name, URI (Uniform Resource Identifier), field, or hash, and the value can be any kind of data such as an image, user favorite file, or document. . At this time, the size of the key and the value is variable, and for example, the size of the value can be changed according to the data included in the value.

이하에서는, 스토리지 장치(100)가 키-밸류 스토리지 장치인 실시예를 중심으로 설명하기로 하며, 본 명세서에서, 스토리지 장치(100)는 키-밸류 스토리지 장치 또는 키-밸류 스토어와 실질적으로 동일한 의미로 사용될 수 있다. 그러나 스토리지 장치(100)는 키-밸류 스토리지 장치에 한정되지 않으며, 데이터를 오브젝트 단위로 관리하는 임의의 오브젝트 캐시 시스템 또는 오브젝트 스토리지 시스템에 적용될 수 있다. 따라서 스토리지 장치(100)는 키-밸류 페어가 아닌 임의의 방식으로 데이터를 오브젝트 단위로 관리할 수 있다.Hereinafter, an embodiment in which the storage device 100 is a key-value storage device will be mainly described, and in this specification, the storage device 100 has substantially the same meaning as a key-value storage device or a key-value store. can be used as However, the storage device 100 is not limited to a key-value storage device, and may be applied to any object cache system or object storage system that manages data in object units. Accordingly, the storage device 100 may manage data in object units in an arbitrary method other than a key-value pair.

스토리지 장치(100)는 컨트롤러(110), 데이터 버퍼(130) 및 비휘발성 메모리(Non Volatile Memory, NVM)(140)를 포함할 수 있다.The storage device 100 may include a controller 110 , a data buffer 130 , and a non-volatile memory (NVM) 140 .

컨트롤러(110)는 호스트(200)로부터의 기입 커맨드에 응답하여 비휘발성 메모리(140)에 밸류를 기입하거나, 또는 호스트(200)로부터의 독출 커맨드에 응답하여 비휘발성 메모리(140)에 저장된 밸류를 독출하도록 비휘발성 메모리(140)를 제어할 수 있다.The controller 110 writes a value into the nonvolatile memory 140 in response to a write command from the host 200, or writes a value stored in the nonvolatile memory 140 in response to a read command from the host 200. The non-volatile memory 140 may be controlled to read.

컨트롤러(110)는 키-밸류 매니저(120)를 포함할 수 있다. 키-밸류 매니저(120)는 키-밸류 커맨드(CMD)에 포함되는 키-밸류 페어를 수신하고, 키-밸류 페어에 포함되는 키와 밸류를 분리할 수 있다. 키-밸류 매니저(120)는 키-밸류 페어에 포함되는 복수의 키들(KEY)을 추출하고, 데이터 버퍼(130)에 저장할 수 있다. 키-밸류 매니저(120)는 키-밸류 페어에 포함되는 복수의 밸류들(VALUE)을 추출하고, 데이터 버퍼(130)에 저장할 수 있다.The controller 110 may include a key-value manager 120 . The key-value manager 120 may receive a key-value pair included in the key-value command (CMD) and separate a key and value included in the key-value pair. The key-value manager 120 may extract a plurality of keys (KEYs) included in the key-value pair and store them in the data buffer 130 . The key-value manager 120 may extract a plurality of values included in the key-value pair and store them in the data buffer 130 .

키-밸류 매니저(120)는 일정한 개수 또는 일정한 데이터 량의 복수의 키들(KEY)이 데이터 버퍼(130)에 저장된 경우, 저장된 복수의 키들(KEY)을 키 스트림으로써 비휘발성 메모리(140)에 저장할 수 있다. 키-밸류 매니저(120)는 일정한 개수 또는 일정한 데이터 량의 복수의 밸류들(VALUE)이 데이터 버퍼(130)에 저장된 경우, 저장된 복수의 밸류들(VALUE)을 밸류 스트림으로써 비휘발성 메모리(140)에 저장할 수 있다. 일 실시예에서, 밸류 스트림 및 키 스트림 각각은 비휘발성 메모리(140)의 서로 다른 영역에 저장될 수 있다.When a plurality of keys (KEY) of a certain number or amount of data are stored in the data buffer 130, the key-value manager 120 stores the stored plurality of keys (KEY) in the non-volatile memory 140 as a key stream. can When a plurality of values (VALUEs) of a certain number or a certain amount of data are stored in the data buffer 130, the key-value manager 120 converts the stored values into the non-volatile memory 140 as a value stream. can be stored in In one embodiment, each of the value stream and key stream may be stored in different areas of non-volatile memory 140 .

데이터 버퍼(130)는 키(KEY) 및 밸류(VALUE)를 저장하기 위한 적어도 하나의 메모리 소자를 포함할 수 있고, 일 예시에서, 데이터 버퍼(130)는 동적 랜덤 억세스 메모리(Dynamic Random Access Memory; DRAM), 정적 랜덤 억세스 메모리(Static Random Access Memory; SRAM)와 같은 휘발성 메모리 소자를 포함할 수 있다.The data buffer 130 may include at least one memory device for storing a key and a value, and in one example, the data buffer 130 includes a dynamic random access memory; DRAM) and static random access memory (SRAM).

비휘발성 메모리(140)는 메모리 셀 어레이(Memory Cell Array)(MCA)를 포함할 수 있고, 메모리 셀 어레이(MCA)는 메모리 블록들(BLK1 내지 BLKz)을 포함할 수 있으며, 메모리 블록(BLK1)은 복수의 페이지들(PG1 내지 PGk)을 포함할 수 있다. 여기서, z와 k는 각각 양의 정수일 수 있고, 실시예에 따라 다양하게 변경될 수 있다. 예를 들어, 메모리 블록은 소거의 단위이고, 페이지는 기입 및 독출의 단위일 수 있다. 일부 실시예들에서, 메모리 셀 어레이(MCA)는 복수의 플레인들(planes), 복수의 다이들(dies), 또는 복수의 칩들(chips)을 포함할 수 있다. 일 실시예에서, 비휘발성 메모리(140)는 플래쉬 메모리 장치를 포함할 수 있고, 예를 들어, 낸드(NAND) 플래쉬 메모리 장치를 포함할 수 있다. 그러나, 본 발명은 이에 한정되지 않고, 비휘발성 메모리(140)는 ReRAM(resistive RAM), PRAM(phase change RAM), MRAM(magnetic RAM)과 같은 저항형 메모리 장치를 포함할 수 있다.The non-volatile memory 140 may include a memory cell array (MCA), and the memory cell array MCA may include memory blocks BLK1 to BLKz, and the memory block BLK1 may include a plurality of pages PG1 to PGk. Here, z and k may each be a positive integer and may be variously changed according to embodiments. For example, a memory block may be a unit of erase, and a page may be a unit of write and read. In some embodiments, the memory cell array MCA may include a plurality of planes, a plurality of dies, or a plurality of chips. In one embodiment, the non-volatile memory 140 may include a flash memory device, for example, a NAND flash memory device. However, the present invention is not limited thereto, and the non-volatile memory 140 may include a resistive memory device such as a resistive RAM (ReRAM), a phase change RAM (PRAM), or a magnetic RAM (MRAM).

일 실시예에서, 키(KEY)를 이용하여 생성된 키 스트림과 밸류(VALUE)를 이용하여 생성된 밸류 스트림은 서로 다른 메모리 블록들(BLK1~BLKz) 각각에 저장되거나, 같은 메모리 블록(예를 들어, BLK1)의 서로 다른 페이지들(PG1~PGk) 각각에 저장될 수 있다.In one embodiment, the key stream generated using the key (KEY) and the value stream generated using the value (VALUE) are stored in different memory blocks BLK1 to BLKz, respectively, or are stored in the same memory block (eg For example, it may be stored in different pages PG1 to PGk of BLK1).

호스트(200)는 다양한 인터페이스를 통하여 스토리지 장치(100)와 통신할 수 있다. 일 실시예에서 호스트(200)는 AP(Application Processor) 또는 SoC(System-On-a-Chip)로 구현될 수 있다.The host 200 may communicate with the storage device 100 through various interfaces. In one embodiment, the host 200 may be implemented as an Application Processor (AP) or System-On-a-Chip (SoC).

호스트(200)는 키(KEY)-밸류(VALUE) 페어를 포함하는 데이터를 기입하기 위한 키-밸류 커맨드(CMD), 예를 들어, 기입 커맨드 또는 풋(put) 커맨드를 스토리지 장치(100)에 전송할 수 있고, 스토리지 장치(100)는 키-밸류 커맨드(CMD)에 응답하여 비휘발성 메모리(140)에 밸류(VALUE)를 기입할 수 있다.The host 200 issues a key-value command (CMD), eg, a write command or a put command, to the storage device 100 for writing data including a key-value pair. transmission, and the storage device 100 may write a value into the non-volatile memory 140 in response to the key-value command CMD.

또한, 호스트(200)는 키를 포함하는 키-밸류 커맨드(CMD), 예를 들어, 독출 커맨드 또는 겟(get) 커맨드를 스토리지 장치(100)에 전송할 수 있고, 스토리지 장치(100)는 키-밸류 커맨드(CMD)에 응답하여 비휘발성 메모리(140)로부터 키(KEY)에 대응하는 밸류(VALUE)를 독출할 수 있다.In addition, the host 200 may transmit a key-value command (CMD) including a key, for example, a read command or a get command to the storage device 100, and the storage device 100 may transmit the key-value command (CMD). A value corresponding to the key KEY may be read from the non-volatile memory 140 in response to the value command CMD.

이때 호스트(200)는 인터페이스를 통해 사용자 또는 다른 전자 장치 등과 같이 외부로부터 수신한 기입 요청 또는 독출 요청에 기초하여 스토리지 장치(100)로 키-밸류 커맨드(CMD)를 전송할 수 있다. 호스트(200)가 기입 요청 또는 독출 요청을 수신한 경우에 수행하는 동작은 도 3 및 도 4를 참조하여 후술하도록 한다.In this case, the host 200 may transmit a key-value command (CMD) to the storage device 100 based on a write request or a read request received from the outside such as a user or another electronic device through an interface. An operation performed when the host 200 receives a write request or a read request will be described later with reference to FIGS. 3 and 4 .

호스트(200)는 인덱스 트리(210) 및 인덱스 업데이트 버퍼(220)를 포함할 수 있다.The host 200 may include an index tree 210 and an index update buffer 220 .

인덱스 트리(210)는 스토리지 장치(100)에 저장된 데이터를 독출하기 위해 필요한 키를 인덱스를 통해 탐색할 수 있도록 하는 트리이다. 인덱스 트리(210)는 스토리지 장치(100)에 저장된 데이터의 독출에 필요한 키를 식별하는 정보를 포함할 수 있다. 따라서 호스트(200)는 인덱스 트리(210)를 통해 외부로부터 수신한 독출 요청에 대응되는 키를 탐색하고, 이에 기초하여 생성한 키-밸류 커맨드(CMD)를 스토리지 장치(100)로 전송할 수 있다.The index tree 210 is a tree enabling a search for a key necessary to read data stored in the storage device 100 through an index. The index tree 210 may include information identifying a key required to read data stored in the storage device 100 . Accordingly, the host 200 may search for a key corresponding to the read request received from the outside through the index tree 210 and transmit a key-value command (CMD) generated based on the key to the storage device 100 .

인덱스 트리(210)는 스토리지 장치(100)에 저장될 수 있으며, 호스트(200)는 인덱스 트리(210)를 내부의 휘발성 메모리(예를 들어, DRAM)에 로딩하여 이용할 수 있다. 인덱스 트리(210)에 관한 보다 상세한 설명은 도 5 및 도 6을 참조하여 후술하도록 한다.The index tree 210 may be stored in the storage device 100, and the host 200 may load and use the index tree 210 in an internal volatile memory (eg, DRAM). A more detailed description of the index tree 210 will be described later with reference to FIGS. 5 and 6 .

인덱스 업데이트 버퍼(220)는 외부로부터 수신한 기입 요청에 포함된 데이터를 임시로 저장할 수 있다. 즉, 호스트(200)는 외부로부터 기입 요청을 수신하면, 인덱스 업데이트 버퍼(220)에 저장하고, 미리 설정된 업데이트 조건이 충족되는 경우, 이를 인덱스 트리(210)에 업데이트할 수 있다.The index update buffer 220 may temporarily store data included in a write request received from the outside. That is, when receiving a write request from the outside, the host 200 may store it in the index update buffer 220 and update the index tree 210 when a preset update condition is satisfied.

인덱스 업데이트 버퍼(220)는 스토리지 장치(100)에 저장되지 않으며, 호스트(200)는 내부의 휘발성 메모리(예를 들어, DRAM)에 인덱스 업데이트 버퍼(220)를 임시적으로 저장하여 이용할 수 있다. 인덱스 업데이트 버퍼(220)에 관한 보다 상세한 설명은 도 7을 참조하여 후술하도록 한다.The index update buffer 220 is not stored in the storage device 100, and the host 200 may temporarily store and use the index update buffer 220 in an internal volatile memory (eg, DRAM). A more detailed description of the index update buffer 220 will be described later with reference to FIG. 7 .

호스트(200)는 인덱스 업데이트 버퍼(220)에 대한 복구가 필요한 경우, 인덱스 트리(210)에 업데이트되지 않은 버저닝 키에 대응되는 데이터가 포함된 복구 구간을 설정하고, 복구 구간을 분할하여 복수의 스레드들로 분배하고, 복수의 스레드들을 통해 스토리지 장치(100)로부터 복구 구간에 포함된 데이터를 독출하고, 독출된 데이터 중 적어도 일부를 인덱스 업데이트 버퍼(220)에 삽입함으로써 인덱스 업데이트 버퍼(220)를 복구할 수 있다. 호스트(200)의 인덱스 업데이트 버퍼(220) 복구 동작에 관한 보다 상세한 설명은 도 11을 참조하여 후술하도록 한다.When recovery of the index update buffer 220 is required, the host 200 sets a recovery period including data corresponding to a versioning key that has not been updated in the index tree 210, and divides the recovery period into a plurality of The index update buffer 220 is generated by distributing to threads, reading data included in the recovery section from the storage device 100 through a plurality of threads, and inserting at least some of the read data into the index update buffer 220. can be recovered A more detailed description of the recovery operation of the index update buffer 220 of the host 200 will be described later with reference to FIG. 11 .

도 2는 본 개시의 일 실시예에 따른 스토리지 장치를 나타내는 블록도이다.2 is a block diagram illustrating a storage device according to an exemplary embodiment of the present disclosure.

도 2를 참조하면, 스토리지 장치(100)는 키-밸류 매니저(120), 데이터 버퍼(130) 및 비휘발성 메모리(140)를 포함할 수 있고, 키-밸류 매니저(120)는 키-밸류 추출기(121)를 포함할 수 있다.Referring to FIG. 2 , the storage device 100 may include a key-value manager 120, a data buffer 130, and a non-volatile memory 140, and the key-value manager 120 is a key-value extractor. (121) may be included.

키-밸류 추출기(121)는 키-밸류 커맨드(CMD)에 포함된 키(KEY) 및 밸류(VALUE)를 추출할 수 있다. 키-밸류 추출기(121)는 추출한 키(KEY)를 데이터 버퍼(130)의 키 버퍼(131)에 저장하고, 추출한 밸류(VALUE)를 데이터 버퍼(130)의 밸류 버퍼(132)에 저장할 수 있다. 일 실시예에서, 키 버퍼(131) 및 밸류 버퍼(132)는 별도의 메모리 소자로써 구성될 수 있다. 또 다른 실시예에서, 키 버퍼(131) 및 밸류 버퍼(132)는 데이터 버퍼(130)의 서로 다른 영역으로 구성될 수 있다.The key-value extractor 121 may extract a key (KEY) and a value (VALUE) included in the key-value command (CMD). The key-value extractor 121 may store the extracted key in the key buffer 131 of the data buffer 130 and store the extracted value in the value buffer 132 of the data buffer 130. . In one embodiment, the key buffer 131 and the value buffer 132 may be configured as separate memory devices. In another embodiment, the key buffer 131 and the value buffer 132 may be composed of different regions of the data buffer 130 .

일 실시예에서, 키-밸류 추출기(121)는 키 버퍼(131)에 저장된 키(KEY)의 물리적 주소를 매핑 테이블을 이용하여 관리할 수 있고, 일 예시에서, 상기 매핑 테이블은 키(KEY)에 대한 매핑 인덱스로서 키(KEY)에 대응하는 해시 키(hashed key)를 같이 저장하는 해쉬 테이블로서 생성될 수 있다.In one embodiment, the key-value extractor 121 may manage the physical address of the key (KEY) stored in the key buffer 131 using a mapping table, and in one example, the mapping table is a key (KEY) It can be created as a hash table that stores a hash key corresponding to a key as a mapping index for KEY.

키 버퍼(131)에 저장된 복수의 키들(KEY)이 일정 데이터량 이상 되면, 키-밸류 추출기(121)는 복수의 키들(KEY)을 기초로 키 스트림(ST_KEY)을 생성할 수 있다. 일 실시예에서, 키-밸류 추출기(121)는 복수의 키들(KEY)을 연속적으로 배열함으로써 키 스트림(ST_KEY)을 생성할 수 있다. 또 다른 실시예에서, 키-밸류 추출기(121)는 복수의 키들(KEY)과 복수의 키들(KEY) 각각에 대응하는 밸류(VALUE)에 대한 인덱스를 병합함으로써 키 스트림(ST_KEY)을 생성할 수 있다. 키-밸류 추출기(121)는 생성된 키 스트림(ST_KEY)을 비휘발성 메모리(140)의 제1 영역(AR1)에 저장할 수 있다.When a plurality of keys (KEY) stored in the key buffer 131 exceeds a certain amount of data, the key-value extractor 121 may generate a key stream (ST_KEY) based on the plurality of keys (KEY). In one embodiment, the key-value extractor 121 may generate a key stream (ST_KEY) by sequentially arranging a plurality of keys (KEY). In another embodiment, the key-value extractor 121 may generate a key stream (ST_KEY) by merging a plurality of keys (KEY) and an index of a value (VALUE) corresponding to each of the plurality of keys (KEY). there is. The key-value extractor 121 may store the generated key stream ST_KEY in the first area AR1 of the non-volatile memory 140 .

일 실시예에서, 키-밸류 추출기(121)는 저장된 키(KEY)의 제1 영역(AR1) 내의 물리적 주소를 키 테이블을 이용하여 관리할 수 있고, 일 예시에서, 상기 키 테이블은 키(KEY)에 대한 매핑 인덱스로서 키(KEY)에 대응하는 해시 키(hashed key)를 같이 저장하는 해쉬 테이블로서 생성될 수 있다.In one embodiment, the key-value extractor 121 may manage the physical address in the first area AR1 of the stored key KEY using a key table, and in one example, the key table is a key (KEY ), it can be created as a hash table that stores a hash key corresponding to a key (KEY) as a mapping index for .

밸류 버퍼(132)에 저장된 복수의 밸류들(VALUE)이 일정 데이터량 이상 되면, 키-밸류 추출기(121)는 복수의 밸류들(VALUE)을 기초로 밸류 스트림(ST_VAL)을 생성할 수 있다. 일 예시에서, 키-밸류 추출기(121)는 복수의 밸류들(VALUE)을 연속적으로 배열함으로써 밸류 스트림(ST_VAL)을 생성할 수 있다. 키-밸류 추출기(121)는 생성된 밸류 스트림(ST_VAL)을 비휘발성 메모리(140)의 제2 영역(AR2)에 저장할 수 있다. 일 실시예에서, 키-밸류 추출기(121)는 저장된 밸류(VALUE)의 제2 영역(AR2) 내의 물리적 주소를 밸류 테이블을 이용하여 관리할 수 있다.When the plurality of values (VALUE) stored in the value buffer 132 exceeds a certain amount of data, the key-value extractor 121 may generate a value stream (ST_VAL) based on the plurality of values (VALUE). In one example, the key-value extractor 121 may generate a value stream ST_VAL by continuously arranging a plurality of values VALUE. The key-value extractor 121 may store the generated value stream ST_VAL in the second area AR2 of the non-volatile memory 140 . In one embodiment, the key-value extractor 121 may manage the physical address in the second area AR2 of the stored value using a value table.

도 3은 본 개시의 일 실시예에 따른 호스트가 기입 요청을 수신한 경우의 동작을 나타내는 순서도이다.3 is a flowchart illustrating an operation when a host receives a write request according to an embodiment of the present disclosure.

도 3을 참조하면, 단계 S310에서 호스트(200)는 기입 요청을 수신할 수 있다. 기입 요청은 스토리지 장치(100)에 데이터를 저장하도록 하는 요청으로, 기입 키 및 밸류를 포함할 수 있다. 이때 밸류는 기입하고자 하는 데이터일 수 있고, 기입 키는 밸류에 대응되는 키일 수 있다.Referring to FIG. 3 , in step S310, the host 200 may receive a write request. The write request is a request to store data in the storage device 100 and may include a write key and value. In this case, the value may be data to be written, and the write key may be a key corresponding to the value.

단계 S320에서 호스트(200)는 기입 키에 대응되는 버저닝(versioning)키를 생성할 수 있다. 버저닝 키는 기입 요청에 포함된 밸류에 대응되며, 스토리지 장치(100) 내에서 밸류가 저장되는 위치를 나타낼 수 있다. In step S320, the host 200 may generate a versioning key corresponding to the write key. The versioning key corresponds to a value included in the write request and may indicate a location where the value is stored in the storage device 100 .

본 개시의 일 실시예에서 호스트(200)는 스토리지 장치(100)의 커밋(commit) 순번 및 커밋 내 데이터 순번에 기초하여 버저닝 키를 생성할 수 있다. 커밋은 스토리지 장치(100)가 호스트(200)로 데이터가 저장되었음을 확인해주는 메시지일 수 있다. 스토리지 장치(100)는 미리 설정된 주기가 도래할 때마다, 호스트(200)로 커밋을 송신할 수 있고, 호스트(200)는 커밋을 수신함으로써 스토리지 장치(100)에 데이터가 저장되었음을 확인할 수 있다. 이때 커밋 순번은 스토리지 장치(100)가 호스트(200)로 송신한 커밋의 순번일 수 있고, 커밋 내 데이터 순번은 동일한 순번의 커밋에 의해 저장이 확인된 데이터들 중 스토리지 장치(100)에 저장된 순번일 수 있다. 본 개시의 일 실시예에서, 호스트(200)는 기입 요청에 따라 기입될 데이터가 스토리지 장치(100) 내에서 세 번째 커밋에 의해 저장이 확인되고, 세 번째 커밋에 의해 저장이 확인되는 데이터 중 두 번째로 기입된 데이터이면, CMT#3 DATA 2와 같이 버저닝 키를 생성할 수 있다.In one embodiment of the present disclosure, the host 200 may generate a versioning key based on the order of commits of the storage device 100 and the order of data in the commit. Commit may be a message confirming that data is stored from the storage device 100 to the host 200 . The storage device 100 may transmit a commit to the host 200 whenever a preset cycle arrives, and the host 200 may confirm that data is stored in the storage device 100 by receiving the commit. In this case, the commit sequence number may be the sequence number of commits transmitted from the storage device 100 to the host 200, and the sequence number of data in a commit is the sequence number stored in the storage device 100 among data confirmed to be stored by commits of the same sequence number. can be In one embodiment of the present disclosure, the host 200 confirms that data to be written according to a write request is stored in the storage device 100 by a third commit, and two of the data whose storage is confirmed by the third commit If it is the first written data, a versioning key may be generated as in CMT#3 DATA 2.

이때 기입 키는 스토리지 장치(100) 내의 저장 위치와는 무관한 특정 속성값에 기초하여 생성된 값일 수 있으므로, 호스트(200)가 버저닝 키를 생성함으로써, 후술되는 인덱스 업데이트 버퍼(220) 복구 동작의 빠른 수행이 가능하도록 할 수 있다.At this time, since the write key may be a value generated based on a specific attribute value unrelated to the storage location in the storage device 100, the host 200 generates a versioning key, thereby restoring the index update buffer 220 described later. can enable rapid execution of

단계 S330에서 호스트(200)는 버저닝 키 및 버저닝 키에 대응되는 밸류를 포함하는 키-밸류 커맨드(CMD)를 스토리지 장치(100)로 전송할 수 있다. 이에 따라, 스토리지 장치(100)에 기입 요청에 따른 데이터의 기입이 이루어질 수 있다.In step S330, the host 200 may transmit a key-value command (CMD) including a versioning key and a value corresponding to the versioning key to the storage device 100. Accordingly, data may be written in the storage device 100 according to the write request.

단계 S340에서 호스트(200)는 인덱스 업데이트 버퍼(220)에 버저닝 키 및 버저닝 키에 대응되는 밸류를 저장할 수 있다.In step S340, the host 200 may store a versioning key and a value corresponding to the versioning key in the index update buffer 220.

단계 S350에서 호스트(200)는 업데이트 조건이 충족되는지 판단할 수 있다. 업데이트 조건은 인덱스 업데이트 버퍼(220)에 저장된 데이터에 기초하여 인덱스 트리(210)를 업데이트할 지 결정하는 기준이 되는 조건일 수 있다.In step S350, the host 200 may determine whether an update condition is satisfied. The update condition may be a criterion for determining whether to update the index tree 210 based on data stored in the index update buffer 220 .

본 개시의 일 실시예에서 업데이트 조건은 스토리지 장치(100)의 커밋 횟수, 미리 설정된 기준 시간의 경과 여부 및 호스트(200)의 전원 종료 여부 중 적어도 하나를 포함할 수 있다. 이때 커밋 횟수는 인덱스 업데이트 버퍼(220)가 업데이트 된 후, 호스트(200)가 커밋을 수신한 횟수일 수 있다. 예를 들어, 호스트(200)는 인덱스 트리(210)가 업데이트된 후 수신한 커밋 횟수가 3회가 되면, 업데이트 조건이 충족되는 것으로 판단할 수 있다. 다른 예로, 호스트(200)는 인덱스 트리(210)가 업데이트 된 후 기준 시간(예를 들어, 1시간)이 경과하면, 업데이트 조건이 충족되는 것으로 판단할 수 있다. 또 다른 예로, 호스트(200)는 전원 종료 명령을 수신하는 경우, 업데이트 조건이 충족되는 것으로 판단할 수 있다.In an embodiment of the present disclosure, the update condition may include at least one of the number of commits of the storage device 100, whether a preset reference time has elapsed, and whether or not the power of the host 200 is turned off. In this case, the number of commits may be the number of times the host 200 receives a commit after the index update buffer 220 is updated. For example, the host 200 may determine that the update condition is satisfied when the number of commits received after the index tree 210 is updated reaches three. As another example, the host 200 may determine that the update condition is satisfied when a reference time (eg, 1 hour) elapses after the index tree 210 is updated. As another example, the host 200 may determine that an update condition is satisfied when receiving a power shutdown command.

호스트(200)는 업데이트 조건이 충족되지 않는 것으로 판단하면, 다시 단계 S350을 수행할 수 있다. 본 개시의 일 실시예에서 업데이트 조건이 스토리지 장치(100)의 커밋 횟수 또는 미리 설정된 기준 시간의 경과 여부인 경우, 호스트(200)는 업데이트 조건이 충족되지 않는 것으로 판단하면, 도 3에 도시된 바와 같이 다시 단계 S350을 수행할 수 있다. 그러나 본 개시의 다른 실시예에서 업데이트 조건이 호스트(200)의 전원 종료 여부인 경우, 호스트(200)는 업데이트 조건이 충족되지 않는 것으로 판단하면, 도 3에 도시된 바와 달리 추가적인 동작을 수행하지 않고, 단계를 종료할 수 있다.When determining that the update conditions are not satisfied, the host 200 may perform step S350 again. In one embodiment of the present disclosure, when the update condition is the number of commits of the storage device 100 or whether a preset reference time has elapsed, the host 200 determines that the update condition is not satisfied, as shown in FIG. Similarly, step S350 may be performed again. However, in another embodiment of the present disclosure, when the update condition is whether or not the power of the host 200 is turned off, the host 200 does not perform an additional operation, as shown in FIG. , the step can be terminated.

반대로, 호스트(200)는 업데이트 조건이 충족되는 것으로 판단하면, 단계 S360에서, 인덱스 업데이트 버퍼(220)에 기초하여 인덱스 트리(210)를 업데이트 할 수 있다. 즉, 호스트(200)는 인덱스 업데이트 버퍼(220)에 저장된 버저닝 키를 인덱스 트리(210)에 업데이트할 수 있다.Conversely, if it is determined that the update condition is satisfied, the host 200 may update the index tree 210 based on the index update buffer 220 in step S360. That is, the host 200 may update the versioning key stored in the index update buffer 220 to the index tree 210 .

이때 호스트(200)는 인덱스 업데이트 버퍼(220)에 저장된 모든 버저닝 키를 일괄적으로 인덱스 트리(210)에 업데이트할 수 있다. 이에 따라 인덱스 트리(210)의 업데이트에 필요한 연산을 감소시킬 수 있다.At this time, the host 200 may collectively update all versioning keys stored in the index update buffer 220 to the index tree 210 . Accordingly, operations required for updating the index tree 210 may be reduced.

도 4는 본 개시의 일 실시예에 따른 호스트가 독출 요청을 수신한 경우의 동작을 나타내는 순서도이다.4 is a flowchart illustrating an operation when a host receives a read request according to an embodiment of the present disclosure.

도 4를 참조하면, 단계 S410에서 호스트(200)는 독출 요청을 수신할 수 있다. 독출 요청은 스토리지 장치(100)로부터 데이터를 읽어오도록 하는 요청일 수 있다.Referring to FIG. 4 , the host 200 may receive a read request in step S410. The read request may be a request to read data from the storage device 100 .

단계 S420에서 호스트(200)는 독출 요청된 데이터에 대응되는 버저닝 키가 인덱스 업데이트 버퍼(220)에 존재하는지 판단할 수 있다.In step S420, the host 200 may determine whether a versioning key corresponding to the read-requested data exists in the index update buffer 220.

호스트(200)는 독출 요청된 데이터에 대응되는 버저닝 키가 인덱스 업데이트 버퍼(220)에 존재하는 것으로 판단하면, 단계 S430에서, 인덱스 업데이트 버퍼(220)에서 버저닝 키를 획득할 수 있다.When the host 200 determines that the versioning key corresponding to the read-requested data exists in the index update buffer 220, the host 200 may acquire the versioning key from the index update buffer 220 in step S430.

반대로, 호스트(200)는 독출 요청된 데이터에 대응되는 버저닝 키가 인덱스 업데이트 버퍼(220)에 존재하지 않는 것으로 판단되면, 단계 S440에서, 독출 요청된 데이터에 대응되는 버저닝 키가 인덱스 트리(210)에 존재하는지 판단할 수 있다.Conversely, if the host 200 determines that the versioning key corresponding to the read-requested data does not exist in the index update buffer 220, in step S440, the versioning key corresponding to the read-requested data is added to the index tree ( 210) can be determined.

호스트(200)는 독출 요청된 데이터에 대응되는 버저닝 키가 인덱스 트리(210)에 존재하는 것으로 판단하면, 단계 S450에서, 인덱스 트리(210)에서 버저닝 키를 획득할 수 있다.When the host 200 determines that the versioning key corresponding to the read-requested data exists in the index tree 210, the host 200 may obtain the versioning key from the index tree 210 in step S450.

반대로, 호스트(200)는 독출 요청된 데이터에 대응되는 버저닝 키가 인덱스 트리(210)에도 존재하지 않는 것으로 판단되면, 스토리지 장치(100)에 독출 요청된 데이터가 존재하지 않는 것이므로, 그대로 단계를 종료할 수 있다.Conversely, if the host 200 determines that the versioning key corresponding to the read-requested data does not even exist in the index tree 210, the read-requested data does not exist in the storage device 100, so the step is performed as it is. can be terminated

호스트(200)는 단계 S430 또는 단계 S450에서 버저닝 키를 획득한 후, 단계 S460에서, 버저닝 키를 포함하는 키-밸류 커맨드(CMD)를 스토리지 장치(100)로 전송할 수 있다. 이에 따라, 스토리지 장치(100)로부터 독출 요청된 데이터의 독출이 이루어질 수 있다.After acquiring the versioning key in step S430 or step S450, the host 200 may transmit a key-value command (CMD) including the versioning key to the storage device 100 in step S460. Accordingly, the read-requested data may be read from the storage device 100 .

도 5는 본 개시의 일 실시예에 따른 호스트의 인덱스 트리를 나타내는 도면이다.5 is a diagram illustrating an index tree of a host according to an embodiment of the present disclosure.

도 5를 참조하면, 인덱스 트리(210a)의 일 실시예를 확인할 수 있다. 인덱스 트리(210a)는 스토리지 장치(100)에 저장된 데이터에 포함된 버저닝 키를 식별하는 정보를 포함하는 인덱스를 저장할 수 있다.Referring to FIG. 5 , one embodiment of the index tree 210a can be seen. The index tree 210a may store an index including information identifying a versioning key included in data stored in the storage device 100 .

인덱스 트리(210a)는 복수의 인덱스 노드들(A, B, C) 및 복수의 리프 노드들(D1', D2, D3', D4)을 포함할 수 있다.The index tree 210a may include a plurality of index nodes A, B, and C and a plurality of leaf nodes D1', D2, D3', and D4.

인덱스 노드는 독출하고자 하는 데이터에 대응되는 버저닝 키를 식별하는 정보를 포함하는 인덱스를 저장할 수 있다. 그리고 인덱스 노드는 인덱스에 기초하여 독출 요청에 대응되는 버저닝 키에 대한 요청을 다른 인덱스 노드 또는 리프 노드로 라우팅할 수 있다. 예를 들어, 인덱스 노드 A는 독출하고자 하는 데이터에 기초하여 독출 요청에 대응되는 버저닝 키에 대한 요청을 인덱스 노드 B 또는 인덱스 노드 C로 라우팅할 수 있다. 그리고 인덱스 노드 B는 독출하고자 하는 데이터에 기초하여 독출 요청에 대응되는 버저닝 키에 대한 요청을 리프 노드 D1' 또는 리프 노드 D2로 라우팅할 수 있다. 그리고 인덱스 노드 C는 독출하고자 하는 데이터에 기초하여 독출 요청에 대응되는 버저닝 키에 대한 요청을 리프 노드 D3' 또는 리프 노드 D4로 라우팅할 수 있다.The index node may store an index including information identifying a versioning key corresponding to data to be read. Also, the index node may route a request for a versioning key corresponding to the read request to another index node or leaf node based on the index. For example, index node A may route a request for a versioning key corresponding to the read request to index node B or index node C based on data to be read. Further, the index node B may route a request for a versioning key corresponding to the read request to the leaf node D1' or the leaf node D2 based on the data to be read. Further, the index node C may route a request for a versioning key corresponding to the read request to the leaf node D3' or the leaf node D4 based on the data to be read.

리프 노드는 독출하고자 하는 데이터에 대응되는 버저닝 키를 저장할 수 있다. 따라서 호스트(200)는 인덱스 트리(210a)를 이용하여 독출하고자 하는 데이터에 대응되는 버저닝 키를 획득할 수 있다.The leaf node may store a versioning key corresponding to data to be read. Accordingly, the host 200 may obtain a versioning key corresponding to data to be read using the index tree 210a.

도 6은 본 개시의 일 실시예에 따른 호스트의 인덱스 트리가 업데이트되는 방법을 나타내는 도면이다.6 is a diagram illustrating a method of updating an index tree of a host according to an embodiment of the present disclosure.

도 6을 참조하면, 인덱스 트리(210b)가 업데이트되는 일 실시예를 확인할 수 있다. 도 6에 도시된 실시예는 리프 노드 D2가 리프 노드 D2'로 업데이트되고, 리프 노드 D4가 리프 노드 D4'로 업데이트된 경우의 인덱스 트리(210b)의 변화를 나타낸 실시예이다.Referring to FIG. 6 , an embodiment in which the index tree 210b is updated can be confirmed. The embodiment shown in FIG. 6 is an embodiment illustrating changes in the index tree 210b when the leaf node D2 is updated to the leaf node D2' and the leaf node D4 is updated to the leaf node D4'.

본 개시의 일 실시예에서 인덱스 트리(210b)는 append-only 방식에 의해 업데이트 될 수 있다. append-only 방식은 트리가 업데이트 되는 경우, 기존의 리프 노드 및 해당 리프 노드의 상위 인덱스 노드를 덮어쓰는 대신, 새로운 노드를 생성하여 기존의 노드를 대체하는 방식이다.In an embodiment of the present disclosure, the index tree 210b may be updated using an append-only method. In the append-only method, when the tree is updated, a new node is created to replace the existing node instead of overwriting the existing leaf node and the upper index node of the leaf node.

이때 리프 노드 D2가 리프 노드 D2'로 업데이트될 때, 호스트(200)는 리프 노드 D2의 상위 인덱스 노드인 인덱스 노드 B 및 인덱스 노드 A에 대응되는 노드를 새로 생성하여야 한다. 또한, 리프 노드 D4가 리프 노드 D4'로 업데이트될 때, 호스트(200)는 리프 노드 D4의 상위 인덱스 노드인 인덱스 노드 C 및 인덱스 노드 A에 대응되는 노드를 새로 생성하여야 한다.At this time, when leaf node D2 is updated to leaf node D2', the host 200 must newly create nodes corresponding to index node B and index node A, which are upper index nodes of leaf node D2. Also, when leaf node D4 is updated to leaf node D4′, the host 200 must newly create nodes corresponding to index node C and index node A, which are upper index nodes of leaf node D4.

이에 따라, 호스트(200)는 새로운 인덱스 노드인 인덱스 노드 A', 인덱스 노드 B' 및 인덱스 노드 C'를 생성할 수 있다. 그리고 인덱스 노드 A'는 인덱스 노드 B' 또는 인덱스 노드 C'로 라우팅 가능하게 연결되고, 인덱스 노드 B'는 리프 노드 D1' 또는 리프 노드 D2'로 라우팅 가능하게 연결되고, 인덱스 노드 C'는 리프 노드 D3' 또는 리프 노드 D4'로 라우팅 가능하게 연결될 수 있다.Accordingly, the host 200 may create new index nodes such as index node A', index node B', and index node C'. And index node A' is routable connected to index node B' or index node C', index node B' is routable connected to leaf node D1' or leaf node D2', and index node C' is a leaf node. It can be routable connected to D3' or leaf node D4'.

도 7은 본 개시의 일 실시예에 따른 호스트의 인덱스 업데이트 버퍼를 나타내는 도면이다.7 is a diagram illustrating an index update buffer of a host according to an embodiment of the present disclosure.

도 7을 참조하면, 인덱스 업데이트 버퍼(220a)의 일 실시예를 확인할 수 있다. 인덱스 업데이트 버퍼(220a)는 기입 요청된 데이터에 포함된 기입 키 및 기입 키에 대응되는 버저닝 키를 저장할 수 있다.Referring to FIG. 7 , an embodiment of the index update buffer 220a can be seen. The index update buffer 220a may store a write key included in write-requested data and a versioning key corresponding to the write key.

우선 인덱스 업데이트 버퍼(220a)의 1행은 기입 키를 포함하는 데이터로 D5를, 버저닝 키로 CMT#4 DATA 1을 저장할 수 있다. 또한, 인덱스 업데이트 버퍼(220a)의 2행은 기입 키를 포함하는 데이터로 D6를, 버저닝 키로 CMT#4 DATA 2을 저장할 수 있다. 이때 인덱스 업데이트 버퍼(220a)의 2행에 저장된 데이터는 인덱스 업데이트 버퍼(220a)의 1행에 저장된 데이터와 커밋 순번이 동일하면, 커밋 내 데이터 순번만 1 증가한 버저닝 키를 가질 수 있다.First, row 1 of the index update buffer 220a may store D5 as data including a write key and CMT#4 DATA 1 as a versioning key. Also, row 2 of the index update buffer 220a may store D6 as data including a write key and CMT#4 DATA 2 as a versioning key. In this case, if the data stored in row 2 of the index update buffer 220a has the same commit order as the data stored in row 1 of the index update buffer 220a, only the order of the data in the commit may have a versioning key that is increased by 1.

또한, 인덱스 업데이트 버퍼(220a)의 3행은 기입 키를 포함하는 데이터로 D2'를, 버저닝 키로 CMT#4 DATA 3을 저장할 수 있다. 이때 인덱스 업데이트 버퍼(220a)의 3행에 저장된 데이터와 인덱스 업데이트 버퍼(220a)의 1행 및 2행에 저장된 데이터 간에 커밋 순번이 동일하면, 커밋 내 데이터 순번만 1 또는 2가 증가한 버저닝 키를 가질 수 있다.Also, row 3 of the index update buffer 220a may store D2' as data including a write key and CMT#4 DATA 3 as a versioning key. At this time, if the commit order is the same between the data stored in row 3 of the index update buffer 220a and the data stored in rows 1 and 2 of the index update buffer 220a, a versioning key in which only the data order in the commit is increased by 1 or 2 can have

또한, 인덱스 업데이트 버퍼(220a)의 4행은 기입 키를 포함하는 데이터로 D6'를, 버저닝 키로 CMT#5 DATA 1을 저장할 수 있다. 이때 인덱스 업데이트 버퍼(220a)의 4행에 저장된 데이터와 인덱스 업데이트 버퍼(220a)의 1행 내지 3행에 저장된 데이터와 커밋 순번이 다르면, 커밋 순번이 1 증가하고, 커밋 내 데이터 순번은 초기화되어 1인 버저닝 키를 가질 수 있다.Also, row 4 of the index update buffer 220a may store D6' as data including a write key and CMT#5 DATA 1 as a versioning key. At this time, if the data stored in row 4 of the index update buffer 220a and the data stored in rows 1 to 3 of the index update buffer 220a and the commit order are different, the commit order is increased by 1, and the data order in the commit is initialized to 1. You can have an inversioning key.

도 8은 본 개시의 일 실시예에 따른 스토리지 장치에 저장된 메모리 블록의 일 예시를 나타내는 도면이다.8 is a diagram illustrating an example of a memory block stored in a storage device according to an embodiment of the present disclosure.

도 8을 참조하면, 스토리지 장치(100)에 저장된 메모리 블록의 일 실시예가 도시된 모습을 확인할 수 있다.Referring to FIG. 8 , an example of a memory block stored in the storage device 100 may be seen.

메모리 블록은 기입되는 순서대로 순차적으로 데이터를 저장할 수 있다. 도 8의 실시예에서 데이터의 기입 순서는 도 8에 화살표로 표시된 방향과 같을 수 있다.The memory block may sequentially store data in the order in which it is written. In the embodiment of FIG. 8 , the order of writing data may be the same as the direction indicated by the arrow in FIG. 8 .

메모리 블록은 슈퍼 블록(super block, SB), 하나 이상의 데이터 블록(D1, D2, ??), 하나 이상의 인덱스 블록(A, B, C) 및 하나 이상의 헤더 블록(H)을 포함할 수 있다.A memory block may include a super block (SB), one or more data blocks (D1, D2, ??), one or more index blocks (A, B, C), and one or more header blocks (H).

슈퍼 블록(SB)은 최근 커밋 순번 및 인덱스 트리(210)에 업데이트된 마지막 커밋 순번을 가리키는 헤더 블록(H)의 위치를 저장할 수 있다. 이때 최근 커밋 순번은 가장 최근 커밋이 수행된 데이터 블록을 포함하는 커밋 순번을 나타내고, 인덱스 트리(210)에 업데이트된 마지막 커밋 순번은 가장 최근 인덱스 트리(210)의 업데이트가 완료된 데이터 블록을 포함하는 커밋 순번을 나타낼 수 있다. 이에 따라, 호스트(200)는 헤더 블록에 접근함으로써, 후술되는 바와 같이 인덱스 업데이트 버퍼의 복구 구간을 설정할 수 있다.The super block SB may store the latest commit sequence number and the location of the header block H indicating the last commit sequence updated in the index tree 210 . In this case, the latest commit sequence number represents the commit sequence including the most recently committed data block, and the last commit sequence updated in the index tree 210 is the commit sequence including the most recently updated data block in the index tree 210. sequence can be indicated. Accordingly, the host 200 may set a recovery period of the index update buffer as will be described later by accessing the header block.

하나 이상의 데이터 블록(D1, D2, ??)은 버저닝 키 및 밸류를 저장할 수 있다. 하나 이상의 인덱스 블록(A, B, C)은 인덱스 트리(210)의 인덱스를 저장할 수 있다. 하나 이상의 헤더 블록(H)은 커밋이 수행되었음을 나타내는 값을 저장할 수 있다.One or more data blocks (D1, D2, ??) may store a versioning key and value. One or more index blocks A, B, and C may store indexes of the index tree 210 . One or more header blocks (H) may store values indicating that a commit has been performed.

도 8의 실시예의 경우, 데이터 블록 D1 및 데이터 블록 D2에 데이터가 저장되고 나서, 커밋이 수행되어 헤더 블록 H이 생성된 것을 확인할 수 있다. 그 다음 데이터 블록 D3, 데이터 블록 D4, 데이터 블록 D1' 및 데이터 블록 D3'에 데이터가 저장되고 나서, 인덱스 블록 A, 인덱스 블록 B 및 인덱스 블록 C에 인덱스 트리(210)의 인덱스가 저장되고 나서, 커밋이 수행되어 헤더 블록 H이 생성된 것을 확인할 수 있다. 그리고 나서 데이터 블록 D5 및 데이터 블록 D6에 데이터가 저장되고 나서, 커밋이 수행되어 헤더 블록 H이 생성된 것을 확인할 수 있다. 마지막으로 데이터 블록 D2' 및 데이터 블록 D6'에 데이터가 저장되고 나서, 커밋이 수행되어 헤더 블록 H이 생성된 것을 확인할 수 있다In the case of the embodiment of FIG. 8 , after data is stored in the data block D1 and the data block D2, it can be confirmed that a commit is performed and the header block H is created. Then data is stored in data block D3, data block D4, data block D1' and data block D3', then indexes of the index tree 210 are stored in index block A, index block B and index block C, It can be seen that the commit was performed and the header block H was created. Then, after the data is stored in the data block D5 and the data block D6, it can be confirmed that the header block H is created by performing a commit. Finally, after data is stored in data block D2' and data block D6', it can be seen that a commit is performed and header block H is created.

도 9는 본 개시의 일 실시예에 따른 스토리지 장치에 저장된 메모리 블록의 다른 예시를 나타내는 도면이다.9 is a diagram illustrating another example of a memory block stored in a storage device according to an embodiment of the present disclosure.

도 9를 참조하면, 스토리지 장치(100)에 저장된 메모리 블록에서 슈퍼 블록, 인덱스 블록 및 헤더 블록을 제외하고, 데이터 블록들 만을 나타낸 실시예를 확인할 수 있다. 이때 데이터 블록 각각에는 저장된 버저닝 키가 표시되어 있다.Referring to FIG. 9 , an embodiment showing only data blocks excluding super blocks, index blocks, and header blocks from memory blocks stored in the storage device 100 can be seen. At this time, the stored versioning key is displayed on each data block.

도 9의 실시예의 경우, 버저닝 키로 CMT#1 DATA 1, CMT#1 DATA 2 및 CMT#1 DATA 3를 가지는 데이터가 저장된 후, 첫 번째 커밋(COMMIT 1)이 수행된 것을 확인할 수 있다. 이때 첫 번째 커밋(COMMIT 1)이 수행됨과 함께 인덱스 트리(210)의 업데이트도 수행된 것을 확인할 수 있다.In the case of the embodiment of FIG. 9 , after data having CMT#1 DATA 1, CMT#1 DATA 2, and CMT#1 DATA 3 are stored as versioning keys, it can be seen that the first commit (COMMIT 1) is performed. At this time, it can be confirmed that the first commit (COMMIT 1) is performed and the update of the index tree 210 is also performed.

그 다음, 버저닝 키로 CMT#2 DATA 1 및 CMT#2 DATA 2를 가지는 데이터가 저장된 후, 두 번째 커밋(COMMIT 2)이 수행된 것을 확인할 수 있다. 그리고 버저닝 키로 CMT#3 DATA 1 및 CMT#3 DATA 2를 가지는 데이터가 저장된 후, 세 번째 커밋(COMMIT 3)이 수행된 것을 확인할 수 있다. 그리고 버저닝 키로 CMT#4 DATA 1 및 CMT#4 DATA 2를 가지는 데이터가 저장된 후, 네 번째 커밋(COMMIT 4)이 수행된 것을 확인할 수 있다. 그리고 버저닝 키로 CMT#5 DATA 1, CMT#5 DATA 2 및 CMT#5 DATA 3을 가지는 데이터가 저장된 후, 다섯 번째 커밋(COMMIT 5)이 수행된 것을 확인할 수 있다. 이때 두 번째 커밋(COMMIT 2) 내지 다섯 번째 커밋(COMMIT 5)이 수행될 때는 인덱스 트리(210)의 업데이트가 수행되지 않은 것을 확인할 수 있다.Then, after data having CMT#2 DATA 1 and CMT#2 DATA 2 are stored as the versioning key, it can be confirmed that the second commit (COMMIT 2) has been performed. In addition, after data having CMT#3 DATA 1 and CMT#3 DATA 2 are stored as the versioning key, it can be confirmed that the third commit (COMMIT 3) has been performed. In addition, after data having CMT#4 DATA 1 and CMT#4 DATA 2 are stored as the versioning key, it can be confirmed that the fourth commit (COMMIT 4) has been performed. In addition, after data having CMT#5 DATA 1, CMT#5 DATA 2, and CMT#5 DATA 3 as the versioning key is stored, it can be confirmed that the fifth commit (COMMIT 5) has been performed. At this time, when the second commit (COMMIT 2) to the fifth commit (COMMIT 5) are performed, it can be confirmed that the index tree 210 is not updated.

도 10은 본 개시의 다른 실시예에 따른 스토리지 장치에 저장된 메모리 블록의 또 다른 예시를 나타내는 도면이다.10 is a diagram illustrating another example of a memory block stored in a storage device according to another embodiment of the present disclosure.

도 10을 참조하면, 스토리지 장치(100)에 저장된 메모리 블록에서 슈퍼 블록, 인덱스 블록 및 헤더 블록을 제외하고, 데이터 블록들 만을 나타낸 실시예를 확인할 수 있다. 이때 데이터 블록 각각에는 저장된 버저닝 키가 표시되어 있다.Referring to FIG. 10 , an embodiment showing only data blocks excluding super blocks, index blocks, and header blocks from memory blocks stored in the storage device 100 can be seen. At this time, the stored versioning key is displayed on each data block.

도 10의 실시예는 도 9의 실시예와 세 번째 커밋(COMMIT 3)이 수행된 시점까지는 동일하다. 그러나 도 10의 실시예에서는 세 번째 커밋(COMMIT 3)이 수행된 후, 버저닝 키로 CMT#4 DATA 1, CMT#4 DATA 2 및 CMT#4 DATA 3을 가지는 데이터가 저장되고 네 번째 커밋(COMMIT 4)은 아직 수행되지 않은 것을 확인할 수 있다. 이때 두 번째 커밋(COMMIT 2) 및 세 번째 커밋(COMMIT 3)이 수행될 때는 인덱스 트리(210)의 업데이트가 수행되지 않은 것을 확인할 수 있다The embodiment of FIG. 10 is the same as the embodiment of FIG. 9 until the third commit (COMMIT 3) is performed. However, in the embodiment of FIG. 10, after the third commit (COMMIT 3) is performed, data having CMT#4 DATA 1, CMT#4 DATA 2, and CMT#4 DATA 3 as versioning keys is stored, and the fourth commit (COMMIT 4) can confirm that it has not been performed yet. At this time, when the second commit (COMMIT 2) and the third commit (COMMIT 3) are performed, it can be confirmed that the index tree 210 is not updated.

도 11은 본 개시의 일 실시예에 따른 호스트의 동작 방법을 나타내는 순서도이다. 본 개시의 일 실시예에 따른 호스트의 동작 방법은 도 9의 실시예를 함께 참조하여 설명될 것이다.11 is a flowchart illustrating a method of operating a host according to an embodiment of the present disclosure. A method of operating a host according to an embodiment of the present disclosure will be described with reference to the embodiment of FIG. 9 .

도 11을 참조하면, 호스트(200)가 인덱스 업데이트 버퍼(220)의 복구 동작을 수행하는 방법이 도시된 순서도를 확인할 수 있다.Referring to FIG. 11 , a flowchart illustrating a method for the host 200 to perform a recovery operation of the index update buffer 220 can be seen.

이때 호스트(200)는 인덱스 업데이트 버퍼(220)에 대한 복구가 필요한 경우, 도 11의 단계를 시작할 수 있다. 예를 들어, 호스트(200)의 전원이 갑자기 종료되거나, 호스트(200) 내부의 메모리에 이상이 발생하여, 인덱스 업데이트 버퍼(220)의 원자성 또는 지속성이 보장되지 않는 경우, 호스트(200)는 인덱스 업데이트 버퍼(220)에 대한 복구가 필요하다고 판단할 수 있다.At this time, when recovery of the index update buffer 220 is required, the host 200 may start the step of FIG. 11 . For example, when the power of the host 200 is suddenly terminated or an error occurs in the internal memory of the host 200, and atomicity or persistence of the index update buffer 220 is not guaranteed, the host 200 It may be determined that recovery of the index update buffer 220 is necessary.

단계 S1110에서, 호스트(200)는 복구 구간을 설정할 수 있다.In step S1110, the host 200 may set a recovery period.

보다 상세히, 호스트(200)는 스토리지 장치(100)의 헤더 블록(H)으로부터 최근 커밋 순번 및 인덱스 트리(210)에 업데이트된 마지막 커밋 순번을 획득할 수 있다. 도 9의 실시예에서, 호스트(200)는 최근 커밋 순번으로 다섯 번째 커밋(COMMIT 5)을 획득하고, 인덱스 트리(210)에 업데이트된 마지막 커밋 순번으로 첫 번째 커밋(COMMIT 1)을 획득할 수 있다.In more detail, the host 200 may obtain the latest commit sequence number from the header block H of the storage device 100 and the last commit sequence number updated in the index tree 210 . In the embodiment of FIG. 9 , the host 200 may obtain the fifth commit (COMMIT 5) as the latest commit sequence and obtain the first commit (COMMIT 1) as the last commit sequence updated in the index tree 210. there is.

그리고 호스트(200)는 인덱스 트리(210)에 업데이트된 마지막 커밋 순번과 최근 커밋 순번 사이의 구간을 복구 구간으로 설정할 수 있다. 도 9의 실시예에서, 호스트(200)는 첫 번째 커밋(COMMIT 1)이 수행된 이후의 데이터 블록으로부터 다섯 번째 커밋(COMMIT 5)이 수행되기 이전의 데이터 블록까지를 복구 구간으로 설정할 수 있다.Also, the host 200 may set an interval between the last commit sequence updated in the index tree 210 and the latest commit sequence as a recovery interval. In the embodiment of FIG. 9 , the host 200 may set a recovery period from a data block after the first commit (COMMIT 1) to a data block before the fifth commit (COMMIT 5).

단계 S1120에서, 호스트(200)는 복구 구간을 분할하여 복수의 스레드들로 분배할 수 있다.In step S1120, the host 200 may divide the recovery period and distribute it to a plurality of threads.

보다 상세히, 호스트(200)는 복구 구간을 커밋 순번에 기초하여 복수의 커밋 구간들로 분할할 수 있다. 예를 들어, 호스트(200)는 커밋 순번이 동일한 데이터 블록들이 동일한 커밋 구간에 포함되도록, 복구 구간을 복수의 커밋 구간들로 분할할 수 있다. 도 9의 실시예에서, 호스트(200)는 버저닝 키로 CMT#2 DATA 1 및 CMT#2 DATA 2를 가지는 데이터 블록을 제1 커밋 구간으로, 버저닝 키로 CMT#3 DATA 1 및 CMT#3 DATA 2를 가지는 데이터 블록을 제2 커밋 구간으로, 버저닝 키로 CMT#4 DATA 1 및 CMT#4 DATA 2를 가지는 데이터 블록을 제3 커밋 구간으로, 버저닝 키로 CMT#5 DATA 1, CMT#5 DATA 2 및 CMT#5 DATA 3을 가지는 데이터 블록을 제4 커밋 구간으로 분할할 수 있다.In more detail, the host 200 may divide the recovery period into a plurality of commit periods based on the order of commits. For example, the host 200 may divide the recovery period into a plurality of commit periods so that data blocks having the same commit sequence are included in the same commit period. In the embodiment of FIG. 9 , the host 200 uses a data block having CMT#2 DATA 1 and CMT#2 DATA 2 as a versioning key as a first commit period and CMT#3 DATA 1 and CMT#3 DATA as a versioning key. 2 as the second commit interval, and the data blocks having CMT#4 DATA 1 and CMT#4 DATA 2 as the versioning key as the third commit interval, CMT#5 DATA 1 and CMT#5 DATA as the versioning key 2 and CMT#5 DATA 3 may be divided into a fourth commit section.

그리고 호스트(200)는 복수의 커밋 구간들 각각을 복수의 스레드들로 분배할 수 있다. 도 9의 실시예에서, 복수의 스레드들이 제1 스레드 내지 제4 스레드를 포함하는 경우, 호스트(200)는 제1 커밋 구간을 제1 스레드로, 제2 커밋 구간을 제2 스레드로, 제3 커밋 구간을 제3 스레드로, 제4 커밋 구간을 제4 스레드로 분배할 수 있다.Also, the host 200 may distribute each of the plurality of commit sections to a plurality of threads. In the embodiment of FIG. 9 , when the plurality of threads include the first through fourth threads, the host 200 uses the first commit section as the first thread, the second commit section as the second thread, and the third commit section as the second thread. The commit section may be distributed to the third thread and the fourth commit section may be distributed to the fourth thread.

단계 S1130에서, 호스트(200)는 복구 구간에 포함된 데이터를 독출할 수 있다.In step S1130, the host 200 may read data included in the recovery period.

본 개시의 일 실시예에서 호스트(200)는 복수의 스레드들 각각을 통해 분배된 커밋 구간에 대응되는 커밋 순번에 기초하여 스토리지 장치(100)로부터 데이터를 독출할 수 있다. 즉, 복수의 스레드들 각각은 분배된 커밋 구간에 포함된 데이터 블록들의 커밋 순번에 기초하여 스토리지 장치(100)로부터 데이터를 독출할 수 있다. 도 9의 실시예에서, 제1 스레드는 분배된 커밋 구간인 제1 커밋 구간에 포함된 데이터 블록들의 커밋 순번이 2이므로, 스토리지 장치(100)로부터 커밋 순번이 2인 데이터를 모두 독출할 수 있다. 또한, 제4 스레드는 분배된 커밋 구간인 제4 커밋 구간에 포함된 데이터 블록들의 커밋 순번이 5이므로, 스토리지 장치(100)로부터 커밋 순번이 5인 데이터를 모두 독출할 수 있다.In one embodiment of the present disclosure, the host 200 may read data from the storage device 100 based on a commit sequence corresponding to a commit section distributed through each of a plurality of threads. That is, each of the plurality of threads may read data from the storage device 100 based on the commit order of data blocks included in the distributed commit period. In the embodiment of FIG. 9 , since the commit order of data blocks included in the first commit section, which is a distributed commit section, is 2, the first thread can read all data having a commit order of 2 from the storage device 100. . Also, since the commit order of data blocks included in the fourth commit section, which is a distributed commit section, is 5, the fourth thread may read all data having a commit order of 5 from the storage device 100 .

이때 복수의 스레드들 각각은 커밋 구간에 포함된 데이터 블록들의 개수를 파악하고, 이에 기초하여 커밋 순번이 동일한 데이터를 모두 독출할 수 있다. 도 9의 실시예에서, 제4 커밋 구간에 포함된 데이터 블록들이 총 3개이므로, 커밋 순번이 4인 총 3개의 데이터 블록들을 모두 독출할 수 있다. At this time, each of the plurality of threads may determine the number of data blocks included in the commit section, and read all data having the same commit sequence based on this. In the embodiment of FIG. 9 , since there are a total of three data blocks included in the fourth commit interval, all three data blocks having a commit sequence number of 4 can be read.

본 개시의 다른 실시예에서, 호스트(200)는 복수의 스레드들 각각을 통해 동일한 프리픽스(prefix)를 가지는 커밋 순번을 가지는 데이터를 스토리지 장치(100)로부터 독출할 수 있다. 이때 호스트(200)는 동일한 프리픽스를 가지는 커밋 순번을 가지는 데이터를 모두 독출하는 반복자(iterator)를 이용하여 데이터를 스토리지 장치(100)로부터 독출할 수 있다.In another embodiment of the present disclosure, the host 200 may read data having a commit sequence having the same prefix from the storage device 100 through each of a plurality of threads. In this case, the host 200 may read data from the storage device 100 using an iterator that reads all data having the same prefix and commit sequence.

호스트(200)는 복수의 스레드들을 통해 복구 구간에 포함된 데이터를 독출할 때, 복수의 스레드들 각각을 통해 병렬적으로 스토리지 장치(100)로부터 복구 구간에 포함된 데이터를 독출할 수 있다. 즉, 복수의 스레드들은 동일한 시점에 분배된 커밋 구간에 포함된 데이터를 독출할 수 있다. 도 9의 실시예에서, 제1 스레드가 제1 커밋 구간에 포함된 데이터를 독출할 때, 제2 스레드는 제2 커밋 구간에 포함된 데이터를 독출하고, 제3 스레드는 제3 커밋 구간에 포함된 데이터를 독출하고, 제4 스레드는 제4 커밋 구간에 포함된 데이터를 독출할 수 있다.When reading data included in the recovery period through a plurality of threads, the host 200 may read data included in the recovery period from the storage device 100 in parallel through each of the plurality of threads. That is, a plurality of threads can read data included in a distributed commit section at the same point in time. In the embodiment of FIG. 9 , when the first thread reads data included in the first commit section, the second thread reads data included in the second commit section, and the third thread reads data included in the third commit section. read data, and the fourth thread may read data included in the fourth commit interval.

이와 같이 복수의 스레드들을 통해 병렬적으로 데이터를 독출함으로써, 인덱스 업데이트 버퍼의 복구 속도를 빠르게 할 수 있다.By reading data in parallel through a plurality of threads, the recovery speed of the index update buffer can be increased.

단계 S1140에서, 호스트(200)는 독출된 데이터에 기초하여 인덱스 업데이트 버퍼를 복구할 수 있다.In step S1140, the host 200 may restore the index update buffer based on the read data.

보다 상세히, 호스트(200)는 복수의 스레드들을 통해 독출된 데이터 중 적어도 일부를 인덱스 업데이트 버퍼(220)에 삽입함으로써, 인덱스 업데이트 버퍼(220)를 복구할 수 있다.In more detail, the host 200 may restore the index update buffer 220 by inserting at least some of data read through a plurality of threads into the index update buffer 220 .

이때 호스트(200)는 독출된 데이터 중에서 유효 데이터를 선택하고, 유효 데이터를 인덱스 업데이트 버퍼(220)에 삽입할 수 있다. 본 개시의 일 실시예에서 유효 데이터는 유효한 버저닝 키를 가지는 데이터일 수 있다.At this time, the host 200 may select valid data from among the read data and insert the valid data into the index update buffer 220 . In an embodiment of the present disclosure, valid data may be data having a valid versioning key.

단계 S1140을 통해 인덱스 업데이트 버퍼(220)를 복구하고 나서, 도 11에는 도시되지 않았지만, 호스트(200)는 스토리지 장치(100)에 저장된 데이터 중에서 최근 커밋 이후에 저장된 데이터를 삭제할 수 있다. 이는 도 10의 실시예를 참조하여 설명될 수 있다.After restoring the index update buffer 220 through step S1140, although not shown in FIG. 11, the host 200 may delete data stored after a recent commit among data stored in the storage device 100. This can be explained with reference to the embodiment of FIG. 10 .

도 10의 실시예에서, 최근 커밋 순번은 세 번째 커밋(COMMIT 3)이고, 인덱스 트리(210)에 업데이트된 마지막 커밋 순번은 첫 번째 커밋(COMMIT 1)이므로, 복구 구간은 첫 번째 커밋(COMMIT 1)이 수행된 이후의 데이터 블록으로부터 세 번째 커밋(COMMIT 3)이 수행되기 이전의 데이터 블록까지의 구간일 수 있다.In the embodiment of FIG. 10, the latest commit sequence is the third commit (COMMIT 3), and the last commit sequence updated in the index tree 210 is the first commit (COMMIT 1), so the recovery interval is the first commit (COMMIT 1). ) may be performed to a data block before the third commit (COMMIT 3) is performed.

이 경우, 세 번째 커밋(COMMIT 3)이 수행된 이후의 데이터 블록들은 인덱스 업데이트 버퍼(220)에 복구되지 않게 된다. 즉, 버저닝 키가 CMT#4 DATA 1, CMT#4 DATA 2 및 CMT#4 DATA 3인 데이터 블록들은 인덱스 업데이트 버퍼(220)에 복구되지 않게 된다.In this case, data blocks after the third commit (COMMIT 3) is performed are not restored to the index update buffer 220. That is, data blocks having versioning keys of CMT#4 DATA 1, CMT#4 DATA 2, and CMT#4 DATA 3 are not restored to the index update buffer 220.

이때 호스트(200)는 스토리지 장치(100)에 저장된 데이터 중에서 최근 커밋 이후에 저장된 데이터인, 버저닝 키가 CMT#4 DATA 1, CMT#4 DATA 2 및 CMT#4 DATA 3인 데이터를 삭제할 수 있다.At this time, the host 200 may delete data stored after a recent commit among data stored in the storage device 100 and having versioning keys of CMT#4 DATA 1, CMT#4 DATA 2, and CMT#4 DATA 3. .

여기서, 버저닝 키가 CMT#4 DATA 1, CMT#4 DATA 2 및 CMT#4 DATA 3인 데이터 블록들은 스토리지 장치(100)의 커밋에 의해 호스트(200)가 저장되었음을 확인하지 않은 데이터를 포함하는 블록들이다. 따라서 호스트(200)는 스토리지 장치(100)에 저장된 데이터 중에서 최근 커밋 이후에 저장된 데이터를 삭제함으로써, 추후 발생할 수 있는 버저닝 키의 중복 사용과 같은 문제를 방지할 수 있다.Here, the data blocks whose versioning keys are CMT#4 DATA 1, CMT#4 DATA 2, and CMT#4 DATA 3 include data for which the host 200 has not confirmed that they have been stored by the commit of the storage device 100. are blocks Therefore, the host 200 can prevent problems such as duplicate use of a versioning key that may occur in the future by deleting data stored after a recent commit among data stored in the storage device 100 .

상술한 바와 같은 본 개시에 따른 호스트(200) 및 호스트(200)의 동작 방법을 이용하면, 복수의 스레드들을 이용하여 인덱스 업데이트 버퍼(220)를 복구함으로써, 보다 빠르게 인덱스 업데이트 버퍼를 복구할 수 있다.Using the host 200 and the operating method of the host 200 according to the present disclosure as described above, the index update buffer 220 can be restored more quickly by using a plurality of threads. .

도 12는 본 개시의 다른 실시예에 따른 스토리지 시스템을 나타내는 도면이다.12 is a diagram illustrating a storage system according to another exemplary embodiment of the present disclosure.

도 12를 참조하면, 스토리지 시스템(30)은 스토리지 장치(300) 및 호스트(400)를 포함할 수 있다. 그리고 스토리지 장치(300)는 컨트롤러(310), 데이터 버퍼(330) 및 비휘발성 메모리(NVM)(340)를 포함할 수 있다. 도 12에 도시된 실시예는 도 1에 도시된 실시예와 전반적으로 유사한 동작을 수행하므로 차이점을 중심으로 설명하도록 한다.Referring to FIG. 12 , the storage system 30 may include a storage device 300 and a host 400 . Also, the storage device 300 may include a controller 310 , a data buffer 330 , and a non-volatile memory (NVM) 340 . Since the embodiment shown in FIG. 12 generally performs similar operations to the embodiment shown in FIG. 1 , differences will be mainly described.

도 12의 실시예에서 호스트(400)는 메모리(430) 및 프로세서(440)를 포함할 수 있다. In the embodiment of FIG. 12 , the host 400 may include a memory 430 and a processor 440 .

메모리(430)는 인덱스 트리(410) 및 인덱스 업데이트 버퍼(420)를 저장할 수 있다. 이때 메모리(430)는 동적 랜덤 억세스 메모리(DRAM), 정적 랜덤 억세스 메모리(SRAM)와 같은 휘발성 메모리로 구현될 수 있다. 따라서 인덱스 트리(410) 및 인덱스 업데이트 버퍼(420)는 호스트(400)의 전원 종료 시, 메모리(430)에서 휘발될 수 있다. 이때 인덱스 트리(410)는 스토리지 장치(300)에 저장될 수 있고, 인덱스 업데이트 버퍼(420)는 인덱스 트리(410)에 업데이트될 수 있다.The memory 430 may store the index tree 410 and the index update buffer 420 . In this case, the memory 430 may be implemented as a volatile memory such as dynamic random access memory (DRAM) or static random access memory (SRAM). Accordingly, the index tree 410 and the index update buffer 420 may be volatilized in the memory 430 when the power of the host 400 is terminated. In this case, the index tree 410 may be stored in the storage device 300 and the index update buffer 420 may be updated in the index tree 410 .

프로세서(440)는 중앙 처리 장치(Central Processing Unit; CPU)나 마이크로 프로세서 등을 포함할 수 있으며, 호스트(400)의 전반적인 동작을 제어할 수 있다. 메모리(430)는 프로세서(440)의 제어에 따라 동작할 수 있다. 즉, 프로세서(440)는 도 3, 도 4 및 도 11을 통해 설명된 동작들 및 이에 필요한 연산들을 모두 수행할 수 있다.The processor 440 may include a central processing unit (CPU) or a microprocessor, and may control overall operations of the host 400 . The memory 430 may operate under the control of the processor 440 . That is, the processor 440 may perform all of the operations described with reference to FIGS. 3, 4, and 11 and operations necessary therefor.

도 13은 본 개시의 일 실시예에 따른 전자 장치를 나타내는 블록도이다.13 is a block diagram illustrating an electronic device according to an embodiment of the present disclosure.

도 13을 참조하면, 전자 장치(1000)는 프로세서(1100), 메모리 장치(1200), 스토리지 장치(1300), 모뎀(1400), 입출력 장치(1500) 및 파워 서플라이(1600)를 포함할 수 있다. 이때 프로세서(1100) 및 메모리 장치(1200)는 도 12의 호스트(400)에 포함된 프로세서(440) 및 메모리(430)와 같이 구현될 수 있다. 그리고 메모리 장치(1200)는 내부에 인덱스 트리 및 인덱스 업데이트 버퍼를 저장할 수 있다. 또한, 스토리지 장치(1300)는 도 1 또는 도 12에 도시된 스토리지 장치(100, 300)와 같이 구현될 수 있다.Referring to FIG. 13 , an electronic device 1000 may include a processor 1100, a memory device 1200, a storage device 1300, a modem 1400, an input/output device 1500, and a power supply 1600. . In this case, the processor 1100 and the memory device 1200 may be implemented as the processor 440 and the memory 430 included in the host 400 of FIG. 12 . Also, the memory device 1200 may store an index tree and an index update buffer therein. Also, the storage device 1300 may be implemented like the storage devices 100 and 300 shown in FIG. 1 or 12 .

본 개시의 일 실시예에서 프로세서(1100)는 메모리 장치(1200) 내의 인덱스 업데이트 버퍼에 대한 복구가 필요한 경우, 인덱스 트리에 업데이트되지 않은 버저닝 키에 대응되는 데이터가 포함된 복구 구간을 설정하고, 복구 구간을 분할하여 복수의 스레드들로 분배하고, 복수의 스레드들을 통해 스토리지 장치(1300)로부터 복구 구간에 포함된 데이터를 독출하고, 독출된 데이터 중 적어도 일부를 인덱스 업데이트 버퍼(220)에 삽입함으로써 인덱스 업데이트 버퍼(220)를 복구할 수 있다. 이와 같이 복수의 스레드들을 이용하여 인덱스 업데이트 버퍼(220)를 복구함으로써, 보다 빠르게 인덱스 업데이트 버퍼를 복구할 수 있다.In one embodiment of the present disclosure, when recovery of the index update buffer in the memory device 1200 is required, the processor 1100 sets a recovery period including data corresponding to a versioning key that has not been updated in the index tree; By dividing the recovery period and distributing it to a plurality of threads, reading data included in the recovery period from the storage device 1300 through the plurality of threads, and inserting at least some of the read data into the index update buffer 220. The index update buffer 220 may be restored. By restoring the index update buffer 220 using a plurality of threads in this way, the index update buffer can be recovered more quickly.

이상에서와 같이 도면과 명세서에서 예시적인 실시예들이 개시되었다. 본 명세서에서 특정한 용어를 사용하여 실시예들을 설명되었으나, 이는 단지 본 개시의 기술적 사상을 설명하기 위한 목적에서 사용된 것이지 의미 한정이나 청구범위에 기재된 본 개시의 범위를 제한하기 위하여 사용된 것은 아니다. 그러므로 본 기술분야의 통상의 지식을 가진 자라면 이로부터 다양한 변형 및 균등한 타 실시예가 가능하다는 점을 이해할 것이다. 따라서, 본 개시의 진정한 기술적 보호범위는 첨부된 청구범위의 기술적 사상에 의해 정해져야 할 것이다.As above, exemplary embodiments have been disclosed in the drawings and specifications. Embodiments have been described using specific terms in this specification, but they are only used for the purpose of explaining the technical spirit of the present disclosure, and are not used to limit the scope of the present disclosure described in the meaning or claims. Therefore, those of ordinary skill in the art will understand that various modifications and equivalent other embodiments are possible therefrom. Therefore, the true technical scope of protection of the present disclosure should be determined by the technical spirit of the appended claims.

Claims (10)

키-밸류(Key-Value) 쌍을 이용하여 데이터를 처리하는 스토리지 장치와 통신하는 호스트로서,
상기 스토리지 장치에 저장된 데이터의 독출에 필요한 키를 식별하는 정보를 포함하는 인덱스를 저장하는 인덱스 트리; 및
기입 요청된 데이터에 포함된 기입 키 및 상기 기입 키에 대응되는 상기 버저닝 키를 저장하는 인덱스 업데이트 버퍼를 포함하고,
상기 호스트는 미리 설정된 업데이트 조건이 충족되는 경우, 상기 인덱스 업데이트 버퍼에 저장된 상기 버저닝 키를 상기 인덱스 트리에 업데이트하고,
상기 호스트는 상기 인덱스 업데이트 버퍼에 대한 복구가 필요한 경우, 상기 인덱스 트리에 업데이트되지 않은 상기 버저닝 키에 대응되는 데이터가 포함된 복구 구간을 설정하고, 상기 복구 구간을 분할하여 복수의 스레드들로 분배하고, 상기 복수의 스레드들을 통해 상기 스토리지 장치로부터 상기 복구 구간에 포함된 데이터를 독출하고, 상기 독출된 데이터 중 적어도 일부를 상기 인덱스 업데이트 버퍼에 삽입함으로써 상기 인덱스 업데이트 버퍼를 복구하는 것을 특징으로 하는
호스트.
A host communicating with a storage device that processes data using a key-value pair,
an index tree storing an index including information identifying a key required to read data stored in the storage device; and
An index update buffer configured to store a write key included in write-requested data and the versioning key corresponding to the write key;
The host updates the versioning key stored in the index update buffer to the index tree when a preset update condition is satisfied;
When recovery of the index update buffer is required, the host sets a recovery period including data corresponding to the versioning key that has not been updated in the index tree, divides the recovery period, and distributes the recovery period to a plurality of threads. and restoring the index update buffer by reading data included in the recovery section from the storage device through the plurality of threads and inserting at least some of the read data into the index update buffer.
host.
제1항에 있어서,
상기 호스트는 기입 요청을 수신하면, 상기 스토리지 장치의 커밋(commit) 순번 및 커밋 내 데이터 순번에 기초하여 상기 기입 키에 대응되는 상기 버저닝 키를 생성하고, 상기 버저닝 키를 상기 스토리지 장치 및 상기 인덱스 업데이트 버퍼에 저장하는 것을 특징으로 하는
호스트.
According to claim 1,
When receiving a write request, the host generates the versioning key corresponding to the write key based on the order of commits of the storage device and the order of data in the commit, and converts the versioning key to the storage device and the host. characterized by storing in the index update buffer
host.
제1항에 있어서,
상기 호스트는 상기 스토리지 장치의 헤더 블록으로부터 최근 커밋 순번 및 상기 인덱스 트리에 업데이트된 마지막 커밋 순번을 획득하고, 상기 인덱스 트리에 업데이트된 마지막 커밋 순번과 상기 최근 커밋 순번 사이의 구간을 상기 복구 구간으로 설정하는 것을 특징으로 하는
호스트.
According to claim 1,
The host obtains the latest commit sequence and the last commit sequence updated in the index tree from the header block of the storage device, and sets an interval between the last commit sequence updated in the index tree and the latest commit sequence as the recovery period. characterized by
host.
제1항에 있어서,
상기 호스트는 상기 복구 구간을 커밋 순번에 기초하여 복수의 커밋 구간들로 분할하고, 상기 복수의 커밋 구간들 각각을 복수의 스레드들로 분배하는 것을 특징으로 하는
호스트.
According to claim 1,
Characterized in that the host divides the recovery period into a plurality of commit periods based on the commit order, and distributes each of the plurality of commit periods to a plurality of threads.
host.
제4항에 있어서,
상기 호스트는 상기 복수의 스레드들 각각을 통해 분배된 커밋 구간에 대응되는 커밋 순번에 기초하여 상기 스토리지 장치로부터 데이터를 독출하는 것을 특징으로 하는
호스트.
According to claim 4,
Characterized in that the host reads data from the storage device based on a commit sequence corresponding to a commit section distributed through each of the plurality of threads.
host.
제1항에 있어서,
상기 호스트는 상기 복수의 스레드들 각각을 통해 동일한 프리픽스(prefix)를 가지는 커밋 순번을 가지는 데이터를 상기 스토리지 장치로부터 독출하는 것을 특징으로 하는
호스트.
According to claim 1,
Characterized in that the host reads data having a commit sequence having the same prefix from the storage device through each of the plurality of threads.
host.
제1항에 있어서,
상기 호스트는 상기 복수의 스레드들 각각을 통해 병렬적으로 상기 스토리지 장치로부터 상기 복구 구간에 포함된 데이터를 독출하는 것을 특징으로 하는
호스트.
According to claim 1,
Characterized in that the host reads data included in the recovery section from the storage device in parallel through each of the plurality of threads.
host.
제1항에 있어서,
상기 호스트는 상기 독출된 데이터 중에서 유효 데이터를 선택하고, 상기 유효 데이터를 상기 인덱스 업데이트 버퍼에 삽입하여 상기 인덱스 업데이트 버퍼를 복구하는 것을 특징으로 하는
호스트.
According to claim 1,
Characterized in that the host restores the index update buffer by selecting valid data from the read data and inserting the valid data into the index update buffer.
host.
제1항에 있어서,
상기 호스트는 상기 인덱스 업데이트 버퍼를 복구하고 나서, 상기 스토리지 장치에 저장된 데이터 중에서 최근 커밋 이후에 저장된 데이터를 삭제하는 것을 특징으로 하는
호스트.
According to claim 1,
Characterized in that the host deletes data stored after a recent commit among data stored in the storage device after restoring the index update buffer.
host.
키-밸류(Key-Value) 쌍을 이용하여 데이터를 처리하는 스토리지 장치와 통신하는 호스트의 동작 방법에 있어서,
상기 호스트가 인덱스 트리에 업데이트되지 않은 버저닝(versioning) 키에 대응되는 데이터가 포함된 복구 구간을 설정하는 단계;
상기 호스트가 상기 복구 구간을 분할하여 복수의 스레드들로 분배하는 단계;
상기 호스트가 상기 복수의 스레드들을 통해 상기 스토리지 장치로부터 상기 복구 구간에 포함된 데이터를 독출하는 단계; 및
상기 호스트가 상기 독출된 데이터 중 적어도 일부를 인덱스 업데이트 버퍼에 삽입함으로써 상기 인덱스 업데이트 버퍼를 복구하는 단계를 포함하고,
상기 인덱스 트리는 상기 스토리지 장치에 저장된 데이터의 독출에 필요한 키를 식별하는 정보를 포함하는 인덱스를 저장하고, 상기 인덱스 업데이트 버퍼는 기입 요청된 데이터에 포함된 기입 키 및 상기 기입 키에 대응되는 상기 버저닝 키를 저장하는 것을 특징으로 하는
호스트의 동작 방법.
A method of operating a host communicating with a storage device that processes data using a key-value pair, the method comprising:
setting, by the host, a recovery section including data corresponding to a versioning key that has not been updated in the index tree;
dividing, by the host, the recovery period into a plurality of threads;
reading data included in the recovery period from the storage device through the plurality of threads by the host; and
Restoring, by the host, the index update buffer by inserting at least some of the read data into the index update buffer;
The index tree stores an index including information identifying a key necessary for reading data stored in the storage device, and the index update buffer stores a write key included in write-requested data and the versioning code corresponding to the write key. characterized by storing the key
How the host behaves.
KR1020220032949A 2021-08-13 2022-03-16 Host, operating method of host and storage system KR20230025322A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US17/817,714 US11880593B2 (en) 2021-08-13 2022-08-05 Host, operating method of host and storage system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR20210107624 2021-08-13
KR1020210107624 2021-08-13

Publications (1)

Publication Number Publication Date
KR20230025322A true KR20230025322A (en) 2023-02-21

Family

ID=85328202

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020220032949A KR20230025322A (en) 2021-08-13 2022-03-16 Host, operating method of host and storage system

Country Status (1)

Country Link
KR (1) KR20230025322A (en)

Similar Documents

Publication Publication Date Title
US10983955B2 (en) Data unit cloning in memory-based file systems
CN108009008B (en) Data processing method and system and electronic equipment
US11874815B2 (en) Key-value storage device and method of operating the same
US11301379B2 (en) Access request processing method and apparatus, and computer device
US10891074B2 (en) Key-value storage device supporting snapshot function and operating method thereof
US11120081B2 (en) Key-value storage device and method of operating key-value storage device
US11580162B2 (en) Key value append
US10296250B2 (en) Method and apparatus for improving performance of sequential logging in a storage device
US20160092113A1 (en) Host-managed non-volatile memory
CN111414342A (en) Storage device and data processing method thereof
US11461047B2 (en) Key-value storage device and operating method
US10817624B2 (en) Memory system and storage device capable of permanently deleting data stored in a non-volatile memory
KR20210068699A (en) Storage device, storage system and method of operating storage device
US20210026763A1 (en) Storage device for improving journal replay, operating method thereof, and electronic device including the storage device
KR20220022318A (en) Controller and memory system
WO2015162717A1 (en) Computer
KR20230025322A (en) Host, operating method of host and storage system
US11880593B2 (en) Host, operating method of host and storage system
KR20220006458A (en) Key-value storage device and method for sorting key
KR101270777B1 (en) System and method for writing data using a PRAM in a device based on input-output of block unit
US20230046335A1 (en) Host, storage system including the host, and operating method of the host
US11657000B2 (en) Controller and memory system including the same
US20230236737A1 (en) Storage Controller Managing Different Types Of Blocks, Operating Method Thereof, And Operating Method Of Storage Device Including The Same
EP4220414A1 (en) Storage controller managing different types of blocks, operating method thereof, and operating method of storage device including the same
CN110019092B (en) Data storage method, controller and system