KR101353968B1 - Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure - Google Patents

Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure Download PDF

Info

Publication number
KR101353968B1
KR101353968B1 KR1020120007546A KR20120007546A KR101353968B1 KR 101353968 B1 KR101353968 B1 KR 101353968B1 KR 1020120007546 A KR1020120007546 A KR 1020120007546A KR 20120007546 A KR20120007546 A KR 20120007546A KR 101353968 B1 KR101353968 B1 KR 101353968B1
Authority
KR
South Korea
Prior art keywords
block
data
area
blocks
read
Prior art date
Application number
KR1020120007546A
Other languages
Korean (ko)
Other versions
KR20130086693A (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 KR1020120007546A priority Critical patent/KR101353968B1/en
Priority to US13/623,414 priority patent/US20130198453A1/en
Publication of KR20130086693A publication Critical patent/KR20130086693A/en
Application granted granted Critical
Publication of KR101353968B1 publication Critical patent/KR101353968B1/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/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • 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/0866Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches for peripheral storage systems, e.g. disk cache
    • G06F12/0873Mapping of cache memory to specific storage devices or parts thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/31Providing disk cache in a specific location of a storage system
    • G06F2212/313In storage device
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

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

Abstract

데이터 처리방법이 제공된다. 본 데이터 처리 방법에 따르면, 비휘발성 메모리 캐쉬의 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 K개의 블록(K는 1 이상의 자연수)에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우 교체 작업을 수행하고, 비휘발성 메모리 캐쉬의 쓰기 캐쉬 영역의 모든 페이지가 사용된 경우 가비지 콜렉션 작업을 수행하는 데이터 처리방법을 제공할 수 있게 되어, 스토리지 장치는 데이터 더욱 낮은 전력 소모량 및 높은 처리속도를 가질 수 있게 된다. A data processing method is provided. According to this data processing method, a replacement operation is performed when a read access request for new data corresponding to K blocks (K is a natural number of 1 or more) is requested while there is only one free block in the read cache area of the nonvolatile memory cache. It is possible to provide a data processing method for performing garbage collection operations when all pages of the write cache area of the nonvolatile memory cache are used, so that the storage device can have lower power consumption and higher processing speed of data. do.

Description

환형 구조의 비휘발성 메모리 캐쉬에 기록된 데이터를 교체 및 가비지 콜렉션하기 위한 데이터 처리방법{Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure}Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure}

본 발명은 데이터 처리방법에 관한 것으로, 더욱 상세하게는, 환형 구조의 비휘발성 메모리 캐쉬에 기록된 데이터를 교체 및 가비지 콜렉션하기 위한 데이터 처리방법에 관한 것이다.
The present invention relates to a data processing method, and more particularly, to a data processing method for replacing and garbage collection of data written to an annular nonvolatile memory cache.

최근 환경 문제로 인한 그린 IT에 대한 관심이 높아지면서, 전력 소비량이 높은 스토리지 시스템의 효율적인 에너지 관리에 대한 다양한 연구가 진행되고 있다. 인터넷의 발달로 웹서버, 전자 상거래 등 네트워크 서비스가 크게 활성화 됨으로써 많은 양의 데이터를 저장하기 위해 고성능 대용량 디스크가 사용되고, 데이터 백업 역시 테이프를 대체하여 디스크를 사용하고 있는 추세이다. 디스크는 I/O 동작을 수행하는 활성화모드(Active Mode), IO 요청을 대기하는 아이들 모드(Idle Mode), 그리고 일정기간 IO 요청이 없을 경우 디스크 회전을 멈추는 대기모드(Standby Mode)로 구분할 수 있다. 아이들 모드일 때 소비되는 전력은 활성 모드일때 소비되는 전력과 20%만 절약된다. 결국, 디스크는 대기 모드로 진입하지 않으면 IO 동작을 수행하지 않는 상태에서도 많은 양의 전력을 소비하게 된다. Recently, as interest in green IT has increased due to environmental problems, various studies on efficient energy management of high power consumption storage systems have been conducted. With the development of the Internet, network services such as web servers and e-commerce have been greatly activated, and high-performance large-capacity disks are used to store large amounts of data, and data backup is also replacing disks. Disks can be classified into an active mode for performing I / O operations, an idle mode for waiting for an IO request, and a standby mode for stopping disk rotation when there is no IO request for a certain period of time. . The power consumed in idle mode saves only 20% of the power consumed in active mode. As a result, if the disk does not enter standby mode, the disk consumes a large amount of power even without performing IO operation.

디스크의 소비 전력을 크게 줄이기 위한 방법으로, 플래시 메모리를 디스크로 대체하여 사용하는 방법이 사용되고 있다. 플래시 메모리는 디스크보다 짧은 지연시간과 전력 소비량을 가진다. 하지만 플래시 메모리는 단위 용량당 가격이 디스크에 비해 월등히 비싸기 때문에 대용량 디스크로 운용되는 스토리지 시스템에는 부적합하다. 대신 플래시 메모리를 캐시로 활용하여 빈번하게 재사용되는 데이터를 캐시에 올려 디스크를 대기상태로 머물게 함으로써 에너지를 절약하고 성능을 향상시킬 수 있다. 이는 DRAM 캐시를 확장하여 사용하는것 보다 지연시간은 나쁠 수 있으나, DRAM에 비해 저렴하고 랜덤 액세스 read 성능이 좋아 디스크 캐시로써 좋은 대안이 된다. As a method for significantly reducing the power consumption of a disk, a method of replacing a flash memory with a disk has been used. Flash memory has lower latency and power consumption than disks. However, flash memory is much more expensive than disk, making it unsuitable for storage systems running on large disks. Instead, flash memory can be used as a cache to save data and improve performance by putting frequently reused data in the cache to keep the disk on standby. This may have lower latency than using an extended DRAM cache, but it is a good alternative to disk cache because it is cheaper and has better random access read performance than DRAM.

이와 같이, 디스크의 성능 향상과 에너지 절약을 윙해 플래시 메모리 캐시를 사용하는 방법은 일찍이 연구되었다. 하지만, 이 연구는 기본적인 시스템 구조와 알고리즘만을 제안하고 플래시 메모리 특성에 따른 데이터 할당, wear-leveling 등에 대한 고려가 없다. As such, the use of flash memory caches to improve disk performance and energy savings has been studied earlier. However, this study proposes only basic system structure and algorithm and does not consider data allocation and wear-leveling according to flash memory characteristics.

이와 같이, 플래시 메모리를 캐시로 사용함에 있어, 플래시 메모리의 특성을 고려한 플래시 메모리 관리방법을 제공하기 위한 방안의 모색이 요청된다.
As described above, in using the flash memory as a cache, a search for a method for providing a flash memory management method in consideration of the characteristics of the flash memory is required.

본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 본 발명의 목적은, 비휘발성 메모리 캐쉬의 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 K개의 블록(K는 1 이상의 자연수)에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우 교체 작업을 수행하고, 비휘발성 메모리 캐쉬의 쓰기 캐쉬 영역의 모든 페이지가 사용된 경우 가비지 콜렉션 작업을 수행하는 데이터 처리방법을 제공함에 있다.
SUMMARY OF THE INVENTION The present invention has been made to solve the above problems, and an object of the present invention is to correspond to K blocks (K is a natural number of 1 or more) in a state in which one empty block of a read cache area of a nonvolatile memory cache remains. The present invention provides a data processing method of performing a replacement operation when read access to new data is requested, and garbage collection when all pages of the write cache area of the nonvolatile memory cache are used.

상기 목적을 달성하기 위한 본 발명의 일 실시예에 따른, 환형 구조의 비휘발성 메모리 캐쉬를 포함하는 스토리지 장치의 데이터 처리방법은, 상기 비휘발성 메모리 캐쉬의 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 K개의 블록(K는 1 이상의 자연수)에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우, 상기 읽기 캐쉬 영역의 블록 중 K개의 블록을 선정하여 상기 새로운 데이터를 기록하는 교체 작업을 수행하는 단계; 상기 비휘발성 메모리 캐쉬의 쓰기 캐쉬 영역의 모든 페이지가 사용된 경우, 쓰기 캐쉬 영역에 기록된 유효한 데이터를 모두 디스크 어레이에 기록하고, 쓰기 캐쉬 영역을 모두 삭제한 후에 일정 블록 수만큼 이동시키는, 가비지 콜렉션 작업을 수행하는 단계;를 포함한다. According to an embodiment of the present invention, a data processing method of a storage device including a nonvolatile memory cache having an annular structure includes a state in which one empty block of a read cache area of the nonvolatile memory cache remains. If read access is requested for new data corresponding to K blocks (K is a natural number of 1 or more), selecting K blocks among the blocks of the read cache area and performing a replacement operation of recording the new data ; When all pages of the write cache area of the nonvolatile memory cache are used, garbage collection, which writes all valid data written to the write cache area to the disk array, and moves the predetermined number of blocks after deleting all the write cache areas. It includes; performing a task.

그리고, 상기 교체 작업 수행 단계는, 상기 읽기 캐쉬 영역에 빈 블록이 1개 남은 상태에서 K개의 블록에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우, 상기 읽기 캐쉬 영역 내에서 K개의 교체 대상 블록을 K개 선정하는 단계; 상기 K개의 교체 대상 블록을 삭제하여 빈 블록으로 변경하는 단계; 기존에 존재하던 1개의 빈 블록 및 상기 선정된 K개의 빈 블록들에 상기 새로운 데이터를 기록하는 단계; 상기 새로운 데이터가 기록된 블록들의 스패어 영역에 액세스가 없었음을 나타내는 값을 표시하는 단계; 및 상기 선정된 K개의 블록들 중 남은 1개의 빈 블록에 읽기할당 포인터를 대응시키는 단계;를 포함한다. In the performing of the replacing operation, when read access is requested for new data corresponding to K blocks in a state in which one empty block remains in the read cache area, K replacement blocks in the read cache area are requested. Selecting K; Deleting the K replacement blocks to replace the empty blocks; Recording the new data into one empty block and the selected K empty blocks; Displaying a value indicating no access to a spare area of blocks in which the new data is recorded; And associating a read allocation pointer with one remaining empty block among the selected K blocks.

또한, 상기 선정단계는, 읽기교체 포인터 및 블록의 스패어 영역의 비트값을 이용하여 상기 교체대상 블록을 선정할 수도 있다. In the selecting step, the replacement target block may be selected using a read replacement pointer and a bit value of a spare area of the block.

그리고, 상기 선정단계는, 액세스 리스트를 이용하여 교체 대상 블록을 선정할 수도 있다. In the selecting step, the replacement target block may be selected using the access list.

또한, 상기 가비지 콜랙션 작업단계는, 상기 쓰기 캐쉬 영역의 모든 페이지가 사용된 경우, 상기 쓰기 캐쉬 영역의 블록들 중 무효 블록들 내의 유효 페이지들을 모두 제1 예약 영역의 블록 내에 기록하는 단계; 상기 쓰기 캐쉬 영역 내의 모든 무효 블록을 삭제하는 단계; 상기 쓰기 캐쉬 영역 내의 유효 블록의 데이터 및 상기 비휘발성 메모리 캐쉬 내의 제1 예약 영역의 블록에 기록된 데이터를 상기 스토리지 장치의 디스크 어레이에 복사하는 단계; 상기 쓰기 캐쉬 영역 내의 유효 블록 및 상기 제1 예약 영역의 데이터가 기록된 적어도 하나의 블록을 삭제하는 단계; 및 상기 제1 예약 영역의 데이터가 기록된 적어도 하나의 블록의 개수만큼 상기 쓰기 캐쉬 영역을 이동시키는 단계;를 포함할 수도 있다. The garbage collection operation may include writing all valid pages in invalid blocks among blocks of the write cache area in a block of the first reserved area when all pages of the write cache area are used; Deleting all invalid blocks in the write cache area; Copying data of a valid block in the write cache area and data written in a block of a first reserved area in the nonvolatile memory cache to a disk array of the storage device; Deleting a valid block in the write cache area and at least one block in which data of the first reserved area is recorded; And moving the write cache area by the number of at least one block in which data of the first reserved area is recorded.

그리고, 상기 무효 블록은 스페어 영역에 데이터가 무효인 페이지가 포함되어 있음을 나타내는 표시가 있는 블록을 나타내고, 상기 유효 페이지는 페이지의 스패어 영역에 데이터가 유효임이 표시된 페이지를 나타낼 수도 있다.
The invalid block may indicate a block in which the spare area includes an invalid page, and the valid page may indicate a page in which the data is valid in the spare area of the page.

본 발명의 다양한 실시예에 따르면, 비휘발성 메모리 캐쉬의 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 K개의 블록(K는 1 이상의 자연수)에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우 교체 작업을 수행하고, 비휘발성 메모리 캐쉬의 쓰기 캐쉬 영역의 모든 페이지가 사용된 경우 가비지 콜렉션 작업을 수행하는 데이터 처리방법을 제공할 수 있게 되어, 스토리지 장치는 데이터 더욱 낮은 전력 소모량 및 높은 처리속도를 가질 수 있게 된다.
According to various embodiments of the present disclosure, when a read access to new data corresponding to K blocks (K is a natural number of 1 or more) is requested, when there is only one free block in the read cache area of the nonvolatile memory cache, it is replaced. It is possible to provide a data processing method for performing tasks and performing garbage collection operations when all pages of the write cache area of the nonvolatile memory cache are used, so that the storage device has lower power consumption and higher processing speed of data. It becomes possible.

도 1은 본 발명의 일 실시예에 따른, 비휘발성 메모리 캐쉬(Cache)를 이용하는 스토리지 장치의 구조를 도시한 도면,
도 2는 본 발명의 일 실시예에 따른, 환형 구조의 비휘발성 메모리 캐쉬(200)의 구조를 도시한 도면,
도 3a는 본 발명의 일 실시예에 따른 하나의 블록의 구조를 도시한 도면,
도 3b는 본 발명의 일 실시예에 따른, 복수개의 페이지를 포함하는 블록을 도시한 도면,
도 4a는 본 발명의 일 실시예에 따른, 데이터가 처리되기 전의 환형 구조의 비휘발성 메모리 캐쉬의 상태를 도시한 도면,
도 4b는 본 발명의 일 실시예에 따른, 읽기 및 쓰기에 대한 데이터 처리가 수행된 경우를 도시한 도면,
도 4c는 본 발명의 일 실시예에 따른, 제2 블록의 데이터가 아웃 플레이스 업데이트되는 경우를 도시한 도면,
도 5a는 본 발명의 일 실시예에 따른, 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 3개의 블록에 해당되는 새로운 데이터에 대한 액세스가 발생한 경우를 도시한 도면,
도 5b는 본 발명의 일 실시예에 따른, 3개의 블록이 빈 블록으로 선정된 상태를 도시한 도면,
도 6a는 본 발명의 일 실시예에 따른, 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 3개의 블록에 해당되는 새로운 데이터에 대한 액세스가 발생한 경우를 도시한 도면,
도 6b는 본 발명의 일 실시예에 따른, 액세스 리스트를 이용하여 3개의 블록이 빈 블록으로 선정된 상태를 도시한 도면,
도 7a는 본 발명의 일 실시예에 따른, 쓰기 캐쉬 영역이 모두 사용된 경우를 도시한 도면,
도 7b는 본 발명의 일 실시예에 따른, 가비지 콜랙션 과정에서 1개의 블록만큼 시계방향으로 쓰기 캐쉬 영역이 이동된 상태를 도시한 도면이다.
1 is a diagram illustrating a structure of a storage device using a nonvolatile memory cache according to an embodiment of the present invention;
2 is a diagram illustrating a structure of a nonvolatile memory cache 200 having an annular structure, according to an embodiment of the present invention;
3A is a view showing the structure of one block according to an embodiment of the present invention;
3B illustrates a block including a plurality of pages according to an embodiment of the present invention;
4A is a diagram illustrating a state of a nonvolatile memory cache having an annular structure before data is processed according to an embodiment of the present invention;
4B is a diagram illustrating a case where data processing for reading and writing is performed according to an embodiment of the present invention;
4C is a diagram illustrating a case in which data of a second block is out-place updated according to an embodiment of the present invention;
FIG. 5A illustrates a case in which access to new data corresponding to three blocks occurs in a state in which one empty block of a read cache area remains, according to an embodiment of the present invention; FIG.
5B is a diagram illustrating a state in which three blocks are selected as empty blocks, according to an embodiment of the present invention;
FIG. 6A illustrates a case in which access to new data corresponding to three blocks occurs in a state in which one empty block of a read cache area remains, according to an embodiment of the present invention; FIG.
6B illustrates a state in which three blocks are selected as empty blocks using an access list according to an embodiment of the present invention;
7A is a diagram illustrating a case where all write cache regions are used, according to an embodiment of the present invention;
FIG. 7B is a diagram illustrating a state in which a write cache region is moved clockwise by one block in a garbage collection process according to an embodiment of the present invention.

이하에서는 도면을 참조하여 본 발명을 보다 상세하게 설명한다. Hereinafter, the present invention will be described in detail with reference to the drawings.

도 1은 본 발명의 일 실시예에 따른, 비휘발성 메모리 캐쉬(Cache)를 이용하는 스토리지 장치(100)의 구조를 도시한 도면이다. 도 1에 도시된 바와 같이, 스토리지 장치(100)는 스토리지 컨트롤러(110) 및 디스크 어레이(120)를 포함한다. 1 is a diagram illustrating a structure of a storage device 100 using a nonvolatile memory cache according to an embodiment of the present invention. As shown in FIG. 1, the storage device 100 includes a storage controller 110 and a disk array 120.

도 1에 도시된 바와 같이, 스토리지 컨트롤러(110)는 CPU(112), 메모리(114), 및 비휘발성 메모리 캐쉬(116)를 포함한다. CPU(112)는 스토리지 장치(100)의 전반적인 동작을 제어한다. 메모리(114)는 CPU가 처리하는 데이터를 임시로 저장하는 공간으로 RAM 및 캐쉬메모리 등이 포함된다. As shown in FIG. 1, the storage controller 110 includes a CPU 112, a memory 114, and a nonvolatile memory cache 116. The CPU 112 controls the overall operation of the storage device 100. The memory 114 is a space for temporarily storing data processed by the CPU and includes a RAM and a cache memory.

비휘발성 메모리 캐쉬(116)는 SSD 등의 비휘발성 메모리를 이용한 대용량 캐쉬에 해당된다. 비휘발성 메모리 캐쉬(116)에 사용되는 비휘발성 메모리는 플래쉬 메모리가 이용된 SSD가 될 수 있으며, 이외에도 다양한 종류의 비휘발성 메모리를 이용하는 SSD(Solid State Drive) 가 이용될 수 있다. 예를 들어, 비휘발성 메모리 캐쉬(116)는 SSD, 플래시 메모리 등 비휘발성 메모리 캐쉬라면 어떤 것이라도 적용될 수 있음은 물론이다. The nonvolatile memory cache 116 corresponds to a large capacity cache using nonvolatile memory such as an SSD. The nonvolatile memory used in the nonvolatile memory cache 116 may be an SSD using a flash memory. In addition, a solid state drive (SSD) using various types of nonvolatile memory may be used. For example, the nonvolatile memory cache 116 may be applied to any nonvolatile memory cache such as SSD and flash memory.

디스크 어레이(120)는 복수개의 디스크가 포함되어 대용량 저장 공간을 구현하게 된다. The disk array 120 includes a plurality of disks to implement a large storage space.

CPU(112)는 데이터 접근이 요청되면 먼저 메모리(114)에 데이터가 존재하는지 검색한다. 그리고, CPU(112)는 메모리(114)에 데이터가 있으면 해당 데이터에 액세스하게 된다. 반면, CPU(112)는 메모리(114)에 데이터가 없으면 해당 데이터가 비휘발성 메모리 캐쉬(116)에 있는지 여부를 검색한다. 그리고, CPU(112)는 비휘발성 메모리 캐쉬(116)에 데이터가 있으면 해당 데이터에 액세스하게 된다. 반면, CPU(112)는 비휘발성 메모리 캐쉬(116)에 데이터가 없으면 디스크 어레이(120)에서 해당 데이터를 액세스하게 된다. When a data access request is made, the CPU 112 first searches whether data exists in the memory 114. The CPU 112 accesses the data if there is data in the memory 114. On the other hand, if there is no data in the memory 114, the CPU 112 searches whether the data exists in the nonvolatile memory cache 116. If there is data in the nonvolatile memory cache 116, the CPU 112 accesses the data. On the other hand, if there is no data in the nonvolatile memory cache 116, the CPU 112 accesses the data in the disk array 120.

이와 같이, CPU(1120)는 메모리(114) -> 비휘발성 메모리 캐쉬(116) -> 디스크 어레이(120)의 순으로 데이터 액세스를 시도하게 된다. 이에 따라, 스토리지 장치(100)는 비휘발성 메모리 캐쉬(116)를 이용함으로써 디스크 IO 퍼포먼스를 향상시킬 수 있고 디스크어레이(120)의 전력 소모를 줄일 수 있게 된다. As such, the CPU 1120 attempts to access data in the order of the memory 114-> nonvolatile memory cache 116-> disk array 120. Accordingly, the storage device 100 may improve disk IO performance by using the nonvolatile memory cache 116 and may reduce power consumption of the disk array 120.

한편, 도 1의 스토리지 장치(100)는 비휘발성 메모리 캐쉬(116)를 포함하는 전자 장치이면 어느 것이라도 적용될 수 있음은 물론이다. 예를 들어, 스토리지 장치(100)는 비휘발성 메모리 캐쉬(116)를 포함하는 컴퓨터 장치, 디스크 어레이 장치, 서버 장치, 노트북 컴퓨터, 휴대폰 등이 될 수 있음은 물론이다. The storage device 100 of FIG. 1 may be applied to any electronic device including the nonvolatile memory cache 116. For example, the storage device 100 may be a computer device including a nonvolatile memory cache 116, a disk array device, a server device, a notebook computer, a mobile phone, or the like.

이하에서는, 비휘발성 메모리 캐쉬(116)의 구조 및 동작에 관하여 상세히 설명한다. 이하에서 설명되는 비휘발성 메모리 캐쉬(116)의 구조 및 동작은 이하에서 설명되는 알고리즘에 따라 CPU(112)에 의해 수행될 수도 있다. Hereinafter, the structure and operation of the nonvolatile memory cache 116 will be described in detail. The structure and operation of the nonvolatile memory cache 116 described below may be performed by the CPU 112 in accordance with the algorithm described below.

도 2는 본 발명의 일 실시예에 따른, 환형 구조의 비휘발성 메모리 캐쉬(200)의 구조를 도시한 도면이다. 여기에서, 비휘발성 메모리 캐쉬(200)는 도 1의 비휘발성 메모리 캐쉬(160)에 해당되는 것으로, SSD 캐쉬, 플래시 메모리 캐쉬 등이 될 수 있다. 2 is a diagram illustrating a structure of a nonvolatile memory cache 200 having an annular structure according to an embodiment of the present invention. Here, the nonvolatile memory cache 200 corresponds to the nonvolatile memory cache 160 of FIG. 1, and may be an SSD cache, a flash memory cache, or the like.

도 2에 도시된 바와 같이, 비휘발성 메모리 캐쉬(200)는 저장 영역의 블록들이 환형 구조로 구성된다. 실제로, 비휘발성 메모리 캐쉬(200)는 가장 마지막 데이터 블록이 가장 처음 블록과 연결됨으로써 환형 구조를 가지게 될 수 있게 된다. As shown in FIG. 2, the nonvolatile memory cache 200 has a block structure in a storage area. In practice, the nonvolatile memory cache 200 may have an annular structure by connecting the last block of data with the first block.

도 2에 도시된 바와 같이, 비휘발성 메모리 캐쉬(200)는 쓰기 캐쉬 영역(210), 읽기 캐쉬 영역(220), 제1 예약 영역(230), 및 제2 예약 영역(240)을 포함한다. As shown in FIG. 2, the nonvolatile memory cache 200 includes a write cache area 210, a read cache area 220, a first reserved area 230, and a second reserved area 240.

쓰기 캐쉬 영역(210)은 쓰기 액세스 작업을 진행하기 위해 사용되는 영역이고, 읽기 캐쉬 영역(220)은 읽기 액세스 작업을 진행하기 위해 사용되는 영역이다. 이와 같이, 비휘발성 메모리 캐쉬(200)는 읽기 영역과 쓰기 영역이 구분되어져 있음으로써, 캐쉬의 미스율을 감소시킬 수 있게 된다. The write cache area 210 is an area used to perform a write access operation, and the read cache area 220 is an area used to perform a read access operation. As described above, since the read area and the write area are divided in the nonvolatile memory cache 200, the miss rate of the cache can be reduced.

또한, 도 2에 도시된 바와 같이, 읽기 캐쉬 영역(220)은 쓰기 캐쉬영역(210)보다 더 많은 저장 영역이 할당된 것을 확인할 수 있다. 읽기 캐쉬 영역(220)은 히트율이 높고 아웃 플레이스 업데이트(out place update)에 민감하지 않으며 읽기 액세스가 쓰기 액세스보다 많기 때문에, 읽기 캐쉬 영역(220)을 많이 할당함으로써 IO 효율을 극대화할 수 있게 된다. In addition, as shown in FIG. 2, the read cache area 220 may confirm that more storage areas are allocated than the write cache area 210. Since the read cache area 220 has a high hit rate, is not sensitive to out place updates, and has more read accesses than write accesses, the read cache area 220 may be allocated a large number of read cache areas to maximize IO efficiency. .

구체적으로, 읽기 캐쉬 영역(220), 쓰기 캐쉬 영역(210), 제1 예약 영역(230), 및 제2 예약 영역(240)이 각각 전체 캐쉬 공간의 70%, 10%, 10%, 10%를 차지할 수 있다. Specifically, the read cache area 220, the write cache area 210, the first reserved area 230, and the second reserved area 240 each represent 70%, 10%, 10%, and 10% of the total cache space. Can occupy.

또한, 제1 예약 영역(230) 및 제2 예약 영역(240)은 아웃 플레이스 업데이트 및 가비지 컬렉션(garbage collection)을 위해 예약된 영역이다. In addition, the first reserved area 230 and the second reserved area 240 are reserved areas for out-place update and garbage collection.

아웃 클레이스 업데이트(out-place update)는 비휘발성 메모리인 플래시 메모리의 전기적 특성에 기인하여 데이터를 업데이트 하는 방식에 해당된다. 플래시 메모리의 전기적 특성으로 한번 쓰인 페이지에 데이터를 덮어쓰기(in-place update)를 할 수 없다. 따라서 플래시 메모리에서 데이터를 수정할 때는 비어있는 영역을 할당하여 새로운 데이터를 기록하고 이전 데이터 페이지는 스패어 영역에 무효화 표시를 하게 되는데, 이러한 방법을 아웃플레이스 업데이트(out-place update)라고 한다. 이 때, 아웃플레이스 업데이트를 위해 새로운 데이터를 기록하는 영역이 제1 예약 영역(230) 및 제2 예약 영역(240)이 된다. Out-place update corresponds to a method of updating data due to the electrical characteristics of flash memory, which is a nonvolatile memory. The electrical characteristics of flash memory make it impossible to overwrite data on a written page. Therefore, when modifying data in flash memory, new data is written by allocating an empty area, and old data pages are marked as invalid in the spare area. This method is called an out-place update. At this time, the areas for recording new data for out-place updating are the first reserved area 230 and the second reserved area 240.

또한, 쓰기 캐쉬 영역(210) 내의 대부분의 페이지가 쓰여져서 비어있는 영역이 부족해지면 가비지 컬렉션이 필요해진다. 가비지 컬렉션(garbage collection)은 쓰기 캐쉬 영역(210) 내의 블록에 퍼져있는 무효화된 페이지가 포함된 블록을 삭제하여 빈 블록 영역을 확보하는 것이다. 이와 같은 가비지 컬렉션에 제1 예약 영역(230) 및 제2 예약 영역(240)이 사용된다. 이를 위해, 제1 예약 영역(230) 및 제2 예약 영역(240)은 각각 쓰기 캐쉬 영역(210)과 같거나 1~2배 내의 크기로 할당된다. In addition, garbage collection is required when most pages in the write cache area 210 are written out and the empty area becomes insufficient. Garbage collection is to delete the block including the invalidated page spread in the block in the write cache area 210 to secure an empty block area. The first reserved area 230 and the second reserved area 240 are used for such garbage collection. To this end, the first reserved area 230 and the second reserved area 240 are each allocated with the same size as the write cache area 210 or within 1 to 2 times.

도 2에 도시된 바와 같이, 환형 구조의 비휘발성 메모리 캐쉬(200)는 블록 단위로 구분되어 있는 것을 확인할 수 있다. 이하에서는, 도 3a 및 도 3b를 참고하여 블럭 단위의 구조를 상세하게 설명한다. As shown in FIG. 2, it can be seen that the nonvolatile memory cache 200 having an annular structure is divided in block units. Hereinafter, a block unit structure will be described in detail with reference to FIGS. 3A and 3B.

도 3a는 본 발명의 일 실시예에 따른 하나의 블록(300)의 구조를 도시한 도면이다. 도 3a에 도시된 바와 같이, 하나의 블록(300)은 데이터 영역(310)과 스패어(spare) 영역을 포함한다. 데이터 영역(310)은 실질적인 데이터가 페이지 단위로 기록되는 영역이다. 그리고, 스패어 영역(320)은 해당 블록 단위 및 블록 내의 페이지 단위로 관련된 메타 데이터가 기록된다. 구체적으로, 스패어 영역(320)에는 데이터 영역(310)에 데이터가 기록되어 있는지 여부, 접근이 있었는지 여부 및 데이터 영역(310)에 기록된 데이터가 유효한지 여부가 기록될 수 있다. 예를 들어, 읽기 캐쉬 영역(220)의 한 블록의 스패어 영역(320)은 값이 없을 경우 빈 블록을 나타내고, 값이 "0"인 경우 데이터 영역(310)에 데이터가 기록되어 있으나 접근이 없었던 것을 나타내며, 값이 "1"인 경우, 데이터 영역(310)에 데이터가 기록되어 있으며 접근이 있었던 것을 나타낸다. 3A is a diagram illustrating the structure of one block 300 according to an embodiment of the present invention. As shown in FIG. 3A, one block 300 includes a data area 310 and a spare area. The data area 310 is an area where substantial data is recorded in units of pages. In the spare area 320, metadata associated with the corresponding block unit and the page unit within the block are recorded. In detail, the spare area 320 may record whether data is recorded in the data area 310, whether access has been made, and whether data recorded in the data area 310 is valid. For example, the spare area 320 of one block of the read cache area 220 indicates an empty block when there is no value, and when the value is "0", data is recorded in the data area 310, but access is not possible. When the value is " 1 ", the data is recorded in the data area 310 and there is access.

한편, 하나의 블록(300)은 복수개의 페이지를 포함한다. 도 3b는 본 발명의 일 실시예에 따른, 복수개의 페이지를 포함하는 블록(300)을 도시한 도면이다. 도 3b에 도시된 바와 같이, 하나의 블록(300)은 복수개의 페이지를 포함하는 것을 확인할 수 있다. 하나의 페이지는 페이지 데이터 영역(311) 및 페이지 스패어 영역(321)을 포함한다. 페이지 데이터 영역(311)은 실제로 데이터의 읽기 및 쓰기의 단위 영역이 된다. 그리고, 페이지 스패어 영역(321)은 해당 페이지의 상태를 나타내는 정보가 기록된다. Meanwhile, one block 300 includes a plurality of pages. 3B illustrates a block 300 including a plurality of pages according to an embodiment of the present invention. As shown in FIG. 3B, one block 300 may include a plurality of pages. One page includes a page data area 311 and a page spare area 321. The page data area 311 actually becomes a unit area for reading and writing data. In the page spare area 321, information indicating the state of the corresponding page is recorded.

예를 들어, 쓰기 캐쉬 영역(210)의 한 페이지의 페이지 스패어 영역(321)은 값이 없을 경우 빈 페이지을 나타내고, 값이 "I"인 경우 페이지 데이터 영역(311)에 데이터가 기록되어 있으나 무효화(Invalid)된 것을 나타내며, 값이 "V"인 경우, 페이지 데이터 영역(311)에 데이터가 기록되어 있으며 유효한 데이터(Valid)임을 나타낸다. For example, the page spare area 321 of one page of the write cache area 210 indicates a blank page when there is no value, and when the value is "I", data is recorded in the page data area 311 but invalidated. If the value is " V ", the data is recorded in the page data area 311 and is valid data (Valid).

또한, 쓰기 캐쉬 영역(210)의 한 블록의 스패어 영역(320)은 값이 없을 경우 모든 페이지가 비어있는 빈 블록을 나타내고, 값이 "I"인 경우 해당 블록에 포함된 복수의 페이지 중 하나라도 무효화된 페이지가 있는 경우를 나타내며, 값이 "V"인 경우, 해당 블록에 포함된 복수의 페이지가 모두 유효한 경우를 나타낸다. In addition, the spare area 320 of one block of the write cache area 210 indicates an empty block in which all pages are empty when there is no value, and when the value is "I", one of a plurality of pages included in the block. Even if the page is invalidated, the value "V" indicates that the plurality of pages included in the block are all valid.

이하에서는, 환형 구조의 비휘발성 메모리 캐쉬(200)에 데이터를 읽고 쓰기 위한 데이터 처리 방법에 대해 설명한다. 환형 구조의 비휘발성 메모리 캐쉬(200)는 쓰기 캐쉬 영역(210)에는 페이지 단위로 액세스가 실행되고, 읽기 캐쉬 영역(220)에는 블록 단위로 액세스가 실행된다. Hereinafter, a data processing method for reading and writing data to and from the nonvolatile memory cache 200 having an annular structure will be described. The annular nonvolatile memory cache 200 accesses the write cache area 210 in units of pages and accesses the read cache area 220 in units of blocks.

첫번째로, 환형 구조의 비휘발성 메모리 캐쉬(200)에서 데이터를 읽는 방법에 대해 설명한다. First, a method of reading data from the nonvolatile memory cache 200 having an annular structure will be described.

읽기 액세스가 요청된 경우, 스토리지 장치(100)는 요청된 읽기 액세스에 대응되는 데이터인 제1 데이터가 비휘발성 메모리 캐쉬(200)의 읽기 캐쉬 영역(220)에 존재하는지 여부를 블록단위로 검색한다. When a read access is requested, the storage device 100 searches in block units whether the first data, which is data corresponding to the requested read access, exists in the read cache area 220 of the nonvolatile memory cache 200. .

제1 데이터가 읽기 캐쉬 영역(220)에 존재하는 경우, 스토리지 장치(100)는 제1 데이터에 대응되는 블록인 제1 블록으로부터 해당 데이터를 읽는다. 그리고, 스토리지 장치(100)는 제1 블록의 스패어 영역에 액세스가 있었음을 표시한다. 예를 들어, 스토리지 장치(100)는 제1 블록의 스패어 영역에 액세스 여부를 표시하는 비트를 '0'에서 '1'로 변경하게 된다. 그 후에, 스토리지 장치(100)는 제1 블록 다음에 위치된 빈 블록에 읽기할당 포인터(R_alloc_ptr)를 대응시킨다. 여기에서, 읽기할당 포인터는 읽기 캐쉬 영역(220)에서 빈 블록을 찾기 위해 사용되는 포인터이다. When the first data exists in the read cache area 220, the storage device 100 reads the data from the first block that is a block corresponding to the first data. The storage device 100 indicates that access has been made to the spare area of the first block. For example, the storage device 100 changes the bit indicating whether to access the spare area of the first block from '0' to '1'. Thereafter, the storage device 100 associates a read allocation pointer R_alloc_ptr with an empty block located after the first block. Here, the read allocation pointer is a pointer used to find an empty block in the read cache area 220.

반면, 제1 데이터가 읽기 캐쉬 영역(220)에 존재하지 않는 경우, 스토리지 장치(100)는 디스크 어레이(120)로부터 제1 데이터를 읽는다. 그리고, 스토리지 장치(100)는 읽기할당 포인터(R_alloc_ptr)가 대응된 빈 블록인 제2 블록에 제1 데이터를 기록한다. 또한, 스토리지 장치(100)는 제2 블록의 스패어 영역에 데이터가 기록되었으나 액세스는 없었음을 표시한다. 예를 들어, 스토리지 장치(100)는 제1 블록의 스패어 영역에 액세스 여부를 표시하는 비트를 '0'으로 표시하게 된다. 그 후에, 스토리지 장치(100)는 제2 블록 다음에 위치된 빈 블록에 읽기할당 포인터(R_alloc_ptr)를 대응시킨다.In contrast, when the first data does not exist in the read cache area 220, the storage device 100 reads the first data from the disk array 120. The storage device 100 writes the first data to a second block that is an empty block to which the read allocation pointer R_alloc_ptr corresponds. In addition, the storage device 100 indicates that data was recorded in the spare area of the second block but no access was made. For example, the storage device 100 displays a bit indicating whether access to the spare area of the first block is '0'. Thereafter, the storage device 100 associates a read allocation pointer R_alloc_ptr with an empty block located after the second block.

이와 같은 과정을 통해, 스토리지 장치(100)는 환형 구조의 비휘발성 메모리 캐쉬(200)에서 데이터를 읽게 된다. Through this process, the storage device 100 reads data from the nonvolatile memory cache 200 having an annular structure.

두번째로, 환형 구조의 비휘발성 메모리 캐쉬(200)에서 데이터를 쓰는 방법에 대해 설명한다. Secondly, a method of writing data in the nonvolatile memory cache 200 having an annular structure will be described.

쓰기 액세스가 요청된 경우, 스토리지 장치(100)는 요청된 쓰기 액세스에 대응되는 데이터인 제2 데이터가 비휘발성 메모리 캐쉬(200)의 쓰기 캐쉬 영역(210)에 존재하는지 여부를 페이지 단위로 검색한다. When a write access is requested, the storage device 100 searches whether the second data, which is data corresponding to the requested write access, exists in the write cache area 210 of the nonvolatile memory cache 200 in units of pages. .

제2 데이터가 쓰기 캐쉬 영역(210)에 존재하는 경우, 스토리지 장치(100)는 제2 데이터에 대응되는 페이지인 제1 페이지의 스패어 영역에 기록된 데이터가 무효화 되었음을 표시한다. 예를 들어, 스토리지 장치(100)는 제1 페이지의 스패어 영역의 상태를 표시하는 비트를 'V'에서 'I'로(Valid에서 Invalid로) 변경하게 된다. 또한, 스토리지 장치(100)는 제1 페이지가 포함된 블록인 제3 블록의 스패어 영역에 무효화된 페이지가 있음을 표시한다. 예를 들어, 스토리지 장치(100)는 제3 블록의 스패어 영역의 상태를 표시하는 비트를 'V'(또는 '0')에서 'I'(또는 '1')로(Valid에서 Invalid로) 변경하게 된다. 그 후에, 스토리지 장치(100)는 제1 예약 영역(230)에 제2 데이터를 기록하게 된다. 그리고, 스토리지 장치(100)는 제1 페이지 다음에 위치된 빈 페이지에 쓰기할당 포인터(W_alloc_ptr)를 대응시킨다. 여기에서, 쓰기할당 포인터는 쓰기 캐쉬 영역(210)에서 빈 페이지를 찾기 위해 사용되는 포인터이다. 이와 같은 과정은 변경된 데이터의 업데이트 방법에 해당되며, 이를 아웃 플레이스 업데이트라고 한다. When the second data exists in the write cache area 210, the storage device 100 indicates that data written in the spare area of the first page, which is a page corresponding to the second data, is invalidated. For example, the storage device 100 changes a bit indicating the state of the spare area of the first page from 'V' to 'I' (from Valid to Invalid). In addition, the storage device 100 indicates that there is a page invalidated in the spare area of the third block, which is a block including the first page. For example, the storage device 100 sets a bit indicating the state of the spare area of the third block from 'V' (or '0') to 'I' (or '1') (Valid to Invalid). Will change. Thereafter, the storage device 100 writes the second data in the first reserved area 230. Then, the storage device 100 associates a write allocation pointer W_alloc_ptr with a blank page located after the first page. Here, the write allocation pointer is a pointer used to find a blank page in the write cache area 210. This process corresponds to a method of updating changed data, which is called an out place update.

반면, 제2 데이터가 쓰기 캐쉬 영역(210)에 존재하지 않는 경우, 스토리지 장치(100)는 쓰기 할당 포인터(W_alloc_ptr)가 대응된 빈 페이지인 제2 페이지에 제2 데이터를 기록한다. 그리고, 스토리지 장치(100)는 제2 페이지의 스패어 영역에 기록된 데이터가 유효함을 표시한다. 예를 들어, 스토리지 장치(100)는 제2 페이지의 스패어 영역의 상태를 표시하는 비트를 'V'(또는 '0')로(Valid로) 표시하게 된다. 그리고, 스토리지 장치(100)는 제2 페이지가 포함된 블록에 빈 페이지가 있으면, 다음 빈 페이지로 쓰기할당 포인터(W_alloc_ptr)를 이동시킨다. 반면, 스토리지 장치(100)는 제2 페이지가 포함된 블록에 빈 페이지가 없으면, 다음 블록으로 쓰기할당 포인터(W_alloc_ptr)를 이동시킨다. On the other hand, when the second data does not exist in the write cache area 210, the storage device 100 writes the second data to the second page, which is a blank page to which the write allocation pointer W_alloc_ptr corresponds. In addition, the storage device 100 indicates that data recorded in the spare area of the second page is valid. For example, the storage device 100 displays a bit indicating the state of the spare area of the second page as 'V' (or '0') (as Valid). If there is a blank page in the block including the second page, the storage device 100 moves the write allocation pointer W_alloc_ptr to the next blank page. On the other hand, if there is no blank page in the block including the second page, the storage device 100 moves the write allocation pointer W_alloc_ptr to the next block.

이와 같은 과정을 통해, 스토리지 장치(100)는 환형 구조의 비휘발성 메모리 캐쉬(200)에 데이터를 쓰거나 업데이트(아웃 플레이스 업데이트) 하게 된다. Through this process, the storage device 100 writes or updates data (out-place update) to the nonvolatile memory cache 200 having an annular structure.

이하에서는, 도 4a 내지 도 4c를 참고하여, 환형 구조의 비휘발성 메모리 캐쉬(200)에 데이터를 읽고 쓰기 위한 데이터 처리 방법에 대해 예를 들어 설명한다.Hereinafter, a data processing method for reading and writing data to and from the nonvolatile memory cache 200 having an annular structure will be described with reference to FIGS. 4A to 4C.

도 4a는 본 발명의 일 실시예에 따른, 데이터가 처리되기 전의 환형 구조의 비휘발성 메모리 캐쉬(200)의 상태를 도시한 도면이다. 4A is a diagram illustrating a state of a nonvolatile memory cache 200 having an annular structure before data is processed according to an embodiment of the present invention.

도 4a에 도시된 바와 같이, 읽기 캐쉬 영역(220)에는 빈 블록과 데이터가 기록된 블록이 포함되어 있고, 데이터가 기록된 블록들은 스패어 영역에 데이터에 대한 액세스가 없었음을 나타내는 '0'과 데이터에 대한 액세스가 있었음을 나타내는 '1'이 표시된 것을 확인할 수 있다. 또한, 읽기할당 포인터(R_alloc_ptr)는 빈 블록인 제1 블록(410)에 대응되어 있는 것을 확인할 수 있다. As shown in FIG. 4A, the read cache area 220 includes an empty block and a block in which data is written, and blocks in which data is written are '0' indicating that there is no access to data in the spare area. You'll see that '1' is displayed, indicating that there was access to the data. In addition, it can be seen that the read allocation pointer R_alloc_ptr corresponds to the first block 410 which is an empty block.

또한, 도 4a에 도시된 바와 같이, 쓰기 캐쉬 영역(210)에는 빈 블록과 데이터가 기록된 블록이 포함되어 있다. 그리고, 포함된 페이지들 중 적어도 하나의 페이지에 데이터가 기록되어 있고 기록된 페이지가 모두 유효한 페이지인 경우, 해당 블록은 스패어 영역에 데이터에 유효함을 나타내는 'V'가 표시되어 있다. 또한, 쓰기할당 포인터(W_alloc_ptr)는 빈 블록인 제2 블록(420)에 대응되어 있는 것을 확인할 수 있다. In addition, as shown in FIG. 4A, the write cache area 210 includes an empty block and a block in which data is recorded. When data is recorded in at least one of the included pages and all of the recorded pages are valid pages, 'V' indicating that the block is valid for the data is displayed in the spare area. In addition, it can be seen that the write allocation pointer W_alloc_ptr corresponds to the second block 420 which is an empty block.

도 4b는 본 발명의 일 실시예에 따른, 읽기 및 쓰기에 대한 데이터 처리가 수행된 경우를 도시한 도면이다. 도 4b에서, ①은 읽기 캐쉬 영역(220)의 제3 블록(430)에 기록된 데이터에 읽기 액세스를 수행하는 것을 나타내고, ②는 읽기 캐쉬 영역(220)에 기록되어 있지 않은 데이터를 제1 블록(410)에 기록하여 읽기 액세스를 수행하는 것을 나타내며, ③은 제2 블록(420)에 데이터를 기록하여 쓰기 액세스를 수행하는 것을 나타낸다. 4B is a diagram illustrating a case where data processing for reading and writing is performed according to an embodiment of the present invention. In FIG. 4B, 1 indicates that a read access is performed on data recorded in the third block 430 of the read cache area 220, and 2 indicates a first block of data not recorded in the read cache area 220. 410 denotes to perform a read access, and (3) denotes writing data to the second block 420 to perform a write access.

도 4a와 도 4b를 비교해보면 알 수 있듯이, 제3 블록(430)은 ①의 과정을 수행하면서 스패어 영역의 값이 '0'에서 '1'로 변경된 것을 확인할 수 있다. As can be seen by comparing FIG. 4A with FIG. 4B, the third block 430 may check that the value of the spare area is changed from '0' to '1' while performing the process of ①.

그리고, 제1 블록(410)은 ②의 과정을 수행하면서 데이터 영역에 데이터가 기록되고 스패어 영역에 '0'이 표시된 것을 확인할 수 있다. 이 과정에서, 읽기할당 포인터(R_alloc_ptr)는 제1 블록(410)에서 다음 빈 블록인 제4 블록(440)으로 위치가 변경된 것을 확인할 수 있다. In addition, the first block 410 may check that data is recorded in the data area and '0' is displayed in the spare area while performing step ②. In this process, it may be confirmed that the read allocation pointer R_alloc_ptr has been changed from a first block 410 to a fourth block 440 which is the next empty block.

또한, 제2 블록(420)은 ③의 과정을 수행하면서 데이터 영역에 데이터가 기록되고 스패어 영역에 'V'가 표시된 것을 확인할 수 있다. 또한, ③의 과정에서 제2 블록(420)은 모든 페이지가 기록되었기 때문에, 쓰기할당 포인터(W_alloc_ptr)는 제2 블록(420)에서 다음 빈 블록인 제5 블록(450)으로 위치가 변경된 것을 확인할 수 있다. In addition, the second block 420 may check that data is recorded in the data area and 'V' is displayed in the spare area while performing step (3). In addition, since the second block 420 has written all the pages in the process of ③, it is confirmed that the write allocation pointer W_alloc_ptr has been changed from the second block 420 to the fifth block 450 which is the next empty block. Can be.

한편, 도 4c는 본 발명의 일 실시예에 따른, 제2 블록(420)의 데이터가 아웃 플레이스 업데이트되는 경우를 도시한 도면이다. Meanwhile, FIG. 4C is a diagram illustrating a case where data of the second block 420 is out-place updated according to an embodiment of the present invention.

도 4c에서 ①은 쓰기 캐쉬 영역(210)의 제2 블록(420)에 기록된 데이터에 대해 아웃 플레이스 업데이트를 수행하는 것을 나타내고 있다. 도 4c에 도시된 바와 같이, 제2 블록(420)에 기록된 데이터 중 일부 또는 전부에 해당되는 페이지의 데이터가 업데이트되는 경우, 업데이트된 데이터는 제1 예약 영역(230)의 제6 블록(460)에 업데이트된 페이지 단위로 기록된다. 그리고, 제2 블록(420)의 업데이트 대상이된 페이지는 해당되는 페이지의 스패어 영역에 데이터가 무효임을 나타내도록 'I'를 표시하고, 제2 블록(420)의 스패어 영역에도 데이터가 무효인 페이지가 있음을 나타내도록 'I'를 표시하게 된다. In FIG. 4C,? Indicates that out-place update is performed on data recorded in the second block 420 of the write cache area 210. As shown in FIG. 4C, when data of a page corresponding to some or all of the data recorded in the second block 420 is updated, the updated data is the sixth block 460 of the first reserved area 230. ) Is recorded in units of updated pages. In addition, the updated page of the second block 420 displays 'I' to indicate that data is invalid in the spare area of the corresponding page, and the data is invalid in the spare area of the second block 420. 'I' will be displayed to indicate that there is an in-page.

이와 같은 과정을 통해, 스토리지 장치(100)는 데이터에 대한 읽기 및 쓰기 액세스를 수행하게 된다. Through this process, the storage device 100 performs read and write access to data.

이하에서는, 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 교체 및 가비지 콜렉션(garbage collection)하기 위한 데이터 처리방법에 관하여 설명한다. 여기에서, 교체 작업은 읽기 캐쉬 영역(220)에 빈블록이 부족한 경우에 수행되는 작업이고, 가비지 콜렉션은 쓰기 캐쉬 영역(210)에 빈블록이 부족한 경우에 수행되는 작업이다. Hereinafter, a data processing method for replacing and garbage collection of data recorded in the nonvolatile memory cache 200 having an annular structure will be described. Here, the replacement operation is performed when the free cache is insufficient in the read cache area 220, and garbage collection is performed when the empty cache is insufficient in the write cache area 210.

첫번째로, 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 교체하는 데이터 처리방법에 관하여 설명한다. First, a data processing method for replacing data written in the nonvolatile memory cache 200 having an annular structure will be described.

스토리지 장치(100)는 환형 구조의 비휘발성 메모리 캐쉬(200)의 읽기 캐쉬 영역(220)에 빈 블록이 1개 남은 상태에서 적어도 한 개(이하, K개로 칭함 : K는 1 이상의 자연수)의 블록에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우, 읽기 캐쉬 영역(220)의 블록 중 K개의 블록을 선정하여 새로운 데이터를 기록하는 교체 작업을 수행한다. The storage device 100 includes at least one block (hereinafter, referred to as K: K is a natural number of 1 or more) in a state in which one empty block remains in the read cache area 220 of the annular nonvolatile memory cache 200. When read access is requested for new data corresponding to the data, K blocks of the blocks of the read cache area 220 are selected and a replacement operation of writing new data is performed.

구체적으로, 스토리지 장치(100)는 읽기 캐쉬 영역(220)에 빈 블록이 1개 남은 상태에서 K개의 블록에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우, 읽기 캐쉬 영역(220) 내에서 K개의 교체 대상 블록을 K개 선정한다. 교체 대상 블록을 선정하는 방법은 2가지가 있으며, 이와 관련하여 이하에서 설명한다. In detail, when the read access request for new data corresponding to the K blocks is requested with one empty block remaining in the read cache area 220, the storage device 100 may store K in the read cache area 220. Select K replacement blocks. There are two methods for selecting a block to be replaced, which will be described below.

첫번째 방법으로, 스토리지 장치(100)는 읽기교체 포인터(R_rep_ptr) 및 블록의 스패어 영역의 비트값을 이용하여 교체대상 블록을 선정하는 방법을 적용할 수 있다. 구체적으로, 스토리지 장치(100)는 1개 남은 빈 블록으로부터 읽기교체 포인터(R_rep_ptr)를 특정 방향으로 순차적으로 이동시키면서 블록의 스패어 영역의 값을 확인한다. 만약, 읽기교체 포인터가 대응된 블록의 스패어 영역이 액세스가 있었음을 나타내는 값(예를 들어, '1')이면, 스토리지 장치(100)는 해당 블록의 스패어 영역의 값을 액세스가 없었음을 나타내는 값(예를 들어, '0')으로 변경한다. 반면, 읽기교체 포인터가 대응된 블록의 스패어 영역이 액세스가 없었음을 나타내는 값(예를 들어, '0')이면, 스토리지 장치(100)는 해당 블록을 삭제하여 빈 블록으로 변경한다. 스토리지 장치(100)는 이와 같은 과정을 K개의 빈 블록이 확보될 때까지 반복하게 된다. In a first method, the storage device 100 may apply a method of selecting a replacement block using a read replacement pointer R_rep_ptr and a bit value of a spare area of a block. In detail, the storage device 100 checks the value of the spare area of the block while sequentially moving the read replacement pointer R_rep_ptr in a specific direction from one remaining empty block. If the read replacement pointer is a value indicating that the spare area of the corresponding block has been accessed (for example, '1'), the storage device 100 has no access to the spare area of the corresponding block. Change to a value that represents (for example, '0'). On the other hand, if the read replacement pointer is a value (eg, '0') indicating that the spare area of the corresponding block does not have access, the storage device 100 deletes the block and changes it to an empty block. The storage device 100 repeats this process until K empty blocks are secured.

두번째 방법으로, 스토리지 장치(100)는 액세스 리스트를 이용하여 교체 대상 블록을 선정하는 방법을 적용할 수도 있다. 여기에서, 액세스 리스트는 LRU(Least Recently Used) 알고리즘에 따른 것으로 블록의 대략적인 액세스 빈도를 나타낸다. 여기에서, 액세스 리스트는 읽기 캐쉬 영역(220)의 모든 블록에 대응되는 항목들이 순차적으로 배열되어 있다. 또한, 액세스 리스트는 앞부분을 헤드(Head)라고 칭하고 뒷부분을 테일(Tail)이라 칭하며, 헤드에 가까울수록 최근에 접근된 이력이 있는 블록을 나타내고, 테일에 가까울수록 마지막 접근 시점이 오래된 블록을 나타낸다. As a second method, the storage device 100 may apply a method of selecting a replacement target block using an access list. Here, the access list is in accordance with the Least Recently Used (LRU) algorithm and represents an approximate frequency of access of the block. Herein, items corresponding to all blocks of the read cache area 220 are sequentially arranged in the access list. In addition, the access list is referred to as a head (Head) and the tail is called a tail (Tail), the closer to the head indicates a block that has recently accessed history, the closer to the tail indicates a block that is the last access point is older.

구체적으로, 스토리지 장치(100)는 액세스 리스트의 테일에 해당되는 블록부터 헤드 방향으로 순차적으로 블록의 스패어 영역의 값을 확인한다. 만약, 해당되는 블록의 스패어 영역이 액세스가 있었음을 나타내는 값(예를 들어, '1')이면, 스토리지 장치(100)는 해당 블록의 스패어 영역의 값을 액세스가 없었음을 나타내는 값(예를 들어, '0')으로 변경한다. 반면, 읽기교체 포인터가 대응된 블록의 스패어 영역이 액세스가 없었음을 나타내는 값(예를 들어, '0')이면, 스토리지 장치(100)는 해당 블록을 삭제하여 빈 블록으로 변경한다. 스토리지 장치(100)는 이와 같은 과정을 K개의 빈 블록이 확보될 때까지 반복하게 된다. In detail, the storage device 100 sequentially checks the spare area value of the block in the head direction from the block corresponding to the tail of the access list. If the spare area of the corresponding block has a value indicating that there is an access (for example, '1'), the storage device 100 determines a value indicating that there is no access to the spare area of the corresponding block ( For example, change to '0'. On the other hand, if the read replacement pointer is a value (eg, '0') indicating that the spare area of the corresponding block does not have access, the storage device 100 deletes the block and changes it to an empty block. The storage device 100 repeats this process until K empty blocks are secured.

이와 같이, 스토리지 장치(100)는 두가지 방법으로 교체 대상 블록을 선정할 수 있다. As such, the storage device 100 may select a replacement target block in two ways.

그 후에, 스토리지 장치(100)는 기존에 존재하던 1개의 빈 블록 및 새로 확보된 빈 블록들에 K개의 블록에 해당되는 데이터를 기록하고, 데이터가 기록된 블록의 스패어 영역에 액세스가 없었음을 나타내는 값(예를 들어, '0')을 표시하게 된다. 그리고, 스토리지 장치(100)는 남은 1개의 빈 블록에 읽기할당 포인터(R_alloc_ptr)를 대응시키게 된다. Thereafter, the storage device 100 records data corresponding to K blocks in one existing empty block and newly secured empty blocks, and there is no access to the spare area of the block in which the data is recorded. It will display a value (for example, '0'). The storage device 100 associates the read allocation pointer R_alloc_ptr with the remaining one free block.

이 때, 두번째 방법에 의해 교체 대상 블록이 선정된 경우, 스토리지 장치(100)는 액세스 리스트에서 데이터가 기록된 블록들에 대응되는 항목들을 헤드 쪽으로 이동시키게 된다. At this time, when the replacement target block is selected by the second method, the storage device 100 moves items corresponding to the blocks in which data is recorded in the access list to the head.

이와 같은 과정을 통해, 스토리지 장치(100)는 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 교체하는 데이터 처리방법을 수행하게 된다. Through this process, the storage device 100 performs a data processing method of replacing data written in the nonvolatile memory cache 200 having an annular structure.

도 5a 내지 도 6b를 참고하여, 상술된 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 교체하는 데이터 처리방법에 대해 예를 들어 설명한다. 5A to 6B, a data processing method for replacing data recorded in the nonvolatile memory cache 200 having the annular structure described above will be described by way of example.

도 5a 및 도 5b는 첫번째 방법에 의해 교체 대상 블록이 선정되는 과정을 도시하고 있다. 도 5a는 본 발명의 일 실시예에 따른, 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 3개의 블록에 해당되는 새로운 데이터에 대한 액세스가 발생한 경우를 도시한 도면이다. 그리고, 도 5b는 본 발명의 일 실시예에 따른, 3개의 블록이 빈 블록으로 선정된 상태를 도시한 도면이다. 5A and 5B illustrate a process of selecting a block to be replaced by the first method. FIG. 5A illustrates a case in which access to new data corresponding to three blocks occurs in a state in which one empty block of a read cache area remains, according to an embodiment of the present invention. 5B is a diagram illustrating a state in which three blocks are selected as empty blocks according to an embodiment of the present invention.

도 5a에 도시된 바와 같이, 읽기 캐쉬 영역에 1개의 빈 블록(510)이 남은 상태에서, ①의 읽기 액세스 (3개의 블록에 해당되는 새로운 데이터에 대한 액세스)이 발생된 경우, 스토리지 장치(100)는 먼저 읽기 교체 포인터(R_rep_ptr)를 시계방향으로 순차적으로 이동시키면서 해당 블록의 스패어 영역의 값을 확인한다. 그리고, 스토리지장치(100)는 해당 블록의 스패어 영역의 값이 '1'인 경우 '0'으로 변경하고, '0'인 경우 블록을 삭제하여 빈 블록으로 만든다. As illustrated in FIG. 5A, when one empty block 510 is left in the read cache area, when a read access of ① (access to new data corresponding to three blocks) occurs, the storage device 100 is generated. ) First checks the value of the spare area of the block while sequentially moving the read replacement pointer (R_rep_ptr) clockwise. If the value of the spare area of the block is '1', the storage device 100 changes the value to '0', and if the value is '0', the storage device 100 deletes the block to make the block empty.

따라서, 도 5b에 도시된 바와 같이, 스토리지 장치(100)는 제2 블록(520), 제3 블록(530), 및 제5 블록(550)을 빈 블록으로 만들고, 제4 블록(540)은 스패어 영역의 값을 '1'에서 '0'으로 변경한 것을 확인할 수 있다. Thus, as shown in FIG. 5B, the storage device 100 makes the second block 520, the third block 530, and the fifth block 550 an empty block, and the fourth block 540 It can be seen that the value of the spare area is changed from '1' to '0'.

그 후에, 스토리지 장치(100)는 액세스 대상이 되는 데이터를 디스크 어레이(120)로부터 읽은 후에, 제1 블록(510), 제2 블록(520), 및 제3 블록(530)에 액세스 대상이 되는 데이터를 기록하게 된다. 그리고, 스토리지 장치(100)는 읽기 할당 포인터(R_alloc_ptr) 및 읽기 교체 포인터(R_rep_ptr)를 빈 블록인 제5 블록(550)에 대응시키게 된다. Thereafter, the storage device 100 reads data to be accessed from the disk array 120 and then accesses the first block 510, the second block 520, and the third block 530. The data will be recorded. In addition, the storage device 100 may correspond to the fifth block 550, which is a free block, with the read allocation pointer R_alloc_ptr and the read replacement pointer R_rep_ptr.

한편, 도 6a 및 도 6b는 두번째 방법에 의해 교체 대상 블록이 선정되는 과정을 도시하고 있다. 도 6a는 본 발명의 일 실시예에 따른, 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 3개의 블록에 해당되는 새로운 데이터에 대한 액세스가 발생한 경우를 도시한 도면이다. 그리고, 도 6b는 본 발명의 일 실시예에 따른, 액세스 리스트를 이용하여 3개의 블록이 빈 블록으로 선정된 상태를 도시한 도면이다. 6A and 6B illustrate a process of selecting a replacement target block by the second method. FIG. 6A illustrates a case in which access to new data corresponding to three blocks occurs in a state in which one empty block of a read cache area remains, according to an embodiment of the present invention. 6B is a diagram illustrating a state in which three blocks are selected as empty blocks using an access list according to an embodiment of the present invention.

도 6a에 도시된 바와 같이, 읽기 캐쉬 영역에 1개의 빈 블록(610)이 남은 상태에서, ①의 읽기 액세스 (3개의 블록에 해당되는 새로운 데이터에 대한 액세스)이 발생된 경우, 스토리지 장치(100)는 액세스 리스트(600)의 테일에 가까운 항목의 블록부터 헤드 방향으로 순차적으로 이동시키면서 해당 블록의 스패어 영역의 값을 확인한다. 그리고, 스토리지 장치(100)는 해당 블록의 스패어 영역의 값이 '1'인 경우 '0'으로 변경하고, '0'인 경우 블록을 삭제하여 빈 블록으로 만든다. As illustrated in FIG. 6A, when one empty block 610 is left in the read cache area, a read access of 1 (access to new data corresponding to three blocks) occurs, the storage device 100. ) Sequentially checks the value of the spare area of the block while sequentially moving from the block of the item close to the tail of the access list 600 to the head direction. If the value of the spare area of the block is '1', the storage device 100 changes the value to '0', and if the value is '0', the storage device 100 deletes the block to make the block empty.

따라서, 도 6b에 도시된 바와 같이, 스토리지 장치(100)는 제2 블록(520), 제3 블록(530), 및 제5 블록(550)을 빈 블록으로 만들고, 제4 블록(540)은 스패어 영역의 값을 '1'에서 '0'으로 변경한 것을 확인할 수 있다. Thus, as shown in FIG. 6B, the storage device 100 makes the second block 520, the third block 530, and the fifth block 550 an empty block, and the fourth block 540 It can be seen that the value of the spare area is changed from '1' to '0'.

그 후에, 스토리지 장치(100)는 액세스 대상이 되는 데이터를 디스크 어레이(120)로부터 읽은 후에, 제1 블록(510), 제2 블록(520), 및 제3 블록(530)에 액세스 대상이 되는 데이터를 기록하게 된다. 그리고, 스토리지 장치(100)는 액세스 리스트(600)에서 제1 블록(510), 제2 블록(520), 및 제3 블록(530)에 대응되는 항목을 헤드로 이동시킨다. 또한, 스토리지 장치(100)는 읽기 할당 포인터(R_alloc_ptr) 및 읽기 교체 포인터(R_rep_ptr)를 빈 블록인 제5 블록(550)에 대응시키게 된다. Thereafter, the storage device 100 reads data to be accessed from the disk array 120 and then accesses the first block 510, the second block 520, and the third block 530. The data will be recorded. The storage device 100 moves items corresponding to the first block 510, the second block 520, and the third block 530 to the head in the access list 600. In addition, the storage device 100 maps the read allocation pointer R_alloc_ptr and the read replacement pointer R_rep_ptr to the fifth block 550 which is an empty block.

지금까지, 도 5a 내지 도 6b를 참고하여, 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 교체하는 데이터 처리방법에 대해 예를 들어 설명하였다. So far, the data processing method of replacing data recorded in the nonvolatile memory cache 200 having an annular structure has been described with reference to FIGS. 5A to 6B.

두번째로, 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 가비지 콜렉션하는 데이터 처리방법에 관하여 설명한다. Secondly, a data processing method for garbage collection of data recorded in the annular nonvolatile memory cache 200 will be described.

스토리지 장치(100)는 환형 구조의 비휘발성 메모리 캐쉬(200)의 쓰기 캐쉬 영역(210)의 모든 페이지가 사용된 경우, 쓰기 캐쉬 영역(210)에 기록된 유효한 데이터를 모두 디스크 어레이(120)에 기록하고 쓰기 캐쉬 영역(210)을 모두 삭제한 후에 일정 블록 수만큼 이동시키는 가비지 콜렉션 작업을 수행한다. When all the pages of the write cache area 210 of the annular nonvolatile memory cache 200 are used, the storage device 100 stores all valid data written in the write cache area 210 to the disk array 120. After deleting all of the write and write cache areas 210, a garbage collection operation is performed to move a predetermined number of blocks.

먼저, 스토리지 장치(100)는 쓰기 캐쉬 영역(210)의 모든 페이지가 사용된 경우, 쓰기 캐쉬 영역(210)의 블록들 중 무효 블록들 내의 유효 페이지들을 모두 제1 예약 영역(230)의 블록 내에 기록한다. 여기에서, 무효 블록은 (스페어 영역에 데이터가 무효인 페이지가 포함되어 있음을 나타내는 표시(예를 들어, "I")가 있는 블록을 나타내고, 유효 페이지는 페이지의 스패어 영역에 데이터가 유효임이 표시(예를 들어, "V")된 페이지를 나타낸다. First, when all pages of the write cache area 210 are used, the storage device 100 stores all valid pages in the invalid blocks among the blocks of the write cache area 210 in the block of the first reserved area 230. Record it. Here, an invalid block indicates a block having an indication (for example, "I") indicating that a spare area contains a page where data is invalid, and a valid page indicates that data is valid in a spare area of a page. Represents a displayed page (e.g., "V").

구체적으로, 스토리지 장치(100)는 쓰기 캐쉬 영역(210) 내에서 첫번째 무효 블록에 쓰기교체 포인터(W_rep_ptr)를 위치시킨다. 스토리지 장치(100)는 무효 블록 내에서 유효 페이지를 검색한다. 그리고, 스토리지 장치(100)는 무효 내의 유효 페이지를 제1 예약 영역(230)에 기록한다. 그 후에, 스토리지 장치(100)는 다음 무효 블록에 쓰기교체 포인터(W_rep_ptr)를 위치시킨 후, 상술한 과정을 반복하게되며, 쓰기 캐쉬 영역의 마지막 무효 블록까지 이와 같은 과정을 반복하게 된다. 이를 통해, 스토리지 장치(100)는 쓰기 캐쉬 영역(210)의 모든 페이지가 사용된 경우, 쓰기 캐쉬 영역(210)의 블록들 중 무효 블록들 내의 유효 페이지들을 모두 제1 예약 영역(230)의 블록 내에 기록하게 된다. In detail, the storage device 100 places the write replacement pointer W_rep_ptr in the first invalid block in the write cache area 210. The storage device 100 searches for valid pages in the invalid block. In addition, the storage device 100 records the valid page in the invalid state in the first reserved area 230. Thereafter, the storage device 100 places the write replacement pointer W_rep_ptr in the next invalid block, and then repeats the above-described process, and repeats the above process until the last invalid block of the write cache area. Accordingly, when all pages of the write cache area 210 are used, the storage device 100 blocks all valid pages in the invalid blocks among the blocks of the write cache area 210 of the first reserved area 230. Will be written in.

그 다음, 스토리지 장치(100)는 쓰기 캐쉬 영역(210) 내의 모든 무효 블록을 삭제하게 된다. 그리고, 스토리지 장치(100)는 쓰기 캐쉬 영역(210) 내의 유효 블록의 데이터 및 제1 예약 영역(230)의 블록에 기록된 데이터를 모두 디스크 어레이(120)에 복사한다. 그리고, 스토리지 장치(100)는 쓰기 캐쉬 영역(210) 내의 유효 블록 및 제1 예약 영역(230)의 데이터가 기록된 적어도 하나의 블록도 삭제하게 된다. Then, the storage device 100 deletes all invalid blocks in the write cache area 210. The storage device 100 copies both the data of the effective block in the write cache area 210 and the data recorded in the block of the first reserved area 230 to the disk array 120. The storage device 100 also deletes at least one block in which the valid block in the write cache area 210 and the data in the first reserved area 230 are recorded.

그 후에, 스토리지 장치(100)는 제1 예약 영역(230)의 데이터가 기록된 적어도 하나의 블록만큼 쓰기 캐쉬 영역(210)을 이동시킨다. 구체적으로, 제1 예약 영역(230)의 데이터가 기록된 적어도 하나의 블록이 L개인 것으로 가정하여 설명한다(L은 1 이상의 자연수). 스토리지 장치(100)는 제1 예약 영역(230)에 인접한 L개의 읽기 캐쉬 영역(230)의 블록을 제2 예약 영역(240)으로 복사시키고, 복사된 L개의 읽기 캐쉬 영역(230)의 블록을 삭제하여 빈 블록으로 만든다. 이 때, 제1 예약 영역(230)에 인접한 L개의 읽기 캐쉬 영역(230)의 블록은 제2 예약 영역(240) 중 읽기 캐쉬 영역(230)에 인접한 블록부터 순차적으로 복사된다. 그 다음, 스토리지 장치(100)는 제1 예약 영역(230) 방향으로 L개의 블록 만큼 쓰기 캐쉬 영역(210)을 이동시킨다. 이와 같은 과정을 통해, 스토리지 장치(100)는 제1 예약 영역(230)의 데이터가 기록된 적어도 하나의 블록만큼 쓰기 캐쉬 영역(210)을 이동시키게 된다. Thereafter, the storage device 100 moves the write cache area 210 by at least one block in which data of the first reserved area 230 is recorded. Specifically, it is assumed that at least one block in which data in the first reserved area 230 is recorded is L (L is a natural number of 1 or more). The storage device 100 copies the blocks of the L read cache areas 230 adjacent to the first reserved area 230 to the second reserved area 240, and copies the blocks of the copied L read cache areas 230. Delete it to make an empty block. In this case, blocks of the L read cache areas 230 adjacent to the first reserved area 230 are sequentially copied from blocks adjacent to the read cache area 230 among the second reserved areas 240. Next, the storage device 100 moves the write cache area 210 by L blocks toward the first reserved area 230. Through this process, the storage device 100 moves the write cache area 210 by at least one block in which data of the first reserved area 230 is recorded.

이와 같은 과정을 통해, 스토리지 장치(100)는 환형 구조의 비휘발성 메모리 캐쉬(200)의 쓰기 캐쉬 영역(210)의 모든 페이지가 사용된 경우, 쓰기 캐쉬 영역(210)에 기록된 유효한 데이터를 모두 디스크 어레이(120)에 기록하고 쓰기 캐쉬 영역(210)을 모두 삭제한 후에 일정 블록 수만큼 이동시키는 가비지 콜렉션 작업을 수행할 수 있게 된다. Through this process, when all pages of the write cache area 210 of the nonvolatile memory cache 200 of the annular structure are used, all of the valid data recorded in the write cache area 210 are used. After the write to the disk array 120 and the write cache area 210 are all deleted, the garbage collection operation may be performed by moving the predetermined number of blocks.

비휘발성 메모리 중 플래시 메모리는 블록삭제횟수가 약 십~백만번 정도로 제한되어 있기 때문에 특정 블록에 삭제 연산이 집중되어 마모(wear-out)됨으로써 사용할 수 없게 될 우려가 있으나, 이와 같이 쓰기 캐쉬 영역(210)을 주기적으로 이동시킴으로써, 이와 같이 마모(wear-out)의 가능성을 최소화 할 수 있게 된다. Among the nonvolatile memories, the flash memory is limited to about 10 to 1 million block erases, so the erase operation may be concentrated on a specific block and may be unusable due to wear-out. However, the write cache area 210 By periodically moving), the likelihood of wear-out can be minimized.

이하에서는, 도 7a 및 도 7b를 참고하여, 상술된 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 가비지 콜렉션하는 데이터 처리방법에 대해 예를 들어 설명한다. Hereinafter, with reference to FIGS. 7A and 7B, a data processing method for garbage collection of data recorded in the nonvolatile memory cache 200 having the annular structure described above will be described as an example.

도 7a는 본 발명의 일 실시예에 따른, 쓰기 캐쉬 영역이 모두 사용된 경우를 도시한 도면이다. 그리고, 도 7b는 본 발명의 일 실시예에 따른, 가비지 콜랙션 과정에서 1개의 블록만큼 시계방향으로 쓰기 캐쉬 영역이 이동된 상태를 도시한 도면이다. FIG. 7A is a diagram illustrating a case where all write cache regions are used, according to an embodiment of the present invention. FIG. 7B is a diagram illustrating a state in which a write cache region is moved clockwise by one block in a garbage collection process according to an embodiment of the present invention.

도 7a에 도시된 바와 같이, 제1 블록(710)에 데이터가 기록되어 쓰기 캐쉬 영역이 모두 사용된 경우, 스토리지 장치(100)는 가비지 콜렉션을 시작하게 된다. 이 때, 도 7a에 도시된 바와 같이, 제1 예약 영역(230)의 제2 블록(720)은 아웃 플레이스 업데이트를 통해 일부 페이지에 데이터가 기록된 상태이다. As shown in FIG. 7A, when data is written to the first block 710 so that the write cache area is completely used, the storage device 100 starts garbage collection. In this case, as shown in FIG. 7A, the second block 720 of the first reserved area 230 is in a state in which data is written to some pages through out-place updating.

이 상태에서, 스토리지 장치(100)는 도 7b에 도시된 바와 같이, 쓰기 캐쉬 영역(210) 내의 모든 무효 블록(760,770,780)에 포함된 유효 페이지를 제1 예약 영역(230)내의 블록에 기록한 후에, 모든 무효 블록(760,770,780)을 삭제한다. 도 7b의 경우, 모든 무효 블록에 포함된 유효 페이지가 제2 블록(720) 내에 모두 기록된 상태이다. 그 후에, 스토리지 장치(100)는 제1 블록(710) 및 제2 블록(720)에 기록된 데이터를 디스크 어레이(120)로 복사한 후에, 제1 블록(710) 및 제2 블록(720)을 삭제하게 된다. In this state, as shown in FIG. 7B, the storage device 100 writes valid pages included in all invalid blocks 760, 770, and 780 in the write cache area 210 to blocks in the first reserved area 230. Delete all invalid blocks 760, 770, 780. In the case of FIG. 7B, all valid pages included in all invalid blocks are recorded in the second block 720. Thereafter, the storage device 100 copies the data recorded in the first block 710 and the second block 720 to the disk array 120, and then the first block 710 and the second block 720 are stored. Will be deleted.

그 다음, 스토리지 장치(100)는 제2 블록(720)을 쓰기 캐쉬 영역(210)으로 편입시키기 위해, 쓰기 캐쉬 영역(210)을 시계 방향으로 1개 블록 만큼 이동시킨다. 이를 위해, 스토리지 장치(100)는 제3 블록(730)을 제2 예약 영역(240) 제4 블록(740)으로 이동시킨 후에, 제3 블록(730)을 제1 예약영역(230)에 편입시킨다. 그리고, 스토리지 장치(100)는 제4 블록(740)을 읽기 캐쉬 영역(220)으로 편입시키게 된다. 그리고, 스토리지 장치(100)는 제6 블록(760)을 제2 예약영역(240)에 편입시킴으로써, 제2 예약영역(240)을 제5 블록(750)부터 제6 블록(760)사이가 되도록 한블록 이동시킨다. Next, the storage device 100 moves the write cache area 210 by one block clockwise to incorporate the second block 720 into the write cache area 210. To this end, after the storage device 100 moves the third block 730 to the second reserved area 240 and the fourth block 740, the storage device 100 incorporates the third block 730 into the first reserved area 230. Let's do it. The storage device 100 incorporates the fourth block 740 into the read cache area 220. In addition, the storage device 100 incorporates the sixth block 760 into the second reserved area 240 so that the second reserved area 240 is between the fifth block 750 and the sixth block 760. Move one block.

이와 같은 과정을 통해, 스토리지 장치(100)는 가비지 콜렉션을 마치게 되고, 쓰기 캐쉬 영역(210)은 시계방향으로 한 블록만큼 이동하게 된다. Through this process, the storage device 100 finishes garbage collection, and the write cache area 210 moves by one block clockwise.

지금까지, 도 7a 및 도 7b를 참고하여, 상술된 환형 구조의 비휘발성 메모리 캐쉬(200)에 기록된 데이터를 가비지 콜렉션하는 데이터 처리방법에 대해 예를 들어 설명하였다.  So far, the data processing method for garbage collection of the data recorded in the nonvolatile memory cache 200 having the annular structure described above has been described with reference to FIGS. 7A and 7B.

한편, 본 실시예에 따른 환형 구조의 비휘발성 메모리 캐쉬 및 상술된 데이터 처리방법을 구현하는 컴퓨터 프로그램을 수록한 컴퓨터로 읽을 수 있는 기록매체에도 본 발명의 기술적 사상이 적용될 수 있음은 물론이다. 또한, 본 발명의 다양한 실시예에 따른 기술적 사상은 컴퓨터로 읽을 수 있는 기록매체에 기록된 컴퓨터로 읽을 수 있는 코드 형태로 구현될 수도 있다. 컴퓨터로 읽을 수 있는 기록매체는 컴퓨터에 의해 읽을 수 있고 데이터를 저장할 수 있는 어떤 데이터 저장 장치이더라도 가능하다. 예를 들어, 컴퓨터로 읽을 수 있는 기록매체는 ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 광디스크, 하드 디스크 드라이브, 등이 될 수 있음은 물론이다. 또한, 컴퓨터로 읽을 수 있는 기록매체에 저장된 컴퓨터로 읽을 수 있는 코드 또는 프로그램은 컴퓨터간에 연결된 네트워크를 통해 전송될 수도 있다. Meanwhile, the technical idea of the present invention may be applied to a computer-readable recording medium including a nonvolatile memory cache having an annular structure and a computer program implementing the above-described data processing method. In addition, the technical idea according to various embodiments of the present invention may be embodied in computer-readable code form recorded on a computer-readable recording medium. The computer-readable recording medium is any data storage device that can be read by a computer and can store data. For example, the computer-readable recording medium may be a ROM, a RAM, a CD-ROM, a magnetic tape, a floppy disk, an optical disk, a hard disk drive, or the like. In addition, the computer readable code or program stored in the computer readable recording medium may be transmitted through a network connected between the computers.

또한, 이상에서는 본 발명의 바람직한 실시예에 대하여 도시하고 설명하였지만, 본 발명은 상술한 특정의 실시예에 한정되지 아니하며, 청구범위에서 청구하는 본 발명의 요지를 벗어남이 없이 당해 발명이 속하는 기술분야에서 통상의 지식을 가진자에 의해 다양한 변형실시가 가능한 것은 물론이고, 이러한 변형실시들은 본 발명의 기술적 사상이나 전망으로부터 개별적으로 이해되어져서는 안될 것이다.
While the present invention has been particularly shown and described with reference to exemplary embodiments thereof, it is to be understood that the invention is not limited to the disclosed exemplary embodiments, but, on the contrary, It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the present invention.

100 : 스토리지 장치 110 : 스토리지 컨트롤러
112 : CPU 114 : 메모리
116, 200 : 비휘발성 메모리 캐쉬 210 : 쓰기 캐쉬 영역
220 : 읽기 캐쉬 영역 230 : 제1 예약 영역
240 : 제2 예약 영역
100: storage device 110: storage controller
112: CPU 114: memory
116, 200: nonvolatile memory cache 210: write cache area
220: read cache area 230: first reserved area
240: second reserved area

Claims (6)

환형 구조의 비휘발성 메모리 캐쉬를 포함하는 스토리지 장치의 데이터 처리방법에 있어서,
상기 비휘발성 메모리 캐쉬의 읽기 캐쉬 영역의 빈 블록이 1개 남은 상태에서 K개의 블록(K는 1 이상의 자연수)에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우, 상기 읽기 캐쉬 영역의 블록 중 K개의 블록을 선정하여 상기 새로운 데이터를 기록하는 교체 작업을 수행하는 단계;
상기 비휘발성 메모리 캐쉬의 쓰기 캐쉬 영역의 모든 페이지가 사용된 경우, 쓰기 캐쉬 영역에 기록된 유효한 데이터를 디스크 어레이에 기록하고, 쓰기 캐쉬 영역을 삭제한 후에 일정 블록 수만큼 이동시키는, 가비지 콜렉션 작업을 수행하는 단계;를 포함하고,
상기 가비지 콜랙션 작업단계는,
상기 쓰기 캐쉬 영역의 모든 페이지가 사용된 경우, 상기 쓰기 캐쉬 영역의 블록들 중 무효 블록들 내의 유효 페이지들을 모두 제1 예약 영역의 블록 내에 기록하는 단계;
상기 쓰기 캐쉬 영역 내의 모든 무효 블록을 삭제하는 단계;
상기 쓰기 캐쉬 영역 내의 유효 블록의 데이터 및 상기 비휘발성 메모리 캐쉬 내의 제1 예약 영역의 블록에 기록된 데이터를 상기 스토리지 장치의 디스크 어레이에 복사하는 단계;
상기 쓰기 캐쉬 영역 내의 유효 블록 및 상기 제1 예약 영역의 데이터가 기록된 적어도 하나의 블록을 삭제하는 단계; 및
상기 제1 예약 영역의 데이터가 기록된 적어도 하나의 블록의 개수만큼 상기 쓰기 캐쉬 영역을 이동시키는 단계;를 포함하는 것을 특징으로 하는 데이터 처리방법.
A data processing method of a storage device including a nonvolatile memory cache having an annular structure,
If read access is requested for new data corresponding to K blocks (K is a natural number equal to or greater than 1) when only one empty block of the read cache area of the nonvolatile memory cache is left, K of the blocks of the read cache area is requested. Selecting two blocks to perform a replacement operation of recording the new data;
If all pages of the write cache area of the nonvolatile memory cache are used, garbage collection operation is performed to write valid data written to the write cache area to the disk array, and move the predetermined number of blocks after deleting the write cache area. Performing;
The garbage collection work step,
When all pages of the write cache area are used, writing all valid pages in invalid blocks among blocks of the write cache area into a block of a first reserved area;
Deleting all invalid blocks in the write cache area;
Copying data of a valid block in the write cache area and data written in a block of a first reserved area in the nonvolatile memory cache to a disk array of the storage device;
Deleting a valid block in the write cache area and at least one block in which data of the first reserved area is recorded; And
And moving the write cache area by the number of at least one block in which data of the first reserved area is recorded.
제 1항에 있어서,
상기 교체 작업 수행 단계는,
상기 읽기 캐쉬 영역에 빈 블록이 1개 남은 상태에서 K개의 블록에 해당되는 새로운 데이터에 대한 읽기 액세스가 요청된 경우, 상기 읽기 캐쉬 영역 내에서 K개의 교체 대상 블록을 K개 선정하는 단계;
상기 K개의 교체 대상 블록을 삭제하여 빈 블록으로 변경하는 단계;
기존에 존재하던 1개의 빈 블록 및 상기 선정된 K개의 빈 블록들에 상기 새로운 데이터를 기록하는 단계;
상기 새로운 데이터가 기록된 블록들의 스패어 영역에 액세스가 없었음을 나타내는 값을 표시하는 단계; 및
상기 선정된 K개의 블록들 중 남은 1개의 빈 블록에 읽기할당 포인터를 대응시키는 단계;를 포함하는 것을 특징으로 하는 데이터 처리방법.
The method of claim 1,
Performing the replacement operation,
Selecting K replacement blocks in the read cache area when a read access request for new data corresponding to K blocks is requested when only one empty block remains in the read cache area;
Deleting the K replacement blocks to replace the empty blocks;
Recording the new data into one empty block and the selected K empty blocks;
Displaying a value indicating no access to a spare area of blocks in which the new data is recorded; And
And associating a read allocation pointer with one remaining free block among the selected K blocks.
제 2항에 있어서,
상기 선정단계는,
읽기교체 포인터 및 블록의 스패어 영역의 비트값을 이용하여 상기 교체대상 블록을 선정하는 것을 특징으로 하는 데이터 처리방법.
3. The method of claim 2,
Wherein the selecting step comprises:
And selecting the replacement block using a read replacement pointer and a bit value of a spare area of the block.
제 2항에 있어서,
상기 선정단계는,
액세스 리스트를 이용하여 교체 대상 블록을 선정하는 것을 특징으로 하는 데이터 처리방법.
3. The method of claim 2,
Wherein the selecting step comprises:
A data processing method comprising selecting a block to be replaced using an access list.
삭제delete 제 1항에 있어서,
상기 무효 블록은 스페어 영역에 데이터가 무효인 페이지가 포함되어 있음을 나타내는 표시가 있는 블록을 나타내고,
상기 유효 페이지는 페이지의 스패어 영역에 데이터가 유효임이 표시된 페이지를 나타내는 것을 특징으로 하는 데이터 처리 방법.
The method of claim 1,
The invalid block represents a block in which the spare area has an indication indicating that a page whose data is invalid is included,
And the valid page indicates a page on which a valid data is displayed in a spare area of the page.
KR1020120007546A 2012-01-26 2012-01-26 Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure KR101353968B1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
KR1020120007546A KR101353968B1 (en) 2012-01-26 2012-01-26 Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure
US13/623,414 US20130198453A1 (en) 2012-01-26 2012-09-20 Hybrid storage device inclucing non-volatile memory cache having ring structure

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120007546A KR101353968B1 (en) 2012-01-26 2012-01-26 Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure

Publications (2)

Publication Number Publication Date
KR20130086693A KR20130086693A (en) 2013-08-05
KR101353968B1 true KR101353968B1 (en) 2014-01-23

Family

ID=49213797

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120007546A KR101353968B1 (en) 2012-01-26 2012-01-26 Data process method for replacement and garbage collection data in non-volatile memory cache having ring structure

Country Status (1)

Country Link
KR (1) KR101353968B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100755702B1 (en) * 2005-12-27 2007-09-05 삼성전자주식회사 Storage apparatus using non volatile memory as cache and method for operating the same
JP2009104687A (en) * 2007-10-22 2009-05-14 Fujitsu Ltd Storage device and control circuit

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100755702B1 (en) * 2005-12-27 2007-09-05 삼성전자주식회사 Storage apparatus using non volatile memory as cache and method for operating the same
JP2009104687A (en) * 2007-10-22 2009-05-14 Fujitsu Ltd Storage device and control circuit

Also Published As

Publication number Publication date
KR20130086693A (en) 2013-08-05

Similar Documents

Publication Publication Date Title
EP3204859B1 (en) Methods and systems for cache lines de-duplication
US20180356984A1 (en) Memory system and method of controlling memory system
US9378131B2 (en) Non-volatile storage addressing using multiple tables
KR101257691B1 (en) Memory controller and data management method
CN105718530B (en) File storage system and file storage control method thereof
US9003099B2 (en) Disc device provided with primary and secondary caches
US9009396B2 (en) Physically addressed solid state disk employing magnetic random access memory (MRAM)
US20070094445A1 (en) Method to enable fast disk caching and efficient operations on solid state disks
JP2009211233A (en) Memory system
US20130198453A1 (en) Hybrid storage device inclucing non-volatile memory cache having ring structure
US8825946B2 (en) Memory system and data writing method
KR101297442B1 (en) Nand flash memory including demand-based flash translation layer considering spatial locality
JP2012141946A (en) Semiconductor storage device
JP6711121B2 (en) Information processing apparatus, cache memory control method, and cache memory control program
CN110018790B (en) Method and system for ensuring data breakdown consistency in persistent memory
US10635581B2 (en) Hybrid drive garbage collection
KR20070096429A (en) Fast mounting for a file system on nand flash memory
KR20100115090A (en) Buffer-aware garbage collection technique for nand flash memory-based storage systems
CN109783398A (en) One kind is based on related perception page-level FTL solid state hard disk performance optimization method
KR20130022604A (en) Apparatus and method for data storing according to an access degree
US20140258591A1 (en) Data storage and retrieval in a hybrid drive
US20140047161A1 (en) System Employing MRAM and Physically Addressed Solid State Disk
JP5221593B2 (en) Memory system
KR101353967B1 (en) Data process method for reading/writing data in non-volatile memory cache having ring structure
WO2019136969A1 (en) High-efficiency method for mapping physical position to logical mapping position

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
LAPS Lapse due to unpaid annual fee