KR20090007926A - Apparatus and method for managing index of data stored in flash memory - Google Patents

Apparatus and method for managing index of data stored in flash memory Download PDF

Info

Publication number
KR20090007926A
KR20090007926A KR1020070071155A KR20070071155A KR20090007926A KR 20090007926 A KR20090007926 A KR 20090007926A KR 1020070071155 A KR1020070071155 A KR 1020070071155A KR 20070071155 A KR20070071155 A KR 20070071155A KR 20090007926 A KR20090007926 A KR 20090007926A
Authority
KR
South Korea
Prior art keywords
index
page
flash memory
buffer
entries
Prior art date
Application number
KR1020070071155A
Other languages
Korean (ko)
Other versions
KR100907477B1 (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 KR1020070071155A priority Critical patent/KR100907477B1/en
Publication of KR20090007926A publication Critical patent/KR20090007926A/en
Application granted granted Critical
Publication of KR100907477B1 publication Critical patent/KR100907477B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/14Handling requests for interconnection or transfer
    • G06F13/16Handling requests for interconnection or transfer for access to memory bus
    • G06F13/1668Details of memory controller
    • G06F13/1673Details of memory controller using buffers
    • 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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/0292User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5016Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals the resource being the memory

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

An index information management apparatus of data effectively stored in a flash memory through cluster and a method thereof are provided to reflect the physical properties of the memory. An index generation part confirms with whether an index-page exists in the flash memory(S500). The whole record stored in flash memory is read the index generation part(S510). An index generation part stores an index-page in which the flash page is allocated from the flash memory(S530). A directory management part reflects the indexing information of the index-page stored in the flash memory(S540). The index generation part confirms whether the index entry comprises index-page(S550).

Description

플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치 및 방법{Apparatus and method for managing index of data stored in flash memory}Apparatus and method for managing index of data stored in flash memory}

도 1은 본 발명에 따른 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치에 대한 바람직한 실시예의 상세한 구성을 도시한 블록도,1 is a block diagram showing a detailed configuration of a preferred embodiment of an apparatus for managing index information of data stored in a flash memory according to the present invention;

도 2는 플래시 메모리에 저장되어 있는 인덱스 페이지의 예를 도시한 도면,2 is a diagram illustrating an example of an index page stored in a flash memory;

도 3은 갱신지연 버퍼부에 저장된 버퍼 엔트리의 예를 도시한 도면,3 is a diagram showing an example of a buffer entry stored in an update delay buffer unit;

도 4는 인덱스 관리부의 상세한 구성을 도시한 블록도,4 is a block diagram showing a detailed configuration of an index management unit;

도 5는 본 발명에 따른 인덱스 정보 관리 장치에서 인덱스 페이지를 생성하기 위한 벌크-로드연산의 수행과정을 도시한 흐름도,5 is a flowchart illustrating a process of performing a bulk-load operation for generating an index page in the apparatus for managing index information according to the present invention;

도 6은 본 발명에 따른 인덱스 정보 관리 방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도,6 is a flowchart illustrating a process of performing a preferred embodiment of the index information management method according to the present invention;

도 7은 본 발명에 따른 인덱스 정보 관리 장치에서 삽입 또는 삭제연산과정에 대한 일 실시예의 수행과정을 도시한 흐름도,7 is a flowchart illustrating a process of performing an embodiment of an insertion or deletion operation in the index information management apparatus according to the present invention;

도 8은 본 발명에 따른 인덱스 정보 관리 장치에서 삽입 또는 삭제연산과정에 대한 다른 실시예의 수행과정을 도시한 흐름도,8 is a flowchart illustrating a process of performing another embodiment of an insertion or deletion operation in the index information management apparatus according to the present invention;

도 9는 본 발명에 따른 인덱스 정보 관리 장치에서 삽입 또는 삭제연산과정에 대한 또 다른 실시예의 수행과정을 도시한 흐름도,9 is a flowchart illustrating a process of performing another embodiment of an insertion or deletion operation in the index information management apparatus according to the present invention;

도 10a 및 도 10b는 각각 단위병합연산의 수행대상이 되는 플래시 메모리의 데이터 및 갱신지연 버퍼부의 데이터를 도시한 도면,10A and 10B are diagrams illustrating data of a flash memory and an update delay buffer unit, which are units of a unit merge operation, respectively;

도 11은 본 발명에 따른 인덱스 정보 관리 방법에 있어서 단위병합연산의 수행과정을 도시한 흐름도,11 is a flowchart illustrating a process of performing a unit merge operation in the index information management method according to the present invention;

도 12는 도 11에 도시된 단위병합연산의 페이지 재구성단계의 구체적인 구성을 도시한 흐름도,12 is a flowchart illustrating a specific configuration of a page reconstruction step of the unit merge operation illustrated in FIG. 11;

도 13은 단위병합연산시 단위병합 가능유닛과 단위병합 가능셋을 메인 메모리 내에서 병합한 결과를 도시한 도면, 그리고,FIG. 13 is a diagram illustrating a result of merging a unit merging unit and a unit merging set in a main memory during unit merging; and

도 14는 본 발명에 따른 인덱스 정보 관리 방법에 있어서 검색연산의 수행과정을 도시한 흐름도이다.14 is a flowchart illustrating a process of performing a search operation in the index information management method according to the present invention.

본 발명은 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치 및 방법에 관한 것으로, 보다 상세하게는 플래시 메모리에 저장된 데이터에 대하여 발생하는 다양한 연산을 효율적으로 처리하는 인덱스 정보를 생성하고 관리하는 장치 및 방법에 관한 것이다.The present invention relates to an apparatus and method for managing index information of data stored in a flash memory, and more particularly, to an apparatus and method for generating and managing index information for efficiently processing various operations occurring on data stored in a flash memory. It is about.

플래시 메모리는 동일한 크기의 연속적인 블록으로 구성되며, 하나의 블록은 동일한 크기의 연속적인 페이지로 구성된다. 플래시 메모리에서 수행 가능한 연산은 읽기, 쓰기 및 소거의 세가지이다. 읽기 및 쓰기 연산은 페이지 단위로 수행되 며, 소거 연산은 블록 단위로 수행된다. 이때, 쓰기 연산은 읽기 연산에 비해 많은 수행시간이 소요되며, 쓰기 연산에 비해 더 많은 수행시간이 소요되는 소거 연산을 유발시킨다. 따라서 쓰기 연산의 횟수를 줄일수록 플래시 메모리의 전반적인 성능이 향상된다. Flash memory is composed of consecutive blocks of the same size, and one block is composed of consecutive pages of the same size. There are three operations that can be performed in flash memory: read, write and erase. Read and write operations are performed in units of pages, and erase operations are performed in units of blocks. At this time, the write operation takes more execution time than the read operation, and causes an erase operation that requires more execution time than the write operation. Therefore, reducing the number of write operations improves the overall performance of the flash memory.

이러한 플래시 메모리는 현재 많은 분야에서 주 저장 장치로 사용되고 있으나 다른 저장 장치와는 구별되는 특성이 있다. Such flash memory is currently used as a main storage device in many fields, but is distinguished from other storage devices.

플래시 메모리의 첫 번째 특성은 읽기 연산과 쓰기, 소거 연산의 수행 속도에 큰 차이가 있다는 것이다. 플래시 메모리의 읽기 연산과 쓰기 연산은 페이지 단위로 수행되며, 한 페이지에 쓰기 연산을 수행하는 시간은 읽기 연산에 비하여 20배 가량 느리다. 또한 소거 연산은 여러 개의 페이지로 구성된 블록 단위로 수행되는데 그 수행 속도는 읽기 속도와 비교하여 200배 가량 느리다.The first characteristic of flash memory is that there is a big difference in the speed of read, write and erase operations. The read and write operations of the flash memory are performed in units of pages, and the time to write a page is about 20 times slower than the read operation. In addition, the erase operation is performed in a block unit composed of several pages, which is 200 times slower than the read speed.

플래시 메모리의 두 번째 특성은 소거 연산이 수행된 페이지에만 쓰기 연산을 수행할 수 있다는 것이다. 즉, 플래시 메모리에 저장된 데이터가 갱신되어도 동일한 페이지에 덮어쓰는 것은 불가능하며 새로운 빈 페이지에 기록하여야 한다. 이 때, 갱신할 데이터가 저장되어 있던 페이지 내에 존재하는 다른 모든 유효한 데이터들도 모두 복사해야 하는 부하가 추가적으로 발생한다. 기존의 페이지는 추후에 소거 연산을 통하여 다시 기록 가능한 상태가 된다.The second characteristic of flash memory is that the write operation can be performed only on the page where the erase operation is performed. That is, even if the data stored in the flash memory is updated, it is impossible to overwrite the same page and must be written to a new blank page. At this time, there is an additional load to copy all other valid data existing in the page where the data to be updated is stored. The existing page is made ready to be written again later through an erase operation.

플래시 메모리의 세 번째 특성은 그 수명이 결정되어 있다는 것이다. 플래시 메모리를 구성하는 페이지의 각 블록은 100,000 ~ 1,000,000번의 소거 연산이 이루어지고 나면 더 이상 사용이 불가능하다. 따라서 플래시 페이지에 대한 잦은 덮어 쓰기는 빈 페이지의 급격한 소모를 유발시키고, 이는 빈 페이지를 제공하기 위한 소거 연산을 유발시켜 결과적으로 플래시 메모리의 수명을 단축시킨다.The third characteristic of flash memory is that its life is determined. Each block on the page that makes up the flash memory is no longer available after 100,000 to 1,000,000 erase operations. As a result, frequent overwriting of flash pages results in a rapid exhaustion of empty pages, which in turn causes an erase operation to provide the empty pages, resulting in a shorter flash memory life.

상술한 바와 같은 플래시 메모리의 특성으로 인하여 기존의 일반적인 저장장치에 적용되는 인덱싱 방법은 플래시 메모리에 적합하지 않다. 종래의 가장 대표적인 인덱스 구조로는 B+트리가 있다. B+트리는 하드 디스크 기반 인덱스에서 성능 감소의 주원인인 디스크의 입출력을 효과적으로 감소시키는 것을 주목적으로 고안되었다. 그 결과 큰 성능 향상을 이루었으며 현재 하드 디스크 기반 데이터베이스 시스템에서 가장 널리 쓰이는 인덱스 구조이다.Due to the characteristics of the flash memory as described above, the indexing method applied to the existing general storage device is not suitable for the flash memory. The most typical index structure of the related art is a B + tree. The B + tree is designed to effectively reduce disk I / O, which is the main cause of performance reduction in hard disk-based indexes. The result is a significant performance improvement and is the most widely used index structure in current hard disk-based database systems.

플래시 메모리에서 B+트리를 그대로 사용하는 경우, 레코드가 삽입 또는 삭제될 때 플래시 페이지에는 비록 여유 공간이 존재하더라도 동일한 페이지에 덮어쓸 수 없기 때문에 새로운 페이지를 할당하여 해당 노드의 변경된 상태를 저장해야 한다. 이 때 오버플로 또는 언더플로우 현상이 발생하면 해당 노드는 분할 또는 병합이 이루어지고 이는 상위 노드에 영향을 미친다. 즉, 상위 노드에 대응되는 플래시 페이지에서도 새로운 페이지의 할당 및 복사 연산이 이루어져야 한다. B+트리에서는 이러한 분할과 병합이 리프 노드로부터 루트 노드에 이르기까지 연쇄적으로 발생할 수 있다. 이와 같이 데이터의 삽입과 삭제로 잦은 덮어쓰기를 유발시키는 B+트리는 플래시 메모리의 물리적 특성으로 인하여 플래시 메모리의 수명을 단축시키며, 인덱스에서 발생하는 다양한 연산을 수행함에 있어서 하드 디스크에서와 같은 성능을 기대하기 어렵다.If the B + tree is used as it is in flash memory, when a record is inserted or deleted, the flash page cannot be overwritten on the same page even though there is free space. Therefore, a new page must be allocated to save the changed state of the node. At this time, if overflow or underflow occurs, the node is divided or merged, which affects the parent node. In other words, new pages must be allocated and copied in the flash page corresponding to the upper node. In a B + tree, such splitting and merging can occur cascaded from leaf nodes to root nodes. The B + tree, which causes frequent overwriting by inserting and deleting data, shortens the life of flash memory due to the physical characteristics of flash memory, and expects the same performance as that of the hard disk in performing various operations occurring in the index. it's difficult.

플래시 메모리를 물리적 기반으로 하는 종래의 인덱스 구조로는 B-트리를 플 래시 메모리의 특성에 맞게 개선한 BFTL(B-Tree Flash Translation Layer)이 있다. 플래시 메모리에 대한 B+트리의 구현상의 문제점에서 나타난 바와 같이 플래시 메모리의 특성상 페이지에 여유 공간이 존재하더라도 그 공간을 활용할 수 없다. 따라서 BFTL에서는 인덱스 엔트리들을 플래시 페이지에 기록할 때 B-트리와는 달리 서로 다른 인덱스 노드에 속하는 엔트리라 할지라도 하나의 플래시 페이지에 최대한 가득 채워서 저장한다.A conventional index structure based on flash memory is a B-Tree Flash Translation Layer (BFTL) that improves B-trees to suit the characteristics of flash memory. As shown in the problem of the implementation of B + tree for flash memory, even if there is free space on the page, the space cannot be utilized. Therefore, in BFTL, when writing index entries to a flash page, even though entries belonging to different index nodes are stored in a single flash page as much as possible, unlike B-trees.

이와 같이 BFTL은 B-트리와는 달리 하나의 플래시 페이지에 서로 다른 인덱스 노드에 속하는 엔트리가 존재하기 때문에 BFTL을 이용하는 어플리케이션에게 B-트리를 이용하는 것과 동일하게 보여주기 위한 추가적인 메커니즘이 필요하다. 먼저 BFTL에서는 동일한 인덱스 노드에 속하는 엔트리들의 물리적 저장 위치를 식별할 수 있는 메커니즘이 필요하다. 이를 위해 BFTL에서는 노드 변환 테이블이라는 자료 구조를 이용한다. 노드 변환 테이블은 동일 노드에 소속된 인덱스 엔트리들이 저장된 주소들의 연결 리스트를 원소로 가지는 집합이다. 노드 변환 테이블은 메인 메모리 내에 상주하며 노드의 수가 증가함에 따라 그 크기가 증가하므로 메인 메모리의 사용량을 증가시킨다. BFTL에서 인덱스의 탐색은 이러한 노드 변환 테이블을 이용하여 메인 메모리 내에서 인덱스 노드를 구축해 가며 수행된다. 이 과정에서 다수의 서로 다른 플래시 페이지들을 액세스해야 하므로 검색 성능은 감소하며, 인덱스 노드를 구축하기 위해 메인 메모리 사용량이 증가한다. 다음으로 BFTL에서 플래시 페이지에 저장된 인덱스 엔트리들은 각기 자신이 소속된 노드를 나타내는 추가 정보를 포함한다. 만약, 인덱스 노드의 분할 또는 합병이 발생하면 이러한 추가 정보로 인하여 다수의 페이지에 분산되어 저장된 인덱스 엔트리들의 갱신이 유발된다. 그 결과, 대상 인덱스 엔트리들을 포함하는 모든 플래시 페이지들은 새로운 페이지로 복사되어야 한다.As such, unlike the B-tree, the BFTL has an entry belonging to a different index node in one flash page. Therefore, an additional mechanism is required to show an application that uses the BFTL the same as using the B-tree. First, BFTL needs a mechanism to identify the physical storage location of entries belonging to the same index node. To do this, BFTL uses a data structure called a node translation table. The node translation table is a collection having as its elements a linked list of addresses in which index entries belonging to the same node are stored. The node translation table resides in main memory, and its size increases as the number of nodes increases, thereby increasing the usage of main memory. Index search in BFTL is performed by building index nodes in main memory using this node translation table. This process requires access to a number of different flash pages, which reduces search performance and increases main memory usage to build index nodes. Next, in BFTL, the index entries stored on the flash page each contain additional information indicating the node to which they belong. If splitting or merging of index nodes occurs, this additional information causes update of index entries distributed and stored in multiple pages. As a result, all flash pages containing target index entries must be copied to a new page.

상술한 바와 같이 BFTL은 서로 다른 인덱스 노드에 속하는 엔트리들을 하나의 플래시 페이지에 저장함으로써 불필요한 데이터의 복사에 따른 부하를 감소시키며, 플래시 페이지를 가득 채움으로써 기록되는 페이지의 수를 감소시킨다. 그러나 BFTL은 그 구조로 인하여 메인 메모리의 사용량이 증가하고 검색 성능이 감소하게 되며, 인덱스 노드의 분할 또는 합병 시 다수의 플래시 페이지가 복사되는 부하를 유발한다.As described above, BFTL reduces the load due to unnecessary copying of data by storing entries belonging to different index nodes in one flash page, and reduces the number of pages written by filling the flash page. However, due to its structure, BFTL increases the main memory usage and decreases the search performance, and incurs the load of multiple flash pages being copied when the index node is split or merged.

본 발명이 이루고자 하는 기술적 과제는 플래시 메모리의 물리적 특성을 고려하여 인덱스의 동적인 삽입과 삭제로 인한 플래시 페이지의 쓰기 연산과 소거 연산의 횟수를 감소시킬 수 있고, 플래시 메모리에 저장된 데이터에 대하여 인덱스 엔트리들을 효과적으로 클러스터링함으로써 빠른 검색을 지원할 수 있으며, 플래시 페이지의 이용률을 높여 저장 공간의 효율성을 보장할 수 있는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치 및 방법을 제공하는 데 있다.An object of the present invention is to reduce the number of write and erase operations of a flash page due to dynamic insertion and deletion of an index in consideration of the physical characteristics of the flash memory, and index entries for data stored in the flash memory. The present invention provides an apparatus and method for managing index information of data stored in flash memory that can support fast retrieval by effectively clustering them and ensure the efficiency of storage space by increasing utilization of flash pages.

본 발명이 이루고자 하는 다른 기술적 과제는 플래시 메모리의 물리적 특성을 고려하여 인덱스의 동적인 삽입과 삭제로 인한 플래시 페이지의 쓰기 연산과 소거 연산의 횟수를 감소시킬 수 있고, 플래시 메모리에 저장된 데이터에 대하여 인덱스 엔트리들을 효과적으로 클러스터링함으로써 빠른 검색을 지원할 수 있으며, 플래시 페이지의 이용률을 높여 저장 공간의 효율성을 보장할 수 있는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는 데 있다.Another object of the present invention is to reduce the number of write and erase operations of a flash page due to dynamic insertion and deletion of an index in consideration of the physical characteristics of the flash memory, and to index the data stored in the flash memory. By effectively clustering entries, you can support fast retrieval, and you can use a computer that has recorded a program to run index information management of data stored in flash memory that can increase the utilization of flash pages to ensure the efficiency of storage space. To provide a record carrier.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치는, 플래시 메모리에 저장되어 있거나 저장될 연산대상 데이터 및 상기 연산대상 데이터에 대해 수행될 연산의 종류를 포함하는 버퍼 엔트리가 저장되는 갱신지연 버퍼부; 상기 플래시 메모리에 대해 연산대상 데이터를 기록하기 위한 삽입연산 또는 상기 플래시 메모리로부터 연산대상 데이터를 제거하기 위한 삭제연산의 수행이 지시되면 수행될 연산에 대응하는 버퍼 엔트리를 생성하여 상기 갱신지연 버퍼부에 저장하는 버퍼 엔트리 생성부; 및 상기 갱신지연 버퍼부의 저장가능공간이 사전에 설정된 임계값보다 작아지면 상기 갱신지연 버퍼부가 빌 때까지, 상기 플래시 메모리에 저장되어 있는 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 인덱스 페이지 중에서 소정 개수의 인덱스 페이지를 병합대상 페이지로 선정하고, 상기 병합대상 페이지에 기록되어 있는 인덱스 엔트리를 독출하여 메인 메모리에 로딩한 후 상기 갱신지연 버퍼부에 저장되어 있는 버퍼 엔트리를 상기 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 플래시 메모리에 기록될 인덱스 페이지를 구성하는 인덱스 관리부;를 구비한다.In order to achieve the above technical problem, an apparatus for managing index information of data stored in a flash memory according to the present invention includes calculation target data stored in or to be stored in the flash memory and a type of operation to be performed on the calculation target data. An update delay buffer unit for storing a buffer entry; Instructing the update delay buffer unit to generate a buffer entry corresponding to the operation to be performed when an instruction to perform an insert operation for recording operation target data or a delete operation for removing operation target data from the flash memory is instructed. A buffer entry generating unit for storing; And a plurality of index entries including key values of records stored in the flash memory and record position information until the update delay buffer unit is empty when the storage available space of the update delay buffer unit becomes smaller than a preset threshold. A predetermined number of index pages are selected as merge target pages among the index pages, the index entries recorded in the merge target pages are read and loaded into the main memory, and the buffer entries stored in the update delay buffer unit are stored in the main memory. And an index manager configured to sequentially insert between index entries loaded in the memory to configure an index page to be written to the flash memory.

상기의 다른 기술적 과제를 달성하기 위한, 본 발명에 따른 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 방법은, (a) 플래시 메모리에 대해 연산대상 데이터를 기록하기 위한 삽입연산 또는 상기 플래시 메모리로부터 연산대상 데이터를 제거하기 위한 삭제연산의 수행이 지시되면 수행될 연산에 대응하여 플래시 메모리에 저장되어 있거나 저장될 연산대상 데이터 및 상기 연산대상 데이터에 대해 수행될 연산의 종류를 포함하는 버퍼 엔트리를 생성하여 갱신지연 버퍼에 저장하는 단계; (b) 상기 갱신지연 버퍼부의 저장가능공간이 사전에 설정된 임계값보다 작아지면 상기 플래시 메모리로부터 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 소정 개수의 인덱스 페이지를 병합대상 페이지로 선정하는 단계; 및 (c) 상기 병합대상 페이지에 기록되어 있는 인덱스 엔트리를 독출하여 메인 메모리에 로딩한 후 상기 갱신지연 버퍼에 저장되어 있는 버퍼 엔트리를 상기 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 플래시 메모리에 기록될 인덱스 페이지를 구성하는 단계;를 갖는다.According to another aspect of the present invention, there is provided a method of managing index information of data stored in a flash memory according to the present invention, which comprises: (a) insert operation for recording operation target data into a flash memory or operation target data from the flash memory; When an instruction to perform a delete operation is performed to remove a buffer, an update delay is generated by generating a buffer entry including operation target data stored in or stored in flash memory and a type of operation to be performed on the operation target data corresponding to the operation to be performed. Storing in a buffer; (b) when the storage available space of the update delay buffer unit is smaller than a preset threshold, a predetermined number of index pages including a plurality of index entries including key values of records and position information of records from the flash memory are merged. Selecting a step; And (c) reading and loading the index entry recorded in the merge target page into the main memory, and sequentially inserting buffer entries stored in the update delay buffer between the index entries loaded into the main memory and flashing them. Constructing an index page to be written to a memory.

이에 의해 플래시 메모리의 쓰기 연산과 소거 연산의 횟수를 감소시킴으로써 플래시 메모리의 수명을 연장시킬 수 있으며, 플래시 페이지의 이용률을 높여 저장 공간의 효율성을 보장할 수 있다.Accordingly, the lifespan of the flash memory can be extended by reducing the number of write and erase operations of the flash memory, and the efficiency of the storage space can be guaranteed by increasing the utilization of the flash page.

이하에서 첨부된 도면들을 참조하여 본 발명에 따른 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치 및 방법의 바람직한 실시예에 대해 상세하게 설명한다.Hereinafter, a preferred embodiment of an apparatus and method for managing index information of data stored in a flash memory according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치에 대한 바람직한 실시예의 상세한 구성을 도시한 블록도이다.1 is a block diagram showing a detailed configuration of a preferred embodiment of the apparatus for managing index information of data stored in a flash memory according to the present invention.

도 1을 참조하면, 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치(100)는 인덱스 생성부(110), 버퍼 엔트리 생성부(120), 갱신지연 버퍼부(130), 인덱스 관리부(140), 메인 메모리(150) 버퍼관리부(160), 디렉토리 관리부(170) 및 검색부(180)를 구비한다.Referring to FIG. 1, the apparatus 100 for managing index information of data stored in a flash memory includes an index generator 110, a buffer entry generator 120, an update delay buffer 130, an index manager 140, and a main controller. The memory 150 includes a buffer manager 160, a directory manager 170, and a searcher 180.

인덱스 생성부(110)는 플래시 메모리(190)에 인덱스 페이지가 존재하지 않으면, 플래시 메모리(190)에 저장되어 있는 전체 레코드에 대해 인덱스 엔트리를 생성한 후 사전에 설정되어 있는 기준개수에 해당하는 인덱스 엔트리로 이루어진 인덱스 페이지를 생성하여 플래시 메모리(190)의 빈 페이지에 저장한다. 이와 같이 인덱스 생성부(110)에 의해 플래시 메모리(190)에 저장되어 있는 데이터를 기초로 인덱스 페이지를 구성하는 연산을 벌크-로드 연산이라 한다. If there is no index page in the flash memory 190, the index generator 110 generates an index entry for all records stored in the flash memory 190, and then indexes a preset number of indexes. An index page composed of entries is generated and stored in a blank page of the flash memory 190. As described above, an operation of constructing an index page based on data stored in the flash memory 190 by the index generator 110 is called a bulk-load operation.

도 2에는 플래시 메모리(190)에 저장되어 있는 인덱스 페이지의 예가 도시되어 있다. 도 2를 참조하면, 플래시 메모리(190)에는 인덱스(210)와 플래시 페이지(240)가 저장된다. 인덱스(210)는 인덱스 페이지의 집합이며, 인덱스 페이지(220)는 인덱스 엔트리들을 저장하는 단위이다. 각각의 인덱스 페이지는 플래시 페이지에 대응되어 저장되며, 인덱스에서 논리적으로 연속적인 인덱스 페이지들이 플래시 메모리(190) 내에서 물리적으로 연속될 필요는 없다. 인덱스 페이지(220)는 다수의 인덱스 엔트리(230)를 포함한다. 인덱스 엔트리(230)는 기본적으로 연산대상 데이터(즉, 레코드의 키값) 및 연산대상 데이터의 위치정보를 포함한다. 각각의 인덱스 페이지는 포함하는 인덱스 엔트리의 수에 따라 빈 공간이 존재할 수 있으며, 인덱스 페이지 내의 인덱스 엔트리들은 레코드의 키값의 크기에 따라 정렬되어 저장된다. 이때 레코드의 키값이란 대응되는 레코드를 식별할 수 있는 필드의 실제 값을 의미하며, 레코드의 위치정보란 플래시 메모리(190)에 저장된 레코드의 주소를 의미한다.2 illustrates an example of an index page stored in the flash memory 190. 2, an index 210 and a flash page 240 are stored in the flash memory 190. The index 210 is a set of index pages, and the index page 220 is a unit for storing index entries. Each index page is stored in correspondence with a flash page, and index pages that are logically contiguous in the index need not be physically contiguous in the flash memory 190. Index page 220 includes a number of index entries 230. The index entry 230 basically includes operation target data (ie, a key value of a record) and position information of the calculation target data. Each index page may have empty space according to the number of index entries it contains, and the index entries in the index pages are stored in alignment according to the size of the key value of the record. In this case, the key value of the record means an actual value of a field for identifying a corresponding record, and the record position information means an address of a record stored in the flash memory 190.

버퍼 엔트리 생성부(120)는 플래시 메모리(190)에 대해 연산대상 데이터를 기록하기 위한 삽입연산 또는 플래시 메모리(190)로부터 연산대상 데이터를 제거하기 위한 삭제연산의 수행이 지시되면 수행될 연산에 대응하는 버퍼 엔트리를 생성한다. 버퍼 엔트리는 기본적으로 플래시 메모리(190)에 저장되어 있거나 저장될 연산대상 데이터(즉, 레코드의 키값), 연산대상 데이터의 위치정보 및 연산대상 데이터에 대해 수행될 연산의 종류를 포함한다. 버퍼 엔트리는 엔트리 저장구조에 따라 갱신지연 버퍼부(130) 내에서 상이한 형태로 유지되거나 추가적인 정보를 포함할 수 있다. 일예로 버퍼 엔트리들은 키값의 순서대로 갱신지연 버퍼부(130)에 저장될 수 있다. 이러한 구조에서는 버퍼 엔트리의 삽입 및 삭제 시에 정렬된 순서를 유지하기 위한 부하가 발생하나 이진탐색을 통해 엔트리에 대한 효율적인 검색을 수행할 수 있는 이점이 있다. 이때 동일한 레코드에 대해 서로 다른 연산이 발생하면 갱신지연 버퍼부(130) 내에는 최신의 연산에 관련된 버퍼 엔트리만 유지된다. 다른 예로 갱신지연 버퍼부(130) 내에 버퍼 엔트리들이 이진탐색트리의 형태로 저장되는 경우에 버퍼 엔트리에는 왼쪽 자식 포인터 및 오른쪽 자식 포인터가 추가적으로 포함된다. 이러한 구조에서는 버퍼 엔트리들을 이진탐색트리의 형태로 유지해야 하는 부하가 존재하나, 갱신지연 버퍼부(130) 내의 엔트리에 대한 삽입, 삭제 그리고 검색을 효율적으로 수행할 수 있는 이점이 있다. 이 경우에도 동일한 레코드에 대해 서는 최신의 연산에 관련된 버퍼 엔트리만 갱신지연 버퍼부(130)에 유지된다. The buffer entry generating unit 120 corresponds to an operation to be performed when an insert operation for recording the operation target data or an erase operation for removing the operation target data from the flash memory 190 is instructed to the flash memory 190. Create a buffer entry. The buffer entry basically includes operation target data (ie, a key value of a record) stored in or to be stored in the flash memory 190, position information of the operation target data, and a type of operation to be performed on the operation target data. The buffer entry may be maintained in a different form in the update delay buffer unit 130 or include additional information according to the entry storage structure. For example, the buffer entries may be stored in the update delay buffer unit 130 in the order of key values. In this structure, there is a load to maintain the sorted order when inserting and deleting buffer entries, but there is an advantage that an efficient search for entries can be performed through binary search. In this case, when different operations are generated for the same record, only the buffer entries related to the latest operation are maintained in the update delay buffer unit 130. As another example, when the buffer entries are stored in the form of a binary search tree in the update delay buffer unit 130, the buffer entry further includes a left child pointer and a right child pointer. In such a structure, there is a load to maintain the buffer entries in the form of a binary search tree, but there is an advantage that the insertion, deletion, and retrieval of entries in the update delay buffer unit 130 can be efficiently performed. Even in this case, only the buffer entry related to the latest operation is maintained in the update delay buffer unit 130 for the same record.

갱신지연 버퍼부(130)에는 버퍼 엔트리 생성부(120)에 의해 생성된 버퍼 엔트리가 저장된다. 갱신지연 버퍼부(130)는 메인 메모리(150) 내에서 고정된 크기로 유지되거나 별도의 저장수단으로 구성되며, 동적으로 삽입 또는 삭제되는 인덱스 엔트리를 임시로 저장하고 관리하기 위한 장치이다. 도 3에는 갱신지연 버퍼부(130)에 저장된 버퍼 엔트리(310, 320, 330, 340, 350)의 예가 도시되어 있다. The update delay buffer unit 130 stores the buffer entry generated by the buffer entry generator 120. The update delay buffer unit 130 is maintained in a fixed size in the main memory 150 or configured as a separate storage means, and is a device for temporarily storing and managing index entries dynamically inserted or deleted. 3 illustrates an example of buffer entries 310, 320, 330, 340, and 350 stored in the update delay buffer unit 130.

인덱스 관리부(140)는 갱신지연 버퍼부(130)의 저장가능공간이 사전에 설정된 임계값(예를 들면, 저장가능공간의 10%, 0% 등)보다 작아지면 갱신지연 버퍼부(130)가 빌 때까지, 플래시 메모리(190)에 저장되어 있는 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 인덱스 페이지 중에서 소정 개수(예를 들면, 2개)의 인덱스 페이지를 병합대상 페이지로 선정한다. 또한 인덱스 관리부(140)는 선정된 병합대상 페이지에 기록되어 있는 인덱스 엔트리를 독출하여 메인 메모리(150)에 로딩한 후 갱신지연 버퍼부(130)에 저장되어 있는 버퍼 엔트리를 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 플래시 메모리(190)에 기록될 인덱스 페이지를 구성한다. When the storage delay of the update delay buffer unit 130 is smaller than a preset threshold value (for example, 10%, 0%, etc.) of the update delay buffer unit 130, the index delay unit 130 Until a blank page is merged, a predetermined number (for example, two) of index pages including a plurality of index pages including a key value of a record and position information of the record stored in the flash memory 190 are merged. To be selected. In addition, the index manager 140 reads the index entries recorded in the selected merge target page, loads them into the main memory 150, and then loads the buffer entries stored in the update delay buffer unit 130 into the main memory. The index pages to be written to the flash memory 190 are sequentially inserted between the entries.

도 4는 인덱스 관리부(140)의 상세한 구성을 도시한 블록도이다.4 is a block diagram illustrating a detailed configuration of the index manager 140.

도 4를 참조하면, 인덱스 관리부(140)는 페이지 선정부(410), 엔트리 선정부(420), 페이지 구성부(430), 전처리부(440), 식별정보 할당부(450) 및 엔트리 배분부(460)로 구성된다.Referring to FIG. 4, the index manager 140 may include a page selector 410, an entry selector 420, a page constructer 430, a preprocessor 440, an identification information allocator 450, and an entry distributor. 460.

페이지 선정부(410)는 갱신지연 버퍼부(130)의 저장가능공간이 사전에 설정 된 임계값보다 작아지면 플래시 메모리(190)에 저장되어 있는 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 인덱스 페이지 중에서 소정 개수(예를 들면, 2개)의 인덱스 페이지를 병합대상 페이지로 선정한다. The page selector 410 may include a plurality of records including key values of records stored in the flash memory 190 and record position information when the storage space of the update delay buffer 130 is smaller than a preset threshold. A predetermined number (for example, two) of index pages among the index pages formed of the index entries are selected as the merge target page.

엔트리 선정부(420)는 갱신지연 버퍼부(130)에 저장되어 있는 버퍼 엔트리들 중에서 병합대상 페이지들로부터 파악된 기록가능공간에 해당하는 개수의 버퍼 엔트리를 병합가능 엔트리로 선정한다.The entry selector 420 selects the number of buffer entries corresponding to the recordable spaces identified from the merge target pages among the buffer entries stored in the update delay buffer unit 130 as mergeable entries.

페이지 구성부(430)는 병합가능 엔트리를 연산대상 데이터의 크기를 기준으로 메인 메모리(150)에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 임시 인덱스 페이지를 구성한다. 이때 버퍼 엔트리들이 연산의 발생순서대로 갱신지연 버퍼부(130)에 저장되는 구조를 가지고 있으면, 임시 인덱스 페이지를 구성하기 전에 갱신지연 버퍼부(130)에 저장되어 있는 버퍼 엔트리들에 대한 전처리과정이 필요하다. The page constructing unit 430 sequentially inserts the mergeable entry between the index entries loaded in the main memory 150 based on the size of the operation target data to form a temporary index page. At this time, if the buffer entries have a structure that is stored in the update delay buffer unit 130 in the order of occurrence of the operation, the preprocessing process for the buffer entries stored in the update delay buffer unit 130 before constructing the temporary index page. need.

전처리부(440)는 갱신지연 버퍼부(130)에 저장되어 있는 버퍼 엔트리들을 연산대상 데이터의 크기를 기준으로 정렬하고, 동일한 연산대상 데이터에 대해 상이한 연산종류가 설정되어 있으면 동일한 연산대상 데이터 중에서 시간적으로 늦게 갱신지연 버퍼부(130)에 저장된 연산대상 데이터 및 그에 대응하는 연산종류에 해당하는 버퍼 엔트리를 제외하고 나머지 연산대상 데이터 및 연산종류에 해당하는 버퍼 엔트리를 제거한다. 이와 같은 전처리부(440)의 동작에 의해 갱신지연 버퍼부(140) 내에서 동일한 키값에 대해 반복적으로 삽입과 삭제연산이 발생한 경우에 이를 통합하여 최신의 정보에 대한 병합연산이 가능하다.The preprocessing unit 440 sorts the buffer entries stored in the update delay buffer unit 130 based on the size of the calculation target data, and if different calculation types are set for the same calculation target data, the preprocessing unit 440 performs temporal processing among the same calculation target data. As a result, except for the buffer entry corresponding to the operation target data stored in the update delay buffer unit 130 and the corresponding operation type, the buffer entry corresponding to the remaining operation target data and the operation type is removed. When the insertion and deletion operations are repeatedly performed on the same key value in the update delay buffer unit 140 by the operation of the preprocessing unit 440, merge operation of the latest information is possible.

식별정보 할당부(450)는 임시 인덱스 페이지 중에서 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행된 임시 인덱스 페이지에 대해 제1페이지 식별정보를 할당하고, 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행되지 않은 임시 인덱스 페이지에 대해 제2페이지 식별정보를 할당하고, 나머지 임시 임덱스 페이지에 대해 제1페이지 식별정보를 할당한다. 이와 같이 임시 인덱스 페이지를 구분하는 이유는 인덱스의 구성 및 저장시에 플래시 페이지의 이용율이 50% 이상을 만족하는 조건에서 최소한의 쓰기 연산이 수행되도록 하기 위함이다. The identification information allocating unit 450 allocates the first page identification information to the temporary index page in which the insertion or deletion operation is performed by the mergeable entry among the temporary index pages, and the insertion or deletion operation by the mergeable entry is not performed. Second page identification information is allocated to the non-temporary index page, and the first page identification information is allocated to the remaining temporary index pages. The reason for distinguishing the temporary index pages as described above is to allow the minimum write operation to be performed under the condition that the utilization rate of the flash page satisfies 50% or more when constructing and storing the index.

엔트리 배분부(460)는 제1페이지 식별정보가 할당된 임시 인덱스 페이지 중에서 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지의 이전 또는 이후에 위치하는 제2페이지 식별정보가 할당된 임시 인덱스 페이지에 제1페이지 식별정보를 다시 할당한 후 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지를 구성하는 엔트리들을 상기 제1페이지 식별정보가 할당된 임시 인덱스 페이지에 배분하여 플래시 메모리(190)에 기록될 인덱스 페이지를 구성한다. The entry allocator 460 allocates the temporary index page to which the second page identification information is allocated before or after the temporary index page in which the page utilization rate is lower than the preset reference utilization rate among the temporary index pages to which the first page identification information is assigned. After allocating the first page identification information to the first page identification information, the entries constituting the temporary index page having the page utilization rate lower than the preset reference utilization rate are allocated to the temporary index page to which the first page identification information is allocated to the flash memory 190. Configure the index page to be written.

메인 메모리(150)에는 병합연산을 수행하기 위한 플래시 메모리(190)로부터 독출한 인덱스 페이지가 저장된다. 또한 메인 메모리(150)에는 병합연산의 수행시 갱신지연 버퍼부(130)로부터 선정된 병합가능 엔트리가 저장된다. 나아가 메인 메모리(150)에는 본 발명에 따른 인덱스 정보 관리 장치(100)가 인덱스를 생성하거나 갱신하는 과정에서 발생한 중간 데이터가 저장된다. 한편 갱신지연 버퍼부(130)는 메인 메모리(150)로부터 고정적으로 할당받아 구성될 수 있다. The main memory 150 stores index pages read from the flash memory 190 for performing a merge operation. In addition, the main memory 150 stores mergeable entries selected from the update delay buffer unit 130 when the merge operation is performed. Furthermore, the main memory 150 stores intermediate data generated while the index information management apparatus 100 according to the present invention creates or updates an index. The update delay buffer unit 130 may be fixedly allocated from the main memory 150.

버퍼관리부(160)는 삽입 또는 삭제연산에 대한 수행이 지시되면 갱신지연 버퍼부(130)에 연산대상 데이터에 해당하여 생성된 버퍼 엔트리를 기록한다. 이러한 버퍼관리부(160)의 갱신지연 버퍼부(130)의 관리동작은 버퍼 엔트리의 구조에 따라 상이하다. 일예로 버퍼 엔트리가 이진탐색에 적합한 형태로 관리되는 경우에 있어서, 버퍼관리부(160)는 갱신지연 버퍼부(130)에 버퍼 엔트리 생성부(120)에 의해 생성된 버퍼 엔트리와 동일한 연산대상 데이터를 포함하는 버퍼 엔트리가 존재하면 갱신지연 버퍼부(130)에 기존재하는 버퍼 엔트리의 연산종류를 새롭게 생성된 버퍼 엔트리의 연산종류로 변경한다. When the buffer management unit 160 is instructed to perform an insert or delete operation, the buffer manager 160 records the buffer entry generated corresponding to the operation target data in the update delay buffer unit 130. The management operation of the update delay buffer unit 130 of the buffer manager 160 is different depending on the structure of the buffer entry. For example, in the case where the buffer entry is managed in a form suitable for binary search, the buffer management unit 160 supplies the update delay buffer unit 130 with the same operation target data as the buffer entry generated by the buffer entry generation unit 120. If there is a buffer entry to be included, the operation type of the buffer entry existing in the update delay buffer unit 130 is changed to the operation type of the newly created buffer entry.

디렉토리 관리부(170)는 플래시 메모리(190)에 저장되어 있는 인덱스 페이지에 논리적 순서에 따라 직접 접근이 가능하도록 하기 위한 디렉토리를 생성한다. 생성된 디렉토리는 파일 시스템이 존재하는 경우에는 파일맵의 형태로 파일 시스템이 유지 및 관리한다. 이때 파일맵은 효율적인 검색을 위해 중간에 삽입 및 삭제가 가능하여야 한다. 이와 달리 파일 시스템이 존재하지 않으면 디렉토리는 파일 시스템에서 제공하는 파일맵과 동일한 형태로 구현된다. The directory manager 170 creates a directory for directly accessing the index page stored in the flash memory 190 in a logical order. The created directory is maintained and managed by the file system in the form of a file map when the file system exists. At this time, the file map should be inserted and deleted in the middle for efficient search. In contrast, if the file system does not exist, the directory is implemented in the same form as the file map provided by the file system.

검색부(180)는 검색연산의 요청시 최신의 정보를 저장하고 있는 갱신지연 버퍼부(130)를 우선 검색하여 검색결과를 제공한다. 이때 갱신지연 버퍼부(130)에 검색요청된 값이 존재하지 않으면, 검색부(180)는 디렉토리를 검사하여 검색연산을 수행할 인덱스 페이지를 파악한 후 해당 인덱스 페이지 내에서 이진 탐색을 수행하여 검색요청된 값을 검색하여 검색결과를 제공한다.The search unit 180 first searches for an update delay buffer unit 130 that stores the latest information when a search operation is requested, and provides a search result. At this time, if the search request value does not exist in the update delay buffer unit 130, the search unit 180 checks the directory, identifies the index page to perform the search operation, and performs a binary search within the index page. The searched value and provide the search result.

도 5는 본 발명에 따른 인덱스 정보 관리 장치에서 인덱스 페이지를 생성하 기 위한 벌크-로드연산의 수행과정을 도시한 흐름도이다.5 is a flowchart illustrating a bulk-load operation for generating an index page in the apparatus for managing index information according to the present invention.

도 5를 참조하면, 인덱스 생성부(110)는 플래시 메모리(190)에 인덱스 페이지가 존재하는지 여부를 확인한다(S500). 만약 인덱스 페이지가 존재하지 않으면, 인덱스 생성부(110)는 플래시 메모리(190)에 저장되어 있는 전체 레코드를 읽어 인덱스 페이지를 구성할 인덱스 엔트리를 생성한다(S510). 다음으로 인덱스 생성부(110)는 외부로부터 입력받거나 기설정되어 있는 페이지 채움 인수(즉, 하나의 인덱스 페이지에 들어갈 수 있는 인덱스 엔트리의 수)에 해당하는 인덱스 엔트리로 이루어진 인덱스 페이지를 생성한다(S520). 다음으로 인덱스 생성부(110)는 플래시 메모리(190)로부터 플래시 페이지를 할당받아 생성한 인덱스 페이지를 저장한다(S530). 다음으로 디렉토리 관리부(170)는 플래시 메모리(190)에 저장된 인덱스 페이지에 대한 인덱싱 정보를 디렉토리에 반영한다(S540). 마지막으로 인덱스 생성부(110)는 인덱스 페이지를 구성할 인덱스 엔트리가 존재하는지 확인하고(S550), 인덱스 엔트리가 존재하지 않으면 벌크-로드연산을 종료한다. Referring to FIG. 5, the index generator 110 checks whether an index page exists in the flash memory 190 (S500). If the index page does not exist, the index generator 110 reads the entire record stored in the flash memory 190 and generates an index entry to configure the index page (S510). Next, the index generator 110 generates an index page composed of index entries corresponding to a page fill factor input from the outside or a preset page fill factor (that is, the number of index entries that can fit in one index page) (S520). ). Next, the index generator 110 stores the index page generated by allocating a flash page from the flash memory 190 (S530). Next, the directory manager 170 reflects indexing information about the index page stored in the flash memory 190 in the directory (S540). Finally, the index generator 110 checks whether an index entry for constituting the index page exists (S550), and if the index entry does not exist, ends the bulk-load operation.

도 6은 본 발명에 따른 인덱스 정보 관리 방법에 대한 바람직한 실시예의 수행과정을 도시한 흐름도이다.6 is a flowchart illustrating a process of performing a preferred embodiment of the index information management method according to the present invention.

도 6을 참조하면, 버퍼관리부(160)는 레코드에 대한 삽입 또는 삭제연산의 수행이 지시되면(S600), 지시된 연산에 해당하는 레코드의 키값 및 연산종류를 포함하는 버퍼 엔트리를 갱신지연 버퍼부(130)에 기록한다(S610). 다음으로 인덱스 관리부(140)는 갱신지연 버퍼부(130)의 여유용량이 사전에 설정된 기준값보다 작은지를 확인한다(S620). 만약 여유용량이 사전에 설정된 기준값보다 작으면, 인덱스 관리부(140)는 플래시 메모리(190)로부터 사전에 설정된 개수의 인덱스 페이지로부터 인덱스 엔트리를 독출하여 메인 메모리(150)에 로딩한다(S630). 다음으로 인덱스 관리부(140)는 메인 메모리(150)에 로딩된 인덱스 엔트리와 갱신지연 버퍼부(130)로부터 선정된 개수의 병합가능 엔트리를 병합하여 인덱스 페이지를 재구성한다(S640). 다음으로 인덱스 관리부(140)는 갱신지연 버퍼부(130)에 버퍼 엔트리가 존재하는지 확인한다(S650). 만약 버퍼 엔트리가 존재하면, 인덱스 관리부(140)는 S630단계부터 S640단계를 수행한다. 이와 달리 버퍼 엔트리가 존재하지 않으면, 디렉토리 관리부(170)는 재구성된 인덱스 페이지의 인덱스 정보를 디렉토리에 반영한다(S660). Referring to FIG. 6, when an instruction to perform an insert or delete operation on a record is instructed (S600), the buffer manager 160 updates a buffer entry including a key value and an operation type of a record corresponding to the indicated operation. Record at 130 (S610). Next, the index manager 140 checks whether the spare capacity of the update delay buffer unit 130 is smaller than a preset reference value (S620). If the spare capacity is smaller than a preset reference value, the index manager 140 reads an index entry from a preset number of index pages from the flash memory 190 and loads the index entry into the main memory 150 (S630). Next, the index manager 140 reconstructs the index page by merging the index entries loaded in the main memory 150 and the number of mergeable entries selected from the update delay buffer unit 130 (S640). Next, the index manager 140 checks whether a buffer entry exists in the update delay buffer unit 130 (S650). If there is a buffer entry, the index manager 140 performs steps S630 to S640. In contrast, if the buffer entry does not exist, the directory manager 170 reflects the index information of the reconstructed index page to the directory (S660).

도 7은 본 발명에 따른 인덱스 정보 관리 장치에서 삽입 또는 삭제연산과정에 대한 일 실시예의 수행과정을 도시한 흐름도이다. 도 7에 도시된 실시예는 연산의 발생시점에 따라 갱신지연 버퍼부(130)의 빈 공간에 버퍼 엔트리가 순차적으로 저장되는 경우에 해당한다.7 is a flowchart illustrating a process of performing an embodiment of an insertion or deletion operation in the index information management apparatus according to the present invention. The embodiment shown in FIG. 7 corresponds to a case where buffer entries are sequentially stored in empty spaces of the update delay buffer unit 130 according to when an operation occurs.

도 7을 참조하면, 레코드에 대한 삽입 또는 삭제연산의 수행이 지시되면, 버퍼관리부(160)는 갱신지연 버퍼부(130)의 첫번째 빈 공간을 검색한다(S700). 다음으로 버퍼관리부(160)는 검색된 빈 공간에 새로운 버퍼 엔트리를 삽입한다(S710). 다음으로 인덱스 관리부(140)는 갱신지연 버퍼부(130)에 여유공간이 존재하는지 확인한다(S720). 만약 여유공간이 존재하지 않으면, 인덱스 관리부(140)는 병합연산을 수행한다(S730). 도 7을 참조하여 설명한 실시예는 인덱스 엔트리의 삽입과 삭제 시에 효과적이지만, 갱신지연 버퍼부(130) 내에서의 검색 시간은 느린 단점이 있다.Referring to FIG. 7, when an instruction for inserting or deleting a record is performed, the buffer manager 160 searches for the first free space of the update delay buffer 130 (S700). Next, the buffer manager 160 inserts a new buffer entry into the searched empty space (S710). Next, the index manager 140 checks whether the free space exists in the update delay buffer unit 130 (S720). If the free space does not exist, the index manager 140 performs a merge operation (S730). Although the embodiment described with reference to FIG. 7 is effective at inserting and deleting index entries, the search time in the update delay buffer unit 130 is slow.

도 8은 본 발명에 따른 인덱스 정보 관리 장치에서 삽입 또는 삭제연산과정에 대한 다른 실시예의 수행과정을 도시한 흐름도이다. 도 8에 도시된 실시예는 버퍼 엔트리를 갱신지연 버퍼부(130)에 키값의 크기에 따라 저장하는 경우에 해당한다.8 is a flowchart illustrating a process of performing another embodiment of the insertion or deletion operation in the index information management apparatus according to the present invention. The embodiment shown in FIG. 8 corresponds to a case where the buffer entry is stored in the update delay buffer unit 130 according to the size of the key value.

도 8을 참조하면, 레코드에 대한 삽입 또는 삭제연산의 수행이 지시되면, 버퍼관리부(160)는 갱신지연 버퍼부(130)에 대한 이진탐색을 통해 새로운 버퍼 엔트리와 동일한 키값을 갖는 버퍼 엔트리를 검색한다(S800). 다음으로 버퍼관리부(160)는 동일한 키값의 버퍼 엔트리가 존재하면(S810), 기존의 버퍼 엔트리를 삭제한다(S820). 다음으로 버퍼관리부(130)는 새로운 엔트리를 갱신지연 버퍼부(130)에 저장하고 갱신지연 버퍼부(130)의 엔트리들을 키값을 기준으로 정렬한다(S830). 다음으로 인덱스 관리부(140)는 갱신지연 버퍼부(130)에 여유공간이 존재하는지 확인한다(S840). 만약 여유공간이 존재하지 않으면, 인덱스 관리부(140)는 병합연산을 수행한다(S850). 도 8에 도시된 실시예는 버퍼 엔트리의 삽입과 삭제 시에 정렬된 순서를 유지하는 부하가 존재한다. 그러나 동일 레코드에 대한 서로 다른 연산이 발생하면 최신의 연산만을 유지하므로, 이진탐색을 통하여 갱신지연 버퍼부(130)에 대한 검색을 효율적으로 수행할 수 있다.Referring to FIG. 8, when an instruction to insert or delete a record is performed, the buffer manager 160 searches for a buffer entry having the same key value as the new buffer entry through binary search for the update delay buffer unit 130. (S800). Next, if there is a buffer entry of the same key value (S810), the buffer manager 160 deletes the existing buffer entry (S820). Next, the buffer manager 130 stores the new entry in the update delay buffer 130 and sorts the entries of the update delay buffer 130 based on the key value (S830). Next, the index manager 140 checks whether the free space exists in the update delay buffer unit 130 (S840). If the free space does not exist, the index manager 140 performs a merge operation (S850). In the embodiment shown in Fig. 8, there is a load that maintains the sorted order upon insertion and deletion of buffer entries. However, when different operations on the same record occur, only the latest operation is maintained, so that the search for the update delay buffer unit 130 can be efficiently performed through binary search.

도 9는 본 발명에 따른 인덱스 정보 관리 장치에서 삽입 또는 삭제연산과정에 대한 또 다른 실시예의 수행과정을 도시한 흐름도이다. 도 9에 도시된 실시예는 버퍼 엔트리를 갱신지연 버퍼부(130)에 이진탐색트리의 형태로 저장하는 경우에 해 당한다.9 is a flowchart illustrating a process of performing another embodiment of an insertion or deletion operation in the index information management apparatus according to the present invention. The embodiment shown in FIG. 9 corresponds to the case where the buffer entry is stored in the update delay buffer unit 130 in the form of a binary search tree.

도 9를 참조하면, 레코드에 대한 삽입 또는 삭제연산의 수행이 지시되면, 버퍼관리부(160)는 갱신지연 버퍼부(130)에 대한 이진탐색을 통해 새로운 버퍼 엔트리와 동일한 키값을 갖는 버퍼 엔트리를 검색한다(S900). 다음으로 버퍼관리부(160)는 동일한 키값의 버퍼 엔트리가 존재하면(S910), 기존의 버퍼 엔트리를 삭제한다(S920). 다음으로 버퍼관리부(130)는 새로운 엔트리를 갱신지연 버퍼부(130)에 저장하고 갱신지연 버퍼부(130)의 엔트리들이 이진탐색트리구조를 유지하도록 엔트리들의 정보를 갱신한다(S930). 다음으로 인덱스 관리부(140)는 갱신지연 버퍼부(130)에 여유공간이 존재하는지 확인한다(S940). 만약 여유공간이 존재하지 않으면, 인덱스 관리부(140)는 병합연산을 수행한다(S950). 도 9에 도시된 실시예는 동일 레코드에 대한 서로 다른 연산이 발생하면 최신의 연산만을 유지하므로, 버퍼 엔트리의 삽입, 삭제 및 검색을 모두 효율적으로 수행할 수 있으나, 이진탐색트리를 유지하는 부하가 존재한다.Referring to FIG. 9, when an instruction to insert or delete a record is performed, the buffer manager 160 searches for a buffer entry having the same key value as a new buffer entry through binary search for the update delay buffer unit 130. (S900). Next, if there is a buffer entry of the same key value (S910), the buffer manager 160 deletes the existing buffer entry (S920). Next, the buffer manager 130 stores the new entry in the update delay buffer unit 130 and updates the information of the entries so that the entries of the update delay buffer unit 130 maintain the binary search tree structure (S930). Next, the index manager 140 checks whether the free space exists in the update delay buffer unit 130 (S940). If the free space does not exist, the index manager 140 performs a merge operation (S950). In the embodiment shown in Fig. 9, only the latest operation is maintained when different operations on the same record occur, so that all the insertion, deletion, and retrieval of buffer entries can be efficiently performed. exist.

도 7 내지 도 9를 참조하여 설명한 바와 같은 삽입연산 또는 삭제연산을 통해 지속적으로 갱신지연 버퍼부(130)에 버퍼 엔트리가 저장되면 갱신지연 버퍼부(130)의 여유용량이 사전에 설정된 임계값보다 작아지게 된다. 이 경우 인덱스 관리부(140)는 갱신지연 버퍼부(130)에 저장되어 있는 버퍼 엔트리를 플래시 메모리(190)에 저장되어 있는 인덱스 페이지의 인덱스 엔트리들과 병합하여 인덱스 페이지를 재구성하는 병합연산을 수행한다. 이때 병합연산은 일정한 개수의 인덱스 페이지에 대해 수행되는 단위병합연산이 복수회 수행되는 형태로 이루어지며, 갱신 지연 버퍼부(130)가 빌 때까지 수행된다. When buffer entries are continuously stored in the update delay buffer unit 130 through the insert operation or the delete operation as described above with reference to FIGS. 7 to 9, the free capacity of the update delay buffer unit 130 is greater than the preset threshold. It becomes small. In this case, the index manager 140 merges the buffer entries stored in the update delay buffer unit 130 with the index entries of the index pages stored in the flash memory 190 and performs a merge operation for reconstructing the index pages. . In this case, the merge operation is performed in a form in which a unit merge operation performed on a predetermined number of index pages is performed a plurality of times, and is performed until the update delay buffer unit 130 is empty.

도 10a 및 도 10b에는 각각 단위병합연산의 수행대상이 되는 플래시 메모리(190)의 데이터 및 갱신지연 버퍼부(130)의 데이터가 도시되어 있다. 10A and 10B, data of the flash memory 190 and data of the update delay buffer unit 130, which are the targets of the unit merge operation, are shown.

도 10a 및 도 10b를 참조하면, 단위병합 가능유닛(1000)은 사전에 설정된 개수의 인덱스 페이지(1010, 1020)로 이루어진 집합이다. 이때 단위병합연산시 단위병합 가능유닛(1000) 내에 저장되어야할 키값의 범위는 단위병합 가능범위로 정의된다. 단위병합연산이 i번째 인덱스 페이지부터 k개의 인덱스 페이지를 대상으로 수행된다면 단위병합 가능범위는 i번째 인덱스 페이지의 최소값부터 (i + k + 1)번째 인덱스 페이지의 최소값 사이가 된다. 0번째 인덱스 페이지는 인덱스 페이지에서 점유할 수 없는 범위에 해당하는 무한소부터 첫 번째 인덱스 페이지의 최소값 사이에 존재하는 인덱스 엔트리들에 대하여 단위병합연산을 수행하기 위해 존재하는 가상의 인덱스 페이지를 의미한다. 도 10a에 도시된 예에서는 단위병합 가능유닛의 단위병합 가능범위는 11보다 크거나 같으며 51보다 작은 수이다. 인덱스 페이지(1010)는 인덱스 엔트리가 기록된 점유영역(1012)과 엔덱스 엔트리가 기록되지 않은 비점유영역(1014)으로 구분된다. 한편 갱신지연 버퍼부(130)의 버퍼 엔트리 중에서 단위병합 가능범위에 포함되는 인덱스 페이지들의 비점유영역에 해당하는 개수의 버퍼 엔트리로 구성되는 집합이 단위병합 가능셋(1030)이다. 도 10b에 도시된 예에서 단위병합 가능셋을 이루는 버퍼 엔트리들은 (12, 삽입), (15, 삭제), (41, 삽입) 및 (42, 삽입)이다. 10A and 10B, the unit merging unit 1000 is a set consisting of a predetermined number of index pages 1010 and 1020. At this time, the range of key values to be stored in the unit mergeable unit 1000 during unit merge operation is defined as a unit mergeable range. If the unit merge operation is performed on the i th index page to the k index pages, the unit merge possible range is between the minimum value of the i th index page and the minimum value of the (i + k + 1) th index page. The zeroth index page refers to a virtual index page that exists to perform unit merging on index entries existing between an infinite number corresponding to a range that cannot be occupied in the index page and a minimum value of the first index page. In the example shown in FIG. 10A, the unit merging possible range of the unit merging unit is greater than or equal to 11 and smaller than 51. The index page 1010 is divided into an occupied area 1012 in which an index entry is recorded and a non-occupied area 1014 in which an index entry is not recorded. On the other hand, the unit merging set 1030 is a set composed of the number of buffer entries corresponding to the non-occupied area of the index pages included in the unit merging possible range among the buffer entries of the update delay buffer unit 130. In the example shown in FIG. 10B, the buffer entries forming the unit mergeable set are (12, insert), (15, delete), (41, insert), and (42, insert).

도 11은 본 발명에 따른 인덱스 정보 관리 방법에 있어서 단위병합연산의 수 행과정을 도시한 흐름도이다.11 is a flowchart illustrating a process of performing a unit merge operation in the index information management method according to the present invention.

도 11을 참조하면, 페이지 선정부(410)는 갱신지연 버퍼부(130)의 저장가능공간이 사전에 설정된 임계값보다 작아지면 플래시 메모리(190)에 저장되어 있는 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 인덱스 페이지 중에서 소정 개수(예를 들면, 2개)의 인덱스 페이지를 병합대상 페이지로 선정하고, 병합대상 페이지의 인덱스 엔트리를 메인 메모리(150)에 로딩한다(S1100). 다음으로 엔트리 선정부(420)는 갱신지연 버퍼부(130)에 저장되어 있는 버퍼 엔트리들 중에서 병합대상 페이지들로부터 파악된 비점유영역에 해당하는 개수의 버퍼 엔트리를 병합가능 엔트리로 선정한다(S1110). 다음으로 페이지 구성부(430)는 병합가능 엔트리를 키값의 크기를 기준으로 메인 메모리(150)에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 인덱스 페이지를 재구성한다(S1120). 이때 버퍼 엔트리들이 연산의 발생순서대로 갱신지연 버퍼부(130)에 저장되는 구조를 가지고 있으면, 임시 인덱스 페이지를 구성하기 전에 갱신지연 버퍼부(130)에 저장되어 있는 버퍼 엔트리들에 대한 전처리과정이 필요하다. Referring to FIG. 11, the page selector 410 records key values and record position information of a record stored in the flash memory 190 when the storage available space of the update delay buffer unit 130 is smaller than a preset threshold. A predetermined number (for example, two) of index pages including a plurality of index pages including a plurality of index entries including a target page is selected as a merge target page, and the index entries of the merge target page are loaded into the main memory 150 (S1100). ). Next, the entry selecting unit 420 selects the number of buffer entries corresponding to the non-occupied area identified from the merge target pages among the buffer entries stored in the update delay buffer unit 130 as mergeable entries (S1110). ). Next, the page constructing unit 430 reconstructs the index page by sequentially inserting mergeable entries between index entries loaded in the main memory 150 based on the size of the key value (S1120). At this time, if the buffer entries have a structure that is stored in the update delay buffer unit 130 in the order of occurrence of the operation, the preprocessing process for the buffer entries stored in the update delay buffer unit 130 before constructing the temporary index page. need.

도 12는 도 11에 도시된 단위병합연산의 페이지 재구성단계의 구체적인 구성을 도시한 흐름도이다.12 is a flowchart illustrating a specific configuration of a page reconstruction step of the unit merge operation illustrated in FIG. 11.

도 12를 참조하면, 먼저 페이지 구성부(430)는 병합가능 엔트리를 키값의 크기를 기준으로 메인 메모리(150)에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 임시 인덱스 페이지를 구성한다(S1200). 다음으로 식별정보 할당부(450)는 임시 인덱스 페이지 중에서 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행된 임시 인덱스 페이지에 대해 제1페이지 식별정보를 할당하고, 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행되지 않은 임시 인덱스 페이지에 대해 제2페이지 식별정보를 할당한다(S1210). Referring to FIG. 12, first, the page constructing unit 430 sequentially inserts a mergeable entry between index entries loaded in the main memory 150 based on the size of a key value to construct a temporary index page (S1200). . Next, the identification information allocating unit 450 allocates the first page identification information to the temporary index page in which the insertion or deletion operation is performed by the mergeable entry among the temporary index pages, and the insertion or deletion operation is performed by the mergeable entry. The second page identification information is allocated to the temporary index page that has not been performed (S1210).

여기에서 제1페이지 식별정보가 부여된 인덱스 페이지는 단위병합 가능유닛의 점유영역에 속하는 버퍼 엔트리가 존재하는 인덱스 페이지를 의미한다. 즉, 제1페이지 식별정보가 부여된 페이지는 병합 연산의 결과로 반드시 덮어쓰기가 수행되어야 하는 인덱스 페이지를 의미한다. 도 10a에 도시된 실시예의 경우에 단위병합 가능유닛(1000) 중 왼쪽 인덱스 페이지(1010)가 이러한 페이지에 해당한다. 또한 제2페이지 식별정보가 부여된 인덱스 페이지는 단위병합 가능유닛 중 점유영역에 속하는 버퍼 엔트리가 존재하지 않는 인덱스 페이지를 의미한다. 즉, 제2페이지 식별정보가 부여된 페이지는 병합연산으로 인하여 덮어쓰기가 수행될 수도 있고 그렇지 않을 수도 있는 인덱스 페이지를 의미한다. 도 10a에 도시된 실시예의 경우에 단위병합 가능유닛(1000) 중 오른쪽 인덱스 페이지(1020)가 이러한 페이지에 해당한다.Here, the index page to which the first page identification information is assigned means an index page in which a buffer entry belonging to an occupied area of the unit mergeable unit exists. That is, the page to which the first page identification information is assigned refers to an index page which must be overwritten as a result of the merge operation. In the case of the embodiment illustrated in FIG. 10A, the left index page 1010 of the unit mergeable unit 1000 corresponds to such a page. In addition, the index page to which the second page identification information is assigned means an index page in which no buffer entry belonging to the occupied area among the unit mergeable units exists. That is, the page to which the second page identification information is assigned means an index page which may or may not be overwritten due to a merge operation. In the case of the embodiment illustrated in FIG. 10A, the right index page 1020 of the unit mergeable unit 1000 corresponds to such a page.

다음으로 엔트리 배분부(460)는 제1페이지 식별정보가 할당된 임시 인덱스 페이지의 인덱스 엔트리 수를 검사한다(S1220). 만약 제1페이지 식별정보가 할당된 임시 인덱스 페이지의 인덱스 엔트리 수가 인덱스 페이지에 대해 설정된 저장가능 엔트리 수(즉, 페이지 채움 인수)의 절반 이하인 임시 인덱스 페이지가 존재하면(S1230), 엔트리 배분부(460)는 해당 임시 인덱스 페이지에 인접한 제2페이지 식별정보가 할당된 임시 인덱스 페이지의 식별정보를 제1페이지 식별정보로 변경한 다(S1240). S1220단계 내지 S1240단계는 제1페이지 식별정보가 부여된 모든 임시 인덱스 페이지에 대해 반복적으로 수행된다.Next, the entry distribution unit 460 checks the number of index entries of the temporary index page to which the first page identification information is assigned (S1220). If there is a temporary index page in which the number of index entries of the temporary index page to which the first page identification information is allocated is less than or equal to half of the number of storeable entries (ie, page fill factor) set for the index page (S1230), the entry allocator 460 ) Changes the identification information of the temporary index page to which the second page identification information adjacent to the temporary index page is assigned to the first page identification information (S1240). Steps S1220 to S1240 are repeatedly performed on all temporary index pages to which first page identification information is assigned.

다음으로 엔트리 배분부(460)는 제2페이지 식별정보가 부여된 임시 인덱스 페이지 중에서 페이지 쓰기 횟수를 감소시킬 수 있는 페이지가 존재하는지 확인한다(S1250). 만약 그러한 임시 인덱스 페이지가 존재하면 해당 페이지의 식별정보를 제1페이지 식별정보로 변경한다(S1260). 다음으로 엔트리 배분부(460)는 제1페이지 식별정보가 부여된 임시 인덱스 페이지에 갱신지연 버퍼부(130)로부터 선정된 병합가능 엔트리들을 균등하게 배분하여 플래시 메모리(190)에 저장할 인덱스 페이지를 재구성한다(S1270). 마지막으로 엔트리 배분부(460)는 재구성된 인덱스 페이지를 플래시 메모리(190)에 저장한다(S1280).Next, the entry distribution unit 460 checks whether there is a page that can reduce the number of page writes among the temporary index pages to which the second page identification information is assigned (S1250). If such a temporary index page exists, the identification information of the corresponding page is changed to the first page identification information (S1260). Next, the entry allocator 460 equally distributes the mergeable entries selected from the update delay buffer unit 130 to the temporary index page to which the first page identification information is assigned, and reconstructs the index page to be stored in the flash memory 190. (S1270). Finally, the entry distributor 460 stores the reconstructed index page in the flash memory 190 (S1280).

도 13은 단위병합연산시 단위병합 가능유닛과 단위병합 가능셋을 메인 메모리(150) 내에서 병합한 결과를 도시한 도면이다. FIG. 13 is a diagram illustrating a result of merging a unit mergeable unit and a unit mergeable set in the main memory 150 during unit merge operation.

도 13을 참조하면, 해당 인덱스 엔트리들을 플래시 페이지에 배분함에 있어제1페이지 식별정보가 부여된 임시 인덱스 페이지(1310, 1330) 중에서 두 번째 나타나는 임시 인덱스 페이지(1330)의 인덱스 엔트리들은 그 수가 하나의 인덱스 페이지에서 저장할 수 있는 총 인덱스 엔트리 수의 절반에 미치지 못한다. 그러므로 해당 인덱스 엔트리들 이전에 존재하는 임시 인덱스 페이지 중에서 제2페이지 식별정보가 부여된 임시 인덱스 페이지(1320)의 식별정보를 제1페이지 식별정보로 변경한다. 다음으로 더 이상 제2페이지 식별정보가 부여된 임시 인덱스 페이지가 존재하지 않으므로 도 8개의 인덱스 엔트리들을 2개의 플래시 페이지(1340, 1350)에 균 등하게 분배한다.Referring to FIG. 13, the number of index entries of the temporary index page 1330 appearing second from the temporary index pages 1310 and 1330 to which the first page identification information is assigned in allocating the corresponding index entries to the flash pages is one number. Less than half the total number of index entries that an index page can hold. Therefore, the identification information of the temporary index page 1320 to which the second page identification information is assigned among the temporary index pages existing before the corresponding index entries is changed into the first page identification information. Next, since there is no longer a temporary index page to which second page identification information is assigned, FIG. 8 index entries are equally distributed to two flash pages 1340 and 1350.

도 11 내지 도 13을 참조하여 설명한 방법에 의해 삽입 및 삭제 연산을 수행하면 인덱스 페이지의 이용률이 50% 이상 보장되면서 쓰기 연산의 횟수를 크게 감소시킬 수 있다. 다만 예외적으로 삭제 연산이 많은 경우 이용률이 50% 이하인 페이지가 생성될 수 있으나, 쓰기 연산의 횟수를 감소시키기 위해 이러한 페이지의 존재를 허용할 수 있다. 또한 성능 향상을 위해 단위 병합 가능 유닛의 크기가 1로 주어진 경우 0번째 노드에 대한 병합 연산은 첫 번째 인덱스 페이지의 병합 연산 시에 같이 수행할 수 있다.When the insert and delete operations are performed by the method described with reference to FIGS. 11 to 13, the number of write operations can be greatly reduced while ensuring the utilization rate of the index page by 50% or more. An exception is that pages with less than 50% utilization may be generated when there are many delete operations, but the existence of such pages may be allowed to reduce the number of write operations. In addition, when the size of the unit mergeable unit is 1 for the purpose of performance improvement, the merge operation on the 0 th node may be performed at the same time as the merge operation of the first index page.

본 발명에서는 삽입 및 삭제 연산을 즉시 인덱스에 반영하지 않고 갱신 지연 버퍼를 이용하므로 검색연산의 과정이 다음과 같이 수정된다. 즉 인덱스에서 검색연산은 먼저 최신의 정보를 저장하고 있는 갱신지연 버퍼부(130)에 대해 수행된다. 만약 요청하는 값이 갱신지연 버퍼부(130)에 존재하지 않으면, 디렉터리를 통하여 인덱스 페이지를 검색한다.In the present invention, since the update delay buffer is used instead of immediately applying the insert and delete operations to the index, the search operation is modified as follows. That is, the search operation in the index is first performed on the update delay buffer unit 130 which stores the latest information. If the requested value does not exist in the update delay buffer unit 130, the index page is searched through the directory.

도 14는 본 발명에 따른 인덱스 정보 관리 방법에 있어서 검색연산의 수행과정을 도시한 흐름도이다.14 is a flowchart illustrating a process of performing a search operation in the index information management method according to the present invention.

도 14를 참조하면, 검색 연산이 발생하면 검색부(180)는 최신의 정보를 저장하고 있는 갱신지연 버퍼부(130)를 우선 검색한다(1400). 이때 버퍼 엔트리가 생성된 시간순으로 저장되어 있는 구조에서는 검색부(180)는 갱신지연 버퍼부(130)의 후방으로부터 순차 탐색을 실시한다. 이와 달리 버퍼 엔트리가 키값의 크기순서로 저장되어 있거나 이진탐색트리구조로 저장되어 있는 구조에서는 검색부(180)는 갱 신지연 버퍼부(130)에 대해 이진 탐색을 수행한다. 다음으로 검색부(180)는 갱신지연 버퍼부(130) 내에 검색요청된 값이 존재하는지 확인한다(S1410). 만약 갱신지연 버퍼부(130)에 검색요청된 값이 존재하면, 검색부는 해당 값의 주소를 반환한다(S1420). 이와 달리 갱신지연 버퍼부(130)에 검색요청된 값이 존재하지 않으면, 검색부(180)는 디렉토리를 검사하여 검색연산을 수행할 인덱스 페이지를 찾는다(1430). 다음으로 검색부(180)는 인덱스 페이지 내에서 이진 탐색을 수행하여 검색요청된 값을 검색한다(1440). 만약 인덱스 페이지 내에 검색요청된 값이 존재하면, 검색부(180)는 해당 값의 주소를 반환한다(1450). 이와 달리 인덱스 페이지 내에 검색요청된 값이 존재하지 않으면, 검색부(180)는 오류를 반환한다(1460).Referring to FIG. 14, when a search operation occurs, the search unit 180 first searches for an update delay buffer unit 130 that stores the latest information (1400). At this time, in the structure in which the buffer entries are stored in the chronological order in which they are generated, the search unit 180 sequentially searches from behind the update delay buffer unit 130. In contrast, in the structure in which the buffer entries are stored in the order of the key values or in the binary search tree structure, the search unit 180 performs a binary search on the update delay buffer unit 130. Next, the search unit 180 checks whether there is a search request value in the update delay buffer unit 130 (S1410). If the search request value exists in the update delay buffer unit 130, the search unit returns the address of the corresponding value (S1420). In contrast, if the search request value does not exist in the update delay buffer unit 130, the search unit 180 searches the directory to find an index page to perform a search operation (1430). Next, the search unit 180 performs a binary search in the index page to search for a value requested for search (1440). If the search request value exists in the index page, the search unit 180 returns the address of the corresponding value (1450). In contrast, if the search request value does not exist in the index page, the search unit 180 returns an error (1460).

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The invention can also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like, and may also be implemented in the form of a carrier wave (for example, transmission over the Internet). Include. The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

이상에서 본 발명의 바람직한 실시예에 대해 도시하고 설명하였으나, 본 발명은 상술한 특정의 바람직한 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진 자라면 누구든지 다양한 변형 실시가 가능한 것은 물론이고, 그와 같은 변경은 청구범위 기재의 범위 내에 있게 된다.Although the preferred embodiments of the present invention have been shown and described above, the present invention is not limited to the specific preferred embodiments described above, and the present invention belongs to the present invention without departing from the gist of the present invention as claimed in the claims. Various modifications can be made by those skilled in the art, and such changes are within the scope of the claims.

본 발명에 따른 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치 및 방법에 의하면, 인덱스 엔트리들을 효과적으로 클러스터링 함으로써 플래시 페이지의 이용률을 높이면서 효율적인 검색이 가능하다. 또한 플래시 메모리의 물리적 특성을 반영하여 동적인 삽입과 삭제를 지연시킴으로써, 플래시 메모리의 쓰기 연산과 소거 연산의 횟수를 감소시켜 플래시 메모리의 수명을 연장시킬 수 있다. 나아가 적은 메모리를 이용하며 저전력으로 동작하기 때문에 모바일 또는 내장형 시스템에서 적용될 수 있다.According to the apparatus and method for managing index information of data stored in a flash memory according to the present invention, by efficiently clustering index entries, an efficient search can be performed while increasing the utilization rate of a flash page. In addition, by delaying dynamic insertion and deletion in consideration of the physical characteristics of the flash memory, it is possible to extend the life of the flash memory by reducing the number of write and erase operations of the flash memory. Furthermore, it uses less memory and operates at lower power, so it can be applied in mobile or embedded systems.

Claims (15)

플래시 메모리에 저장되어 있거나 저장될 연산대상 데이터 및 상기 연산대상 데이터에 대해 수행될 연산의 종류를 포함하는 버퍼 엔트리가 저장되는 갱신지연 버퍼부;An update delay buffer unit configured to store buffer entries including operation target data stored in or to be stored in flash memory and types of operations to be performed on the operation target data; 상기 플래시 메모리에 대해 연산대상 데이터를 기록하기 위한 삽입연산 또는 상기 플래시 메모리로부터 연산대상 데이터를 제거하기 위한 삭제연산의 수행이 지시되면 수행될 연산에 대응하는 버퍼 엔트리를 생성하여 상기 갱신지연 버퍼부에 저장하는 버퍼 엔트리 생성부; 및Instructing the update delay buffer unit to generate a buffer entry corresponding to the operation to be performed when an instruction to perform an insert operation for recording operation target data or a delete operation for removing operation target data from the flash memory is instructed. A buffer entry generating unit for storing; And 상기 갱신지연 버퍼부의 저장가능공간이 사전에 설정된 임계값보다 작아지면 상기 갱신지연 버퍼부가 빌 때까지, 상기 플래시 메모리에 저장되어 있는 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 인덱스 페이지 중에서 소정 개수의 인덱스 페이지를 병합대상 페이지로 선정하고, 상기 병합대상 페이지에 기록되어 있는 인덱스 엔트리를 독출하여 메인 메모리에 로딩한 후 상기 갱신지연 버퍼부에 저장되어 있는 버퍼 엔트리를 상기 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 플래시 메모리에 기록될 인덱스 페이지를 구성하는 인덱스 관리부;를 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치.When the storage space of the update delay buffer unit becomes smaller than a preset threshold, the index may include a plurality of index entries including key values of records stored in the flash memory and record position information until the update delay buffer unit is empty. A predetermined number of index pages are selected as a merge target page among index pages, the index entries recorded in the merge target page are read and loaded into the main memory, and the buffer entries stored in the update delay buffer unit are stored in the main memory. And an index manager configured to sequentially insert between index entries loaded in the memory and to write an index page to be recorded in the flash memory. 제 1항에 있어서,The method of claim 1, 플래시 메모리에 인덱스 페이지가 존재하지 않으면, 플래시 메모리에 저장되어 있는 전체 레코드에 대해 상기 인덱스 엔트리를 생성한 후 사전에 설정되어 있는 기준개수에 해당하는 인덱스 엔트리로 이루어진 인덱스 페이지를 생성하여 플래시 메모리의 빈 페이지에 저장하는 인덱스 생성부를 더 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치.If the index page does not exist in the flash memory, the index entry is generated for all records stored in the flash memory, and then an index page composed of index entries corresponding to a predetermined reference number is created to generate an empty page of the flash memory. And an index generator for storing the data in a page. 제 1항에 있어서,The method of claim 1, 상기 갱신지연 버퍼부에 저장되어 있는 버퍼 엔트리들을 연산대상 데이터의 키값의 크기를 기준으로 정렬하고, 동일한 연산대상 데이터에 대해 상이한 연산종류가 설정되어 있으면 동일한 연산대상 데이터 중에서 시간적으로 늦게 상기 갱신지연 버퍼부에 저장된 연산대상 데이터 및 그에 대응하는 연산종류에 해당하는 버퍼 엔트리를 제외하고 나머지 연산대상 데이터 및 연산종류에 해당하는 버퍼 엔트리를 제거하는 전처리부를 더 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 생성 장치.When the buffer entries stored in the update delay buffer unit are arranged based on the size of the key value of the operation target data, and different operation types are set for the same operation target data, the update delay buffer is delayed in time among the same operation target data. And a pre-processing unit for removing the buffer entry corresponding to the operation target data and the operation type except for the operation target data stored in the unit and the buffer entry corresponding to the operation type corresponding thereto. Index information generating device. 제 1항에 있어서,The method of claim 1, 상기 갱신지연 버퍼부에 상기 생성된 버퍼 엔트리와 동일한 연산대상 데이터를 포함하는 버퍼 엔트리가 존재하면 상기 갱신지연 버퍼부에 기존재하는 버퍼 엔트리의 연산종류를 상기 생성된 버퍼 엔트리의 연산종류로 변경하는 버퍼 관리부를 더 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관 리 장치.Changing the operation type of the buffer entry existing in the update delay buffer unit to the operation type of the generated buffer entry if the buffer entry including the same operation target data as the generated buffer entry exists in the update delay buffer unit. Index information management apparatus for data stored in the flash memory, characterized in that it further comprises a buffer management unit. 제 1항, 제 3항 또는 제 4항 중 어느 한 항에 있어서,The method according to any one of claims 1, 3 or 4, 상기 인덱스 관리부는 상기 갱신지연 버퍼부에 저장되어 있는 버퍼 엔트리들 중에서 상기 병합대상 페이지들로부터 파악된 기록가능공간에 해당하는 개수의 버퍼 엔트리를 병합가능 엔트리로 선정하고, 상기 병합가능 엔트리를 상기 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 플래시 메모리에 기록될 인덱스 페이지를 구성하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 장치.The index manager selects a number of buffer entries corresponding to recordable spaces identified from the merge target pages as mergeable entries among the buffer entries stored in the update delay buffer unit, and selects the mergeable entry as the main entry. And an index page to be written to the flash memory by sequentially inserting the index entries loaded into the memory. 제 1항, 제 3항 또는 제 4항 중 어느 한 항에 있어서,The method according to any one of claims 1, 3 or 4, 상기 인덱스 관리부는,The index management unit, 상기 갱신지연 버퍼부의 저장가능공간이 사전에 설정된 임계값보다 작아지면 상기 플래시 메모리에 저장되어 있는 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 인덱스 페이지 중에서 소정 개수의 인덱스 페이지를 병합대상 페이지로 선정하는 페이지 선정부;When the storage available space of the update delay buffer unit is smaller than a preset threshold, a predetermined number of index pages may be selected from an index page including a plurality of index entries including key values and record position information of a record stored in the flash memory. A page selector for selecting a merge target page; 상기 갱신지연 버퍼부에 저장되어 있는 버퍼 엔트리들 중에서 상기 병합대상 페이지들로부터 파악된 기록가능공간에 해당하는 개수의 버퍼 엔트리를 병합가능 엔트리로 선정하는 엔트리 선정부;An entry selecting unit which selects, as mergeable entries, a number of buffer entries corresponding to recordable spaces identified from the merge target pages among buffer entries stored in the update delay buffer unit; 상기 병합가능 엔트리를 연산대상 데이터의 키값의 크기를 기준으로 상기 메 인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 임시 인덱스 페이지를 구성하는 페이지 구성부;A page constructing unit configured to sequentially insert the mergeable entry among the index entries loaded in the main memory based on the size of the key value of the operation target data to form a temporary index page; 상기 임시 인덱스 페이지 중에서 상기 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행된 임시 인덱스 페이지에 대해 제1페이지 식별정보를 할당하고, 상기 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행되지 않은 임시 인덱스 페이지에 대해 제2페이지 식별정보를 할당하고, 나머지 임시 임덱스 페이지에 대해 제1페이지 식별정보를 할당하는 식별정보 할당부; 및Among the temporary index pages, first page identification information is allocated to a temporary index page on which an insert or delete operation is performed by the mergeable entry, and to a temporary index page on which the insert or delete operation on the mergeable entry is not performed. An identification information allocator for allocating second page identification information to the second page and allocating the first page identification information to the remaining temporary index pages; And 상기 제1페이지 식별정보가 할당된 임시 인덱스 페이지 중에서 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지의 이전 또는 이후에 위치하는 제2페이지 식별정보가 할당된 임시 인덱스 페이지에 제1페이지 식별정보를 다시 할당한 후 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지를 구성하는 엔트리들을 상기 제1페이지 식별정보가 할당된 임시 인덱스 페이지에 배분하여 상기 플래시 메모리에 기록될 인덱스 페이지를 구성하는 엔트리 배분부;를 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 생성 장치.Among the temporary index pages to which the first page identification information is assigned, the first page identification information is assigned to the temporary index page to which the second page identification information which is located before or after the temporary index page whose page utilization rate is lower than the preset reference utilization rate is assigned. Entry for configuring an index page to be recorded in the flash memory by allocating entries constituting a temporary index page having a page utilization rate lower than a preset reference utilization rate to a temporary index page to which the first page identification information is allocated after reallocating Apparatus for index information generation of data stored in the flash memory comprising a; distribution unit. 제 6항에 있어서,The method of claim 6, 상기 엔트리 배분부는 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지의 이전 또는 이후에 위치하는 제2페이지 식별정보가 할당된 임시 인덱스 페이지 중에서 페이지 이용율이 높은 페이지에 제1페이지 식별정보를 다 시 할당하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 생성 장치.The entry allocator is configured to reset the first page identification information to the page with the highest page utilization rate among the temporary index pages to which the second page identification information located before or after the temporary index page whose page utilization rate is lower than the preset base utilization rate is assigned. And index information generating device for data stored in flash memory. (a) 플래시 메모리에 대해 연산대상 데이터를 기록하기 위한 삽입연산 또는 상기 플래시 메모리로부터 연산대상 데이터를 제거하기 위한 삭제연산의 수행이 지시되면 수행될 연산에 대응하여 플래시 메모리에 저장되어 있거나 저장될 연산대상 데이터 및 상기 연산대상 데이터에 대해 수행될 연산의 종류를 포함하는 버퍼 엔트리를 생성하여 갱신지연 버퍼에 저장하는 단계;(a) an operation to be stored or to be stored in the flash memory in response to the operation to be performed when an instruction to perform an insert operation for recording the operation target data or a delete operation for removing the operation target data from the flash memory is instructed to the flash memory; Generating a buffer entry including a target data and a type of operation to be performed on the operation target data and storing the buffer entry in an update delay buffer; (b) 상기 갱신지연 버퍼부의 저장가능공간이 사전에 설정된 임계값보다 작아지면 상기 플래시 메모리로부터 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 소정 개수의 인덱스 페이지를 병합대상 페이지로 선정하는 단계; 및(b) when the storage available space of the update delay buffer unit is smaller than a preset threshold, a predetermined number of index pages including a plurality of index entries including key values of records and position information of records from the flash memory are merged. Selecting a step; And (c) 상기 병합대상 페이지에 기록되어 있는 인덱스 엔트리를 독출하여 메인 메모리에 로딩한 후 상기 갱신지연 버퍼에 저장되어 있는 버퍼 엔트리를 상기 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 플래시 메모리에 기록될 인덱스 페이지를 구성하는 단계;를 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 방법.(c) reading the index entries recorded in the merge target page and loading them into the main memory, and sequentially inserting the buffer entries stored in the update delay buffer between the index entries loaded into the main memory and then flash memory. And configuring an index page to be written in the index information management method of the data stored in the flash memory. 제 8항에 있어서,The method of claim 8, (d) 플래시 메모리에 인덱스 페이지가 존재하지 않으면, 플래시 메모리에 저 장되어 있는 전체 레코드에 대해 상기 인덱스 엔트리를 생성한 후 사전에 설정되어 있는 기준개수에 해당하는 인덱스 엔트리로 이루어진 인덱스 페이지를 생성하여 플래시 메모리의 빈 페이지에 저장하는 단계를 더 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 방법.(d) If the index page does not exist in the flash memory, the index entry is generated for all records stored in the flash memory, and then an index page composed of index entries corresponding to a predetermined reference number is generated. And storing the data in a blank page of the flash memory. 제 8항에 있어서,The method of claim 8, (e) 상기 갱신지연 버퍼에 저장되어 있는 버퍼 엔트리들을 연산대상 데이터의 키값의 크기를 기준으로 정렬하고, 동일한 연산대상 데이터에 대해 상이한 연산종류가 설정되어 있으면 동일한 연산대상 데이터 중에서 시간적으로 늦게 상기 갱신지연 버퍼에 저장된 연산대상 데이터 및 그에 대응하는 연산종류에 해당하는 버퍼 엔트리를 제외하고 나머지 연산대상 데이터 및 연산종류에 해당하는 버퍼 엔트리를 제거하는 단계를 더 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 생성 방법.(e) Sorting the buffer entries stored in the update delay buffer based on the size of the key value of the operation target data, and if the different operation types are set for the same operation target data, the update is performed later in the same operation target data. And removing the buffer entry corresponding to the remaining operation target data and the operation type except for the buffer entry corresponding to the operation target data stored in the delay buffer and the operation type corresponding thereto. Index information generation method. 제 8항에 있어서,The method of claim 8, (f) 상기 갱신지연 버퍼에 상기 생성된 버퍼 엔트리와 동일한 연산대상 데이터를 포함하는 버퍼 엔트리가 존재하면 상기 갱신지연 버퍼에 기존재하는 버퍼 엔트리의 연산종류를 상기 생성된 버퍼 엔트리의 연산종류로 변경하는 단계를 더 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 방법.(f) changing the operation type of the buffer entry existing in the update delay buffer to the operation type of the generated buffer entry if the buffer entry including the same operation target data as the generated buffer entry exists in the update delay buffer. And managing the index information of the data stored in the flash memory. 제 8항, 제 10항 또는 제 11항 중 어느 한 항에 있어서,The method according to any one of claims 8, 10 or 11, 상기 (c)단계에서, 상기 갱신지연 버퍼에 저장되어 있는 버퍼 엔트리들 중에서 상기 병합대상 페이지들로부터 파악된 기록가능공간에 해당하는 개수의 버퍼 엔트리를 병합가능 엔트리로 선정하고, 상기 병합가능 엔트리를 상기 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 플래시 메모리에 기록될 인덱스 페이지를 구성하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 관리 방법.In the step (c), among the buffer entries stored in the update delay buffer, the number of buffer entries corresponding to the recordable space identified from the merge target pages is selected as a mergeable entry, and the mergeable entry is selected. And index pages to be written in the flash memory by sequentially inserting the index entries loaded in the main memory. 제 8항, 제 10항 또는 제 11항 중 어느 한 항에 있어서,The method according to any one of claims 8, 10 or 11, 상기 (c)단계는,Step (c) is, (c1) 상기 갱신지연 버퍼의 저장가능공간이 사전에 설정된 임계값보다 작아지면 상기 플래시 메모리로부터 레코드의 키값 및 레코드의 위치정보를 포함하는 복수개의 인덱스 엔트리로 이루어진 소정 개수의 인덱스 페이지를 병합대상 페이지로 선정하는 단계;(c1) when the storage space of the update delay buffer becomes smaller than a preset threshold, a predetermined number of index pages including a plurality of index entries including key values of records and position information of records from the flash memory are merged. Selecting a step; (c2) 상기 갱신지연 버퍼에 저장되어 있는 버퍼 엔트리들 중에서 상기 병합대상 페이지들로부터 파악된 기록가능공간에 해당하는 개수의 버퍼 엔트리를 병합가능 엔트리로 선정하는 단계;(c2) selecting a number of buffer entries corresponding to recordable spaces identified from the merge target pages among the buffer entries stored in the update delay buffer as mergeable entries; (c3) 상기 병합가능 엔트리를 연산대상 데이터의 키값의 크기를 기준으로 상기 메인 메모리에 로딩된 인덱스 엔트리들 사이에 순차적으로 삽입하여 임시 인덱 스 페이지를 구성하는 단계;(c3) constructing a temporary index page by sequentially inserting the mergeable entry between index entries loaded in the main memory based on the size of the key value of the operation target data; (c4) 상기 임시 인덱스 페이지 중에서 상기 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행된 임시 인덱스 페이지에 대해 제1페이지 식별정보를 할당하고, 상기 병합가능 엔트리에 의한 삽입 또는 삭제연산이 수행되지 않은 임시 인덱스 페이지에 대해 제2페이지 식별정보를 할당하고, 나머지 임시 임덱스 페이지에 대해 제1페이지 식별정보를 할당하는 단계; 및(c4) Allocate first page identification information to a temporary index page in which the insertion or deletion operation is performed by the mergeable entry among the temporary index pages, and the temporary insertion or deletion operation by the mergeable entry is not performed. Allocating second page identification information to the index page and allocating the first page identification information to the remaining temporary index pages; And (c5) 상기 제1페이지 식별정보가 할당된 임시 인덱스 페이지 중에서 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지의 이전 또는 이후에 위치하는 제2페이지 식별정보가 할당된 임시 인덱스 페이지에 제1페이지 식별정보를 다시 할당한 후 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지를 구성하는 엔트리들을 상기 제1페이지 식별정보가 할당된 임시 인덱스 페이지에 배분하여 상기 플래시 메모리에 기록될 인덱스 페이지를 구성하는 단계;를 포함하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 생성 방법.(c5) a first index is assigned to a temporary index page to which second page identification information, which is located before or after a temporary index page having a page utilization rate lower than a preset reference rate, is allocated among the temporary index pages to which the first page identification information is assigned. After reallocating the page identification information, the entries constituting the temporary index page having the page utilization rate lower than the preset reference utilization rate are allocated to the temporary index page to which the first page identification information is allocated, thereby indexing the index page to be recorded in the flash memory. And indexing the data stored in the flash memory. 제 13항에 있어서,The method of claim 13, 상기 (c5)단계에서, 페이지 이용율이 사전에 설정된 기준이용율보다 낮은 임시 인덱스 페이지의 이전 또는 이후에 위치하는 제2페이지 식별정보가 할당된 임시 인덱스 페이지 중에서 페이지 이용율이 높은 페이지에 제1페이지 식별정보를 다시 할당하는 것을 특징으로 하는 플래시 메모리에 저장된 데이터의 인덱스 정보 생성 방법.In step (c5), the first page identification information is assigned to a page having a high page utilization rate among the temporary index pages to which the second page identification information located before or after the temporary index page whose page utilization rate is lower than a predetermined reference utilization rate is assigned. Index information generation method of the data stored in the flash memory, characterized in that for reallocating again. 제 8항 내지 제11항 중 어느 한 항에 기재된 플래시 메모리에 저장된 데이터의 인덱스 정보 생성 방법을 컴퓨터에서 실행시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for executing the method of generating index information of data stored in a flash memory according to any one of claims 8 to 11.
KR1020070071155A 2007-07-16 2007-07-16 Apparatus and method for managing index of data stored in flash memory KR100907477B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070071155A KR100907477B1 (en) 2007-07-16 2007-07-16 Apparatus and method for managing index of data stored in flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070071155A KR100907477B1 (en) 2007-07-16 2007-07-16 Apparatus and method for managing index of data stored in flash memory

Publications (2)

Publication Number Publication Date
KR20090007926A true KR20090007926A (en) 2009-01-21
KR100907477B1 KR100907477B1 (en) 2009-07-10

Family

ID=40488380

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070071155A KR100907477B1 (en) 2007-07-16 2007-07-16 Apparatus and method for managing index of data stored in flash memory

Country Status (1)

Country Link
KR (1) KR100907477B1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101465447B1 (en) * 2014-03-31 2014-12-10 성균관대학교산학협력단 Method for external merge sort, system for external merge sort and distributed processing system for external merge sort
US9164890B2 (en) 2012-06-28 2015-10-20 Samsung Electronics Co., Ltd. Storage device capable of increasing its life cycle and operating method thereof
CN110489380A (en) * 2019-08-14 2019-11-22 腾讯科技(深圳)有限公司 A kind of data processing method, device and equipment
KR102102313B1 (en) * 2019-11-27 2020-04-20 주식회사 리얼타임테크 System for Managing TimeSeries data in In-Memory Database

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101377923B1 (en) * 2011-12-08 2014-03-24 한양대학교 에리카산학협력단 Apparatus and metohd for storing data in flash memory by using b-tree performing delayed update
KR102263800B1 (en) * 2015-01-07 2021-06-10 에스케이텔레콤 주식회사 Memory management apparatus and control method thereof

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1185609A (en) 1997-09-09 1999-03-30 Mitsubishi Electric Corp Semiconductor memory and data managing method therefor
WO2005066793A2 (en) * 2003-12-30 2005-07-21 Sandisk Corporation Non-volatile memory and method with non-sequential update block management
KR20060106993A (en) * 2005-04-06 2006-10-13 주식회사 에스원 Method for storing data in flash memory
KR101257848B1 (en) * 2005-07-13 2013-04-24 삼성전자주식회사 Data storing apparatus comprising complex memory and method of operating the same

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9164890B2 (en) 2012-06-28 2015-10-20 Samsung Electronics Co., Ltd. Storage device capable of increasing its life cycle and operating method thereof
KR101465447B1 (en) * 2014-03-31 2014-12-10 성균관대학교산학협력단 Method for external merge sort, system for external merge sort and distributed processing system for external merge sort
CN110489380A (en) * 2019-08-14 2019-11-22 腾讯科技(深圳)有限公司 A kind of data processing method, device and equipment
CN110489380B (en) * 2019-08-14 2024-02-13 腾讯科技(深圳)有限公司 Data processing method, device and equipment
KR102102313B1 (en) * 2019-11-27 2020-04-20 주식회사 리얼타임테크 System for Managing TimeSeries data in In-Memory Database
WO2021107211A1 (en) * 2019-11-27 2021-06-03 주식회사 리얼타임테크 In-memory database-based time-series data management system

Also Published As

Publication number Publication date
KR100907477B1 (en) 2009-07-10

Similar Documents

Publication Publication Date Title
US11243911B2 (en) Method and apparatus for fault-tolerant memory management
US6571261B1 (en) Defragmentation utility for a shared disk parallel file system across a storage area network
US7930559B1 (en) Decoupled data stream and access structures
US7640262B1 (en) Positional allocation
JP6205650B2 (en) Method and apparatus utilizing non-uniform hash function to place records in non-uniform access memory
US7610468B2 (en) Modified buddy system memory allocation
US7673099B1 (en) Affinity caching
US7720892B1 (en) Bulk updates and tape synchronization
US7933938B2 (en) File storage system, file storing method and file searching method therein
KR20070060070A (en) Fat analysis for optimized sequential cluster management
CN111522507B (en) Low-delay file system address space management method, system and medium
KR20120090965A (en) Apparatus, system, and method for caching data on a solid-state strorage device
KR100907477B1 (en) Apparatus and method for managing index of data stored in flash memory
CN108733306A (en) A kind of Piece file mergence method and device
US11144508B2 (en) Region-integrated data deduplication implementing a multi-lifetime duplicate finder
US20230028391A1 (en) Embedded reference counts for file clones
CN109407985B (en) Data management method and related device
CN113377292B (en) Single machine storage engine
CN114281762A (en) Log storage acceleration method, device, equipment and medium
KR20210058118A (en) Casedb: low-cost put-intensive key-value store for edge computing
US10877881B2 (en) In-place garbage collection of a sharded, replicated distributed state machine based on mergeable operations
CN113204520B (en) Remote sensing data rapid concurrent read-write method based on distributed file system
US20240028560A1 (en) Directory management method and system for file system based on cuckoo hash and storage medium
KR100982591B1 (en) File system, main storage and flash storage for progressive indexing and data management method using the progressive indexing
KR20110042576A (en) Dynamic index information maintenance system adapted solid state disk and method thereof and recording medium having program source thereof

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130701

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140624

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee