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

Methods and apparatuses for cacheline conscious extendible hashing Download PDF

Info

Publication number
KR20200102337A
KR20200102337A KR1020190165111A KR20190165111A KR20200102337A KR 20200102337 A KR20200102337 A KR 20200102337A KR 1020190165111 A KR1020190165111 A KR 1020190165111A KR 20190165111 A KR20190165111 A KR 20190165111A KR 20200102337 A KR20200102337 A KR 20200102337A
Authority
KR
South Korea
Prior art keywords
segment
hash key
concierge
index
bucket
Prior art date
Application number
KR1020190165111A
Other languages
Korean (ko)
Other versions
KR102360879B1 (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

The present invention relates to a cacheline conscious extendible hashing method and a device therefor capable of minimizing access to a memory cacheline by using a segment including at least one bucket referenced through a directory. According to an embodiment of the present invention, the cacheline conscious extendible hashing method, which is performed by a cacheline conscious extendible hashing device, comprises the following steps of: identifying a segment referenced through a directory by using a first index of a hash key; verifying a bucket to be accessed within the identified segment by using a second index of the hash key; and storing data corresponding to the hash key in the verified bucket.

Description

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

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

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

해시 테이블은 해시 함수를 통해 데이터를 저장할 수 있는 특정 위치를 결정하는데, 특정 해시 키 값을 가지는 데이터가 저장될 수 있는 공간을 버켓(Bucket)이라 부른다. 해시 테이블은 크게 두 가지 종류로 구분할 수 있다. 하나는 정적 해시 테이블이고, 다른 하나는 동적 해시 테이블이다. 정적 해시 테이블 자료구조는 하나의 커다란 연속된 메모리 공간을 필요로 한다. 즉, 데이터들이 저장될 수 있는 버켓이 서로 연속되어 하나의 메모리 공간에 순서대로 저장된다. 어떤 데이터의 해시 키 값이 K라면, K 번째 버켓에 저장되는데, 이 K 번째 버켓의 위치는 연속된 메모리 공간에서 (K×버켓크기)로 결정된다. 즉, 버켓이 4KB 이고, 해시 키 값이 3이라면, 해시 테이블을 위해 할당받은 연속된 메모리 공간에서 12KB에 위치한 버켓에 데이터를 저장해야 한다. 만일 어떤 데이터가 저장될 버켓을 찾았는데, 그 버켓에 이미 많은 데이터가 저장되어 있어, 더 이상 새로운 데이터를 저장할 수 없다면, 정적 해시 테이블은 현재의 메모리 공간보다 더 커다란 연속 메모리 공간을 할당하고 기존 데이터들을 새로운 메모리 공간에 위치한 버켓들로 복사한다. 이 연산을 리해싱(Rehashing)이라 부르는데, 리해싱은 매우 오버헤드가 큰 연산이다. The 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. Static hash table data structures require one large contiguous memory space. That is, buckets in which data can be stored are consecutively stored in one memory space in order. If the hash key value of some data is K, it is stored in the K-th bucket, and the location of this K-th bucket is determined as (K × bucket size) in the continuous memory space. That is, if the bucket is 4KB and the hash key value is 3, data must be stored in a bucket located at 12KB in the contiguous memory space allocated for the hash table. If a bucket where some data is to be stored is found, and a lot of data is already stored in the bucket and no more new data can be stored, the static hash table allocates a larger contiguous memory space than the current memory space and Copies them to buckets located in a 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번째 포인터를 사용해 버켓을 찾는다.A dynamic hash table that dynamically allocates buckets has been developed to reduce such rehashing overhead. The most representative method is the Extendible Hash. The structure of the extendable hash table is composed of two layers as shown in FIG. 1. The upper layer is an array of pointers called directories, and the lower layer is the buckets that store 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 directory size is 8 (2 3 ), 3 bits are used. In the example of FIG. 1, 2 bits are used. Since the least significant bit (LSB), that is, 2 bits is 10 (2) , the bucket is searched using the binary number 10 (2) out of the 4 directory entries, that is, the 3rd pointer with the array index 2.

도 1의 예시에서는 버켓(Bucket) B3이 사용된다. 디렉토리를 찾는데 사용되는 비트의 수를 디렉토리의 글로벌 깊이(Global Depth, G)라고 부른다. 개별 버켓은 자신의 로컬 깊이(Local Depth)를 가지는데, 그 이유는 하나의 버켓이 여러 디렉토리 엔트리가 가리킬 수 있기 때문이다. 도 1의 예시에서와 같이 글로벌 깊이가 2이고 로컬 깊이가 1인 버켓(Bucket) B2는 2개의 디렉토리 엔트리가 가리키게 된다. 만일 글로벌 깊이가 3이고 로컬 깊이가 1이면 그 버켓은 2(3-1) 개의 디렉토리 엔트리가 가리키게 된다.In the example of FIG. 1, a bucket B3 is used. The number of bits used to find a directory is called the directory's Global Depth (G). Each bucket has its own Local Depth, because a bucket can be pointed to by multiple directory entries. As shown in the example of FIG. 1, two directory entries point to a 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 there is insufficient space, two new buckets must be created and the data must be divided and stored. In Figure 1, since the local depth of the bucket B2 is 1, only one bit marked in dark black is used and stored in the bucket B2. However, if the bucket is divided, the local depth is increased by one and the local depth is 2 Two buckets B4 and B5 are made as shown in FIG. 2.

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

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

도 3은 익스텐더블 해시의 디렉토리 확장의 예시를 설명하기 위한 도면이다.3 is a diagram for describing an example of directory expansion 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 is pointing to only one directory entry. In the example of FIG. 2, it is assumed that the bucket B3 is divided. The local depth of the 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 divided and new buckets B6 and B7 with a local depth of 3 are created, data is copied to B6 or B7 using bits of 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, I cannot 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 should be made twice as large as shown in FIG. 3. This operation is called Directory Doubling. That is, a directory with a global depth of 3 (2 3 ) and capable of storing 8 directory entries is created. At this time, pointers are copied to other buckets that are not partitioned so that new directory entries are doubled. That is, Bucket B1, which was pointed to by 00, is pointed 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, the size of the bucket is set to 4KB or 8KB, so performance is optimized only for disk-based systems. In other words, it is not a data structure suitable for an in-memory system. If this extendable hashing is applied to an 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, memory that is nonvolatile while being able to access byte units such as Intel 3D crosspoint, STT-MRAM (Spin Transfer Torque-Magnetic Random Access Memory), and PCRAM (Phase-change memory), which are recently developed. Even if the data structure is updated with 8-byte operations in order to be used on the computer, the data structure must always maintain consistency, but the conventional extendable hashing has a problem in that it does not maintain consistency for these 8-byte operations. .

본 발명의 실시예들은 디렉토리를 통해 참조되는 적어도 하나의 버켓이 포함된 세그먼트를 이용함으로써, 메모리 캐시라인 접근을 최소화할 수 있는, 캐시라인 컨시어스 익스텐더블 해싱 방법 및 장치를 제공하고자 한다.Embodiments of the present invention are to provide a method and apparatus for a cache line concierge extendable hashing that 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 fault-atomicity that conventional extendable hashing cannot provide for non-volatile memory, and provides non-volatile memory with fewer cache lines. An object of the present invention is to provide a method and apparatus for cache line concierge 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 the extendable hashing method performed by a Cacheline Conscious Extendible Hashing device, a directory (Directory) using a first index of a hash key Checking a segment referenced through ); Identifying a bucket to be accessed within the identified segment by using a second index of the hash key; And storing data corresponding to the hash key in the identified bucket. A cache 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 인덱스에 대응되는 디렉토리 엔트리를 탐색하고, 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인할 수 있다.In the step of confirming the segment, a directory entry corresponding to the first index of the hash key may be searched, and a segment referenced through the searched directory entry may be identified.

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

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

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

상기 세그먼트를 분할하는 단계는, 상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시킬 수 있다.The step of dividing the segment 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.

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

상기 방법은, 세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 상기 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행하는 단계를 더 포함할 수 있다.The method may further include identifying a segment in which a system problem has occurred using the global depth and a local depth of the segment, and recovering 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 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 through the memory and the cache, wherein the processor executes the at least one program, and thus a segment referenced through a directory using a first index of a hash key. ), and by using the second index of the hash key, a bucket to be accessed within the identified segment is identified, and data corresponding to the hash key is written to or read from the identified 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 check a segment referenced through the searched directory entry.

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

상기 프로세서는, 로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 상기 확인된 세그먼트의 데이터를 스캔하여 상기 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 상기 생성된 새로운 세그먼트에 복사할 수 있다.The processor generates a new segment with an increased local depth, scans data of the identified segment, and sends 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 segmented segment and designate data having another preset bit value corresponding to the increased local depth as an invalid key.

상기 프로세서는, 상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시킬 수 있다.The processor 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.

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

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

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

본 발명의 실시예들은 디렉토리를 통해 참조되는 적어도 하나의 버켓이 포함된 세그먼트를 이용함으로써, 메모리 캐시라인 접근을 최소화할 수 있다.Embodiments of the present invention 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 fault-atomicity that conventional extendable hashing cannot provide for non-volatile memory, and provides non-volatile memory with fewer cache lines. It 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 dividing a conventional extendable hash.
3 is a diagram for describing an example of directory expansion of an extendable hash.
4 is a configuration diagram illustrating a configuration of a cache line concierge extendable hashing apparatus according to an embodiment of the present invention.
5 to 7 are diagrams for explaining the operation of the cache line concierge extendable hashing apparatus according to an embodiment of the present invention.
8 is a flowchart illustrating a cache line concierge extendable hashing operation according to an embodiment of the present invention.
9 is a diagram for describing a new segment generation operation in a cache line-concierge extendable hashing operation according to an embodiment of the present invention.
10 is a diagram for explaining a separation and slow deletion operation in a cache line-concierge extendable hashing operation according to an embodiment of the present invention.
11 to 13 are diagrams for explaining a tree-shaped segment separation operation in a 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 operation in a cache line concierge extendable hashing method according to an embodiment of the present invention.
16 is a flowchart illustrating a partition operation operation in a cache line concierge extendable hashing method according to an embodiment of the present invention.
17 is a flowchart illustrating a recovery operation operation in a cache line concierge extendable hashing method according to an embodiment of the present invention.
18A to 18C are diagrams showing experimental results of throughputs having various segment/bucket sizes for an embodiment of the present invention and a prior art.
19A to 19D are diagrams showing time required for insertion while changing the R/W latency of a nonvolatile memory in the embodiment of the present invention and in the prior art.
20A to 20C are diagrams showing simultaneous execution performance for latency CDF and insertion/retrieval throughput for the embodiment of the present invention and the prior art.

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

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

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

어떤 구성요소가 다른 구성요소에 "연결되어" 있다거나 "접속되어" 있다고 언급된 때에는, 그 다른 구성요소에 직접적으로 연결되어 있거나 또는 접속되어 있을 수도 있지만, 중간에 다른 구성요소가 존재할 수도 있다고 이해되어야 할 것이다. 반면에, 어떤 구성요소가 다른 구성요소에 "직접 연결되어" 있다거나 "직접 접속되어" 있다고 언급된 때에는, 중간에 다른 구성요소가 존재하지 않는 것으로 이해되어야 할 것이다. When a component is referred to as being "connected" or "connected" to another component, it is understood that it may be directly connected or connected to the other component, but other components may exist in the middle. Should be. On the other hand, when a component is referred to as being "directly connected" or "directly connected" to another component, it should be understood that there is no other component 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. Singular expressions include plural expressions unless the context clearly indicates otherwise. In the present application, terms such as "comprise" or "have" are intended to designate the presence of features, numbers, steps, actions, components, parts, or combinations thereof described in the specification, but one or more other features. It is to be understood that the presence or addition of elements or numbers, steps, actions, components, parts, or combinations thereof, does not preclude in advance.

다르게 정의되지 않는 한, 기술적이거나 과학적인 용어를 포함해서 여기서 사용되는 모든 용어들은 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자에 의해 일반적으로 이해되는 것과 동일한 의미를 가지고 있다. 일반적으로 사용되는 사전에 정의되어 있는 것과 같은 용어들은 관련 기술의 문맥상 가지는 의미와 일치하는 의미를 가진 것으로 해석되어야 하며, 본 출원에서 명백하게 정의하지 않는 한, 이상적이거나 과도하게 형식적인 의미로 해석되지 않는다.Unless otherwise defined, all terms used herein, including technical or scientific terms, have the same meaning as commonly understood by one of ordinary skill in the art to which the present 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 technology, and should not be interpreted as an ideal or excessively formal meaning unless explicitly defined in this 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 an overall understanding, the same reference numerals are used for the same elements in the drawings, and duplicate descriptions for the same elements are omitted.

도 4는 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치의 구성을 설명하기 위한 구성도이다.4 is a configuration diagram illustrating a configuration of a cache line concierge 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 of the illustrated components are essential components. The cacheline concierge extendable hashing device 100 may be implemented by more components than the illustrated components, and the cacheline concierge extendable hashing device 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 a bucket in a file system of a memory or read data stored in the bucket through a 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, identifies a segment referenced through a directory using a first index of a hash key, and determines a second index of the hash key. By using, a bucket to be accessed within the identified segment is identified, and data corresponding to the hash key is stored in the identified 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 the 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 the 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 the 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 check 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 a 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 increased local depth, scans data of the identified segment, and retrieves data having a preset bit value corresponding to the increased local depth. You can copy it to a new segment created. For example, the processor 110 may copy data having a bit value of 1 of the second index corresponding to the increased local depth to a new segment and update a pointer of a corresponding directory entry.

다양한 실시예에서, 프로세서(110)는 분할되는 세그먼트의 로컬 깊이(Local depth)를 증가시키고, 그 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정할 수 있다. 일례로, 프로세서(110)는 제 2 인덱스의 증가시킨 로컬 깊이(Local depth)에 해당하는 비트 값이 0인 데이터를 분할되는 세그먼트에서 지우지 않고, 로컬 깊이만 8바이트 연산으로 증가시킴으로써, 지우지 않은 데이터가 유효하지 않은 키가 되게 만들 수 있다. 즉, 지우지 않은 데이터는 유효하지 않은 키로 간주되고, 다른 데이터에 의해 덮어 써질 수 있다.In various embodiments, the processor 110 may increase a local depth of a segment to be segmented, and designate data having another preset 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, but increases the local depth by 8-byte operation, Can be made into an invalid key. That is, data that has not been erased is considered 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 a pointer to be updated among pointers of a directory entry from a pointer having a large second index value to a pointer having a small second index value. As another example, the processor 110 may update a pointer to be updated among pointers of a directory entry from a pointer having a small second index value to a pointer having a large second index value. Thereafter, the processor 110 may perform a recovery operation in the opposite direction to the update order to recover.

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

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

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

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

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

본 발명의 일 실시예에서는 이러한 익스텐더블 해싱(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)을 효율적으로 관리할 수 있다.According to an embodiment of the present invention, it is intended to provide a Cacheline-Conscious Extendible Hashing (CCEH) method suitable for a memory capable of byte unit access by modifying such an extendible hashing method. . The Cacheline-Conscious Extendible Hashing (CCEH) according to an embodiment of the present invention is a modification of Extendible Hashing, and the conventional Extendable Hashing is a nonvolatile memory. This is an extendible hashing method that provides fault-atomicity, which cannot be provided for, and allows more efficient use of nonvolatile memory with fewer cachelines. CCEH can efficiently manage a cacheline by placing a layer called a segment in a two-tier structure consisting of a conventional directory and a bucket.

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

도 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, a cache line concierge extendable hashing apparatus according to an embodiment of the present invention includes a CPU 210, a CPU cache 220, and a nonvolatile memory (PM). Includes 230. Here, the nonvolatile memory 230 may include a PM-based file system 231 or a PM-based database. Instead of the nonvolatile memory 230, a dynamic random-access memory (DRAM) may be used.

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 check a segment referenced through a directory using the 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 check a bucket to be accessed within the identified segment by 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 a reference 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 identified segment. Directory [segment index] + bucket index can be the address of the bucket to be accessed. In addition, the CPU 210 may store a key value or data corresponding to the hash key in the identified bucket. Alternatively, the CPU can read or write the key value or data corresponding to the hash key in the identified bucket.

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

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

도 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)) 연산을 통해 한 번에 데이터를 저장하거나 읽을 캐시라인의 메모리 주소를 구할 수 있다. 여기서, 해시 키의 세그먼트 인덱스와 버켓 인덱스는 특정 위치로 한정되지 않는다. Referring to FIG. 8 as an example, since the global depth is 2 (G=2), the directory has 4 (2 2 ) entries, i.e. 00 (L=2), 01 (L=2), 10 (L=1) And 11 (L=1). If the given hash key value is 10101010... If 11111110 (2) , two bits equal to the global depth are 10 (2), that is, a segment is searched in a directory using a 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. The number of bits is determined by the size of the segment. That is, if a segment has 2 S buckets (cache lines), 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 the bucket to store or find data. That is, the hash key 10101010... 11111110 (2) can be obtained given the ground (& Segment (10 (2) ) + 64 * 11111110 (2)) the memory address of the cache line by the operation stores data at a time, or read. Here, the segment index and bucket index of the hash key are not limited to a specific position.

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

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

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

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

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

본 발명의 일 실시예에 따른 캐시라인-컨시어스 익스텐더블 해싱 장치는 세그먼트가 분할될 때, 새로운 세그먼트(Segment)를 할당하고, 세그먼트 안에 저장되어 있는 모든 데이터들을 스캔한다. 새로 생성된 세그먼트의 로컬 깊이는 분할되는 세그먼트의 로컬 깊이보다 하나 크다. 따라서, 분할되는 세그먼트의 데이터를 스캔하면서 해시 키의 한 비트를 더 확인하는데, 이 비트가 1이면 새로운 세그먼트에 복사하고 0이면 기존 세그먼트에 그대로 둔다. 주의할 점은 새로운 세그먼트로 데이터를 복사하더라도 이전의 세그먼트에서 삭제하지 않는다는 점이다. 이는 복구 시에 이전 세그먼트를 그대로 사용하기 위함이다.When a segment is divided, the cache line-concierge 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 segmented. Therefore, while scanning the data of the segment to be divided, one more 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 is not 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에서와 같이 세그먼트의 로컬 깊이가 증가되는 순간 유효하지 않은 키로 간주되고, 이 공간은 다른 데이터를 저장하는데 사용될 수 있다.9 shows a state in which a segment 3 having a local depth of 1 in FIG. 8 is divided to create a new segment 4 having a local depth of 2. FIG. Even if the data copied from the previous segment to the new segment 4 are not deleted, the data becomes invalid as soon as the local depth of the segment increases, so there is no problem even if it is not deleted. For example, in FIG. 9, 1101...11111110 (2) has been 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 increases 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 slow deletion operation in a cache line-concierge 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 the Segment ) It remains unremoved in 3. 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 considered an invalid key when 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 segmented from the previous segment must be increased after all new segments have been written. If this order is not followed, consistency problems may arise when the system dies. After increasing the local depth of the previous segment, the pointers of the directory entries 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 the segmented segment is increased and the directory points to a new segment.

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

세그먼트가 분할되는 경우, 디렉토리는 여러 디렉토리 엔트리가 갱신되어야 한다. 본 발명의 일 실시예에서는 디렉토리(Directory)를 갱신할 때는 디렉토리 엔트리(Directory entry)들을 버디(buddy)라 불리는 쌍으로 묶어서 세그먼트 분리(Segment split)가 일어나는 기록(History)을 트리 형태로 관리할 수 있다. 본 발명의 일 실시예에서는 시스템에 문제가 생겼을 때 이 트리를 탐색하는 것으로 문제를 발견할 수 있다. 이때, 본 발명의 일 실시예에서는 글로벌 깊이와 로컬 깊이를 사용해서 어느 부분이 문제가 생겼는지 판단하고 버디라 불리는 짝을 백업처럼 활용하여 복구를 진행할 수 있다. When the segment is divided, the directory must be updated with several directory entries. In one embodiment of the present invention, when updating a directory, directory entries are grouped into pairs called buddies, so that the history of segment splitting can be managed in a tree form. have. In one embodiment of the present invention, when there is a problem in the system, the problem can be found by searching this tree. In this case, in an embodiment of the present invention, a global depth and a local depth are used to determine which part has a problem, and a pair called a buddy may be used 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 having 16 directory entries. The tree structure shows the history of segmentation. It can be seen that S1 is divided into S1 and S3, and S2 is divided into S2 and S4 in the cache line concierge extendable hashing (CCEH) structure where only two segments S1 and S2 were initially present. In addition, in Level 3, it can be seen that S1 is divided into S1 and S5 again, and S3 is divided into S3 and S6. The current tree structure has a global depth of 4. In this state, consider a situation in which segment S2 is divided.

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, it must be updated from 9th to 12th entries in the directory. In a situation in which several directory entries are updated, the cache line 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, the cacheline concierge extendable hashing apparatus 100 may first update the leftmost entry and then update the right entries one by one in a situation in which several directory entries are updated. As shown in FIG. 12, the cache line 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 cache line concierge extendable hashing apparatus 100 updates the next 11th entry S2 (L=2) to S11 (L=3). Thereafter, the cache line concierge extendable hashing apparatus 100 increases the local depth of the 10th and ninth entries by one and changes them to S2 (L=3). This order must be observed for restoration.

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

도 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 operations are performed in order as described above. I 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 divided. Therefore, the right segment is reconstructed using the current node as a backup. If the two local depths are the same, it means that the segmented buddy segment is completely written.

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

단계 S101에서, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는, 해시 키의 인덱스를 입력받는다. In step S101, the cache 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 cache line concierge extendable hashing device 100 accesses the corresponding segment in the directory using the index of the hash key.

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

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

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

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

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

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

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

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

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

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

단계 S301에서, 본 발명의 일 실시예에 따른 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 첫 디렉토리 엔트리부터 복구 동작을 시작한다. In step S301, the cache line concierge 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 less than or equal to the size of the directory, the cache line concierge extendable hashing apparatus 100 checks the local depth of the current location. In step S302, if the current location is larger than the directory size, the cache line concierge extendable hashing apparatus 100 ends the recovery operation.

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

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

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

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

단계 S308에서, 캐시라인 컨시어스 익스텐더블 해싱 장치(100)는 버디가 현재 위치에 도달하지 않으면, 버디의 로컬 깊이가 현재 깊이와 같은지를 확인한다. In step S308, if the buddy does not reach the current position, the cache line concierge 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 cache line concierge extendable hashing apparatus 100 stores the current depth in the local depth of the buddy. On the other hand, the cache line concierge extendable hashing apparatus performs step S307 if the local depth of the buddy is the same as the current depth.

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

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

본 발명의 실시예들에 대한 실험을 위해, 인텔 제온 하스웰-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 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 has 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 DRAM based PM latency emulator, Quartz were used. To emulate write latency, we insert a stall cycle after each clflush command.

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

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

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

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

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

도 20a 내지 도 20c는 본 발명의 실시예와 종래 기술에 대해 레이턴시 CDF 및 삽입/검색 처리량에 대한 동시 실행 성능을 나타낸 도면이다.20A to 20C are diagrams showing simultaneous execution performance for latency CDF and insertion/retrieval throughput for the 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, the rest of the implementations except for the CCEH according to the embodiment of the present invention suffer from a total table rehashing overhead. CCEH(C) surpasses CCEH in search throughput, such as CoW (Copy-on-Write) 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 embodiments of the present invention described above 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 program instructions 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 when the at least one program is executed by the processor, the processor causes: a first index of a hash key. To check the segment referenced through the directory, check the bucket to be accessed within the identified segment by using the second index of the hash key, and check the identified bucket. A non-transitory computer-readable storage medium may be provided that includes instructions for inserting a key value corresponding to a hash key.

상술한 본 발명에 따른 방법은 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현되는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록 매체로는 컴퓨터 시스템에 의하여 해독될 수 있는 데이터가 저장된 모든 종류의 기록 매체를 포함한다. 예를 들어, ROM(Read Only Memory), RAM(Random Access Memory), 자기 테이프, 자기 디스크, 플래시 메모리, 광 데이터 저장장치 등이 있을 수 있다. 또한, 컴퓨터로 판독 가능한 기록매체는 컴퓨터 통신망으로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 읽을 수 있는 코드로서 저장되고 실행될 수 있다.The above-described method according to the present invention may be implemented as a computer-readable code on a computer-readable recording medium. The computer-readable recording medium includes all kinds of recording media in which data that can be decoded 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 device, and the like. In addition, the computer-readable recording medium can be distributed to a computer system connected through a computer communication network, and stored and executed as code that can be read 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 It will be appreciated that various modifications and changes can be made to the present invention without departing from the spirit and scope.

구체적으로, 설명된 특징들은 디지털 전자 회로, 또는 컴퓨터 하드웨어, 펌웨어, 또는 그들의 조합들 내에서 실행될 수 있다. 특징들은 예컨대, 프로그래밍 가능한 프로세서에 의한 실행을 위해, 기계 판독 가능한 저장 디바이스 내의 저장장치 내에서 구현되는 컴퓨터 프로그램 제품에서 실행될 수 있다. 그리고 특징들은 입력 데이터 상에서 동작하고 출력을 생성함으로써 설명된 실시예들의 함수들을 수행하기 위한 지시어들의 프로그램을 실행하는 프로그래밍 가능한 프로세서에 의해 수행될 수 있다. 설명된 특징들은, 데이터 저장 시스템으로부터 데이터 및 지시어들을 수신하기 위해, 및 데이터 저장 시스템으로 데이터 및 지시어들을 전송하기 위해, 결합된 적어도 하나의 프로그래밍 가능한 프로세서, 적어도 하나의 입력 디바이스, 및 적어도 하나의 출력 디바이스를 포함하는 프로그래밍 가능한 시스템 상에서 실행될 수 있는 하나 이상의 컴퓨터 프로그램들 내에서 실행될 수 있다. 컴퓨터 프로그램은 소정 결과에 대해 특정 동작을 수행하기 위해 컴퓨터 내에서 직접 또는 간접적으로 사용될 수 있는 지시어들의 집합을 포함한다. 컴퓨터 프로그램은 컴파일된 또는 해석된 언어들을 포함하는 프로그래밍 언어 중 어느 형태로 쓰여지고, 모듈, 소자, 서브루틴(subroutine), 또는 다른 컴퓨터 환경에서 사용을 위해 적합한 다른 유닛으로서, 또는 독립 조작 가능한 프로그램으로서 포함하는 어느 형태로도 사용될 수 있다.Specifically, the described features may be implemented in digital electronic circuitry, or computer hardware, firmware, or combinations thereof. Features may be executed in a computer program product implemented in storage in a machine-readable storage device, for example, for execution by a programmable processor. And the features can be performed by a programmable processor executing a program of directives to perform the functions of the described embodiments by operating on input data and generating output. The described features include at least one programmable processor, at least one input device, and at least one output coupled to receive data and directives from the data storage system and to transmit data and directives to the data storage system. It can be executed within one or more computer programs that can be executed on a programmable system including the device. A computer program includes a set of directives that can be used directly or indirectly within a computer to perform a specific action on a given result. Computer programs are written in any form of programming language, including compiled or interpreted languages, and included as modules, elements, subroutines, or other units suitable for use in other computer environments, or as independently operable programs. 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 directives include, for example, both general and special purpose microprocessors, and either a single processor or multiple processors of a different type of computer. Storage devices suitable for implementing computer program directives and data implementing the described features are, 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 types of non-volatile memory including CD-ROM and DVD-ROM disks. The processor and memory may be integrated within application-specific integrated circuits (ASICs) or added by ASICs.

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

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

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

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

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

Claims (23)

캐시라인 컨시어스 익스텐더블 해싱(Cacheline Conscious Extendible Hashing) 장치에 의해 수행되는 익스텐더블 해싱 방법에 있어서,
해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하는 단계;
상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하는 단계; 및
상기 확인된 버켓에 상기 해시 키에 대응되는 데이터를 저장하는 단계를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
In the extendable hashing method performed by a Cacheline Conscious Extendible Hashing device,
Identifying a segment referenced through a directory by using a first index of a hash key;
Identifying a bucket to be accessed within the identified segment by using a second index of the hash key; And
And storing data corresponding to the hash key in the identified bucket.
제1항에 있어서,
상기 해시 키의 글로벌 깊이(Global depth) 비트값을 확인하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 1,
The method further comprising the step of checking a global depth bit value of the hash key.
제1항에 있어서,
상기 해시 키의 제1 인덱스는,
상기 해시 키의 최상위 비트(Most Significant Bit, MSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 1,
The first index of the hash key,
Including the most significant bit of the hash key (Most Significant Bit, MSB), cache line concierge extendable hashing method.
제1항에 있어서,
상기 해시 키의 제2 인덱스는,
상기 해시 키의 최하위 비트(Least Significant Bit, LSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 1,
The second index of the hash key,
Including the least significant bit (Least Significant Bit, LSB) of the hash key, cache line concierge extendable hashing method.
제1항에 있어서,
상기 세그먼트를 확인하는 단계는,
상기 해시 키의 제1 인덱스에 대응되는 디렉토리 엔트리를 탐색하고, 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 1,
The step of identifying the segment,
A method of searching for a directory entry corresponding to the first index of the hash key and identifying a segment referenced through the searched directory entry.
제1항에 있어서,
상기 해시 키의 제2 인덱스를 이용하여 세그먼트에 접근하는 경우에 충돌이 발생하면 세그먼트를 분할하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 1,
The method further comprising dividing the segment when a collision occurs when a segment is accessed by using the second index of the hash key.
제6항에 있어서,
상기 세그먼트를 분할하는 단계는,
로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 상기 확인된 세그먼트의 데이터를 스캔하여 상기 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 상기 생성된 새로운 세그먼트에 복사하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 6,
The step of dividing the segment,
A cache that creates a new segment with 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 created new segment Line concierge extendable hashing method.
제6항에 있어서,
상기 세그먼트를 분할하는 단계는,
상기 분할된 세그먼트의 로컬 깊이(Local depth)를 증가시키고 상기 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 6,
The step of dividing the segment,
A method of increasing a local depth of the segmented segment and designating data having a different bit value corresponding to the increased local depth as an invalid key.
제6항에 있어서,
상기 세그먼트를 분할하는 단계는,
상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시키는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 6,
The step of dividing the segment,
A method of increasing the local depth of the identified segment, updating a pointer of a directory entry, and increasing the local depth of the segmented segment.
제6항에 있어서,
상기 세그먼트가 분할되는 경우, 디렉토리를 갱신할 때 디렉토리 엔트리들을 버디(buddy)라는 쌍으로 묶는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 6,
If the segment is divided, the method further comprising the step of grouping the directory entries into a pair of a buddy (buddy) when updating the directory, cacheline concierge extendable hashing method.
제10항에 있어서,
세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 상기 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 방법.
The method of claim 10,
Using the global depth and the local depth of the segment to identify the segment in which the system problem has occurred, and performing recovery of the segment in which the system problem has occurred by using the buddy, the cacheline concierge extendable hashing method. .
적어도 하나의 프로그램을 저장하고, 디렉토리를 통해 참조되는 적어도 하나의 버켓이 포함된 세그먼트를 저장하는 메모리; 및
상기 메모리와 캐시를 통해 연결된 프로세서를 포함하고,
상기 프로세서는, 상기 적어도 하나의 프로그램을 실행함으로써,
해시 키(Hash key)의 제1 인덱스를 이용하여 디렉토리(Directory)를 통해 참조되는 세그먼트(Segment)를 확인하고,
상기 해시 키의 제2 인덱스를 이용하여 상기 확인된 세그먼트 내에서 접근하려는 버켓(Bucket)을 확인하고,
상기 확인된 버켓에 상기 해시 키에 대응되는 데이터를 쓰거나 읽는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
A memory storing at least one program and storing a segment including at least one bucket referenced through a directory; And
Including a processor connected through the memory and cache,
The processor, by executing the at least one program,
Check the segment referenced through the directory by using the first index of the hash key,
Using the second index of the hash key, a bucket to be accessed within the identified segment is identified,
A cache line concierge extendable hashing device that writes or reads data corresponding to the hash key in the verified bucket.
제12항에 있어서,
상기 프로세서는,
상기 해시 키의 글로벌 깊이(Global depth) 비트값을 확인하는 단계를 더 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 12,
The processor,
Further comprising the step of checking a global depth bit value of the hash key.
제12항에 있어서,
상기 해시 키의 제1 인덱스는,
상기 해시 키의 최상위 비트(Most Significant Bit, MSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 12,
The first index of the hash key,
A cache line concierge extendable hashing device including the most significant bit (MSB) of the hash key.
제12항에 있어서,
상기 해시 키의 제2 인덱스는,
상기 해시 키의 최하위 비트(Least Significant Bit, LSB)를 포함하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 12,
The second index of the hash key,
A cache line concierge extendable hashing device including a least significant bit (LSB) of the hash key.
제12항에 있어서,
상기 프로세서는,
상기 해시 키의 제1 인덱스에 대응되는 디렉토리 엔트리를 탐색하고, 상기 탐색된 디렉토리 엔트리를 통해 참조되는 세그먼트를 확인하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 12,
The processor,
A cache line concierge extendable hashing device for searching for a directory entry corresponding to the first index of the hash key and identifying a segment referenced through the searched directory entry.
제12항에 있어서,
상기 프로세서는,
상기 해시 키의 제2 인덱스를 이용하여 세그먼트에 접근하는 경우에 충돌이 발생하면 세그먼트를 분할하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 12,
The processor,
A cacheline concierge extendable hashing device that divides a segment when a collision occurs when a segment is accessed using the second index of the hash key.
제17항에 있어서,
상기 프로세서는,
로컬 깊이(Local depth)를 증가시킨 새로운 세그먼트를 생성하고, 상기 확인된 세그먼트의 데이터를 스캔하여 상기 증가시킨 로컬 깊이에 해당하는 기설정된 비트 값을 갖는 데이터를 상기 생성된 새로운 세그먼트에 복사하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 17,
The processor,
A cache that creates a new segment with 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 created new segment Line concierge extendable hashing device.
제17항에 있어서,
상기 프로세서는,
상기 분할된 세그먼트의 로컬 깊이(Local depth)를 증가시키고 상기 증가시킨 로컬 깊이에 해당하는 기설정된 다른 비트 값을 갖는 데이터를 유효하지 않은 키로 지정하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 17,
The processor,
A cache line concierge extendable hashing device that increases a local depth of the segmented segment and designates data having another preset bit value corresponding to the increased local depth as an invalid key.
제17항에 있어서,
상기 프로세서는,
상기 확인된 세그먼트의 로컬 깊이를 증가시키고, 디렉토리 엔트리(Directory entry)의 포인터(Pointer)를 갱신하고, 상기 분할된 세그먼트의 로컬 깊이를 증가시키는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 17,
The processor,
A cacheline concierge extendable hashing device for increasing the local depth of the identified segment, updating a pointer of a directory entry, and increasing the local depth of the segmented segment.
제17항에 있어서,
상기 프로세서는,
상기 확인된 세그먼트가 분할되는 경우, 디렉토리를 갱신할 때 디렉토리 엔트리들을 버디(buddy)라는 쌍으로 묶는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 17,
The processor,
When the identified segment is divided, when updating a directory, the directory entries are grouped into a pair called a buddy.
제21항에 있어서,
상기 프로세서는,
세그먼트의 글로벌 깊이와 로컬 깊이를 사용하여 시스템 문제가 발생된 세그먼트를 확인하고, 상기 버디를 이용하여 시스템 문제가 발생된 세그먼트의 복구를 수행하는, 캐시라인 컨시어스 익스텐더블 해싱 장치.
The method of claim 21,
The processor,
A cacheline concierge extendable hashing device that checks a segment in which a system problem occurs using the global depth and a local depth of the segment, and recovers a segment in which a system problem occurs using the buddy.
프로세서에 의해 실행 가능한 적어도 하나의 프로그램을 포함하는 비일시적 컴퓨터 판독가능 저장 매체로서, 상기 적어도 하나의 프로그램은 상기 프로세서에 의해 실행될 때, 상기 프로세서로 하여금:
해시 키(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:
Check the segment referenced through the directory by using the first index of the hash key,
Using the second index of the hash key, a bucket to be accessed within the identified segment is identified,
A non-transitory computer-readable storage medium comprising instructions for causing inserting a key value corresponding to the hash key into the identified 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
KR20190020794 2019-02-21
KR1020190020794 2019-02-21

Publications (2)

Publication Number Publication Date
KR20200102337A true KR20200102337A (en) 2020-08-31
KR102360879B1 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 (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010047384A (en) * 1999-11-19 2001-06-15 오길록 A method for controlling directory splits of the extendible hashing
KR20130064319A (en) * 2011-12-08 2013-06-18 한양대학교 에리카산학협력단 Hybrid hash index for storage device based on flash memory
JP2015176407A (en) * 2014-03-17 2015-10-05 Necソリューションイノベータ株式会社 Search device, search method, search program and search data structure

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20010047384A (en) * 1999-11-19 2001-06-15 오길록 A method for controlling directory splits of the extendible hashing
KR20130064319A (en) * 2011-12-08 2013-06-18 한양대학교 에리카산학협력단 Hybrid hash index for storage device based on flash memory
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
KR102360879B1 (en) 2022-02-10

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
US10649897B2 (en) Access request processing method and apparatus, and computer device
US8868926B2 (en) Cryptographic hash database
CN113039547B (en) Key value storage memory system, method and related storage medium
CN105843551B (en) Data integrity and loss resistance in high performance and large capacity storage deduplication
USRE45577E1 (en) Method of writing to a flash memory including data blocks and log blocks
US9971799B2 (en) Storage device for storing directory entries, directory entry lookup apparatus and method, and storage medium storing directory entry lookup program
US20080229003A1 (en) Storage system and method of preventing deterioration of write performance in storage system
US10261704B1 (en) Linked lists in flash memory
US11030092B2 (en) Access request processing method and apparatus, and computer system
US20200334292A1 (en) Key value append
US11841826B2 (en) Embedded reference counts for file clones
KR20200060220A (en) NVM-based file system and method for data update using the same
KR101456104B1 (en) Method, system for dual buffering file management with non-volatile memory and mass storage device using the same
US20200272424A1 (en) Methods and apparatuses for cacheline conscious extendible hashing
US10540242B2 (en) Adaptive power cycle sequences for data recovery
KR102360879B1 (en) Methods and apparatuses for cacheline conscious extendible hashing
US11163446B1 (en) Systems and methods of amortizing deletion processing of a log structured storage based volume virtualization
JP6788386B2 (en) File access provision methods, computers, and software products
US11204880B2 (en) Hash tables in flash memory
KR102665979B1 (en) Compressed key-value store tree data blocks leaked
CN111143284B (en) Dynamic indexing method and device for file system

Legal Events

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