KR102360879B1 - Methods and apparatuses for cacheline conscious extendible hashing - Google Patents

Methods and apparatuses for cacheline conscious extendible hashing Download PDF

Info

Publication number
KR102360879B1
KR102360879B1 KR1020190165111A KR20190165111A KR102360879B1 KR 102360879 B1 KR102360879 B1 KR 102360879B1 KR 1020190165111 A KR1020190165111 A KR 1020190165111A KR 20190165111 A KR20190165111 A KR 20190165111A KR 102360879 B1 KR102360879 B1 KR 102360879B1
Authority
KR
South Korea
Prior art keywords
segment
hash key
index
bucket
processor
Prior art date
Application number
KR1020190165111A
Other languages
Korean (ko)
Other versions
KR20200102337A (en
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 US16/787,318 priority Critical patent/US20200272424A1/en
Publication of KR20200102337A publication Critical patent/KR20200102337A/en
Application granted granted Critical
Publication of KR102360879B1 publication Critical patent/KR102360879B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • G06F12/1018Address translation using page tables, e.g. page table structures involving hashing techniques, e.g. inverted page tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0864Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using pseudo-associative means, e.g. set-associative or hashing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9014Indexing; Data structures therefor; Storage structures hash tables
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/10Providing a specific technical effect
    • G06F2212/1016Performance improvement

Abstract

본 발명은 캐시라인 컨시어스 익스텐더블 해싱 방법 및 장치에 관한 것으로, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법은, 캐시라인 컨시어스 익스텐더블 해싱(Cacheline Conscious Extendible Hashing) 장치에 의해 수행되는 익스텐더블 해싱 방법에 있어서, 해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하는 단계, 상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하는 단계, 및 상기 확인된 버켓에 상기 해시 키에 대응되는 데이터를 저장하는 단계를 포함한다.The present invention relates to a method and apparatus for hashing a cacheline concierge extendable, and the method and apparatus for hashing a cacheline concise extendable according to an embodiment of the present invention include a method for hashing a cacheline concise extendible hashing system in an apparatus In the extendable hashing method performed by Checking a bucket to be accessed within the identified segment, and storing data corresponding to the hash key in the checked bucket.

Figure R1020190165111
Figure R1020190165111

Description

캐시라인 컨시어스 익스텐더블 해싱 방법 및 장치{METHODS AND APPARATUSES FOR CACHELINE CONSCIOUS EXTENDIBLE HASHING}METHODS AND APPARATUSES FOR CACHELINE CONSCIOUS EXTENDIBLE HASHING

본 발명은 캐시라인 컨시어스 익스텐더블 해싱 방법 및 장치에 관한 것이다.[0001] The present invention relates to a method and apparatus for cashline concierge extendable hashing.

종래의 많은 자료구조는 4KB 혹은 8KB 단위의 페이지를 읽고 쓰는 디스크에 맞도록 설계가 되어 있으나, 최근 SAP HANA 데이터베이스 등 인-메모리 기반의 데이터베이스 시스템들이 활용되면서, 블록 기반 자료구조들과는 달리 8바이트 (Word) 크기의 데이터들을 읽고 쓰는 자료구조들에 대한 관심이 높아지고 있다. 해시 테이블(Hash Table) 자료구조는 B-tree 자료구조와 달리 데이터를 상수 시간에 빠르게 읽고 쓸 수 있는 장점이 있다. Many conventional data structures are designed to fit a disk that reads and writes 4KB or 8KB pages, but as in-memory-based database systems such as SAP HANA databases are recently utilized, unlike block-based data structures, 8 ), interest in data structures that read and write data of size is growing. Unlike the B-tree data structure, the hash table data structure has the advantage of being able to read and write data quickly in constant time.

해시 테이블은 해시 함수를 통해 데이터를 저장할 수 있는 특정 위치를 결정하는데, 특정 해시 키 값을 가지는 데이터가 저장될 수 있는 공간을 버켓(Bucket)이라 부른다. 해시 테이블은 크게 두 가지 종류로 구분할 수 있다. 하나는 정적 해시 테이블이고, 다른 하나는 동적 해시 테이블이다. 정적 해시 테이블 자료구조는 하나의 커다란 연속된 메모리 공간을 필요로 한다. 즉, 데이터들이 저장될 수 있는 버켓이 서로 연속되어 하나의 메모리 공간에 순서대로 저장된다. 어떤 데이터의 해시 키 값이 K라면, K 번째 버켓에 저장되는데, 이 K 번째 버켓의 위치는 연속된 메모리 공간에서 (K×버켓크기)로 결정된다. 즉, 버켓이 4KB 이고, 해시 키 값이 3이라면, 해시 테이블을 위해 할당받은 연속된 메모리 공간에서 12KB에 위치한 버켓에 데이터를 저장해야 한다. 만일 어떤 데이터가 저장될 버켓을 찾았는데, 그 버켓에 이미 많은 데이터가 저장되어 있어, 더 이상 새로운 데이터를 저장할 수 없다면, 정적 해시 테이블은 현재의 메모리 공간보다 더 커다란 연속 메모리 공간을 할당하고 기존 데이터들을 새로운 메모리 공간에 위치한 버켓들로 복사한다. 이 연산을 리해싱(Rehashing)이라 부르는데, 리해싱은 매우 오버헤드가 큰 연산이다. A hash table determines a specific location where data can be stored through a hash function, and a space in which data having a specific hash key value can be stored is called a bucket. Hash tables can be divided into two types. One is a static hash table and the other is a dynamic hash table. A static hash table data structure requires one large contiguous memory space. That is, buckets in which data can be stored are sequentially stored in one memory space in succession to each other. If the hash key value of some data is K, it is stored in the K-th bucket, and the location of the K-th bucket is determined by (K×bucket size) in a contiguous memory space. That is, if the bucket is 4KB and the hash key value is 3, data must be stored in the bucket located at 12KB in the contiguous memory space allocated for the hash table. If a bucket is found in which data is to be stored, and a lot of data is already stored in that bucket, and no more new data can be stored, the static hash table allocates a contiguous memory space larger than the current memory space and are copied to the buckets located in the new memory space. This operation is called rehashing, and rehashing is a very overhead operation.

도 1은 종래의 익스텐더블 해싱 자료구조를 설명하기 위한 도면이다.1 is a diagram for explaining a conventional extendable hashing data structure.

이러한 리해싱 오버헤드를 줄이기 위해 동적으로 버켓들을 할당받는 동적 해시 테이블이 개발되었다. 가장 대표적인 방법이 익스텐더블 해시(Extendible Hash) 이다. 익스텐더블 해시 테이블의 구조는 도 1과 같이 2계층으로 구성된다. 상위 계층은 디렉토리(Directory)라고 불리는 포인터 배열이고, 하위 계층은 데이터를 저장하는 버켓들(Buckets)이다. 저장하고자 하는 데이터의 해시 키 중에서 마지막 혹은 처음 몇 개의 비트를 사용하여 어느 디렉토리 엔트리(Directory entry)를 읽을지 결정한다. 이 비트 수는 디렉토리의 크기에 의해 결정된다. 도 1의 예시에서와 같이 디렉토리가 4(22)이면, 2비트만을 사용하며, 디렉토리의 크기가 8(23)이면 3개의 비트를 사용한다. 도 1의 예에서는 2비트를 사용한다. 최하위 2 비트(Least Significant Bit, LSB) 즉, 2 비트가 10(2)이므로 4개의 디렉토리 엔트리 중에 2진수 10(2), 즉 배열의 인덱스가 2인 3번째 포인터를 사용해 버켓을 찾는다.In order to reduce this rehashing overhead, a dynamic hash table that dynamically allocates buckets was developed. The most representative method is the extendable hash. The structure of the extendable hash table consists of two layers as shown in FIG. 1 . The upper layer is an array of pointers called a directory, and the lower layer is buckets for storing data. The last or first few bits of the hash key of the data to be stored are used to determine which directory entry to read. This number of bits is determined by the size of the directory. As in the example of FIG. 1 , if the directory is 4 ( 2 2 ), only 2 bits are used, and if the size of the directory is 8 ( 2 3 ), 3 bits are used. In the example of FIG. 1, 2 bits are used. Since the least significant 2 bits (LSB), that is, the 2 bits are 10 (2) , among the four directory entries, the binary number 10 (2) , that is, the third pointer whose index is 2 in the array is used to find the bucket.

도 1의 예시에서는 버켓(Bucket) B3이 사용된다. 디렉토리를 찾는데 사용되는 비트의 수를 디렉토리의 글로벌 깊이(Global Depth, G)라고 부른다. 개별 버켓은 자신의 로컬 깊이(Local Depth)를 가지는데, 그 이유는 하나의 버켓이 여러 디렉토리 엔트리가 가리킬 수 있기 때문이다. 도 1의 예시에서와 같이 글로벌 깊이가 2이고 로컬 깊이가 1인 버켓(Bucket) B2는 2개의 디렉토리 엔트리가 가리키게 된다. 만일 글로벌 깊이가 3이고 로컬 깊이가 1이면 그 버켓은 2(3-1) 개의 디렉토리 엔트리가 가리키게 된다.In the example of Figure 1, the bucket (Bucket) B3 is used. The number of bits used to find a directory is called the global depth (G) of the directory. Each bucket has its own Local Depth because a single bucket can be pointed to by multiple directory entries. As in the example of FIG. 1 , two directory entries point to bucket B2 having a global depth of 2 and a local depth of 1. If the global depth is 3 and the local depth is 1, the bucket is pointed to by 2 (3-1) directory entries.

도 1에서 버켓 B2에 새로운 데이터를 저장하고자 했으나 공간이 부족하다면, 새로운 버켓 2개를 만들어 데이터를 분할 저장해야 한다. 도 1에서 버켓(Bucket) B2는 로컬 깊이가 1이기 때문에 짙은 검은색으로 표시된 하나의 비트만을 사용해 버켓(Bucket) B2에 저장되었으나, 버켓이 분할된다면 로컬 깊이를 하나 증가시켜 로컬 깊이가 2인 두 개의 버켓 B4와 B5가 도 2와 같이 만들어진다. In FIG. 1 , if new data is to be stored in bucket B2, but space is insufficient, two new buckets should be created and data should be divided and stored. In Figure 1, Bucket B2 is stored in Bucket B2 using only one bit marked in dark black because the local depth is 1, but if the bucket is divided, the local depth is increased by one and the two local depths are 2 Dog buckets B4 and B5 are made as shown in FIG. 2 .

도 2는 종래의 익스텐더블 해시의 분할 예시를 설명하기 위한 도면이다.2 is a diagram for explaining an example of a conventional splitting of an extendable hash.

공간이 부족한 버켓에 저장되어 있던 데이터들은 증가된 로컬 깊이 즉, 2비트 값에 따라 첫 번째 새로운 버켓인 버켓 B4 혹은 두 번째 새로운 버켓인 버켓 B5에 복사된다. 마지막 2비트가 01(2)인 데이터는 첫 번째 새로 만들어진 버켓 B4, 11인 데이터는 두 번째 새로 만들어진 버켓 B5로 복사된다. 이 분할 과정을 마친 뒤에는 버켓(Bucket) B2를 가리키고 있던 디렉토리 엔트리들을 업데이트한다. 즉, 01(2) 디렉토리 엔트리는 01(2)에 해당하는 데이터를 가지고 있는 새로운 버켓 B4를 가리키게 되고, 11(2) 디렉토리 엔트리는 11(2)에 해당하는 데이터를 가지고 있는 새로운 버켓 B5를 가리켜야 한다. The data stored in the bucket with insufficient space is copied to the first new bucket, bucket B4, or the second new bucket, bucket B5, according to the increased local depth, that is, a 2-bit value. The data whose last 2 bits are 01 (2) is copied to the first newly created bucket B4, and the data with 11 is copied to the second newly created bucket B5. After completing this partitioning process, the directory entries pointing to Bucket B2 are updated. That is, the directory entry 01 ( 2) points to the new bucket B4 containing the data corresponding to 01 (2), and the directory entry 11 (2) points to the new bucket B5 containing the data corresponding to 11 (2) . should go

도 3은 익스텐더블 해시의 디렉토리 확장의 예시를 설명하기 위한 도면이다.3 is a diagram for explaining an example of directory extension of an extendable hash.

만일 로컬 깊이가 K이고, 글로벌 깊이도 K라면, 그 버켓은 하나의 디렉토리 엔트리만 가리키고 있는 상황이다. 도 2의 예에서 버켓(Bucket) B3가 분할되는 경우를 가정해보자. 버켓(Bucket) B3의 로컬 깊이는 2이고(Local depth=2), 디렉토리의 글로벌 깊이도 2이다(G=2). 이 경우 버켓(Bucket) B3가 분할되어 로컬 깊이가 3인 새로운 버켓 B6와 B7가 만들어졌을 때, 로컬 깊이만큼의 비트를 사용하여 데이터를 B6 혹은 B7로 복사한다. 즉, 버켓(Bucket) B3에 있던 1101...10001010(2) 은 최하위 3비트인 010(2)에 해당하는 버켓 B6로 복사되고, 010...01101110(2) 은 110(2)에 해당하는 버켓 B7로 복사된다. 그러나, 이 새로운 버켓 B6와 B7를 가리킬 포인터를 디렉토리에 저장할 수 없다. 따라서, 로컬 깊이와 글로벌 깊이가 서로 같은 경우에 버켓이 분할되면 디렉토리를 도 3과 같이 2배 크게 만들어줘야 한다. 이 연산을 디렉토리 확장(Directory Doubling)이라 한다. 즉, 글로벌 깊이가 3이면서 (23) 8개의 디렉토리 엔트리를 저장할 수 있는 디렉토리가 새로 만들어진다. 이때 분할되지 않은 다른 버켓들은 포인터가 복사되어 새로운 디렉토리 엔트리들이 이중으로 가리키게 된다. 즉, 00에 의해 가리켜지던 Bucket B1은 000(2) 뿐 아니라 100(2) 디렉토리 엔트리에 의해 가리켜진다. If the local depth is K and the global depth is K, then the bucket points to only one directory entry. Assume that in the example of Figure 2, the bucket (Bucket) B3 is divided. The local depth of Bucket B3 is 2 (Local depth=2), and the global depth of the directory is also 2 (G=2). In this case, when bucket B3 is partitioned and new buckets B6 and B7 having a local depth of 3 are created, data is copied to B6 or B7 using bits as many as the local depth. That is, 1101...10001010 (2) in bucket B3 is copied to bucket B6 corresponding to 010 (2) , which is the least significant 3 bits, and 010...01101110 (2) corresponds to 110 (2) . is copied to bucket B7. However, it is not possible to store pointers to these new buckets B6 and B7 in the directory. Therefore, if the bucket is divided when the local depth and the global depth are the same, the directory needs to be made twice as large as in FIG. 3 . This operation is called Directory Doubling. That is, a directory with a global depth of 3 (2 3 ) that can store 8 directory entries is created. At this time, pointers to other unpartitioned buckets are copied and new directory entries are double pointed. That is, Bucket B1 pointed to by 00 is pointed to not only by 000 (2) but also by 100 (2) directory entries.

위에 기술한 익스텐더블 해싱(Extendible Hashing)은 오라클(Oracle)의 ZFS 등 다양한 파일 시스템에 사용되고 있다. 그러나, 버켓의 크기가 4KB 혹은 8KB 크기에 맞춰져 있어, 디스크 기반 시스템에만 성능이 최적화되어 있다. 즉, 인-메모리 시스템(In-memory System)에 맞는 자료구조는 아니다. 만일 이 익스텐더블 해싱(extendible Hashing)을 그대로 인-메모리 시스템에 적용할 경우 디렉토리를 통해 버켓을 찾은 뒤 버켓 내부에 모든 데이터들을 하나씩 다 읽어야 한다. 또한, 최근 개발되고 있는 인텔(Intel) 3D 크로스포인트(Xpoint), STT-MRAM(Spin Transfer Torque-Magnetic Random Access Memory), PCRAM(Phase-change memory) 등의 바이트 단위 접근이 가능하면서 비휘발성인 메모리 상에서 활용하기 위해서는 8바이트 연산들로 자료구조를 업데이트하더라도 자료구조가 항상 일관성(Consistency)을 지켜야 하는데, 종래의 익스텐더블 해싱(Extendible Hashing)은 이러한 8바이트 연산들에 대해 일관성을 지키지 못하는 문제점이 있다.The extendable hashing described above is used in various file systems such as Oracle's ZFS. However, since the size of the bucket is set to 4KB or 8KB, performance is optimized only for disk-based systems. That is, it is not a data structure suitable for an in-memory system. If this extendable hashing is applied to the in-memory system as it is, the bucket must be searched through the directory and all data in the bucket must be read one by one. In addition, non-volatile memory that can be accessed in units of bytes, such as Intel 3D Xpoint, STT-MRAM (Spin Transfer Torque-Magnetic Random Access Memory), and PCRAM (Phase-change memory), which are being developed recently. In order to utilize the data structure, even if the data structure is updated with 8-byte operations, the data structure must always maintain consistency. .

본 발명의 실시예들은 디렉토리를 통해 참조되는 적어도 하나의 버켓이 포함된 세그먼트를 이용함으로써, 메모리 캐시라인 접근을 최소화할 수 있는, 캐시라인 컨시어스 익스텐더블 해싱 방법 및 장치를 제공하고자 한다.SUMMARY Embodiments of the present invention provide a method and apparatus for concise extendable hashing of a cache line, which can minimize access to a memory cache line by using a segment including at least one bucket referenced through a directory.

본 발명의 실시예들은 종래의 익스텐더블 해싱(Extendible Hashing)이 비휘발성 메모리를 위해 제공하지 못하던 결함원자성(Failure-atomicity)을 제공하고, 더 적은 캐시라인(Cacheline)의 접근으로 비휘발성 메모리를 더 효율적으로 사용할 수 있는, 캐시라인 컨시어스 익스텐더블 해싱 방법 및 장치를 제공하고자 한다.Embodiments of the present invention provide failure-atomicity that conventional extendable hashing could not provide for non-volatile memory, and reduce non-volatile memory by accessing fewer cache lines. It is an object of the present invention to provide a method and apparatus for cashline concise extendable hashing that can be used more efficiently.

본 발명의 일 실시예에 따르면, 캐시라인 컨시어스 익스텐더블 해싱(Cacheline Conscious Extendible Hashing) 장치에 의해 수행되는 익스텐더블 해싱 방법에 있어서, 해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하는 단계; 상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하는 단계; 및 상기 확인된 버켓에 상기 해시 키에 대응되는 데이터를 저장하는 단계를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법이 제공될 수 있다.According to an embodiment of the present invention, in an extendable hashing method performed by a Cacheline Conscious Extendible Hashing device, a directory using a first index of a hash key ) to check the referenced segment (Segment) through; identifying a bucket to be accessed within the identified segment using a second index of the hash key; and storing data corresponding to the hash key in the checked bucket, a cash line concierge extendable hashing method may be provided.

상기 방법은, 상기 해시 키의 글로벌 깊이(Global depth) 비트값을 확인하는 단계를 더 포함할 수 있다. The method may further include checking a global depth bit value of the hash key.

상기 해시 키의 제1 인덱스는, 상기 해시 키의 최상위 비트(Most Significant Bit, MSB)를 포함할 수 있다.The first index of the hash key may include a Most Significant Bit (MSB) of the hash key.

상기 해시 키의 제2 인덱스는, 상기 해시 키의 최하위 비트(Least Significant Bit, LSB)를 포함할 수 있다.The second index of the hash key may include a least significant bit (LSB) of the hash key.

상기 세그먼트를 확인하는 단계는, 상기 해시 키의 제1 인덱스에 대응되는 디렉토리 엔트리를 탐색하고, 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인할 수 있다.The checking of the segment may include searching a directory entry corresponding to the first index of the hash key, and checking a segment referenced through the searched directory entry.

상기 방법은, 상기 해시 키의 제2 인덱스를 이용하여 세그먼트에 접근하는 경우에 충돌이 발생하면 세그먼트를 분할하는 단계를 더 포함할 수 있다.The method may further include dividing the segment when a collision occurs when the segment is accessed using the second index of the hash key.

상기 세그먼트를 분할하는 단계는, 로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 상기 확인된 세그먼트의 데이터를 스캔하여 상기 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 상기 생성된 새로운 세그먼트에 복사할 수 있다.In the segmenting of the segment, a new segment having an increased local depth is generated, data of the identified segment is scanned, and data having a preset bit value corresponding to the increased local depth is generated. can be copied to a new segment.

상기 세그먼트를 분할하는 단계는, 상기 분할된 세그먼트의 로컬 깊이(Local depth)를 증가시키고 상기 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정할 수 있다.In the segmenting of the segment, a local depth of the segmented segment may be increased and data having another predetermined bit value corresponding to the increased local depth may be designated as an invalid key.

상기 세그먼트를 분할하는 단계는, 상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시킬 수 있다.The dividing of the segment may include increasing a local depth of the identified segment, updating a pointer of a directory entry, and increasing a local depth of the segmented segment.

상기 방법은, 상기 세그먼트가 분할되는 경우, 디렉토리를 갱신할 때 디렉토리 엔트리들을 버디(buddy)라는 쌍으로 묶는 단계를 더 포함할 수 있다.The method may further include tying directory entries into pairs called buddys when updating the directory when the segment is segmented.

상기 방법은, 세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 상기 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행하는 단계를 더 포함할 수 있다.The method may further include identifying a segment in which a system problem occurs using the global depth and the local depth of the segment, and performing recovery of the segment in which the system problem occurs using the buddy.

한편, 본 발명의 다른 실시예에 따르면, 적어도 하나의 프로그램을 저장하고, 디렉토리를 통해 참조되는 적어도 하나의 버켓이 포함된 세그먼트를 저장하는 메모리; 및 상기 메모리와 캐시를 통해 연결된 프로세서를 포함하고, 상기 프로세서는, 상기 적어도 하나의 프로그램을 실행함으로써, 해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하고, 상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하고, 상기 확인된 버켓에 상기 해시 키에 대응되는 데이터를 쓰거나 읽는, 캐시라인 컨시어스 익스텐더블 해싱 장치가 제공될 수 있다.On the other hand, according to another embodiment of the present invention, a memory for storing at least one program and for storing a segment including at least one bucket referenced through a directory; and a processor connected to the memory through a cache, wherein the processor, by executing the at least one program, uses a first index of a hash key to refer to a segment referenced through a directory ), check a bucket to be accessed within the identified segment using the second index of the hash key, and write or read data corresponding to the hash key to the checked bucket A Sears extendable hashing device may be provided.

상기 프로세서는, 상기 해시 키의 글로벌 깊이(Global depth) 비트값을 확인하는 단계를 더 포함할 수 있다. The processor may further include checking a global depth bit value of the hash key.

상기 해시 키의 제1 인덱스는, 상기 해시 키의 최상위 비트(Most Significant Bit, MSB)를 포함할 수 있다.The first index of the hash key may include a Most Significant Bit (MSB) of the hash key.

상기 해시 키의 제2 인덱스는, 상기 해시 키의 최하위 비트(Least Significant Bit, LSB)를 포함할 수 있다.The second index of the hash key may include a least significant bit (LSB) of the hash key.

상기 프로세서는, 상기 해시 키의 제1 인덱스에 대응되는 디렉토리 엔트리를 탐색하고, 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인할 수 있다.The processor may search for a directory entry corresponding to the first index of the hash key, and identify a segment referenced through the searched directory entry.

상기 프로세서는, 상기 해시 키의 제2 인덱스를 이용하여 세그먼트에 접근하는 경우에 충돌이 발생하면 세그먼트를 분할할 수 있다.The processor may divide the segment when a collision occurs when the segment is accessed using the second index of the hash key.

상기 프로세서는, 로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 상기 확인된 세그먼트의 데이터를 스캔하여 상기 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 상기 생성된 새로운 세그먼트에 복사할 수 있다.The processor generates a new segment having an increased local depth, scans data of the identified segment, and adds data having a preset bit value corresponding to the increased local depth to the generated new segment. can be copied.

상기 프로세서는, 상기 분할된 세그먼트의 로컬 깊이(Local depth)를 증가시키고 상기 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정할 수 있다.The processor may increase a local depth of the divided segment and designate data having a different bit value corresponding to the increased local depth as an invalid key.

상기 프로세서는, 상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시킬 수 있다.The processor may increase a local depth of the identified segment, update a pointer of a directory entry, and increase a local depth of the divided segment.

상기 프로세서는, 상기 확인된 세그먼트가 분할되는 경우, 디렉토리를 갱신할 때 디렉토리 엔트리들을 버디(buddy)라는 쌍으로 묶을 수 있다.When the identified segment is segmented, the processor may pair directory entries with a buddy when updating the directory.

상기 프로세서는, 세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 상기 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행할 수 있다.The processor may identify a segment in which a system problem has occurred using the global depth and the local depth of the segment, and may perform recovery of the segment in which the system problem has occurred using the buddy.

한편, 본 발명의 다른 실시예에 따르면, 프로세서에 의해 실행 가능한 적어도 하나의 프로그램을 포함하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 적어도 하나의 프로그램은 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금: 해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하고, 상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하고, 상기 확인된 버켓에 상기 해시 키에 대응되는 키 값을 삽입하게 하는 명령어들을 포함하는, 비 일시적 컴퓨터 판독 가능한 저장 매체가 제공될 수 있다.Meanwhile, according to another embodiment of the present invention, there is provided a non-transitory computer-readable storage medium including at least one program executable by a processor, wherein the at least one program, when executed by the processor, causes the processor to: A segment referenced through a directory is identified using a first index of a hash key, and a bucket to be accessed within the identified segment using a second index of the hash key ), and a non-transitory computer-readable storage medium including instructions for inserting a key value corresponding to the hash key into the checked bucket may be provided.

본 발명의 실시예들은 디렉토리를 통해 참조되는 적어도 하나의 버켓이 포함된 세그먼트를 이용함으로써, 메모리 캐시라인 접근을 최소화할 수 있다.Embodiments of the present invention may minimize memory cache line access by using a segment including at least one bucket referenced through a directory.

본 발명의 실시예들은 종래의 익스텐더블 해싱(Extendible Hashing)이 비휘발성 메모리를 위해 제공하지 못하던 결함원자성(Failure-atomicity)을 제공하고, 더 적은 캐시라인(Cacheline)의 접근으로 비휘발성 메모리를 더 효율적으로 사용할 수 있다.Embodiments of the present invention provide failure-atomicity that conventional extendable hashing could not provide for non-volatile memory, and reduce non-volatile memory by accessing fewer cache lines. can be used more efficiently.

도 1은 종래의 익스텐더블 해싱 자료구조를 설명하기 위한 도면이다.
도 2는 종래의 익스텐더블 해시의 분할 예시를 설명하기 위한 도면이다.
도 3은 익스텐더블 해시의 디렉토리 확장의 예시를 설명하기 위한 도면이다.
도 4는 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치의 구성을 설명하기 위한 구성도이다.
도 5 내지 도 7은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치의 동작을 설명하기 위한 도면이다.
도 8은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 동작을 설명하기 위한 순서도이다.
도 9는 본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 동작에서 새로운 세그먼트 생성 동작을 설명하기 위한 도면이다.
도 10은 본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 동작에서 분리 및 느린 삭제 동작을 설명하기 위한 도면이다.
도 11 내지 도 13은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 동작에서 트리 형태의 세그먼트 분리 동작을 설명하기 위한 도면이다.
도 14는 본 발명의 일 실시예에 따른 복구 알고리즘의 수도 코드를 설명하기 위한 도면이다.
도 15는 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법에서 삽입 연산 동작을 설명하기 위한 순서도이다.
도 16은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법에서 분할 연산 동작을 설명하기 위한 순서도이다.
도 17은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법에서 복구 연산 동작을 설명하기 위한 순서도이다.
도 18a 내지 도 18c는 본 발명의 실시예와 종래 기술에 대해 다양한 세그먼트/버켓 크기를 갖는 처리량의 실험 결과를 나타낸 도면이다.
도 19a 내지 도 19d는 본 발명의 실시예와 종래 기술에 대해 비휘발성 메모리의 R/W 레이턴시를 변화시키면서 삽입에 소요된 시간을 나타낸 도면이다.
도 20a 내지 도 20c는 본 발명의 실시예와 종래 기술에 대해 레이턴시 CDF 및 삽입/검색 처리량에 대한 동시 실행 성능을 나타낸 도면이다.
1 is a diagram for explaining a conventional extendable hashing data structure.
2 is a diagram for explaining an example of a conventional splitting of an extendable hash.
3 is a diagram for explaining an example of directory extension of an extendable hash.
4 is a configuration diagram for explaining the configuration of a cache line concise extendable hashing apparatus according to an embodiment of the present invention.
5 to 7 are diagrams for explaining the operation of the cash line concierge extendable hashing apparatus according to an embodiment of the present invention.
8 is a flowchart for explaining a cache line concise extendable hashing operation according to an embodiment of the present invention.
9 is a diagram for explaining a new segment creation operation in the cache line-conciliation extendable hashing operation according to an embodiment of the present invention.
FIG. 10 is a diagram for explaining a separation and a slow delete operation in a cache line-conscious extendable hashing operation according to an embodiment of the present invention.
11 to 13 are diagrams for explaining a tree-type segment separation operation in the cache line concierge extendable hashing operation according to an embodiment of the present invention.
14 is a diagram for explaining a pseudo code of a recovery algorithm according to an embodiment of the present invention.
15 is a flowchart for explaining an insert operation in the method of cache line concise extendable hashing according to an embodiment of the present invention.
16 is a flowchart for explaining a division operation in the method of cache line concise extendable hashing according to an embodiment of the present invention.
17 is a flowchart for explaining a recovery operation in the method of cache line concise extendable hashing according to an embodiment of the present invention.
18A to 18C are diagrams illustrating experimental results of throughput with various segment/bucket sizes for an embodiment of the present invention and the prior art.
19A to 19D are diagrams illustrating the time taken for insertion while changing the R/W latency of a non-volatile memory according to an embodiment of the present invention and the prior art.
20A to 20C are diagrams illustrating concurrent execution performance for latency CDF and insert/retrieve throughput for an embodiment of the present invention and the prior art.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 실시예를 가질 수 있는바, 특정 실시예들을 도면에 예시하고 상세하게 설명하고자 한다.Since the present invention can have various changes and can have various embodiments, specific embodiments are illustrated in the drawings and described in detail.

그러나 이는 본 발명을 특정한 실시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다.However, this is not intended to limit the present invention to specific embodiments, and it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention.

제1, 제2 등의 용어는 다양한 구성요소들을 설명하는데 사용될 수 있지만, 상기 구성요소들은 상기 용어들에 의해 한정되어서는 안 된다. 상기 용어들은 하나의 구성요소를 다른 구성요소로부터 구별하는 목적으로만 사용된다. 예를 들어, 본 발명의 권리 범위를 벗어나지 않으면서 제1 구성요소는 제2 구성요소로 명명될 수 있고, 유사하게 제2 구성요소도 제1 구성요소로 명명될 수 있다. 및/또는 이라는 용어는 복수의 관련된 기재된 항목들의 조합 또는 복수의 관련된 기재된 항목들 중의 어느 항목을 포함한다.Terms such as first, second, etc. may be used to describe various elements, but the elements should not be limited by the terms. The above terms are used only for the purpose of distinguishing one component from another. For example, without departing from the scope of the present invention, a first component may be referred to as a second component, and similarly, a second component may also be referred to as a first component. and/or includes a combination of a plurality of related listed items or any of a plurality of related listed items.

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. When an element is referred to as being “connected” or “connected” to another element, it is understood that it may be directly connected or connected to the other element, but other elements may exist in between. it should be On the other hand, when it is said that a certain element is "directly connected" or "directly connected" to another element, it should be understood that the other element does not exist in the middle.

본 출원에서 사용한 용어는 단지 특정한 실시예를 설명하기 위해 사용된 것으로, 본 발명을 한정하려는 의도가 아니다. 단수의 표현은 문맥상 명백하게 다르게 뜻하지 않는 한, 복수의 표현을 포함한다. 본 출원에서, "포함하다" 또는 "가지다" 등의 용어는 명세서상에 기재된 특징, 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것이 존재함을 지정하려는 것이지, 하나 또는 그 이상의 다른 특징들이나 숫자, 단계, 동작, 구성요소, 부품 또는 이들을 조합한 것들의 존재 또는 부가 가능성을 미리 배제하지 않는 것으로 이해되어야 한다.The terms used in the present application are only used to describe specific embodiments, and are not intended to limit the present invention. The singular expression includes the plural expression unless the context clearly dictates otherwise. In the present application, terms such as “comprise” or “have” are intended to designate that a feature, number, step, operation, component, part, or combination thereof described in the specification exists, but one or more other features It should be understood that this does not preclude the existence or addition of numbers, steps, operations, components, parts, or combinations thereof.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가진 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless defined otherwise, all terms used herein, including technical and scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. Terms such as those defined in a commonly used dictionary should be interpreted as having a meaning consistent with the meaning in the context of the related art, and should not be interpreted in an ideal or excessively formal meaning unless explicitly defined in the present application. does not

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 본 발명을 설명함에 있어 전체적인 이해를 용이하게 하기 위하여 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다.Hereinafter, preferred embodiments of the present invention will be described in more detail with reference to the accompanying drawings. In describing the present invention, in order to facilitate the overall understanding, the same reference numerals are used for the same components in the drawings, and duplicate descriptions of the same components are omitted.

도 4는 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치의 구성을 설명하기 위한 구성도이다.4 is a configuration diagram for explaining the configuration of a cache line concise extendable hashing apparatus according to an embodiment of the present invention.

도 4에 도시된 바와 같이, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는, 프로세서(110), 캐시(120) 및 메모리(130)를 포함한다. 그러나 도시된 구성요소 모두가 필수 구성요소인 것은 아니다. 도시된 구성요소보다 많은 구성요소에 의해 캐시라인 컨시어스 익스텐더블 해싱 장치(100)가 구현될 수도 있고, 그보다 적은 구성요소에 의해서도 캐시라인 컨시어스 익스텐더블 해싱 장치(100)가 구현될 수 있다.As shown in FIG. 4 , the cache line concierge extendable hashing apparatus 100 according to an embodiment of the present invention includes a processor 110 , a cache 120 , and a memory 130 . However, not all illustrated components are essential components. The cashline concierge extendable hashing apparatus 100 may be implemented by more components than the illustrated components, and the cashline conciuous extendable hashing apparatus 100 may be implemented by fewer components.

이하, 도 4의 캐시라인 컨시어스 익스텐더블 해싱 장치(100)의 각 구성요소들의 구체적인 구성 및 동작을 설명한다.Hereinafter, a detailed configuration and operation of each component of the cache line concierge extendable hashing apparatus 100 of FIG. 4 will be described.

메모리(130)는 적어도 하나의 프로그램을 저장한다. 메모리(130)는 파일 시스템 또는 데이터베이스를 포함할 수 있다. 메모리(130)는 디렉토리를 통해 참조되는 적어도 하나의 버켓이 포함된 세그먼트를 저장한다. 여기서, 메모리(130)는 비휘발성 메모리(Non-volatile memory, NVM, NVRAM) 또는 휘발성 메모리(volatile memory)일 수 있다. The memory 130 stores at least one program. The memory 130 may include a file system or a database. The memory 130 stores a segment including at least one bucket referenced through a directory. Here, the memory 130 may be a non-volatile memory (NVM, NVRAM) or a volatile memory.

프로세서(110)는 메모리(130)와 캐시(120)를 통해 연결된다. 프로세서(110)는 캐시(120)의 캐시라인을 통해 메모리의 파일 시스템에 있는 버켓에 데이터를 저장하거나 버켓에 저장된 데이터를 읽을 수 있다. The processor 110 is connected through the memory 130 and the cache 120 . The processor 110 may store data in or read data stored in the bucket in the file system of the memory through the cache line of the cache 120 .

프로세서(110)는, 적어도 하나의 프로그램을 실행함으로써, 해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하고, 해시 키의 제2 인덱스를 이용하여 그 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하고, 그 확인된 버켓에 해시 키에 대응되는 데이터를 저장한다. 여기서, 프로세서(110)는 해시 키의 제2 인덱스를 이용하여 세그먼트 내 복수의 버켓 중 하나의 버켓에 바로 접근할 수 있다.The processor 110, by executing at least one program, by using the first index of the hash key (Hash key) to identify the segment referenced through the directory (Directory), the second index of the hash key Checks the bucket to be accessed within the identified segment using the method, and stores the data corresponding to the hash key in the checked bucket. Here, the processor 110 may directly access one of the plurality of buckets in the segment by using the second index of the hash key.

다양한 실시예에서, 프로세서(110)는 해시 키의 글로벌 깊이(Global depth) 비트값을 확인할 수 있다.In various embodiments, the processor 110 may check a global depth bit value of the hash key.

다양한 실시예에서, 해시 키의 제1 인덱스는 해시 키의 최상위 비트(Most Significant Bit, MSB)를 포함할 수 있다.In various embodiments, the first index of the hash key may include a Most Significant Bit (MSB) of the hash key.

다양한 실시예에서, 해시 키의 제2 인덱스는 해시 키의 최하위 비트(Least Significant Bit, LSB)를 포함할 수 있다.In various embodiments, the second index of the hash key may include a least significant bit (LSB) of the hash key.

다양한 실시예에서, 프로세서(110)는 해시 키의 제1 인덱스에 대응되는 디렉토리 엔트리를 탐색하고, 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인할 수 있다.In various embodiments, the processor 110 may search for a directory entry corresponding to the first index of the hash key, and identify a segment referenced through the searched directory entry.

다양한 실시예에서, 프로세서(110)는 해시 키의 제2 인덱스를 이용하여 세그먼트에 접근하는 경우에 충돌이 발생하면 세그먼트를 분할할 수 있다.In various embodiments, the processor 110 may divide the segment when a collision occurs when the segment is accessed using the second index of the hash key.

다양한 실시예에서, 프로세서(110)는 로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 확인된 세그먼트의 데이터를 스캔하여 그 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 그 생성된 새로운 세그먼트에 복사할 수 있다. 일례로, 프로세서(110)는 증가시킨 로컬 깊이에 해당하는 제2 인덱스의 비트 값이 1인 데이터를 새로운 세그먼트에 복사하고 해당 디렉토리 엔트리의 포인터를 업데이트할 수 있다. In various embodiments, the processor 110 generates a new segment with an increased local depth, scans data of the identified segment, and generates data having a preset bit value corresponding to the increased local depth. It can be copied to a new segment that has been created. For example, the processor 110 may copy data in which the bit value of the second index corresponding to the increased local depth is 1 to a new segment and update the pointer of the corresponding directory entry.

다양한 실시예에서, 프로세서(110)는 분할되는 세그먼트의 로컬 깊이(Local depth)를 증가시키고, 그 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정할 수 있다. 일례로, 프로세서(110)는 제 2 인덱스의 증가시킨 로컬 깊이(Local depth)에 해당하는 비트 값이 0인 데이터를 분할되는 세그먼트에서 지우지 않고, 로컬 깊이만 8바이트 연산으로 증가시킴으로써, 지우지 않은 데이터가 유효하지 않은 키가 되게 만들 수 있다. 즉, 지우지 않은 데이터는 유효하지 않은 키로 간주되고, 다른 데이터에 의해 덮어 써질 수 있다.In various embodiments, the processor 110 may increase the local depth of the segment to be divided, and may designate data having another predetermined bit value corresponding to the increased local depth as an invalid key. For example, the processor 110 does not erase data having a bit value of 0 corresponding to the increased local depth of the second index from the segment to be divided, and increases only the local depth by an 8-byte operation, so that the unerased data can make it an invalid key. That is, data that is not erased is regarded as an invalid key and may be overwritten by other data.

다양한 실시예에서, 프로세서(110)는 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 분할된 세그먼트의 로컬 깊이를 증가시킬 수 있다. 일례로, 프로세서(110)는 디렉토리 엔트리(Directory entry)의 포인터(Pointer) 중 업데이트되는 포인터(Pointer)를 제2 인덱스 값이 큰 포인터부터 제2 인덱스 값이 작은 포인터 순서로 업데이트할 수 있다. 다른 예로, 프로세서(110)는 디렉토리 엔트리(Directory entry)의 포인터(Pointer) 중 업데이트되는 포인터(Pointer)를 제2 인덱스 값이 작은 포인터부터 제2 인덱스 값이 큰 포인터 순서로 업데이트할 수 있다. 이후, 프로세서(110)는 업데이트 하는 순서의 반대 방향으로 복구 동작을 수행하여 복구할 수 있다. In various embodiments, the processor 110 may increase the local depth of the identified segment, update a pointer of a directory entry, and increase the local depth of the segmented segment. For example, the processor 110 may update updated pointers among pointers of a directory entry in the order of a pointer having a larger second index value to a pointer having a smaller second index value. As another example, the processor 110 may update updated pointers among pointers of a directory entry in the order of a pointer having a small second index value to a pointer having a large second index value. Thereafter, the processor 110 may recover by performing a recovery operation in the opposite direction to the updating order.

다양한 실시예에서, 프로세서(110)는 확인된 세그먼트가 분할되는 경우, 디렉토리를 갱신할 때 디렉토리 엔트리들을 버디(buddy)라는 쌍으로 묶을 수 있다.In various embodiments, the processor 110 may pair the directory entries with a buddy when updating the directory when the identified segments are segmented.

다양한 실시예에서, 프로세서(110)는 세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행할 수 있다. In various embodiments, the processor 110 may identify a segment in which a system problem has occurred using the global depth and the local depth of the segment, and may perform recovery of the segment in which the system problem has occurred using the buddy.

도 5 내지 도 7은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치의 동작을 설명하기 위한 도면이다.5 to 7 are diagrams for explaining the operation of the cash line concierge extendable hashing apparatus according to an embodiment of the present invention.

바이트 단위 접근이 가능한 메모리와 CPU 간의 데이터 전송 단위는 최신 CPU에서 64 바이트의 캐시라인(Cacheline)이다. 만일 종래의 8KB 버켓을 사용한다면, 하나의 데이터를 찾기 위해 128개의 캐시라인으로 구성된 버켓을 읽어야 하므로, 총 128번 메모리에 접근하게 된다. 디스크 기반의 익스텐더블 해싱(Extendible Hashing)과 달리 인-메모리 해시 테이블은 버켓의 크기를 디스크 블록의 크기에 맞출 필요가 없다. 만일 버켓 크기를 64 바이트로 정하면, 하나의 버켓을 읽기 위해 하나의 캐시라인을 읽으면 되므로 총 한 번의 메모리 접근이 필요하다. The unit of data transfer between memory and CPU that can be accessed in bytes is a 64-byte cacheline in modern CPUs. If a conventional 8KB bucket is used, a bucket consisting of 128 cache lines must be read to find one data, so a total of 128 memory is accessed. Unlike disk-based extendable hashing, an in-memory hash table does not have to match the size of the bucket to the size of the disk block. If the bucket size is set to 64 bytes, a total of one memory access is required because one cache line is read to read one bucket.

그러나, 만일 버켓(Bucket)의 크기가 하나의 캐시라인(Cacheline)이라면, 64바이트 캐시라인마다 디렉토리 엔트리가 하나씩 필요한 익스텐더블 해싱(Extendible Hashing)의 특징으로 인해, 디렉토리의 크기가 매우 커지는 단점이 있다. However, if the size of the bucket is one cacheline, there is a disadvantage in that the size of the directory becomes very large due to the characteristic of extendable hashing, which requires one directory entry for every 64-byte cacheline. .

본 발명의 일 실시예에서는 이러한 익스텐더블 해싱(Extendible Hashing) 방법을 변형하여 바이트 단위 접근이 가능한 메모리에 적합하게 캐시라인-컨시어스 익스텐더블 해싱(Cacheline-Conscious Extendible Hashing, CCEH) 방법을 제공하고자 한다. 본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱(Cacheline-Conscious Extendible Hashing, 이하 CCEH)은 익스텐더블 해싱(Extendible Hashing)의 변형으로 종래의 익스텐더블 해싱(Extendible Hashing)이 비휘발성 메모리를 위해 제공하지 못하던 결함 원자성(Failure-atomicity)을 제공하고, 더 적은 캐시라인(Cacheline)의 접근으로 비휘발성 메모리를 더 효율적으로 사용할 수 있는, 익스텐더블 해싱(Extendible Hashing) 방법이다. CCEH는 종래의 디렉토리(Directory)와 버켓(Bucket)으로 이루어진 2단 구조에서 세그먼트(Segment)라는 계층을 두어 캐시라인(Cacheline)을 효율적으로 관리할 수 있다.An embodiment of the present invention is to provide a Cacheline-Conscious Extendible Hashing (CCEH) method suitable for a memory that can be accessed in units of bytes by modifying the extendable hashing method. . Cacheline-Conscious Extendible Hashing (CCEH) according to an embodiment of the present invention is a modification of extendable hashing, and conventional extendable hashing is a non-volatile memory It is an extendable hashing method that provides failure-atomicity that could not be provided for , and can use non-volatile memory more efficiently with fewer cacheline accesses. The CCEH can efficiently manage the cacheline by placing a layer called a segment in the conventional two-tier structure consisting of a directory and a bucket.

본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치가 비휘발성 메모리(Persistent Memory, PM) 기반 파일 시스템 또는 데이터베이스를 포함하여 동작하는 예시가 도 5에 도시되어 있다. FIG. 5 shows an example in which the cache line concierge extendable hashing device according to an embodiment of the present invention operates including a non-volatile memory (Persistent Memory, PM)-based file system or database.

도 5에 도시된 바와 같이, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치는, CPU(210), CPU 캐시(CPU Cache)(220), 비휘발성 메모리(Persistent Memory, PM)(230)를 포함한다. 여기서, 비휘발성 메모리(230)는 PM 기반 파일 시스템(231) 또는 PM 기반 데이터베이스를 포함할 수 있다. 비휘발성 메모리(230) 대신에 DRAM(Dynamic random-access memory)이 사용될 수 있다.As shown in FIG. 5 , the cache line concise extendable hashing device according to an embodiment of the present invention includes a CPU 210 , a CPU cache 220 , and a non-volatile memory (Persistent Memory, PM). (230). Here, the non-volatile memory 230 may include a PM-based file system 231 or a PM-based database. A dynamic random-access memory (DRAM) may be used instead of the non-volatile memory 230 .

CPU(210)는 CPU 캐시(220)의 캐시라인을 통해 해시 키의 인덱스가 참조하는 디렉토리 엔트리를 확인하고, 해당 디렉토리 엔트리가 가리키는 세그먼트 내에서의 버켓에 접근하고자 한다.The CPU 210 checks the directory entry referenced by the index of the hash key through the cache line of the CPU cache 220, and attempts to access the bucket in the segment indicated by the directory entry.

도 6에 도시된 바와 같이, CPU(210)는 해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인할 수 있다. 즉, CPU(210)는 세그먼트 인덱스(Segment Index)를 사용하여 어느 디렉토리 엔트리(Directory Entry)를 참조할 것인지 결정할 수 있다. 여기서, 세그먼트 인덱스(Segment Index)는 제1 인덱스로 지칭될 수 있다. 도 6의 예시에서는 최상위 2비트에 해당하는 세그먼트 인덱스 10(2)를 사용하여 디렉토리 엔트리 010(2)를 참조하는 것으로 확인할 수 있다. As shown in FIG. 6 , the CPU 210 may identify a segment referenced through a directory by using a first index of a hash key. That is, the CPU 210 may determine which directory entry to refer to by using the segment index. Here, the segment index may be referred to as a first index. In the example of FIG. 6 , it can be confirmed that the directory entry 010 (2) is referred to by using the segment index 10 (2) corresponding to the most significant 2 bits.

도 7에 도시된 바와 같이, CPU(210)는 해시 키의 제2 인덱스를 이용하여 그 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인할 수 있다. CPU(210)는 참조하는 세그먼트(Segment) 내에서 어느 버켓(Bucket)을 읽을지를 결정하기 위해, 해시 키(Hash Key)의 버켓 인덱스(Bucket Index)를 사용할 수 있다. 여기서, 버켓 인덱스(Bucket Index)는 제2 인덱스로 지칭될 수 있다. 결과적으로, CPU(210)는 세그먼트 인덱스가 참조하는 디렉토리 엔트리를 통해 세그먼트를 확인하고, 그 확인된 세그먼트 내에서 버켓 인덱스가 가리키는 버켓을 확인할 수 있다. 디렉토리[세그먼트 인덱스]+버켓 인덱스가 접근하려는 버켓(Bucket)의 주소가 될 수 있다. 그리고 CPU(210)는 확인된 버켓에서 해시 키에 대응되는 키 값 또는 데이터를 저장할 수 있다. 또는, CPU는 확인된 버켓에서 해시 키에 대응되는 키 값 또는 데이터를 읽거나 쓸수 있다. As shown in FIG. 7 , the CPU 210 may identify a bucket to be accessed within the identified segment using the second index of the hash key. The CPU 210 may use a bucket index of a hash key to determine which bucket to read in the referenced segment. Here, the bucket index may be referred to as a second index. As a result, the CPU 210 may check the segment through the directory entry referenced by the segment index, and check the bucket indicated by the bucket index within the checked segment. Directory [segment index] + bucket index can be the address of the bucket you want to access. And the CPU 210 may store a key value or data corresponding to the hash key in the checked bucket. Alternatively, the CPU may read or write a key value or data corresponding to the hash key in the checked bucket.

도 8은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 동작을 설명하기 위한 순서도이다.8 is a flowchart for explaining a cache line concise extendable hashing operation according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 해시 테이블 구조는 버켓(Bucket)과 디렉토리(Directory) 사이에 세그먼트(Segment)라는 중간 계층을 둔다. 즉, 세그먼트는 적어도 하나의 버켓(Bucket)들을 묶은 연속된 메모리 공간으로 디렉토리(Directory)의 크기를 줄이는 용도로 사용된다. 즉, 디렉토리는 버켓을 직접 가리키는 것이 아니라, 세그먼트의 시작 위치를 가리키고, 세그먼트 안에 어느 버켓, 즉, 어느 캐시라인을 읽을지는 해시 키의 다른 비트들을 사용하여 결정한다. 본 발명의 일 실시예에서는 해시 키의 앞 부분 (most significant bits, MSB) 혹은 뒷 부분 (least significant bits, LSB)을 사용하여 세그먼트를 특정하고, 해시 키의 다른 비트들을 사용하여 그 세그먼트 안의 버켓을 특정한다. In the hash table structure according to an embodiment of the present invention, an intermediate layer called a segment is placed between a bucket and a directory. That is, a segment is a continuous memory space in which at least one bucket is bundled, and is used to reduce the size of the directory. In other words, the directory does not point directly to the bucket, but to the beginning of the segment, and which bucket in the segment, ie, which cache line to read, is determined using different bits of the hash key. In one embodiment of the present invention, a segment is specified using the most significant bits (MSB) or least significant bits (LSB) of the hash key, and a bucket in the segment is identified using other bits of the hash key. specify

도 8을 예시로 설명하면, 글로벌 깊이가 2(G=2)이므로, 디렉토리는 4 (22)개의 엔트리 즉, 00(L=2), 01(L=2), 10(L=1) 및 11(L=1)을 갖는다. 만일 주어진 해시 키 값이 10101010…11111110(2)이면, 글로벌 깊이만큼의 2개의 비트 10(2) 즉, 세그먼트 인덱스(Segment index)를 활용해서 디렉토리(Directory)에서 세그먼트(Segment)를 찾는다. 본 예에서는 최상위(most significant bits) 2 비트를 사용하는 것을 가정한다. 10(2) 은 세그먼트(Segment) 3을 가리키고 있다. 세그먼트 내부의 버켓(Bucket)을 특정하기 위해서는 대해서는 해시 키의 다른 비트들 즉, 버켓 인덱스(Bucket index)를 사용하는데, 이 비트의 개수는 세그먼트의 크기에 의해 결정된다. 즉, 세그먼트가 2S 개의 버켓(캐시라인)을 가진다면, S개의 비트를 사용해야 한다. 최상위(most significant bit) 비트를 사용하여 세그먼트를 특정하였다고 가정하였으므로, 버켓을 특정하기 위해서는 최하위 LSB(least significant bits) 즉, 버켓 인덱스를 사용한다. 예를 들어 세그먼트 하나는 256 (28)개의 캐시라인 크기 버켓으로 구성된다고 가정하자. 이 경우 8비트를 사용해 버켓을 특정한다. 주어진 해시 키 값의 맨 뒤 8 비트들은 11111110(2)이므로 254번째 캐시 라인이 데이터를 저장하거나 찾을 버켓(Bucket)이 된다. 즉, 해시 키 10101010…11111110(2)이 주어지면 (&Segment(10(2)) + 64 * 11111110(2)) 연산을 통해 한 번에 데이터를 저장하거나 읽을 캐시라인의 메모리 주소를 구할 수 있다. 여기서, 해시 키의 세그먼트 인덱스와 버켓 인덱스는 특정 위치로 한정되지 않는다. 8 as an example, since the global depth is 2 (G=2), the directory has 4 (2 2 ) entries, that is, 00 (L=2), 01 (L=2), 10 (L=1) and 11 (L=1). If the given hash key value is 10101010… If 11111110 (2) , a segment is found in the directory using two bits 10 (2) as much as the global depth, that is, the segment index. In this example, it is assumed that 2 most significant bits are used. 10 (2) points to Segment 3. In order to specify the bucket inside the segment, other bits of the hash key, that is, the bucket index, are used, and the number of these bits is determined by the size of the segment. That is, if a segment has 2 S buckets (cachelines), S bits must be used. Since it is assumed that the segment is specified using the most significant bit, the least significant bits (LSB), that is, the bucket index, are used to specify the bucket. For example, suppose a segment consists of 256 (2 8 ) cacheline-sized buckets. In this case, 8 bits are used to specify the bucket. The last 8 bits of the given hash key value are 11111110 (2) , so the 254th cache line becomes a bucket to store or find data. That is, hash key 10101010… Given 11111110 (2) , (&Segment(10 (2) ) + 64 * 11111110 (2) ) operation can be used to obtain the memory address of the cache line to store or read data at once. Here, the segment index and bucket index of the hash key are not limited to a specific location.

이와 같이, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 단 두 번의 캐시라인(Cacheline) 접근으로 데이터를 저장하거나 읽을 수 있다. 본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 장치는 세그먼트를 통한 메모리 접근 횟수를 최소화할 수 있다. As described above, the cache line concise extendable hashing apparatus 100 according to an embodiment of the present invention can store or read data through only two cache line accesses. The cache line-conciliation extendable hashing apparatus according to an embodiment of the present invention can minimize the number of memory accesses through a segment.

도 9는 본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 동작에서 새로운 세그먼트 생성 동작을 설명하기 위한 도면이다.9 is a diagram for explaining a new segment creation operation in a cache line-conciliation extendable hashing operation according to an embodiment of the present invention.

차세대 비휘발성 메모리는 시스템이 죽거나 전원이 꺼져도 데이터가 메모리에 그대로 존재한다. 이러한 비휘발성 메모리 상에 데이터를 저장할 경우 원자적으로 데이터를 업데이트해야만 시스템을 재부팅해도 문제없이 데이터에 접근할 수 있다. In next-generation non-volatile memory, data remains in the memory even when the system dies or the power is turned off. When data is stored in such non-volatile memory, data can be accessed without any problem even after rebooting the system only after updating the data atomically.

종래의 디스크 기반 익스텐더블 해싱(Extendible Hashing) 기법에서는 버켓이 분할되거나 디렉토리가 업데이트 될 때, 별도의 저장 공간에 백업을 만드는 로깅 연산을 수행하여 많은 양의 데이터를 중복하여 쓰게 된다. In the conventional disk-based extendable hashing technique, when a bucket is partitioned or a directory is updated, a logging operation that creates a backup in a separate storage space is performed to duplicate a large amount of data.

본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 장치는, 비휘발성 메모리를 위한 결함 원자적 세그먼트 분리(Failure-Atomic Segment Split)]를 제공할 수 있다. The cache line-conscious extendable hashing apparatus according to an embodiment of the present invention may provide [Failure-Atomic Segment Split] for a non-volatile memory.

본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 장치는 세그먼트가 분할될 때, 새로운 세그먼트(Segment)를 할당하고, 세그먼트 안에 저장되어 있는 모든 데이터들을 스캔한다. 새로 생성된 세그먼트의 로컬 깊이는 분할되는 세그먼트의 로컬 깊이보다 하나 크다. 따라서, 분할되는 세그먼트의 데이터를 스캔하면서 해시 키의 한 비트를 더 확인하는데, 이 비트가 1이면 새로운 세그먼트에 복사하고 0이면 기존 세그먼트에 그대로 둔다. 주의할 점은 새로운 세그먼트로 데이터를 복사하더라도 이전의 세그먼트에서 삭제하지 않는다는 점이다. 이는 복구 시에 이전 세그먼트를 그대로 사용하기 위함이다.When a segment is divided, the cache line-conciliation extendable hashing apparatus according to an embodiment of the present invention allocates a new segment and scans all data stored in the segment. The local depth of the newly created segment is one greater than the local depth of the segment being split. Therefore, while scanning the data of the segment to be divided, one bit of the hash key is checked. If this bit is 1, it is copied to the new segment, and if it is 0, it is left in the existing segment. Note that even if data is copied to a new segment, it will not be deleted from the previous segment. This is to use the previous segment as it is during recovery.

도 9는 도 8에서의 로컬 깊이가 1인 세그먼트 3(Segment)이 분할되어 로컬 깊이가 2인 새로운 세그먼트 4가 만들어진 상태를 보여준다. 이전 세그먼트에서 새로운 세그먼트 4로 복사한 데이터들은 삭제하지 않더라도 세그먼트의 로컬 깊이가 증가되는 순간 유효하지 않은 데이터가 되므로 굳이 삭제하지 않아도 문제가 없다. 예를 들어 도 9에서 1101...11111110(2)는 세그먼트(Segment) 4로 복사가 되었으나 세그먼트(Segment) 3에 그대로 남아 있다. 그러나 이러한 데이터는 도 10에서와 같이 세그먼트의 로컬 깊이가 증가되는 순간 유효하지 않은 키로 간주되고, 이 공간은 다른 데이터를 저장하는데 사용될 수 있다.FIG. 9 shows a state in which segment 3 having a local depth of 1 in FIG. 8 is divided to form a new segment 4 having a local depth of 2. Referring to FIG. Even if the data copied from the previous segment to the new segment 4 is not deleted, the data becomes invalid as soon as the local depth of the segment increases, so there is no problem even if you do not delete it. For example, 1101...11111110 (2) in FIG. 9 is copied to segment 4, but remains in segment 3 as it is. However, such data is regarded as an invalid key when the local depth of the segment is increased as shown in FIG. 10, and this space can be used to store other data.

도 10은 본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 동작에서 분리 및 느린 삭제 동작을 설명하기 위한 도면이다.10 is a diagram for explaining a separation and a slow delete operation in a cache line-conciliation extendable hashing operation according to an embodiment of the present invention.

도 10에 도시된 바와 같이, 도 9에서 1110...00000000(2), 1110...00000001(2), 1101...111110(2)은 세그먼트(Segment) 4로 복사가 되었으나 세그먼트(Segment) 3에서 삭제되지 않고 남아 있다. 이러한 동작을 느린 삭제(Lazy Deletion) 동작이라고 지칭한다. 도 10에서와 같이, 세그먼트 4로 복사되었으나 세그먼트 3에서 삭제되지 않고 남아 있는 데이터는 세그먼트 3의 로컬 깊이가 2로 증가되는 순간 유효하지 않은 키로 간주되고, 이 공간은 다른 데이터를 저장하는데 사용될 수 있다.As shown in FIG. 10 , in FIG. 9 , 1110...00000000 (2) , 1110...00000001 (2) , 1101...111110 (2) were copied to Segment 4, but Segment ) is not deleted in 3 and remains. This operation is referred to as a lazy deletion operation. As shown in Fig. 10, data copied to segment 4 but not deleted from segment 3 is regarded as an invalid key as soon as the local depth of segment 3 is increased to 2, and this space can be used to store other data. .

이전 세그먼트에서 분할되는 세그먼트의 로컬 깊이는 새로운 세그먼트가 모두 쓰여진 다음에 증가시켜야 한다. 이 순서가 지켜지지 않으면, 시스템이 죽었을 때 일관성(Consistency)에 문제가 생기는 경우가 있다. 이전 세그먼트의 로컬 깊이를 증가시킨 다음에는 디렉토리(Directory) 엔트리의 포인터(Pointer) 들을 갱신하고 분할된 세그먼트(Segment)의 로컬 뎁스(Local depth)를 증가시켜준다. 이 순서 역시 복구를 위해서 반드시 지켜주어야 한다. 도 10은 분할된 세그먼트의 로컬 깊이를 증가시켜주고 새로운 세그먼트를 디렉토리가 가리키고 있는 상태를 보여준다. The local depth of the segment being split from the previous segment should be increased after all new segments have been written. If this order is not observed, consistency problems may occur when the system dies. After increasing the local depth of the previous segment, the pointers of the directory entry are updated and the local depth of the segmented segment is increased. This order must also be followed for recovery. 10 shows a state in which the local depth of a segmented segment is increased and a directory points to a new segment.

도 11 내지 도 13은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 동작에서 트리 형태의 세그먼트 분리 동작을 설명하기 위한 도면이다.11 to 13 are diagrams for explaining a tree-type segment separation operation in the cache line concierge extendable hashing operation according to an embodiment of the present invention.

세그먼트가 분할되는 경우, 디렉토리는 여러 디렉토리 엔트리가 갱신되어야 한다. 본 발명의 일 실시예에서는 디렉토리(Directory)를 갱신할 때는 디렉토리 엔트리(Directory entry)들을 버디(buddy)라 불리는 쌍으로 묶어서 세그먼트 분리(Segment split)가 일어나는 기록(History)을 트리 형태로 관리할 수 있다. 본 발명의 일 실시예에서는 시스템에 문제가 생겼을 때 이 트리를 탐색하는 것으로 문제를 발견할 수 있다. 이때, 본 발명의 일 실시예에서는 글로벌 깊이와 로컬 깊이를 사용해서 어느 부분이 문제가 생겼는지 판단하고 버디라 불리는 짝을 백업처럼 활용하여 복구를 진행할 수 있다. When a segment is split, the directory must be updated with several directory entries. In an embodiment of the present invention, when updating a directory, a history in which segment split occurs can be managed in a tree form by grouping directory entries into a pair called a buddy. have. In one embodiment of the present invention, when a problem occurs in the system, the problem can be found by searching this tree. In this case, in an embodiment of the present invention, it is possible to determine which part has a problem using the global depth and the local depth, and to use a buddy as a backup to perform recovery.

도 11은 디렉토리 엔트리를 16개 가지는 글로벌 깊이가 4인 디렉토리를 보여준다. 트리 구조는 세그먼트가 분할된 히스토리를 보여준다. 처음에는 세그먼트 S1과 S2 두 개만 존재하던 캐시라인 컨시어스 익스텐더블 해싱(CCEH) 구조에서 S1이 S1과 S3로 분할되고 S2는 S2와 S4로 분할되었음을 알 수 있다. 또한, 레벨(Level) 3에서는 S1이 다시 S1과 S5로 분할되었고, S3는 S3과 S6으로 분할되었음을 알 수 있다. 현재의 트리 구조는 글로벌 깊이가 4이다. 이 상태에서 만일 세그먼트 S2가 분할되는 상황을 고려해보자.11 shows a directory with a global depth of 4 with 16 directory entries. The tree structure shows the segmented history. It can be seen that S1 is divided into S1 and S3, and S2 is divided into S2 and S4 in the cache line concise extendable hashing (CCEH) structure in which there are only two segments S1 and S2 at first. Also, it can be seen that at Level 3, S1 is again divided into S1 and S5, and S3 is divided into S3 and S6. The current tree structure has a global depth of 4. Consider a situation in which segment S2 is divided in this state.

S2가 S2와 S11로 분할된다면 디렉토리의 9번째에서부터 12번째 엔트리까지 업데이트되어야 한다. 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 여러 디렉토리 엔트리가 업데이트되는 상황에서 가장 오른쪽에 위치한 엔트리를 우선 업데이트하고 하나씩 왼쪽에 있는 엔트리들을 업데이트 한다. 다른 예로, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 여러 디렉토리 엔트리가 업데이트되는 상황에서 가장 왼쪽에 위치한 엔트리를 우선 업데이트하고 하나씩 오른쪽에 있는 엔트리들을 업데이트할 수 있다. 도 12에 도시된 바와 같이, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 12 번째 S2(L=2)를 S11(L=3)로 업데이트 한다. 도 13에 도시된 바와 같이, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 다음 11번째 엔트리 S2(L=2)를 역시 S11(L=3)로 업데이트 한다. 이후, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 10번째와 9번째 엔트리의 로컬 깊이를 하나 증가시켜 S2(L=3)로 바꾼다. 이 순서는 복구를 위해 반드시 지켜져야 한다. If S2 is divided into S2 and S11, the ninth through twelfth entries in the directory must be updated. In a situation where several directory entries are updated, the cashline concierge extendable hashing apparatus 100 according to an embodiment of the present invention first updates the rightmost entry and updates the left entries one by one. As another example, in a situation where several directory entries are updated, the cashline concierge extendable hashing apparatus 100 may first update the leftmost entry and then update the right entries one by one. As shown in FIG. 12 , the cashline concierge extendable hashing apparatus 100 according to an embodiment of the present invention updates the twelfth S2 (L=2) to S11 (L=3). As shown in FIG. 13 , the cashline concierge extendable hashing apparatus 100 updates the next 11th entry S2 (L=2) to S11 (L=3) as well. Thereafter, the cache line concierge extendable hashing apparatus 100 increases the local depths of the tenth and ninth entries by one and changes them to S2 (L=3). This sequence must be followed for recovery.

이 순서를 지키며 업데이트를 하는 도중 시스템이 죽는다면, 도 14에 도시된 복구 알고리즘을 통해 디렉토리를 업데이트하여 이전에 일관성이 있던 상태로 되돌릴 수 있다. If the system dies during the update while keeping this order, the directory can be updated to the previously consistent state through the recovery algorithm shown in FIG. 14 .

도 14는 본 발명의 일 실시예에 따른 복구 알고리즘의 수도 코드를 설명하기 위한 도면이다.14 is a diagram for explaining a pseudo code of a recovery algorithm according to an embodiment of the present invention.

본 발명의 일 실시예에 따른 복구 알고리즘은 세그먼트 분리(Segment split)가 일어날 때 앞서 기술한 바와 같이 순서대로 연산을 진행하기 때문에 생기는 특성과 버디(Buddy) 세그먼트의 로컬 깊이는 항상 같아야 한다는 점을 활용한 것이다. 만일 오른쪽 버디(Buddy) 세그먼트의 로컬 깊이에 비해 현재 세그먼트의 로컬 깊이가 작으면 세그먼트가 분할되는 도중에 시스템이 죽었다는 것을 의미한다. 그러므로, 현재 노드(Node)를 백업(Backup)으로 사용해 오른쪽 세그먼트를 다시 구성한다. 만일 두 로컬 깊이가 같으면 분할된 버디 세그먼트가 완전히 쓰여졌다는 것을 의미한다. The recovery algorithm according to an embodiment of the present invention takes advantage of the fact that, when segment split occurs, the local depth of the buddy segment must always be the same as the characteristic that occurs because the operations are performed in order as described above. did it If the local depth of the current segment is smaller than the local depth of the right buddy segment, it means that the system died while the segment was being split. Therefore, the right segment is reconfigured using the current node as a backup. If the two local depths are the same, it means that the split buddy segment is completely written.

도 15는 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법에서 삽입 연산 동작을 설명하기 위한 순서도이다.15 is a flowchart for explaining an insert operation in the method of cache line concierge extendable hashing according to an embodiment of the present invention.

단계 S101에서, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는, 해시 키의 인덱스를 입력받는다. In step S101, the cash line concierge extendable hashing apparatus 100 according to an embodiment of the present invention receives an index of a hash key.

단계 S102에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 입력된 해시 키의 글로벌 깊이 비트값을 확인한다. In step S102, the cache line concierge extendable hashing device 100 checks the global depth bit value of the input hash key.

단계 S103에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 해시 키의 인덱스를 이용하여 디렉토리 내에서 해당 세그먼트에 접근한다.In step S103, the cashline concierge extendable hashing device 100 accesses the corresponding segment in the directory by using the index of the hash key.

단계 S104에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 해시 키의 버켓 인덱스인 LSB에 해당하는 버켓에 접근한다.In step S104, the cash line concierge extendable hashing device 100 accesses the bucket corresponding to the LSB, which is the bucket index of the hash key.

단계 S105에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 충돌이 발생하는지를 확인한다.In step S105, the cashline concierge extendable hashing device 100 checks whether a collision occurs.

단계 S106에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 충돌이 발생하지 않으면, 해시 키에 해당하는 키 값을 작성한다.In step S106, the cashline concierge extendable hashing device 100 creates a key value corresponding to the hash key if no collision occurs.

단계 S107에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 충돌이 발생하면, 충돌이 발생한 세그먼트를 분할한한다.In step S107, when a collision occurs, the cashline concierge extendable hashing apparatus 100 divides the segment in which the collision occurs.

도 16은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법에서 분할 연산 동작을 설명하기 위한 순서도이다.16 is a flowchart illustrating a division operation in the method of cache line concise extendable hashing according to an embodiment of the present invention.

단계 S201에서, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 세그먼트 분할 시작 후, 로컬 깊이를 증가시킨 새로운 세그먼트를 생성한다. In step S201 , the cache line concise extendable hashing apparatus 100 according to an embodiment of the present invention creates a new segment with an increased local depth after segment division starts.

단계 S202에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 해시 키의 비트를 확인한 후, 새로운 세그먼트에 그 값을 복사한다. In step S202 , the cashline concise extendable hashing device 100 checks the bit of the hash key, and then copies the value to a new segment.

단계 S203에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 디렉토리 엔트리의 포인터를 갱신한다. In step S203 , the cacheline concise extendable hashing device 100 updates the pointer of the directory entry.

단계 S204에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 이전 세그먼트의 로컬 깊이를 증가시킨다. In step S204 , the cacheline concise extendable hashing device 100 increases the local depth of the previous segment.

도 17은 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법에서 복구 연산 동작을 설명하기 위한 순서도이다.17 is a flowchart for explaining a recovery operation in the method of cache line concise extendable hashing according to an embodiment of the present invention.

단계 S301에서, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 첫 디렉토리 엔트리부터 복구 동작을 시작한다. In step S301 , the cache line concise extendable hashing apparatus 100 according to an embodiment of the present invention starts a recovery operation from the first directory entry.

단계 S302에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 현재 위치가 디렉토리 크기보다 큰지를 확인한다. In step S302, the cache line concierge extendable hashing device 100 checks whether the current location is larger than the directory size.

단계 S303에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 현재 위치가 디렉토리 크기 이하이면, 현재 위치의 로컬 깊이를 확인한다. 단계 S302에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 현재 위치가 디렉토리 크기보다 크면, 복구 연산 동작을 종료한다.In step S303, if the current location is equal to or smaller than the directory size, the cacheline concierge extendable hashing apparatus 100 checks the local depth of the current location. In step S302, if the current location is greater than the directory size, the cache line concierge extendable hashing device 100 ends the recovery operation.

단계 S304에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 스트라이드(Stride) 값을 확인한다. 즉, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 스트라이드 값을 Stride = 2(글로벌 깊이-현재 깊이)와 같이 구한다. In step S304 , the cash line concise extendable hashing device 100 checks a stride value. That is, the cache line concierge extendable hashing apparatus 100 obtains the stride value as Stride = 2 (global depth - current depth) .

단계 S305에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디 값을 확인한다. 즉, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디=현재 위치+Stride와 같이 버디 값을 확인한다. In step S305, the cash line concierge extendable hashing device 100 checks the buddy value. That is, the cash line concierge extendable hashing apparatus 100 checks a buddy value such as buddy = current location + Stride.

단계 S306에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디가 현재 위치에 도달했는지를 확인한다.In step S306, the cash line concierge extendable hashing device 100 checks whether the buddy has reached the current location.

단계 S307에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디가 현재 위치에 도달한 경우, 현재 위치에 스트라이드를 더한다.In step S307, when the buddy reaches the current position, the cashline concierge extendable hashing apparatus 100 adds a stride to the current position.

단계 S308에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디가 현재 위치에 도달하지 않으면, 버디의 로컬 깊이가 현재 깊이와 같은지를 확인한다. In step S308 , if the buddy does not reach the current location, the cashline concise extendable hashing apparatus 100 checks whether the local depth of the buddy is equal to the current depth.

단계 S309에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디의 로컬 깊이가 현재 깊이와 같지 않으면, 버디의 로컬 깊이에 현재 깊이를 저장한다. 반면, 캐시 라인 컨시어스 익스텐더블 해싱 장치는 버디의 로컬 깊이가 현재 깊이와 같으면, 단계 S307을 수행한다. In step S309 , if the local depth of the buddy is not the same as the current depth, the cashline concise extendable hashing apparatus 100 stores the current depth in the local depth of the buddy. On the other hand, if the local depth of the buddy is the same as the current depth, the cache line concise extendable hashing apparatus performs step S307.

단계 S310에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디의 로컬 깊이에 현재 깊이를 저장한 후, 버디 값을 감소시킨다. 그리고 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 단계 S308를 수행한다. In step S310 , the cacheline concise extendable hashing apparatus 100 stores the current depth in the local depth of the buddy, and then decreases the buddy value. And the cash line concierge extendable hashing device 100 performs step S308.

한편, 본 발명의 실시예들에 대한 실험 설정을 살펴보기로 한다. On the other hand, the experimental settings for the embodiments of the present invention will be looked at.

본 발명의 실시예들에 대한 실험을 위해, 인텔 제온 하스웰-EX E7-4809 v3 프로세서 2 개를 사용한다. 실험에 사용된 프로세서는 8 코어, 2.0GHz, 8 × 32KB 명령 캐시, 8 × 32KB 데이터 캐시, 8 × 256KB L2 캐시 및 20MB L3 캐시를 가진다. 그리고 64GB의 DDR3 DRAM과 DRAM 기반 PM 대기 시간 에뮬레이터, Quartz가 사용되었다. 쓰기 지연(write latency)을 에뮬레이트하기 위해, 각 clflush 명령 후에 스톨 사이클(stall cycle)를 삽입한다. For the experiments on the embodiments of the present invention, two Intel Xeon Haswell-EX E7-4809 v3 processors are used. The processor used in the experiment had 8 cores, 2.0 GHz, 8 × 32 KB instruction cache, 8 × 32 KB data cache, 8 × 256 KB L2 cache, and 20 MB L3 cache. And 64GB of DDR3 DRAM and a DRAM-based PM latency emulator, Quartz, were used. To emulate write latency, a stall cycle is inserted after each clflush instruction.

도 18a 내지 도 18c는 본 발명의 실시예와 종래 기술에 대해 다양한 세그먼트/버켓 크기를 갖는 처리량의 실험 결과를 나타낸 도면이다. 18A to 18C are diagrams showing experimental results of throughput with various segment/bucket sizes for an embodiment of the present invention and the prior art.

종래 기술인 EXTH(LSB)는 도 18b에 도시된 바와 같이, 버켓 크기가 증가함에 따라 버켓을 덜 자주 분할한다. 하지만, 도 18a 및 도 18c에 도시된 바와 같이, 빈 슬롯이나 레코드를 찾을 때, 더 많은 수의 캐시 라인을 읽는다. The prior art EXTH (LSB) splits the bucket less frequently as the bucket size increases, as shown in FIG. 18B . However, as shown in FIGS. 18A and 18C , when an empty slot or record is found, a larger number of cache lines are read.

본 발명의 실시예에 따른 CCEH(MSB) 및 CCEH(LSB)의 삽입 처리량은 세그먼트 분할이 덜 빈번하기 때문에, 세그먼트 크기가 최대 16KB까지 증가함에 따라 증가하는 반면, 도 18a 및 도 18c에 도시된 바와 같이, 판독할 캐시 라인의 수 즉, LLC(Last Level Cache) 누락은 큰 세그먼트 크기의 영향을 받지 않는다. Insertion throughput of CCEH (MSB) and CCEH (LSB) according to an embodiment of the present invention increases as the segment size increases up to 16 KB because segment division is less frequent, whereas as shown in FIGS. 18A and 18C , Likewise, the number of cache lines to read, i.e., Last Level Cache (LLC) misses, is not affected by the large segment size.

도 19a 내지 도 19d는 본 발명의 실시예와 종래 기술에 대해 비휘발성 메모리의 R/W 레이턴시를 변화시키면서 삽입에 소요된 시간을 나타낸 도면이다.19A to 19D are diagrams showing time taken for insertion while changing R/W latency of a nonvolatile memory in an embodiment of the present invention and in the prior art.

도 19a 내지 도 19d에서, 쓰기(Write) 동작은 버켓 검색 및 쓰기 시간을 나타낸다. 리해시(Rehash) 동작은 리해싱 시간을 나타낸다. 뻐꾸기 이동(Cuckoo Displacement)은 뻐꾸기 해싱을 위해 기존 레코드를 다른 버켓으로 옮기는 시간을 나타낸다. 도 19a 내지 도 19d에 도시된 바와 같이, 본 발명의 실시예에 따른 CCEH는 전체에서 가장 빠른 평균 삽입 시간을 보여준다. 19A to 19D , a write operation indicates a bucket search and write time. The rehash operation indicates the rehash time. Cuckoo Displacement represents the time it takes to move an existing record to another bucket for cuckoo hashing. 19A to 19D , the CCEH according to the embodiment of the present invention shows the fastest average insertion time in the whole.

도 20a 내지 도 20c는 본 발명의 실시예와 종래 기술에 대해 레이턴시 CDF 및 삽입/검색 처리량에 대한 동시 실행 성능을 나타낸 도면이다.20A to 20C are diagrams illustrating concurrent execution performance with respect to latency CDF and insert/retrieval throughput for an embodiment of the present invention and the prior art.

도 20a 내지 도 20c에 도시된 바와 같이, 본 발명의 실시예에 따른 CCEH를 제외한 나머지 구현들에는 전체 테이블 리해싱 오버헤드를 겪는다. CCEH(C)는 CoW (Copy-on-Write) 락 프리 검색(lock free search)과 같이 검색 처리량에서 CCEH를 능가한다. 도 20c에 도시된 바와 같이, CCEH(C)의 읽기 트랜잭션은 비 차단이다.As shown in Figs. 20A to 20C, implementations other than CCEH according to an embodiment of the present invention suffer from full table rehashing overhead. CCEH(C) outperforms CCEH in search throughput, such as copy-on-write (CoW) lock free search. As shown in Fig. 20C, the read transaction of CCEH(C) is non-blocking.

상술한 본 발명의 실시예들에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 본 발명의 실시예들에 따른 캐시라인 컨시어스 익스텐더블 해싱 방법은 다양한 컴퓨터 수단을 통하여 수행될 수 있는 프로그램 명령 형태로 구현되어 컴퓨터로 읽을 수 있는 기록매체에 기록될 수 있다.The cache line concierge extendable hashing method according to the above-described embodiments of the present invention may be implemented as a computer readable code on a computer readable recording medium. The cache line concierge extendable hashing method according to the embodiments of the present invention may be implemented in the form of a program command that can be executed through various computer means and recorded in a computer-readable recording medium.

프로세서에 의해 실행 가능한 적어도 하나의 프로그램을 포함하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 적어도 하나의 프로그램은 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금: 해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하고, 상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하고, 상기 확인된 버켓에 상기 해시 키에 대응되는 키 값을 삽입하게 하는 명령어들을 포함하는, 비 일시적 컴퓨터 판독 가능한 저장 매체가 제공될 수 있다.A non-transitory computer-readable storage medium comprising at least one program executable by a processor, wherein the at least one program, when executed by the processor, causes the processor to: store a first index of a hash key; to identify a segment referenced through a directory using the A non-transitory computer-readable storage medium containing instructions for inserting a key value corresponding to a hash key may be provided.

상술한 본 발명에 따른 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록 매체로는 컴퓨터 시스템에 의하여 해독될 수 있는 데이터가 저장된 모든 종류의 기록 매체를 포함한다. 예를 들어, ROM(Read Only Memory), RAM(Random Access Memory), 자기 테이프, 자기 디스크, 플래시 메모리, 광 데이터 저장장치 등이 있을 수 있다. 또한, 컴퓨터로 판독 가능한 기록매체는 컴퓨터 통신망으로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 읽을 수 있는 코드로서 저장되고 실행될 수 있다.The above-described method according to the present invention may be implemented as computer-readable codes on a computer-readable recording medium. The computer-readable recording medium includes any type of recording medium in which data that can be read by a computer system is stored. For example, there may be read only memory (ROM), random access memory (RAM), magnetic tape, magnetic disk, flash memory, optical data storage, and the like. In addition, the computer-readable recording medium may be distributed in computer systems connected through a computer communication network, and stored and executed as readable codes in a distributed manner.

이상, 도면 및 실시예를 참조하여 설명하였지만, 본 발명의 보호범위가 상기 도면 또는 실시예에 의해 한정되는 것을 의미하지는 않으며 해당 기술 분야의 숙련된 당업자는 하기의 특허 청구의 범위에 기재된 본 발명의 사상 및 영역으로부터 벗어나지 않는 범위 내에서 본 발명을 다양하게 수정 및 변경시킬 수 있음을 이해할 수 있을 것이다. Although described above with reference to the drawings and examples, it does not mean that the protection scope of the present invention is limited by the drawings or examples, and those skilled in the art will It will be understood that various modifications and variations of the present invention can be made without departing from the spirit and scope thereof.

구체적으로, 설명된 특징들은 디지털 전자 회로, 또는 컴퓨터 하드웨어, 펌웨어, 또는 그들의 조합들 내에서 실행될 수 있다. 특징들은 예컨대, 프로그래밍 가능한 프로세서에 의한 실행을 위해, 기계 판독 가능한 저장 디바이스 내의 저장장치 내에서 구현되는 컴퓨터 프로그램 제품에서 실행될 수 있다. 그리고 특징들은 입력 데이터 상에서 동작하고 출력을 생성함으로써 설명된 실시예들의 함수들을 수행하기 위한 지시어들의 프로그램을 실행하는 프로그래밍 가능한 프로세서에 의해 수행될 수 있다. 설명된 특징들은, 데이터 저장 시스템으로부터 데이터 및 지시어들을 수신하기 위해, 및 데이터 저장 시스템으로 데이터 및 지시어들을 전송하기 위해, 결합된 적어도 하나의 프로그래밍 가능한 프로세서, 적어도 하나의 입력 디바이스, 및 적어도 하나의 출력 디바이스를 포함하는 프로그래밍 가능한 시스템 상에서 실행될 수 있는 하나 이상의 컴퓨터 프로그램들 내에서 실행될 수 있다. 컴퓨터 프로그램은 소정 결과에 대해 특정 동작을 수행하기 위해 컴퓨터 내에서 직접 또는 간접적으로 사용될 수 있는 지시어들의 집합을 포함한다. 컴퓨터 프로그램은 컴파일된 또는 해석된 언어들을 포함하는 프로그래밍 언어 중 어느 형태로 쓰여지고, 모듈, 소자, 서브루틴(subroutine), 또는 다른 컴퓨터 환경에서 사용을 위해 적합한 다른 유닛으로서, 또는 독립 조작 가능한 프로그램으로서 포함하는 어느 형태로도 사용될 수 있다.Specifically, the described features may be implemented in digital electronic circuitry, or computer hardware, firmware, or combinations thereof. Aspects may be executed in a computer program product embodied in storage in a machine readable storage device, for example, for execution by a programmable processor. and features may be performed by a programmable processor executing a program of instructions for performing functions of the described embodiments by operating on input data and generating output. The described features are coupled to at least one programmable processor, at least one input device, and at least one output, for receiving data and instructions from, and for transmitting data and instructions to, a data storage system. may be executed within one or more computer programs that may be executed on a programmable system comprising the device. A computer program includes a set of directives that can be used directly or indirectly in a computer to perform a particular action on a given result. A computer program is written in any form of programming language, including compiled or interpreted languages, and included as a module, element, subroutine, or other unit suitable for use in another computer environment, or as a standalone operable program. It can be used in any form.

지시어들의 프로그램의 실행을 위한 적합한 프로세서들은, 예를 들어, 범용 및 특수 용도 마이크로프로세서들 둘 모두, 및 단독 프로세서 또는 다른 종류의 컴퓨터의 다중 프로세서들 중 하나를 포함한다. 또한 설명된 특징들을 구현하는 컴퓨터 프로그램 지시어들 및 데이터를 구현하기 적합한 저장 디바이스들은 예컨대, EPROM, EEPROM, 및 플래쉬 메모리 디바이스들과 같은 반도체 메모리 디바이스들, 내부 하드 디스크들 및 제거 가능한 디스크들과 같은 자기 디바이스들, 광자기 디스크들 및 CD-ROM 및 DVD-ROM 디스크들을 포함하는 비휘발성 메모리의 모든 형태들을 포함한다. 프로세서 및 메모리는 ASIC들(application-specific integrated circuits) 내에서 통합되거나 또는 ASIC들에 의해 추가될 수 있다.Suitable processors for execution of a program of instructions include, for example, both general and special purpose microprocessors, and either a single processor or multiple processors of a different kind of computer. Storage devices suitable for implementing computer program instructions and data embodying the described features also include, for example, semiconductor memory devices such as EPROM, EEPROM, and flash memory devices, magnetic devices such as internal hard disks and removable disks. devices, magneto-optical disks and all forms of non-volatile memory including CD-ROM and DVD-ROM disks. The processor and memory may be integrated in or added by ASICs (application-specific integrated circuits).

이상에서 설명한 본 발명은 일련의 기능 블록들을 기초로 설명되고 있지만, 전술한 실시예 및 첨부된 도면에 의해 한정되는 것이 아니고, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경 가능하다는 것이 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 있어 명백할 것이다.Although the present invention described above has been described based on a series of functional blocks, it is not limited by the above-described embodiments and the accompanying drawings, and various substitutions, modifications and changes within the scope without departing from the technical spirit of the present invention It will be apparent to those of ordinary skill in the art to which the present invention pertains.

전술한 실시예들의 조합은 전술한 실시예에 한정되는 것이 아니며, 구현 및/또는 필요에 따라 전술한 실시예들 뿐 아니라 다양한 형태의 조합이 제공될 수 있다.The combination of the above-described embodiments is not limited to the above-described embodiment, and various types of combinations may be provided in addition to the above-described embodiments according to implementation and/or necessity.

전술한 실시예들에서, 방법들은 일련의 단계 또는 블록으로서 순서도를 기초로 설명되고 있으나, 본 발명은 단계들의 순서에 한정되는 것은 아니며, 어떤 단계는 상술한 바와 다른 단계와 다른 순서로 또는 동시에 발생할 수 있다. 또한, 당해 기술 분야에서 통상의 지식을 가진 자라면 순서도에 나타난 단계들이 배타적이지 않고, 다른 단계가 포함되거나, 순서도의 하나 또는 그 이상의 단계가 본 발명의 범위에 영향을 미치지 않고 삭제될 수 있음을 이해할 수 있을 것이다.In the foregoing embodiments, the methods are described on the basis of a flowchart as a series of steps or blocks, but the present invention is not limited to the order of the steps, and some steps may occur in a different order or at the same time as other steps as described above. can In addition, those of ordinary skill in the art will recognize that the steps shown in the flowchart are not exclusive, other steps may be included, or that one or more steps in the flowchart may be deleted without affecting the scope of the present invention. you will understand

전술한 실시예는 다양한 양태의 예시들을 포함한다. 다양한 양태들을 나타내기 위한 모든 가능한 조합을 기술할 수는 없지만, 해당 기술 분야의 통상의 지식을 가진 자는 다른 조합이 가능함을 인식할 수 있을 것이다. 따라서, 본 발명은 이하의 특허청구범위 내에 속하는 모든 다른 교체, 수정 및 변경을 포함한다고 할 것이다.The foregoing embodiments include examples of various aspects. It is not possible to describe every possible combination for representing the various aspects, but one of ordinary skill in the art will recognize that other combinations are possible. Accordingly, it is intended that the present invention cover all other substitutions, modifications and variations falling within the scope of the following claims.

100: 캐시라인 컨시어스 익스텐더블 해싱 장치
110: 프로세서
120: 캐시
130: 메모리
100: cashline concierge extendable hashing device
110: processor
120: cache
130: memory

Claims (23)

캐시라인 컨시어스 익스텐더블 해싱(Cacheline Conscious Extendible Hashing) 장치에 의해 수행되는 익스텐더블 해싱 방법에 있어서,
해시 키(Hash key)의 제1 인덱스에 대응하는 디렉토리 엔트리(Directory Entry)를 탐색하는 단계;
각각이 적어도 하나의 상기 디렉토리 엔트리에 연결된 복수의 세그먼트(Segment) 중 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인하는 단계;
상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내의 연속된 저장 공간에 저장된 복수의 버켓(Bucket) 중 접근하려는 하나의 버켓을 확인하는 단계; 및
상기 확인된 버켓에 상기 해시 키에 대응되는 데이터를 저장하는 단계를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
In the extendable hashing method performed by the Cacheline Conscious Extendible Hashing device,
searching for a directory entry corresponding to a first index of a hash key;
identifying a segment referenced through the searched directory entry from among a plurality of segments each connected to the at least one directory entry;
identifying one bucket to be accessed from among a plurality of buckets stored in a continuous storage space in the identified segment by using the second index of the hash key; and
and storing data corresponding to the hash key in the checked bucket.
제1항에 있어서,
상기 해시 키의 글로벌 깊이(Global depth) 비트값을 확인하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
According to claim 1,
The method of claim 1, further comprising: checking a global depth bit value of the hash key.
제1항에 있어서,
상기 해시 키의 제1 인덱스는,
상기 해시 키의 최상위 비트(Most Significant Bit, MSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
According to claim 1,
The first index of the hash key is,
Including a Most Significant Bit (MSB) of the hash key.
제1항에 있어서,
상기 해시 키의 제2 인덱스는,
상기 해시 키의 최하위 비트(Least Significant Bit, LSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
According to claim 1,
The second index of the hash key is,
A method of hashing concierge extendable hashing, including a least significant bit (LSB) of the hash key.
삭제delete 제1항에 있어서,
상기 해시 키의 제2 인덱스를 이용하여 세그먼트에 접근하는 경우에 충돌이 발생하면 세그먼트를 분할하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
According to claim 1,
The method of claim 1, further comprising: dividing a segment when a collision occurs when a segment is accessed using the second index of the hash key.
제6항에 있어서,
상기 세그먼트를 분할하는 단계는,
로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 상기 확인된 세그먼트의 데이터를 스캔하여 상기 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 상기 생성된 새로운 세그먼트에 복사하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
7. The method of claim 6,
The step of dividing the segment comprises:
A cache that creates a new segment with an increased local depth, scans data of the identified segment, and copies data having a preset bit value corresponding to the increased local depth to the new segment Line concierge extendable hashing method.
제6항에 있어서,
상기 세그먼트를 분할하는 단계는,
상기 분할된 세그먼트의 로컬 깊이(Local depth)를 증가시키고 상기 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
7. The method of claim 6,
The step of dividing the segment comprises:
A method of increasing a local depth of the divided segment and designating data having another predetermined bit value corresponding to the increased local depth as an invalid key.
제6항에 있어서,
상기 세그먼트를 분할하는 단계는,
상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시키는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
7. The method of claim 6,
The step of dividing the segment comprises:
The method of claim 1, for increasing a local depth of the identified segment, updating a pointer of a directory entry, and increasing a local depth of the segmented segment.
제6항에 있어서,
상기 세그먼트가 분할되는 경우, 디렉토리를 갱신할 때 디렉토리 엔트리들을 버디(buddy)라는 쌍으로 묶는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
7. The method of claim 6,
and bundling directory entries into pairs called a buddy when updating the directory when the segment is segmented.
제10항에 있어서,
세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 상기 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
11. The method of claim 10,
The method of claim 1, further comprising: identifying a segment in which a system problem has occurred using the global depth and a local depth of the segment, and performing recovery of a segment in which a system problem has occurred using the buddy. .
적어도 하나의 프로그램을 저장하고, 디렉토리 엔트리를 통해 참조되는 복수의 세그먼트를 저장하는 메모리; 및
상기 메모리와 캐시를 통해 연결된 프로세서를 포함하고,
상기 복수의 세그먼트 가각이 적어도 하나의 상기 디렉토리 엔트리(Directory Entry)에 연결되며, 상기 세그먼트 내의 연속된 저장 공간에 복수의 버켓이 저장되고,
상기 프로세서는, 상기 적어도 하나의 프로그램을 실행함으로써,
해시 키(Hash key)의 제1 인덱스에 대응하는 디렉토리 엔트리를 탐색하며, 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트(Segment)를 확인하고,
상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 하나의 버켓(Bucket)을 확인하고,
상기 확인된 버켓에 상기 해시 키에 대응되는 데이터를 쓰거나 읽는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
a memory storing at least one program and storing a plurality of segments referenced through directory entries; and
A processor connected through the memory and the cache;
Each of the plurality of segments is connected to at least one of the directory entries, and a plurality of buckets are stored in a continuous storage space in the segment;
The processor, by executing the at least one program,
Searching for a directory entry corresponding to a first index of a hash key, and identifying a segment referenced through the searched directory entry,
Checking one bucket to be accessed within the identified segment using the second index of the hash key,
A cash line concierge extendable hashing device that writes or reads data corresponding to the hash key to the checked bucket.
제12항에 있어서,
상기 프로세서는,
상기 해시 키의 글로벌 깊이(Global depth) 비트값을 확인하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
13. The method of claim 12,
The processor is
Further comprising the step of verifying a global depth bit value of the hash key, the cache line concierge extendable hashing device.
제12항에 있어서,
상기 해시 키의 제1 인덱스는,
상기 해시 키의 최상위 비트(Most Significant Bit, MSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
13. The method of claim 12,
The first index of the hash key is,
Including a Most Significant Bit (MSB) of the hash key, a cash line concise extendable hashing device.
제12항에 있어서,
상기 해시 키의 제2 인덱스는,
상기 해시 키의 최하위 비트(Least Significant Bit, LSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
13. The method of claim 12,
The second index of the hash key is,
Including a least significant bit (LSB) of the hash key, a cash line concierge extendable hashing device.
제12항에 있어서,
상기 프로세서는,
상기 해시 키의 제1 인덱스에 대응되는 디렉토리 엔트리를 탐색하고, 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
13. The method of claim 12,
The processor is
A cache line concierge extendable hashing device that searches for a directory entry corresponding to the first index of the hash key and identifies a segment referenced through the searched directory entry.
제12항에 있어서,
상기 프로세서는,
상기 해시 키의 제2 인덱스를 이용하여 세그먼트에 접근하는 경우에 충돌이 발생하면 세그먼트를 분할하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
13. The method of claim 12,
The processor is
When a collision occurs when a segment is accessed using the second index of the hash key, the segment is divided, a cache line concierge extendable hashing device.
제17항에 있어서,
상기 프로세서는,
로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 상기 확인된 세그먼트의 데이터를 스캔하여 상기 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 상기 생성된 새로운 세그먼트에 복사하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
18. The method of claim 17,
The processor is
A cache that creates a new segment with an increased local depth, scans data of the identified segment, and copies data having a preset bit value corresponding to the increased local depth to the new segment Line concierge extendable hashing device.
제17항에 있어서,
상기 프로세서는,
상기 분할된 세그먼트의 로컬 깊이(Local depth)를 증가시키고 상기 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
18. The method of claim 17,
The processor is
A cache line concierge extendable hashing apparatus for increasing a local depth of the divided segment and designating data having another predetermined bit value corresponding to the increased local depth as an invalid key.
제17항에 있어서,
상기 프로세서는,
상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시키는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
18. The method of claim 17,
The processor is
A cacheline concierge extendable hashing apparatus for increasing a local depth of the identified segment, updating a pointer of a directory entry, and increasing a local depth of the divided segment.
제17항에 있어서,
상기 프로세서는,
상기 확인된 세그먼트가 분할되는 경우, 디렉토리를 갱신할 때 디렉토리 엔트리들을 버디(buddy)라는 쌍으로 묶는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
18. The method of claim 17,
The processor is
When the identified segment is divided, when updating the directory, the directory entries are bundled into a pair called a buddy.
제21항에 있어서,
상기 프로세서는,
세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 상기 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
22. The method of claim 21,
The processor is
A cashline concierge extendable hashing device, which identifies a segment in which a system problem occurs using a global depth and a local depth of the segment, and performs recovery of a segment in which a system problem occurs by using the buddy.
프로세서에 의해 실행 가능한 적어도 하나의 프로그램을 포함하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 적어도 하나의 프로그램은 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금:
해시 키(Hash key)의 제1 인덱스에 대응하는 디렉토리 엔트리(Directory Entry)를 탐색하고, 각각이 적어도 하나의 상기 디렉토리 엔트리에 연결된 복수의 세그먼트(Segment) 중 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인하고,
상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에 연속된 저장 공간에 저장된 복수의 버켓(Bucket) 중 접근하려는 하나의 버켓을 확인하고,
상기 확인된 버켓에 상기 해시 키에 대응되는 키 값을 삽입하게 하는 명령어들을 포함하는, 비 일시적 컴퓨터 판독 가능한 저장 매체.
A non-transitory computer-readable storage medium comprising at least one program executable by a processor, wherein the at least one program, when executed by the processor, causes the processor to:
A directory entry corresponding to a first index of a hash key is searched for, and a segment referenced through the searched directory entry from among a plurality of segments each connected to at least one directory entry check the
Checking one bucket to be accessed from among a plurality of buckets stored in a continuous storage space in the identified segment using the second index of the hash key,
and instructions for inserting a key value corresponding to the hash key into the checked bucket.
KR1020190165111A 2019-02-21 2019-12-11 Methods and apparatuses for cacheline conscious extendible hashing KR102360879B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/787,318 US20200272424A1 (en) 2019-02-21 2020-02-11 Methods and apparatuses for cacheline conscious extendible hashing

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020190020794 2019-02-21
KR20190020794 2019-02-21

Publications (2)

Publication Number Publication Date
KR20200102337A KR20200102337A (en) 2020-08-31
KR102360879B1 true KR102360879B1 (en) 2022-02-10

Family

ID=72234504

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020190165111A KR102360879B1 (en) 2019-02-21 2019-12-11 Methods and apparatuses for cacheline conscious extendible hashing

Country Status (1)

Country Link
KR (1) KR102360879B1 (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015176407A (en) * 2014-03-17 2015-10-05 Necソリューションイノベータ株式会社 Search device, search method, search program and search data structure

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100325688B1 (en) * 1999-11-19 2002-02-25 오길록 A method for controlling directory splits of the extendible hashing
KR101340706B1 (en) * 2011-12-08 2013-12-11 한양대학교 에리카산학협력단 Hybrid hash index for storage device based on flash memory

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015176407A (en) * 2014-03-17 2015-10-05 Necソリューションイノベータ株式会社 Search device, search method, search program and search data structure

Also Published As

Publication number Publication date
KR20200102337A (en) 2020-08-31

Similar Documents

Publication Publication Date Title
US10983955B2 (en) Data unit cloning in memory-based file systems
CN113168408B (en) Data block overflow using compressed key value storage tree
US11599552B2 (en) Counter-based compaction of key-value store tree data block
US8868926B2 (en) Cryptographic hash database
KR101977575B1 (en) Apparatus and method for directory entry look up, and recording medium recording the directory entry look up program thereof
USRE45577E1 (en) Method of writing to a flash memory including data blocks and log blocks
US9501421B1 (en) Memory sharing and page deduplication using indirect lines
US10261704B1 (en) Linked lists in flash memory
US11106362B2 (en) Additive library for data structures in a flash memory
US11392314B2 (en) Sequentially writing metadata into a solid state disk by redirect-on-write
US11556513B2 (en) Generating snapshots of a key-value index
KR20210123236A (en) Key-value store architecture for key-value devices
US10635654B2 (en) Data journaling for large solid state storage devices with low DRAM/SRAM
US20200272424A1 (en) Methods and apparatuses for cacheline conscious extendible hashing
KR101676175B1 (en) Apparatus and method for memory storage to protect data-loss after power loss
KR102360879B1 (en) Methods and apparatuses for cacheline conscious extendible hashing
US11204880B2 (en) Hash tables in flash memory
US11481143B2 (en) Metadata management for extent-based storage system

Legal Events

Date Code Title Description
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right