KR101474843B1 - Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache - Google Patents

Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache Download PDF

Info

Publication number
KR101474843B1
KR101474843B1 KR1020120152961A KR20120152961A KR101474843B1 KR 101474843 B1 KR101474843 B1 KR 101474843B1 KR 1020120152961 A KR1020120152961 A KR 1020120152961A KR 20120152961 A KR20120152961 A KR 20120152961A KR 101474843 B1 KR101474843 B1 KR 101474843B1
Authority
KR
South Korea
Prior art keywords
cache
block
write
journaling
buffer
Prior art date
Application number
KR1020120152961A
Other languages
Korean (ko)
Other versions
KR20140083338A (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 KR1020120152961A priority Critical patent/KR101474843B1/en
Publication of KR20140083338A publication Critical patent/KR20140083338A/en
Application granted granted Critical
Publication of KR101474843B1 publication Critical patent/KR101474843B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements

Abstract

본 발명의 실시예들에 따른 버퍼 캐시 장치는 중앙 처리 장치(CPU)와 스토리지 사이에서 디스크 버퍼링 기능을 제공하는 버퍼 캐시 장치로서, 비휘발성 메모리 소자들로써 구현되는 캐시 블록 및 이러한 캐시 블록들 중에서 최신 더티 상태(dirty up-to-date state)인 캐시 블록들에 관한 쓰기 보호(frozen) 설정이 기록되는 저널 관리부를 포함할 수 있다. 특히, 정상적인 동작 중에는, 쓰기 보호 설정된 더티 상태(frozen dirty)이면서 불용화되지 않은 캐시 블록들이 캐싱하는 데이터 블록의 컨텐츠를 체크포인트하도록 동작할 수 있고, 시스템의 비정상 종료 시에는, 저널 관리부를 참조하여 캐시 블록들 중에서 쓰기 보호 설정된 더티 상태인 캐시 블록들을 스토리지에 갱신함으로써 시스템을 복구할 수 있다.A buffer cache device according to embodiments of the present invention is a buffer cache device that provides a disk buffering function between a central processing unit (CPU) and storage, and includes a cache block implemented as non-volatile memory devices, And a journal management section in which a frozen setting relating to cache blocks in a dirty up-to-date state is recorded. In particular, during a normal operation, it is possible to check-point the contents of a data block cached by frozen dirty and non-obsolete cache blocks in a write protected state, and when abnormally terminating the system, The system can be restored by updating the cache blocks in the dirty state, which is write-protected among the cache blocks, to the storage.

Description

비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법{BUFFER CACHE APPARATUS, JOURNALING FILE SYSTEM AND JOURNALING METHOD FOR INCORPORATING JOURNALING FEATURES WITHIN NON-VOLATILE BUFFER CACHE}FIELD OF THE INVENTION [0001] The present invention relates to a buffer cache apparatus, a journaling file system, and a journaling method that incorporate a journaling function based on a nonvolatile memory, a journaling file system, and a journaling method.

본 발명은 파일 시스템에 관한 것으로, 더욱 상세하게는, 저널링 기능을 가지는 파일 시스템에 관한 것이다.The present invention relates to a file system, and more particularly, to a file system having a journaling function.

종래에 파일 시스템의 비정상 종료(system failure)에 대처하는 방법은 부팅을 하는 시점에 예를 들어 리눅스(Linux)에서는 fsck와 같은 소정의 유틸리티를 가지고 파일 시스템의 일관성(integrity) 검사를 수행하는 방식으로서, 파일 시스템을 조사하여 문제점을 발견하면 알아서 교정하거나, 자동으로 교정이 불가능하면 사용자가 직접 복구할 수 있게 복구 모드로 재부팅하는 식이다.Conventionally, a method for coping with a system failure of a file system is a method of performing a file system integrity check using a predetermined utility such as fsck at the time of booting, for example, in Linux , Examines the file system to find out if a problem is found, or if it can not be automatically corrected, the user can reboot into the recovery mode so that the user can recover it directly.

운영체제의 버전에 따라 파일시스템 메타 데이터의 항상성을 확인하기 위해 fsck과 같은 유틸리티를 마운트 시점에서 항상 수행하는 경우도 있다. 따라서 기존의 방식에서는 언제 문제가 있을지 모르므로 파일 시스템을 항상 조사하거나 어디서 문제가 발견될 것인지 모르기 때문에 방대한 파일 시스템을 순차적으로 조사를 해야 한다.Depending on the version of the operating system, a utility such as fsck may always be run at mount time to check the consistency of the file system metadata. Therefore, we do not know when the problem will exist in the existing method, so we have to investigate the massive file system sequentially because we do not always examine the file system or know where the problem will be found.

한편, 파일시스템 메타 데이터는 디스크에 구조적으로 존재하는 데이터의 관리를 위한 구조 관리용 2차적 데이터로서, 파일의 생성, 삭제, 디렉토리의 생성과 삭제, 파일 크기의 증가 감소 등에 따라 생성되는 데이터이다. 다시 말해 파일 시스템에 반영되는 변경 사항들에 관한 정보들이다.On the other hand, the file system metadata is secondary data for structure management for managing data existing structurally on the disk, and is data generated due to generation and deletion of files, creation and deletion of directories, and increase and decrease of file sizes. In other words, information about the changes that are reflected in the file system.

저널링 기법은 변경 사항들이 파일 시스템으로 기록되기 전에 일단 저널에 변경 사항들을 기록하고 변경 사항들에 관한 메타 데이터를 로그로 관리하는 기법으로서, 파일 시스템의 비정상적 종료 시에 높은 신뢰성과 빠른 속도를 가지고 복구할 수 있고, 정상적인 동작 시에도 느린 디스크를 대신하여 상대적으로 빠른 저널을 이용함으로써 디스크 성능에서 향상을 볼 수 있다.Journaling technique is a technique to log changes to a journal once before the changes are recorded to the file system and to manage the metadata about the changes as a log. And can improve the disk performance by using a relatively fast journal instead of a slow disk in normal operation.

저널링 기법을 채용한 파일 시스템을 저널링 파일 시스템이라고 하는데, 공통적으로 저널링 파일 시스템은 별도로 마련된 저널 영역에 변경 사항들을 기록하거나 또는 변경 사항과 그 메타 데이터를 함께 기록하다가, 소정의 시점이 되면 가장 최신의 변경 사항들을 스토리지의 원본 위치에 기록하는데, 이를 체크포인트(checkpoint)라고 한다. 저널 영역에 기록할 때에는 일관되게 변경되어야 하는 일련의 업데이트들을 트랜잭션 단위로 관리하며 통상 수 초 단위의 주기로 트랜잭션에 속하는 모든 데이터가 저널 영역에 성공적으로 기록됨을 보장하는 커밋이라 불리는 동작을 수행한다.A file system employing a journaling technique is called a journaling file system. In common, a journaling file system writes changes to a separate journal area or records changes and its metadata together, Changes are written to the original location of the storage, which is called a checkpoint. When writing to the journal area, it manages a series of updates that must be consistently changed on a transaction-by-transaction basis and performs an operation called commit, which ensures that all data belonging to a transaction is successfully written to the journal area, typically at intervals of a few seconds.

저널링 파일 시스템들은 개발사마다 세부적인 정책에서 다소 다르게 개발되고 있다. 예를 들어, 정책에 따라 변경 사항을 스토리지의 원본 위치에 저장하고 나서 메타 데이터를 저널 영역에 기록한다거나, 메타 데이터와 변경 사항을 저널에 기록하고 다시 변경 사항을 스토리지의 원본 위치에 기록할 수도 있다. 또한 정책에 따라 남은 공간이 부족해지면 저널을 체크포인트할 수도 있고, 정해진 시간이 되면 저널을 체크포인트할 수도 있다.Journaling file systems are being developed somewhat differently from detailed policies for each developer. For example, according to policy, you can save changes to the original location of the storage, then record the metadata in the journal area, or record the metadata and changes in the journal and write the changes back to the original location of the storage . It is also possible to checkpoint journals when there is insufficient space left by the policy, or to checkpoint journals at a fixed time.

저널링 파일 시스템의 저널 영역은 시스템의 비정상 종료와 그 이후에도 저장 상태를 유지해야 하므로 비휘발성 스토리지의 일부 공간을 이용한다. The journal area of a journaling file system uses some space in nonvolatile storage because it must remain in a storage state after the abnormal termination of the system and beyond.

문제는 저널링 작업 없는 경우에 캐시 내에 공간 여유가 없어 소거되어야 하는 순간이 되어야 갱신된 데이터를 메인 메모리로부터 저장 장치에 옮겨 기록하던 것과 달리, 저널링 작업은 시스템의 취약성을 줄이기 위해서라도 수 초 단위로 자주 커밋을 일으키므로 상당한 스토리지 트래픽이 유발된다. 이는 접근 비용이 비싼 하드디스크 및 클라우드 스토리지에서는 상당한 성능 저하를 일으키며, 특히 제한된 횟수와 느린 속도를 가지고 쓰기 연산을 허용하는 플래쉬 메모리 사용 환경에서는 성능과 내구성을 상당히 저하시킬 수 있다.The problem is that, in the absence of journaling, the journaling operation is often performed every few seconds to reduce the vulnerability of the system, as opposed to moving the updated data from the main memory to the storage device until it is time to clear the cache Causing committing, which leads to significant storage traffic. This can result in significant performance degradation on expensive hard disk and cloud storage, and can significantly degrade performance and durability in flash memory usage environments that allow write operations with a limited number of times and slower speeds.

최근 각광받는 클라우드 스토리지 시스템에서도 저널링 파일 시스템이 필요하다는 공감대는 있지만 저널링으로 인한 네트워크 액세스 비용으로 인하여 쉽게 적용되지 못하고 있다.Although there is a common consensus that a journaling file system is required in recent cloud storage systems, it is not easily applied due to the cost of network access due to journaling.

이를 해결하기 위해 비휘발성 메모리로 된 저널링 전용 메모리도 제안되기도 한다. 하지만, 이는 메인 메모리, 버퍼 캐시와 대용량 스토리지 외에 운영체제가 관리하여야 하는 별도의 메모리가 추가되는 것이어서, 소프트웨어적으로나 하드웨어적으로 메모리 아키텍처에 상당한 변화가 필요할 수 있고, 버퍼 캐시에서 비휘발성 저널링 메모리 및 스토리지로 각각 두 번의 쓰기 동작이 필요한 것은 변함이 없으며 따라서 신뢰성은 향상되더라도 비용, 속도나 성능 면에서 큰 이점이 없다.To solve this problem, a journaling dedicated memory made of a nonvolatile memory is also proposed. However, this requires additional memory to be managed by the operating system besides main memory, buffer cache, and mass storage, which may require a significant change in the memory architecture both in terms of software and hardware, and the nonvolatile journaling memory and storage There is no change in cost, speed or performance even if the reliability is improved.

한편, 읽고 쓰기 시에 랜덤 액세스가 가능한 상변환 메모리(PCM) 또는 자기저항 메모리(STT-MRAM)과 같은 비휘발성 메모리를 메인 메모리로 사용하여 비휘발성 버퍼 캐시를 구축하는 것만으로 이러한 문제가 쉽게 해결될 것 같지만, 현실적으로는 그렇지 않다.On the other hand, this problem can be easily solved only by using a nonvolatile memory such as a phase-change memory (PCM) or a magnetoresistive memory (STT-MRAM) capable of random access at the time of reading and writing as main memory. It seems to be, but in reality it is not.

저널링 파일 시스템에서 신뢰성은 전원 차단 시에 데이터의 유지 만으로 제공되는 것이 아니고 또한 전원 차단 이후 재공급 내지 재부팅 시에 데이터의 일관성(consistency)이 보장되어야 한다.In a journaling file system, reliability is not only provided by data retention at power down, but also consistency of data at reboot or reboot after power down.

예를 들어, 버퍼 캐시에 있는 데이터 및 그에 상응하는 메타 데이터의 변경은 동시적으로 발생하여야 하는데 데이터가 비휘발성 버퍼 캐시에서 갱신된 직후에 시스템이 멈춘다면, 재부팅 후 비휘발성 버퍼 캐시 내에 변경 데이터가 남아 있다고 하더라도 메타데이터는 일관되지 않은 상태가 되기 때문에 변경 데이터를 스토리지의 원본 위치에 반영할 경우 파일 시스템의 일관성은 무너지게 된다.For example, changes to data in the buffer cache and corresponding metadata should occur concurrently. If the system hangs immediately after the data is updated in the nonvolatile buffer cache, the change data in the nonvolatile buffer cache The metadata is inconsistent, so that the consistency of the file system is lost when the change data is reflected in the original location of the storage.

본 발명이 해결하고자 하는 과제는 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법을 제공하는 데에 있다.SUMMARY OF THE INVENTION It is an object of the present invention to provide a buffer cache apparatus, a journaling file system, and a journaling method which incorporate a journaling function based on a nonvolatile memory.

본 발명의 일 측면에 따른 버퍼 캐시 장치는, 중앙 처리 장치(CPU)와 스토리지 사이에서 디스크 버퍼링 기능을 제공하는 버퍼 캐시 장치로서,A buffer cache apparatus according to an aspect of the present invention is a buffer cache apparatus that provides a disk buffering function between a central processing unit (CPU) and storage,

휘발성 또는 비휘발성 메모리 소자들로써 구현되는 캐시 블록; 및A cache block implemented as volatile or non-volatile memory devices; And

상기 캐시 블록들 중에서 최신 더티 상태(dirty up-to-date state)인 캐시 블록들에 관한 쓰기 보호(frozen) 설정이 기록되는 저널 관리부를 포함할 수 있다.And a journal management unit for recording a frozen setting regarding cache blocks in the latest dirty up-to-date state among the cache blocks.

일 실시예에 따라, 쓰기 보호 설정된 최신 더티 상태(frozen dirty up-to-date state)의 캐시 블록들이 캐싱하는 데이터 블록의 컨텐츠를 상기 스토리지에 체크포인트(checkpoint)하도록 동작할 수 있다.According to one embodiment, cache blocks in a frozen dirty up-to-date state may be operable to checkpoint the contents of a cached data block to the storage.

일 실시예에 따라, 쓰기 보호 설정되지 않은 최신 더티 상태(normal dirty up-to-date)의 캐시 블록들에 대해서 쓰기 보호 설정을 함으로써 제자리 커밋(in-place commit)하며 상기 저널 관리부에 해당 캐시 블록의 쓰기 보호 설정을 기록할 수 있다.According to one embodiment, write protection is set for the cache blocks of the latest dirty up-to-date state in which the write protection is not set, thereby performing in-place commit, The write protection setting of the write-protect switch can be recorded.

일 실시예에 따라, 쓰기 보호 설정되고 최신 더티 상태였던 캐시 블록들이 캐싱하는 데이터 블록의 컨텐츠가 변경될 경우에 해당 캐시 블록은 쓰기 보호 설정된 이전 더티 상태(frozen dirty out-of-date state)가 되고, 상기 스토리지에 체크포인트되기 전에 쓰기 보호 설정 이전 더티 상태로 되는 캐시 블록은 쓰기 보호 해제하며 미사용 상태(free state)의 캐시 블록으로 반환하도록 동작할 수 있다.According to one embodiment, when the contents of a data block to be cached by cache blocks that have been write-protected and are in the latest dirty state are changed, the cache block becomes a frozen dirty out-of-date state , The cache block that becomes the dirty state before the write protection setting before the checkpoint to the storage is released from the write protection and can be returned to the cache block in the free state.

일 실시예에 따라, 시스템의 비정상 종료 후에, 상기 저널 관리부를 참조하여 상기 캐시 블록들 중에서 쓰기 보호 설정된 최신 더티 상태인 캐시 블록들을 상기 스토리지에 갱신하도록 동작할 수 있다.According to one embodiment, after an abnormal termination of the system, the cache manager may be operable to refer to the journal manager to update the cache blocks, which are the latest dirty state, which are write-protected among the cache blocks, to the storage.

본 발명의 다른 측면에 따른 저널링 파일 시스템은A journaling file system according to another aspect of the present invention includes:

스토리지;storage;

휘발성 또는 비휘발성 메모리 소자들로 구현되는 캐시 블록들로써 중앙 처리 장치(CPU)와 상기 스토리지 사이에서 디스크 버퍼링 기능을 제공하며, 상기 캐시 블록들 중에서 최신 더티 상태(dirty up-to-date state)인 캐시 블록들에 관한 쓰기 보호(frozen) 설정이 기록되는 저널 관리부를 포함하는 버퍼 캐시 장치; 및Cache blocks implemented as volatile or nonvolatile memory devices, providing a disk buffering function between a central processing unit (CPU) and the storage, wherein the cache is a dirty up-to-date state cache A buffer cache device including a journal management section in which a frozen setting relating to blocks is recorded; And

상기 캐시 블록에 대한 읽기/쓰기, 쓰기 보호 설정 및 체크포인트 연산을 트리거링하는 제어부를 포함할 수 있다.And a control unit for triggering read / write, write protection setting and checkpoint operations for the cache block.

본 발명의 또 다른 측면에 따른 버퍼 캐시 장치를 이용한 저널링 방법은, 중앙 처리 장치와 스토리지 사이에서 디스크 버퍼링 기능을 제공하는 버퍼 캐시 장치를 이용한 저널링 방법으로서,A journaling method using a buffer cache apparatus according to another aspect of the present invention is a journaling method using a buffer cache apparatus that provides a disk buffering function between a central processing unit and storage,

(a) 변경된 컨텐츠를 가지고 쓰기 요청된 데이터 블록의 갱신 쓰기 연산 시에, 상기 버퍼 캐시 장치가, 해당 데이터 블록을 캐싱 중인 캐시 블록의 쓰기 보호 설정에 따라, 해당 캐시 블록에 변경된 컨텐츠를 갱신 쓰기하거나 또는 미사용 캐시 블록을 찾아 변경된 컨텐츠를 기록하고, 최신 더티 상태의 캐시 블록들의 리스트를 유지하는 단계;(a) at the time of an update write operation of a data block requested to be written with changed contents, the buffer cache device updates or writes the changed contents to the cache block in accordance with the write protection setting of the cache block in which the corresponding data block is being cached Searching for an unused cache block to record the changed content, and maintaining a list of cache blocks in the latest dirty state;

(b) 제자리 커밋 연산이 트리거링되면, 상기 버퍼 캐시 장치가, 상기 최신 더티 상태의 캐시 블록들의 리스트에 의해 참조된 캐시 블록들을 쓰기 보호 설정하고 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트를 유지하는 단계; 및(b) when the in-place commit operation is triggered, the buffer cache device writes and protects the cache blocks referenced by the list of cache blocks in the latest dirty state, and maintains a list of cache blocks in the latest dirty state that is write protected step; And

(c) 체크포인트 연산이 트리거링되면, 상기 버퍼 캐시 장치가, 상기 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트에 의해 참조된 캐시 블록들을 각각 체크포인트함으로써 상기 스토리지의 원본 데이터를 갱신하고, 체크포인트가 수행된 캐시 블록을 클린 상태로 설정하는 단계를 포함할 수 있다.(c) when the checkpoint operation is triggered, the buffer cache device updates the original data of the storage by checking each of the cache blocks referenced by the list of cache blocks of the latest write-protected cache state, And setting the executed cache block to a clean state.

일 실시예에 따라, 상기 변경된 컨텐츠를 가진 최신 더티 상태의 캐시 블록들의 리스트는,According to one embodiment, the list of cache blocks of the latest dirty state with the changed content is stored

미사용 상태 또는 클린 상태의 캐시 블록에 변경된 데이터 블록의 컨텐츠가 쓰기되어 최신 더티 상태로 되는 캐시 블록들에 관한 트랜잭션인 실행 트랜잭션의 리스트로써 유지될 수 있다.The contents of the changed data block may be written to the cache block in an unused state or a clean state to be maintained as a list of execution transactions that are transactions related to cache blocks that are in the latest dirty state.

일 실시예에 따라, 상기 (a) 단계는According to one embodiment, the step (a)

상기 버퍼 캐시 장치가 변경된 컨텐츠로써 쓰기 요청된 데이터 블록의 변경 전의 컨텐츠를 캐싱 중인 캐시 블록을 탐색하는 단계;Searching for a cache block in which the buffer cache device is caching content before the change of the data block requested to be written as the changed content;

상기 탐색된 캐시 블록이 쓰기 보호로 판정되면, 상기 버퍼 캐시 장치가, 쓰기 보호된 캐시 블록이 아닌 새로운 미사용 상태의 캐시 블록을 찾고, 찾은 미사용 상태의 캐시 블록에 변경된 컨텐츠를 기록하는 단계;If the found cache block is determined to be write-protected, the buffer cache device finds a new unused cache block, not a write-protected cache block, and records the changed content in the unused cache block;

상기 버퍼 캐시 장치가, 변경 전 컨텐츠를 캐싱 중인 쓰기 보호 설정된 캐시 블록을 최신 더티 상태에서 이전 더티 상태로 변경하고, 변경된 컨텐츠가 기록된 캐시 블록을 미사용 상태에서 최신 더티 상태로 변경하는 단계;Changing from a latest dirty state to a previous dirty state and changing a cache block in which changed contents are recorded from an unused state to a latest dirty state;

상기 탐색된 캐시 블록이 쓰기 보호되지 않았다고 판정되면, 상기 버퍼 캐시 장치가, 쓰기 보호 설정되지 않은 캐시 블록에 변경된 컨텐츠를 기록하는 단계;Recording the changed contents in the cache block that is not set to the write protection if the cache block found is not write-protected;

각각 최신 더티 상태로 된 캐시 블록들에 관하여, 상기 버퍼 캐시 장치가, 변경된 컨텐츠가 기록된 캐시 블록에 관한 실행 트랜잭션의 리스트를 유지하는 단계를 포함할 수 있다.With respect to cache blocks, each of which is in the latest dirty state, the buffer cache device may include maintaining a list of executing transactions for the cache block in which the changed content has been written.

일 실시예에 따라, 상기 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트는, According to one embodiment, the list of cache blocks of the latest dirty state,

갱신 쓰기 연산 시에 쓰기되는 캐시 블록에 관하여 처리되는 실행 트랜잭션의 리스트로부터, 제자리 커밋 연산 중에 쓰기 보호 설정되고 또한 최신 더티 상태인 캐시 블록들에 관한 트랜잭션인 체크포인트 트랜잭션의 리스트가 유지될 수 있다.A list of checkpoint transactions that are write-protected during an in-place commit operation and that are also transactions with respect to cache blocks that are in the latest dirty state may be maintained from the list of executed transactions that are processed with respect to the cache block being written during the update write operation.

일 실시예에 따라, 상기 (b) 단계는,According to an embodiment, the step (b)

상기 버퍼 캐시 장치가 리스트된 실행 트랜잭션을 커밋 트랜잭션으로 전환하는 단계;Switching the listed execution transaction into a commit transaction;

상기 전환된 커밋 트랜잭션에 연결된 캐시 블록이 있는 경우에, 상기 버퍼 캐시 장치가, 커밋 트랜잭션에 상응하는 캐시 블록을 쓰기 보호 설정하는 단계;If the cache block associated with the switched commit transaction is present, setting the write protection of the cache block corresponding to the commit transaction;

상기 버퍼 캐시 장치가, 상기 쓰기 보호 설정된 캐시 블록들 중에 이전 버전의 컨텐츠를 가지는 캐시 블록을 발견하면 불용 블록 리스트에 포함시키는 단계;If the buffer cache device finds a cache block having a content of a previous version among the write-protected cache blocks, inserting the cache block into an insoluble block list;

상기 버퍼 캐시 장치가, 상기 커밋 트랜잭션을 체크포인트 트랜잭션으로 전환하는 단계; 및The buffer cache device switching the commit transaction to a checkpoint transaction; And

상기 버퍼 캐시 장치가, 상기 불용 블록 리스트에 포함된 캐시 블록들을 각각의 트랜잭션 리스트들로부터 제거하는 단계를 포함할 수 있다.The buffer cache device may include removing cache blocks contained in the unlocked block list from the respective transaction lists.

일 실시예에 따라, (c) 단계는According to one embodiment, step (c) comprises:

상기 체크포인트 트랜잭션 리스트에 체크포인트 트랜잭션이 있는 경우에, 상기 버퍼 캐시 장치가, 각 체크포인트 트랜잭션에 상응하는 캐시 블록을 순차적으로 상기 스토리지로 전송하는 단계; 및If the checkpoint transaction exists in the checkpoint transaction list, the buffer cache device sequentially transmitting cache blocks corresponding to each checkpoint transaction to the storage; And

상기 버퍼 캐시 장치가, 상기 체크포인트 트랜잭션의 리스트를 초기화하는 단계를 포함할 수 있다.The buffer cache device may include initializing the list of checkpoint transactions.

일 실시예에 따라, 상기 버퍼 캐시 장치를 이용한 저널링 방법은According to one embodiment, the journaling method using the buffer cache apparatus

읽기 연산 시에, 상기 버퍼 캐시 장치가 읽기 요청된 데이터 블록의 컨텐츠들을 캐싱하는 캐시 블록들 중에서 가장 최신의 컨텐츠를 가지는 캐시 블록을 읽어 출력하는 단계; 및Reading and outputting a cache block having the latest contents among cache blocks for caching contents of a data block requested to be read by the buffer cache device during a read operation; And

이전에 캐싱된 적이 없는 신규 데이터 블록의 신규 쓰기 연산 시에는 상기 버퍼 캐시 장치가 쓰기 요청된 신규 데이터 블록의 컨텐츠를 미사용 상태의 캐시 블록에 기록하는 단계를 더 포함할 수 있다.And writing the content of the new data block requested to be written by the buffer cache device into the cache block in an unused state at the time of a new write operation of a new data block that has not been previously cached.

일 실시예에 따라, 상기 버퍼 캐시 장치를 이용한 저널링 방법은According to one embodiment, the journaling method using the buffer cache apparatus

(d) 시스템 복구 연산이 트리거링되면, 상기 버퍼 캐시 장치가, 상기 체크포인트 트랜잭션에 연결된 캐시 블록들 중 쓰기 보호 설정된 더티 상태의 캐시 블록들의 리스트에 의해 참조된 캐시 블록들에 기초하여 상기 스토리지를 갱신하는 단계를 더 포함할 수 있다.(d) when the system recovery operation is triggered, the buffer cache device updates the storage based on the cache blocks referenced by the list of dirty cache blocks of the write protected set of cache blocks associated with the checkpoint transaction The method comprising the steps of:

일 실시예에 따라, 상기 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트는,According to one embodiment, the list of cache blocks of the latest dirty state,

갱신 쓰기 연산 시에 쓰기되는 캐시 블록에 관하여 처리되는 실행 트랜잭션이 제자리 커밋 연산 시에 커밋 트랜잭션으로 전환되는 경우에, 상기 커밋 트랜잭션에 따라 제자리 커밋 연산 중에 쓰기 보호 설정되는 캐시 블록들 중에 최신 더티 상태를 유지하는 캐시 블록들에 관하여 처리되는 체크포인트 트랜잭션들의 리스트로써 유지되고,Wherein when an execution transaction to be processed with respect to a cache block to be written at the time of an update write operation is switched to a commit transaction at the time of an in-place commit operation, the latest dirty state Maintained as a list of checkpoint transactions being processed with respect to the cache blocks to be maintained,

상기 실행 트랜잭션, 상기 커밋 트랜잭션 또는 상기 체크포인트 트랜잭션들의 리스트는 각각 상기 저널 관리부에 기록될 수 있다.The execution transaction, the commit transaction, or the list of checkpoint transactions may each be recorded in the journal management unit.

일 실시예에 따라, 상기 (d) 단계는,According to an embodiment, the step (d)

시스템 복구 연산이 트리거링되면, 상기 버퍼 캐시 장치가, 상기 저널 관리부에 아직 체크포인트되지 않은(pending) 체크리스트 트랜잭션들을 참조하여, 쓰기 보호 설정된 더티 상태의 캐시 블록들로써 상기 스토리지를 갱신하는 단계;When the system recovery operation is triggered, the buffer cache device updates the storage with dirty cache blocks that are write-protected with reference to checklist transactions that have not yet been pending to the journal manager;

상기 버퍼 캐시 장치가, 상기 저널 관리부에 제자리 커밋이 완료되지 않은 커밋 트랜잭션을 무효화 및 초기화하는 단계; 및The buffer cache apparatus invalidating and initializing a commit transaction in which the in-place commit is not completed in the journal management unit; And

상기 버퍼 캐시 장치가, 상기 저널 관리부에 남아있는 실행 트랜잭션을 무효화 및 초기화하는 단계를 포함할 수 있다.The buffer cache apparatus may include invalidating and initializing an execution transaction remaining in the journal management unit.

본 발명의 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법에 따르면, 비휘발성 버퍼 캐시 자체를 동시에 저널 데이터를 유지하는 공간으로 활용하므로 변경 데이터의 저널링을 위해 독립된 메모리 공간을 확보하거나 관리할 필요가 없다.According to the buffer cache device, the journaling file system, and the journaling method that incorporate the journaling function based on the nonvolatile memory of the present invention, since the nonvolatile buffer cache itself is used as a space for holding journal data at the same time, There is no need to reserve or manage memory space.

본 발명의 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법에 따르면, 파일들에 변경이 빈번하게 일어나는 어플리케이션의 경우에도 저널링 기능이 없는 시스템과 거의 비슷한 수준으로 스토리지 쓰기 트래픽의 유발을 억제할 수 있다.According to the buffer cache apparatus, the journaling file system, and the journaling method that incorporate the journaling function based on the nonvolatile memory of the present invention, even in the case of an application in which files are frequently changed, Write traffic can be suppressed.

본 발명의 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법에 따르면, 저널링된 데이터가 해당 위치에서 캐싱 기능을 제공하기 때문에, 기존의 버퍼 캐시의 성능을 저하시키지 않으면서 데이터의 높은 신뢰성을 제공할 수 있다.According to the buffer cache apparatus, the journaling file system, and the journaling method that incorporate the journaling function based on the nonvolatile memory of the present invention, since the journaling data provides the caching function at the corresponding position, It is possible to provide high reliability of data.

본 발명의 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법에 따르면, 버퍼 캐시 내에서 저널링이 이루어지기 때문에 클라우드 기반 스토리지 시스템에서도 클라우드 내에서 변경 데이터의 저널링에 따른 추가적인 네트워크 트래픽을 유발하지 않으며, 따라서 클라우드 기반 스토리지 시스템에도 적용할 수 있다.According to the buffer cache device, the journaling file system, and the journaling method that incorporate the journaling function based on the nonvolatile memory of the present invention, since journaling is performed in the buffer cache, the journaling of change data in the cloud is performed in the cloud- It does not cause additional network traffic and can be applied to cloud-based storage systems as well.

본 발명의 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법에 따르면, 종래의 하드 디스크 시스템이거나 최신의 솔리드 디스크 시스템이거나 그 밖의 여하한 방식의 대용량 스토리지 시스템에도 적용될 수 있다.According to the buffer cache apparatus, the journaling file system, and the journaling method that integrate the journaling function based on the nonvolatile memory of the present invention, the conventional cache system can be applied to a conventional hard disk system, a modern solid disk system, or any other mass storage system .

본 발명의 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치, 저널링 파일 시스템 및 저널링 방법에 따르면, 반드시 비휘발성 메모리 소자가 아니더라도 전원이 정상적으로 공급되는 한 휘발성 메모리 소자를 메인 메모리로 이용하더라도 적용될 수 있다.According to the buffer cache device, the journaling file system, and the journaling method that incorporate the journaling function based on the nonvolatile memory of the present invention, even if the volatile memory device is not necessarily a nonvolatile memory device, .

도 1은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 가지는 저널링 파일 시스템을 예시한 블록도이다.
도 2는 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치와 스토리지에서 버퍼 캐시의 제자리 커밋 연산과 커밋된 데이터를 스토리지로 저장하는 연산을 시간의 흐름에 따라 예시한 개념도이다.
도 3은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치에서 어느 한 캐시 블록의 상태 변화를 예시한 상태 다이어그램이다.
도 4는 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법을 예시한 순서도이다.
도 5는 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 갱신 쓰기 연산을 구체적으로 예시한 순서도이다.
도 6은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 제자리 커밋 연산을 구체적으로 예시한 순서도이다.
도 7은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 체크포인트 연산을 구체적으로 예시한 순서도이다.
도 8은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 시스템 복구 연산을 예시한 순서도이다.
1 is a block diagram illustrating a journaling file system having a buffer cache incorporating a journaling function based on a nonvolatile memory according to an embodiment of the present invention.
FIG. 2 is a block diagram of a buffer cache apparatus incorporating a journaling function based on a non-volatile memory according to an embodiment of the present invention, an operation of performing an in-place commit operation of a buffer cache in storage, FIG.
3 is a state diagram illustrating a state change of a cache block in a buffer cache apparatus incorporating a journaling function based on a nonvolatile memory according to an embodiment of the present invention.
4 is a flowchart illustrating a journaling method using a buffer cache that incorporates a journaling function based on a nonvolatile memory according to an embodiment of the present invention.
FIG. 5 is a flowchart illustrating an update write operation of a journaling integrated buffer cache in a journaling method using a buffer cache incorporating a journaling function based on a non-volatile memory according to an embodiment of the present invention.
FIG. 6 is a flowchart illustrating an in-situ commit operation of a journaling integrated buffer cache in a journaling method using a buffer cache incorporating a journaling function based on a non-volatile memory according to an embodiment of the present invention.
FIG. 7 is a flowchart illustrating a checkpoint operation of a journaling integrated buffer cache in a journaling method using a buffer cache incorporating a journaling function based on a non-volatile memory according to an embodiment of the present invention.
FIG. 8 is a flowchart illustrating a system recovery operation of a journaling integrated buffer cache in a journaling method using a buffer cache incorporating a journaling function based on a non-volatile memory according to an embodiment of the present invention.

본문에 개시되어 있는 본 발명의 실시예들에 대해서, 특정한 구조적 내지 기능적 설명들은 단지 본 발명의 실시예를 설명하기 위한 목적으로 예시된 것으로, 본 발명의 실시예들은 다양한 형태로 실시될 수 있으며 본문에 설명된 실시예들에 한정되는 것으로 해석되어서는 아니 된다. For the embodiments of the invention disclosed herein, specific structural and functional descriptions are set forth for the purpose of describing an embodiment of the invention only, and it is to be understood that the embodiments of the invention may be practiced in various forms, The present invention should not be construed as limited to the embodiments described in Figs.

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시예를 보다 상세하게 설명하고자 한다. 도면상의 동일한 구성요소에 대해서는 동일한 참조부호를 사용하고 동일한 구성요소에 대해서 중복된 설명은 생략한다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. The same reference numerals are used for the same constituent elements in the drawings and redundant explanations for the same constituent elements are omitted.

본 발명은 교육과학기술부 산하 한국연구재단에서 관리하는 중견연구자지원사업의 "프로그램 특성 분석에 기반한 스마트 디바이스용 임베디드 운영체제 설계" 연구과제(정부과제고유번호 1345160771호)의 지원으로 수행된 연구 결과를 토대로 한다.The present invention is based on the results of the research conducted with the support of the research project "Design of Embedded Operating System for Smart Device Based on Analysis of Program Characteristics" (Government Project Assigned No. 1345160771) of the Senior Researcher Support Project managed by Korea Research Foundation under the Ministry of Education, Science and Technology do.

도 1은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 가지는 저널링 파일 시스템을 예시한 블록도이다.1 is a block diagram illustrating a journaling file system having a buffer cache incorporating a journaling function based on a nonvolatile memory according to an embodiment of the present invention.

도 1을 참조하면, 버퍼 캐시 장치(10)는 고속의 랜덤 액세스가 가능한 비휘발성 소자들, 예를 들어 상변화 메모리(PCM) 또는 자기저항 메모리(STT-MRAM) 등으로 구현되고 대용량의 스토리지(20)에 대해 데이터 버퍼링(data buffering)을 제공할 수 있다. 스토리지(20)는 통상적인 하드디스크나 SSD 등으로 구현될 수 있다.Referring to FIG. 1, the buffer cache apparatus 10 is implemented with nonvolatile elements capable of high-speed random access, such as a phase change memory (PCM) or a magnetoresistive memory (STT-MRAM) 20 may be provided with data buffering. The storage 20 may be implemented by a conventional hard disk, an SSD, or the like.

비록 주로 본 발명의 명세서에서 버퍼 캐시 장치(10)는 비휘발성 소자들에 기반하여 설명되지만, 본 발명은 전원이 정상적으로 공급되는 한 휘발성 메모리에도 적용될 수 있다.Although the buffer cache device 10 is mainly described in the specification of the present invention based on nonvolatile elements, the present invention can also be applied to volatile memory as long as power is normally supplied.

또한 버퍼 캐시 장치(10)는 마치 메인 메모리와 별도의 장치인 것처럼 설명되었지만, 이는 설명의 편의를 위한 것일 뿐이며, 이러한 표현에 한정되지 않고, 메인 메모리 내의 일부 메모리 영역에서 구현될 수도 있다.Also, although the buffer cache device 10 is described as being a separate device from the main memory, it is for convenience of explanation only, and is not limited to such an expression and may be implemented in some memory areas in the main memory.

제어부(30)는 버퍼 캐시 장치(10)에 대해 특정 캐시 블록에 대한 읽기/쓰기 연산과, 캐시 블록들 전체에 대한 제자리 커밋 연산 및 체크포인트 연산을 지시(triggering)할 수 있다. 제어부(30)가 지시하는 제자리 커밋 연산과 체크포인트 연산에 대응하여, 버퍼 캐시 장치(10)는 소정의 조건에 상응하는 캐시 블록에 대해 제자리 커밋 연산과 체크포인트 연산을 각각 수행할 수 있다. The control unit 30 can instruct the buffer cache apparatus 10 to perform a read / write operation for a specific cache block, an in-place commit operation and a checkpoint operation for the entire cache blocks. Corresponding to the in-place commit operation and the checkpoint operation indicated by the control unit 30, the buffer cache apparatus 10 can perform an in-place commit operation and a checkpoint operation on a cache block corresponding to a predetermined condition, respectively.

제어부(30)는 제자리 커밋 연산 또는 체크포인트 연산을, 예를 들어 특정 시간마다, 또는 쓰기 보호 블록들의 수가 정의된 임계치에 도달할 때에, 트리거링할 수 있다.The control unit 30 can trigger an in-place commit operation or a checkpoint operation, for example, at specific times, or when the number of write protection blocks reaches a defined threshold.

일반적으로, 데이터 버퍼링 또는 디스크 버퍼링은 CPU에 의해 액세스된 데이터 블록을 캐싱하는 기능으로서, 데이터 블록 읽기/쓰기 시에 입출력 시간을 크게 줄일 수 있다. 대신에, 정기적 또는 부정기적으로 캐싱된 데이터 블록을 디스크에 비우기(flush)하여 변경된 부분을 디스크에 반영하여야 한다.In general, data buffering or disk buffering is a function of caching data blocks accessed by the CPU, which can greatly reduce input / output time during data block read / write. Instead, the regularly or irregularly cached data blocks must be flushed to disk to reflect the changed portion to disk.

통상적으로, 디스크는 좁은 의미에서는 하드 디스크와 같은 둥근 기판의 표면 상에 데이터를 기록하는 장치를 의미하지만, 본 발명의 명세서에서는 알려진 모든 종류의 대용량 스토리지 장치를 통칭하는 용어로 사용된다.Typically, a disk refers to a device that records data on the surface of a round substrate such as a hard disk in a narrow sense, but is used in the present specification as a generic term for all kinds of mass storage devices known in the art.

본 발명의 버퍼 캐시 장치(10)와 스토리지(20)를 종래의 버퍼 캐시 장치 및 스토리지는 다음과 같이 비교할 수 있다. The buffer cache device 10 and the storage 20 of the present invention can be compared with conventional buffer cache devices and storage as follows.

기존의 디스크 버퍼링과 저널링 기능을 가진 파일 시스템은 버퍼 캐시에 버퍼링된 데이터 블록들 중 쓰기 변경된 데이터 블록을 해당 운영체제마다의 저널링 정책에 따라 스토리지 내에 별도로 마련된 저널 영역에 저장 즉 커밋(commit)한다. 이로써 비록 신뢰성은 확보되기는 하지만, 액세스 시간이 긴 디스크에 액세스 횟수를 줄이려는 디스크 버퍼링의 원래 의도는 달성하지 못하게 될 수 있고, 나아가 저널링된 데이터 블록은 최종적으로 디스크 내 해당 블록에 기록되어야 하므로 결국 두 번의 기록이 필요하여 성능 저하를 초래할 수 있다.A file system with existing disk buffering and journaling functions stores or commits the changed data blocks of the data blocks buffered in the buffer cache according to the journaling policy of each operating system in a separate journal area in the storage. This makes it impossible to achieve the original intention of disk buffering to reduce the number of accesses to disk with a long access time, although reliability is ensured. Furthermore, since the journaled data block must be finally written to the corresponding block in the disk, It is necessary to record the number of times that the recording is performed.

반면에 본 발명의 버퍼 캐시 장치(10)는 데이터 블록(21)을 쓰기 버퍼링하는 캐시 블록들(12)이 커밋될 때에 제자리 커밋(in-place commit)된다.On the other hand, the buffer cache device 10 of the present invention is in-place committed when the cache blocks 12 that write-buffer the data block 21 are committed.

여기서, 본 발명의 발명자가 제안하는 제자리 커밋 연산이란, 종래의 저널링 파일 시스템의 경우처럼 별도의 저널링 영역에 복사되는 대신에, 비휘발성의 버퍼 캐시 장치(10) 내에 데이터 블록(21)이 버퍼링되어 있는 캐시 블록들을 그대로 쓰기 보호(frozen)시킴으로써 데이터 블록(21)이 저널링된 것과 마찬가지의 효과를 얻는 연산이다.Here, the in-place commit operation proposed by the inventor of the present invention is not copied to a separate journaling area as in the case of the conventional journaling file system, but the data block 21 is buffered in the non-volatile buffer cache device 10 The data block 21 is frozen so that the effect of journaling the data block 21 is obtained.

제자리 커밋을 위해 쓰기 보호된 캐시 블록에서 읽기 연산은 통상의 디스크 버퍼링 캐시 블록처럼 수행되므로 읽기 캐시로서 성능 저하는 전혀 없다.In a write-protected cache block for in-place commit, the read operation is performed like a normal disk buffering cache block, so there is no performance degradation as a read cache.

다만 제자리 커밋을 위해 쓰기 보호된 캐시 블록이 캐싱 중인 데이터 블록(21)에 추가로 변경이 생겨 데이터 블록(21)이 갱신된 경우에 캐시 블록도 갱신되어 하지만, 이 캐시 블록은 쓰기 보호되어 덮어쓰기될 수 없으므로, 갱신된 데이터 블록(21)의 컨텐츠는 비어 있는 캐시 블록을 찾아 저장된다.However, if the data block 21 is updated due to a further change in the data block 21 being cached by the write-protected cache block for in-place commit, the cache block is also updated, The content of the updated data block 21 is found by searching for an empty cache block.

한편, 제자리 커밋된 캐시 블록은 추후에 저널링 정책에 따라 적절한 시점에 스토리지에 체크포인트(checkpoint), 즉 스토리지(20) 내의 원본 위치에 저장되거나, 또는 삭제된다. 구체적으로, 제자리 커밋된 캐시 블록이 체크포인트되는 경우는 그 캐시 블록이 가장 최신의 데이터 블록 컨텐츠를 가지고 있을 때이며, 체크포인트된 후에는 해당 캐시 블록은 쓰기 보호에서 해제되어 자유롭게 쓸 수 있는 쓰기 가능 캐시 블록으로 전환된다. 그렇지 않고 쓰기 보호된 캐시 블록이 이전의 데이터 블록 컨텐츠를 가지고 있다면, 쓰기 보호된 캐시 블록의 컨텐츠는 삭제되고 빈 캐시 블록으로 반환된다.On the other hand, the in-place committed cache block is later stored in a checkpoint in the storage at an appropriate time according to the journaling policy, that is, at the original location in the storage 20 or deleted. Specifically, when a cache block that has been committed in-place is checked, the cache block has the latest data block contents. After the checkpoint, the cache block is released from the write protection, Block. Otherwise, if the write-protected cache block has previous data block contents, the contents of the write-protected cache block are deleted and returned to the empty cache block.

다른 한편으로, 버퍼 캐시 장치(10)에서 쓰기 보호되지 않은 캐시 블록은 일반적인 캐시 블록과 동일하게 제약없이 읽기 및 덮어쓰기될 수 있다. On the other hand, a cache block that is not write-protected in the buffer cache apparatus 10 can be read and overwritten unrestrictedly like a normal cache block.

따라서, 버퍼 캐시 장치(10)는 데이터 블록 컨텐츠를 저장하는 캐시 블록을 쓰기 보호함으로써 최신의 데이터 블록 컨텐츠를 저널에 기록한 효과를 얻을 수 있으며, 동시에 쓰기 보호 여부에 상관없이 모든 캐시 블록을 성능 저하나 오버헤드 없이 읽기 캐시로서 액세스할 수 있다.Accordingly, the buffer cache apparatus 10 can write the latest data block contents to the journal by writing-protecting the cache block storing the data block contents, and at the same time, It can be accessed as read cache without overhead.

이를 위해 버퍼 캐시 장치(10)는 내부에 저널 관리부(11)와 캐시 블록들(12)을 포함한다.To this end, the buffer cache apparatus 10 includes a journal management unit 11 and cache blocks 12 therein.

도 1에서 캐시 블록들(12) 중에 두꺼운 실선 박스로 표시된 캐시 블록은 최신 변경된 컨텐츠 a1를 가지는 더티 캐시 블록이지만, 아직 쓰기 보호되지 않았기 때문에 덮어쓰기될 수 있다. 컨텐츠 a1은 저널링되지 않은, 즉 아직 쓰기 보호되지 않은 상태이다.In FIG. 1, the cache block indicated by the thick solid line box among the cache blocks 12 is a dirty cache block having the latest changed content a1, but can be overwritten because it is not yet write-protected. The content a1 is not journaled, that is, it is not yet write protected.

이중 실선 박스로 표시된 캐시 블록(b2, b4)은 쓰기 보호된 캐시 블록으로서 제자리 커밋된 상태이다. 두 개의 이중 실선 박스로 표시된 캐시 블록이 캐싱 중인 컨텐츠 중 b2는 이전 버전의 데이터 블록 컨텐츠인데, b2를 캐싱 중인 캐시 블록이 쓰기 보호되어 있으므로 변경된 이후 버전의 컨텐츠 b4는 새로운 캐시 블록에 저장된 것이다. 컨텐츠 b2는 이전 버전의 데이터 블록 컨텐츠이므로 스토리지에 커밋될 필요가 없다. 스토리지(20)에는 최신 컨텐츠인 b4가 커밋되고 b2는 폐기된다.The cache blocks b2 and b4 indicated by double solid line boxes are in a state where they have been committed as write-protected cache blocks. Among the contents cached by the two double solid line boxes, b2 is the data block contents of the previous version. Since the cache block being cached by b2 is write-protected, the version b4 of the changed version is stored in the new cache block. Since content b2 is a previous version of the data block content, it need not be committed to storage. The latest content b4 is committed to storage 20 and b2 is discarded.

얇은 실선 박스로 표시된 두 개의 캐시 블록들은 각각 클린 상태의 캐시 블록과 미사용 상태의 빈 캐시 블록이다. 컨텐츠 c는 변경된 적이 없기 때문에 아직 저널링될 필요도 스토리지(20)에 커밋될 필요도 없다.The two cache blocks indicated by the thin solid line boxes are respectively a clean cache block and an empty cache block in an unused state. Since content c has never been changed, it need not yet be journaled nor committed to storage 20.

버퍼 캐시 장치(10)는 각 연산 시에 쓰기, 제자리 커밋 또는 스토리지 커밋이 수행되어야 하는 캐시 블록들에 관하여 트랜잭션들을 생성하거나 또는 그러한 트랜잭션들을 참조하여 각 연산을 수행하는데, 이러한 트랜잭션들은 연산에 따라 실행 트랜잭션(running transaction), 커밋 트랜잭션(commit transaction) 및 체크포인트 트랜잭션(checkpoint transaction)으로 구분될 수 있다.The buffer cache device 10 generates transactions with respect to the cache blocks in which write, in-place commit or storage commit should be performed at each operation, or performs each operation with reference to such transactions, It can be divided into a running transaction, a commit transaction, and a checkpoint transaction.

저널 관리부(11)는 읽기/쓰기 연산에 대응하여 수행될 실행 트랜잭션과 제자리 커밋 연산에 대응하여 수행될 커밋 트랜잭션, 그리고 체크포인트 연산에 대응하여 수행될 체크포인트 트랜잭션들의 리스트 및 메타 데이터와 데이터 블록들의 변경 사항에 관한 메타 데이터를 저장한다.The journal management unit 11 includes a commit transaction to be performed in response to a read / write operation, a commit transaction to be performed in response to an in-place commit operation, a list of checkpoint transactions to be performed in response to a checkpoint operation, Store metadata about changes.

컴퓨터 공학 분야에서 트랜잭션은 데이터의 전송을 시작하는 시점부터 무결성을 보장하면서 완료하기까지 수행되는 일련의 동작들로 된 작업 단위를 가리키는 용어이다.In the field of computer engineering, a transaction is a term that refers to a unit of work consisting of a series of operations performed from the start of data transmission to the completion of ensuring integrity.

실행 트랜잭션은 직전의 제자리 커밋 연산이 일어난 이후부터, 미사용 상태 또는 클린 상태의 캐시 블록에 변경된 데이터 블록의 컨텐츠가 쓰기 요청되어 최신 더티 상태로 되는 캐시 블록들에 관한 트랜잭션이다. 다시 말해, 쓰기 연산 시에 생성되어 관리되는 실행 트랜잭션 리스트는 쓰기 가능한 최신 더티 상태의 캐시 블록들의 리스트와 동일하다.The execution transaction is a transaction related to the cache blocks in which the content of the changed data block is written to the cache block in the unused state or the clean state since the previous in-place commit operation has been performed, and is made the latest dirty state. In other words, the list of executable transactions created and managed during a write operation is the same as the list of cache blocks in the latest writeable dirty state.

커밋 트랜잭션은 제자리 커밋 연산 시에 쓰기 보호 상태로 전환 중인 최신 더티 상태인 캐시 블록들에 관한 트랜잭션이다. A commit transaction is a transaction involving cache blocks that are the latest dirty state transitioning to write protection during in-place commit operations.

체크포인트 트랜잭션은 체크포인트 연산 시에 쓰기 보호 해제될 쓰기 보호 최신 더티 상태의 캐시 블록들에 관한 트랜잭션이다.A checkpoint transaction is a transaction involving cache blocks of the write protection latest dirty state that will be write protected during checkpoint operations.

캐시 블록들(12)은 각자 쓰기 가능한 상태일 때에는 일반적인 읽기/쓰기가 자유로운 디스크 버퍼링용 캐시 블록으로 기능하며, 쓰기 보호로 설정된 상태에서는 읽기는 자유롭지만 쓰기는 제한되는 저널링용 캐시 블록으로 기능할 수 있다.The cache blocks 12 function as a cache block for disk buffering, which is generally readable / writable when they are writable, and can function as a cache block for journaling that is free to read but write is restricted when write protection is set have.

아직 아무런 데이터 블록 컨텐츠도 저장되지 않은 캐시 블록은 빈 캐시 블록(free cache block)이며, 새로운 데이터 블록의 컨텐츠가 저장된 후 변경된 적이 없는 캐시 블록은 클린 캐시 블록(clean cache block)이라고 할 수 있다. 클린 캐시 블록은 변경이 일어나지 않은 상태이므로 읽기 또는 쓰기 캐시로 기능하며 아직 제자리 커밋 연산의 대상이 아니다.A cache block in which no data block contents are stored yet is a free cache block, and a cache block that has not been modified after contents of a new data block is stored may be called a clean cache block. Clean cache blocks are unchanged and therefore function as read or write caches, and are not yet subject to in-place commit operations.

만약 클린 캐시 블록이 캐싱 중인 데이터 블록에서 컨텐츠가 변경되면, 해당 캐시 블록을 변경된 데이터 블록의 컨텐츠로 덮어쓰기한다. 클린 캐시 블록이 변경된 데이터 블록에 의해 덮어쓰기되면 더티 캐시 블록(dirty cache block)이라고 하며 여전히 쓰기 가능 상태이다. 더티 캐시 블록은 데이터 블록의 컨텐츠에 적어도 한 차례의 변경이 일어난 경우이므로 저널링을 위한 제자리 커밋 연산의 대상이 될 수 있다. 따라서 버퍼 캐시 장치(10)는 이러한 더티 캐시 블록에 관한 실행 트랜잭션을 추가하여 저널 관리부(11)에 기록한다.If the content is changed in the data block being cached by the clean cache block, the cache block is overwritten with the content of the changed data block. If a clean cache block is overwritten by a changed data block, it is still called a dirty cache block and is still writable. The dirty cache block may be subject to an in-place commit operation for journaling since at least one change has occurred to the contents of the data block. Therefore, the buffer cache apparatus 10 adds the execution transaction related to this dirty cache block to the journal management unit 11.

더티 캐시 블록이 이후에 쓰기 보호되지 않은 한, 더티 캐시 블록은 이후에 갱신된 데이터 블록으로 계속 덮어쓰기될 수 있고 쓰기 가능 더티 상태를 유지할 수 있다.As long as the dirty cache block is not write-protected thereafter, the dirty cache block may continue to be overwritten with the subsequently updated data block and may remain writable dirty.

한편, 데이터 블록의 컨텐츠가 저장된 더티 캐시 블록이 쓰기 보호된 상태(frozen dirty cache block)이면, 변경된 컨텐츠를 캐싱하기 위해서는 먼저 새로운 빈 캐시 블록을 찾은 다음, 변경된 데이터 블록의 컨텐츠를 저장할 수 있다. 이 경우, 쓰기 요청의 대상이었던 쓰기 보호된 더티 캐시 블록은 이제 그 캐싱된 컨텐츠가 변경 전의 컨텐츠이므로, 쓰기 보호된 이전 더티 캐시 블록(frozen dirty out-of-date cache block)이라고 할 수 있다. 반면에, 변경된 데이터 블록의 컨텐츠가 새로 저장된 캐시 블록은 비록 해당 캐시 블록에는 처음으로 기록이 되었지만 이미 변경된 컨텐츠를 가지므로 쓰기 가능한 최신 더티 캐시 블록(frozen dirty up-to-date cache block)이라고 한다.On the other hand, if the dirty cache block in which the content of the data block is stored is a frozen dirty cache block, in order to cache the changed content, a new empty cache block can be first found and the contents of the changed data block can be stored. In this case, the write-protected dirty cache block that was the subject of the write request is now a write-protected dirty out-of-date cache block since the cached content is now the content before the change. On the other hand, the cache block in which the content of the changed data block is newly stored is called a frozen dirty up-to-date cache block because the cache block has the content already changed although it is first recorded in the corresponding cache block.

이렇게 처음부터 변경된 컨텐츠를 가지게 되는 쓰기 가능 더티 캐시 블록도 저널링을 위한 제자리 커밋 연산의 대상이 될 수 있다. 따라서 버퍼 캐시 장치(10)는 이러한 쓰기 가능 최신 더티 캐시 블록에 관한 실행 트랜잭션을 추가하여 저널 관리부(11)에 기록한다.The writable dirty cache block having the contents changed from the beginning can also be subjected to an in-place commit operation for journaling. Therefore, the buffer cache apparatus 10 adds the execution transaction relating to the latest writable dirty cache block to the journal management unit 11.

이렇듯 더티 상태인 캐시 블록은 쓰기 가능한 상태라면 적어도 한 차례 변경이 있었고 현 시점에서 최신의 컨텐츠를 가지고 있다고 볼 수 있기 때문에 제자리 커밋 연산의 대상이다. 반면에 쓰기 가능한 상태의 클린 캐시 블록은 제자리 커밋 연산의 대상이 아니다.Cache blocks in dirty state are subject to in-place commit operations because they can be considered to have the latest contents at present, at least once if they are writable. On the other hand, writeable clean cache blocks are not subject to in-place commit operations.

실행 트랜잭션은 쓰기 가능한 더티 캐시 블록들에 관하여 생성되기 때문에, 버퍼 캐시 장치(10)가 실행 트랜잭션의 리스트, 정확하게는 실행 트랜잭션에 연결된 캐시 블록들의 리스트를 유지하다가, 제어부(30)에 의해 제자리 커밋 연산이 트리거링될 때 실행 트랜잭션을 곧바로 커밋 트랜잭션으로 전환하면, 버퍼 캐시 장치(10) 내에 제자리 커밋이 필요한 모든 캐시 블록들의 제자리 커밋 작업을 일괄적으로 수행할 수 있다. 이렇게 하여 전환된 커밋 트랜잭션들에 상응하는 쓰기 가능 최신 더티 캐시 블록들은 제자리 커밋 연산 시에 쓰기 보호 설정되어 일괄적으로 쓰기 보호 최신 더티 캐시 블록들이 된다. 커밋 트랜잭션으로 전환 직후에, 실행 트랜잭션은 초기화되고 다시 더티 캐시 블록들을 추적한다.Since the execution transaction is created with respect to writeable dirty cache blocks, the buffer cache device 10 maintains a list of execution transactions, or more precisely a list of cache blocks associated with the execution transaction, It is possible to collectively perform the in-place commit operation of all the cache blocks in the buffer cache apparatus 10 that require the in-place commit, by directly switching the execution transaction to the commit transaction. The latest writable dirty cache blocks corresponding to the committed commit transactions are set to write protection during in-place commit operations, resulting in the latest write-protected new dirty cache blocks. Immediately after switching to a commit transaction, the executing transaction is initialized and again tracks the dirty cache blocks.

한편, 커밋 트랜잭션들은 체크포인트 연산 시에 체크포인트될 체크포인트 트랜잭션들의 리스트로 추가될 수 있다. 만약 제자리 커밋된 캐시 블록들이 그 이후에도 제자리 커밋을 거치고 체크포인트에 이를 때까지 최신 상태를 유지한다면 즉, 그 이후에 그 캐시 블록들이 캐싱하는 데이터 블록들의 컨텐츠가 변경되지 않는다면, 해당 캐시 블록에 관한 체크포인트 트랜잭션은 리스트에서 자리를 유지한다.Commit transactions, on the other hand, can be added as a list of checkpoint transactions to be checkpointed during checkpoint operations. If the contents of the data blocks to be cached by the cache blocks are not changed after that, if the in-place committed cache blocks remain in the latest state until after they have undergone the in-place commit and arrive at the check point, Point transactions keep their place in the list.

만약 제자리 커밋 연산 시에, 제자리 커밋되는 어떤 캐시 블록과 동일한 데이터 블록을 캐싱하지만 과거의 컨텐츠를 가지는 쓰기 보호된 캐시 블록이 있다면 그 쓰기 보호된 과거 더티 캐시 블록에 관한 체크포인트 트랜잭션은 리스트에서 제거될 수 있다. 리스트에서 제거된 캐시 블록은 대신에 불용 블록(obsolete block) 리스트에 포함될 수 있다.If, during an in-place commit operation, there is a write-protected cache block that has the same content as a certain cache block in-place committed but has past content, then the checkpoint transaction for that write protected old dirty cache block is removed from the list . The cache block removed from the list may instead be included in an obsolete block list.

체크포인트 연산이 트리거링되면, 리스트에 남은 체크포인트 트랜잭션들에 상응하는 캐시 블록들을 체크포인트하고, 쓰기 보호를 해제하며 클린 상태로 전환함으로써, 체크포인트 연산이 일괄적으로 수행될 수 있다.When the checkpoint operation is triggered, the checkpoint operations can be performed collectively by checking the cache blocks corresponding to the checkpoint transactions remaining in the list, releasing the write protection, and switching to the clean state.

실시예에 따라, 제자리 커밋 연산 시에 불용 블록 리스트에 포함된 캐시 블록들에 관하여 체크포인트 트랜잭션들을 유지하다가, 체크포인트 연산이 트리거링되면, 체크포인트 트랜잭션들에 상응하는 캐시 블록들 중에 불용 블록 리스트에 포함된 캐시 블록들은 일괄적으로 쓰기 보호 해제하고 빈 캐시 블록으로 반환시키고, 불용 블록 리스트에 포함되지 않는 캐시 블록들을 체크포인트하고 쓰기 보호를 해제하며 클린 상태로 전환할 수도 있다.In accordance with an embodiment, check point transactions are maintained for cache blocks contained in the unused block list during an in-place commit operation, and when a checkpoint operation is triggered, the cache blocks corresponding to checkpoint transactions The included cache blocks may be collectively unprotected and returned to the empty cache block, checkpoint the cache blocks not included in the unused block list, release write protection, and switch to the clean state.

이렇게 하여 본 발명은 버퍼 저널 장치(10)의 캐시 블록에서 제자리 커밋함으로써 저널링 기능을 제공할 수 있다.Thus, the present invention can provide a journaling function by in-place committing in the cache block of the buffer journal device 10. [

이제, 전원 차단 등 시스템에 문제가 생겨 재부팅할 경우에, 만약 데이터 블록에 변경이 일어났지만 저널링 즉 제자리 커밋 연산이 진행 중에 또는 완료하기 전에 문제가 발생하였다면, 시스템은 데이터 블록의 컨텐츠 변경 전에 스토리지(20)에 최종적으로 저장된 상태로 복구된다. 예를 들어 도 1에서 캐시 블록들(12) 중 컨텐츠 a1는 제자리 커밋되기 전이었으므로 폐기되고 스토리지(20)에 기록된 컨텐츠 a0로 복구된다.Now, in case of a system reboot due to a power failure, etc., if a change occurs in a data block but a problem occurs before journaling, in-place commit operation, or before completion, 20). ≪ / RTI > For example, in FIG. 1, the content a1 of the cache blocks 12 is discarded because it was before the in-place commit, and is recovered as the content a0 recorded in the storage 20.

만약 데이터 블록에 변경 사항이 저널링된 후에 즉 제자리 커밋 연산이 완료된 후에 문제가 발생하였다면, 시스템은 데이터 블록의 컨텐츠 변경 후에 버퍼 캐시 장치(10)에서 제자리 커밋된 캐시 블록들 중 최신 컨텐츠를 가진 캐시 블록들에 저장된 상태로 복구된다. 예를 들어, 도 1에서 캐시 블록들(12) 중 컨텐츠 b2는 최신이 아니므로 폐기되고 스토리지(20)에서 컨텐츠 b4로 컨텐츠 b0를 갱신함으로써 복구한다.If a problem occurs after the change is journaled to the data block, that is, after the in-place commit operation is completed, the system, after content change of the data block, Lt; / RTI > For example, in FIG. 1, the content b2 of the cache blocks 12 is discarded because it is not the latest, and is restored by updating the content b0 in the storage 20 to the content b4.

불용 블록 리스트의 데이터를 체크포인트 리스트에서 제거하는 도중에 시스템 상의 문제가 발생한 경우에는, 하나의 트랜잭션을 구성하는 데이터 중 일부만 삭제된 상태일 수 있는데, 그렇다고 하더라도 삭제된 데이터의 최신 버전이 더 나중에 생성된 체크포인트 리스트에 포함되어 있기 때문에, 최종적으로 파일 시스템에 체크포인트 리스트에 포함된 최신 버전이 반영될 것이며, 따라서 원자성에는 문제가 없다.If there is a problem in the system while removing the data of the unused block list from the checkpoint list, only a part of the data constituting one transaction may be deleted. Even if the latest version of the deleted data is later generated Since it is included in the checkpoint list, the latest version included in the checkpoint list will be finally reflected in the file system, so there is no problem in atomicity.

다만, 불용 블록 리스트의 데이터를 체크포인트 리스트에서 제거하는 도중에 시스템 상의 문제가 생겼을 경우에 리스트 전체에 접근하지 못하는 일이 생기지 않도록, 리스트의 포인터 변경을 원자적인 방식으로 수행하거나 데이터 블록 헤더에 불용화 플래그를 별도로 두어 적절히 세팅하는 방식으로 데이터를 체크포인트 리스트에서 제거할 수도 있다.However, in order to prevent access to the entire list when there is a problem in the system in the course of removing the data of the unallowed block list from the checkpoint list, it is necessary to change the pointer of the list atomically, Data may be removed from the checkpoint list by setting the flag appropriately.

만약 데이터 블록에 변경 사항이 스토리지에 커밋된 후에 즉 체크포인트 트랜잭션이 스토리지에 저장된 후에 문제가 발생하였다면, 시스템은 데이터 블록의 컨텐츠 변경 후에 스토리지(20)에 최종적으로 저장된 상태로 복구된다.If a problem occurs after a change to a data block has been committed to storage, that is, after a checkpoint transaction has been stored in the storage, the system is restored to the state ultimately stored in the storage 20 after the content change of the data block.

따라서 시스템의 일관성(consistency)가 보장될 수 있다.Therefore, the consistency of the system can be ensured.

도 2는 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치와 스토리지에서 버퍼 캐시의 제자리 커밋 연산과 커밋된 데이터를 스토리지로 저장하는 연산을 시간의 흐름에 따라 예시한 개념도이다.FIG. 2 is a block diagram of a buffer cache apparatus incorporating a journaling function based on a non-volatile memory according to an embodiment of the present invention, an operation of performing an in-place commit operation of a buffer cache in storage, FIG.

도 2를 참조하면, 데이터 블록 D의 변동하는 컨텐츠가 버퍼 캐시 장치(10)에 캐싱되었다가 최종적으로 스토리지(20)에 저장되기까지 경과가 예시되어 있다. 도 2의 예시에서, 제자리 커밋은 30초마다 일어나도록 설정되고 체크포인트 연산은 90초마다 일어나도록 설정되어 있다.Referring to FIG. 2, the elapsed time until the varying contents of the data block D are cached in the buffer cache device 10 and finally stored in the storage 20 is illustrated. In the example of FIG. 2, the in-place commit is set to occur every 30 seconds and the checkpoint operation is set to occur every 90 seconds.

최초(t=0)에 스토리지(20)에서 D0라는 컨텐츠의 데이터 블록 D가 읽히면서 D0이라는 컨텐츠로 데이터 블록 D가 버퍼 캐시 장치(10)의 캐시 블록 A에 캐싱되는 상황이거나, t=0 이전에 저장되어 있던 데이터 블록 컨텐츠가 스토리지(20)에 저장되면서 쓰기 보호가 해제된 상태로 캐시 블록 A에 캐싱되어 있는 상황으로부터 시작한다. 이 시점에 캐시 블록 A는 클린 캐시(clean cache)이다. t=10에서 데이터 블록 D의 컨텐츠를 D1으로 변경하는 쓰기 연산이 일어나고, 변경된 컨텐츠 D1이 캐시 블록 A에 덮어쓰기된다. 캐시 블록 A는 이제 더티 캐시(dirty cache)이다.The data block D of the content D0 is read from the storage 20 at the first time (t = 0) and the data block D is cached in the cache block A of the buffer cache device 10 by the content of D0, The data block contents stored in the storage 20 are cached in the cache block A in a state in which the write protection is released. At this point, cache block A is a clean cache. At t = 10, a write operation for changing the content of the data block D to D1 occurs, and the changed content D1 is overwritten on the cache block A. Cache block A is now a dirty cache.

t=30에서, 첫 번째 제자리 커밋 연산이 일어나면 더티 캐시인 캐시 블록 A가 제자리 커밋의 대상이 되며, 캐시 블록 A가 쓰기 보호 설정된다. 캐시 블록 A는 이제 쓰기 보호된 최신 더티 캐시(frozen up-to-date dirty cache)이다.At t = 30, when the first in-place commit operation occurs, cache block A, which is a dirty cache, is subject to in-place commit and cache block A is write protected. Cache block A is now a frozen up-to-date dirty cache.

t=40에서, 데이터 블록 D의 컨텐츠를 D2로 변경하는 쓰기 연산이 일어나는데, 캐시 블록 A는 쓰기 보호된 캐시 블록이므로 덮어쓸 수 없고 비어있는 캐시 블록 B에 데이터 블록 D의 최신 버전 D2가 저장된다. 캐시 블록 A는 이제 쓰기 보호된 이전 더티 캐시(frozen out-of-date dirty cache)이고, 캐시 블록 B는 쓰기 가능한 최신 더티 캐시(normal up-to-date dirty cache)이다.At t = 40, a write operation for changing the contents of the data block D to D2 occurs. Since cache block A is a write-protected cache block, it can not be overwritten and the latest version D2 of data block D is stored in empty cache block B . Cache block A is now a frozen out-of-date dirty cache, and cache block B is a normal up-to-date dirty cache.

t=50에서, 데이터 블록 D의 컨텐츠를 D2에서 D3로 변경하는 쓰기 연산이 또 일어나면, 데이터 블록 D의 컨텐츠 D2를 저장하고 있던 캐시 블록 B가 D3로 갱신된다.When a write operation for changing the contents of the data block D from D2 to D3 occurs again at t = 50, the cache block B storing the contents D2 of the data block D is updated to D3.

t=60에서, 두 번째 제자리 커밋 연산이 일어나면, 더티 캐시인 캐시 블록 B가 제자리 커밋의 대상으로서 쓰기 보호 설정된다. 캐시 블록 A는 쓰기 보호된 이전 더티 캐시이고, 이제 캐시 블록 B가 쓰기 보호된 최신 더티 캐시이다.At t = 60, when a second in-place commit operation occurs, cache block B, which is a dirty cache, is write-protected as a target of in-place commit. Cache block A is the old write-protected dirty cache, and cache block B is now the latest dirty cache with write protection.

이후에 쓰기 연산이 없다가 t=90에서, 체크 포인트 연산이 일어나면 쓰기 보호된 캐시 블록 A와 B가 체크 포인트 연산의 대상이 되는데, 캐시 블록 A는 이전 더티 캐시이므로 그 캐싱된 컨텐츠는 더이상 불필요하여 빈(free) 캐시 블록으로 반환되고, 캐시 블록 B는 최신 더티 캐시이므로 그 캐싱된 컨텐츠가 스토리지(20)로 전송되면서 쓰기 보호가 해제된다. 특히 캐시 블록 B의 캐싱된 컨텐츠 D3은 그간의 변경 사항들이 반영된 최신의 컨텐츠로서 디스크에 최종 저장되기 때문에 이후에 변경될 사항들에 대해서는 최초의 컨텐츠라고 볼 수 있으며, 따라서 캐시 블록 B는 체크 포인트 연산 시에 클린(clean) 캐시로 전환된다. If there is no write operation after t = 90, if a checkpoint operation occurs, write-protected cache blocks A and B are subjected to a checkpoint operation. Since the cache block A is an old dirty cache, the cached contents are no longer necessary The cache block B is returned to the free cache block, and since the cache block B is the latest dirty cache, the cached contents are transferred to the storage 20 and the write protection is released. Particularly, since the cached contents D3 of the cache block B are stored in the disk as the latest contents reflecting the changes of the cache blocks B, the contents to be changed thereafter can be regarded as the first contents, The cache is switched to a clean cache.

t=90 시점에 모든 쓰기 보호된 캐시 블록은 쓰기 보호가 모두 해제되고 스토리지(20)에 저장되어야 하는 컨텐츠들은 모두 스토리지(20)에 저장되므로, t=90 시점 이후의 상황은 t=0 시점 이후부터 t=90 시점까지의 상황이 실질적으로 동일하게 반복된다고 이해될 수 있다.At time t = 90, all write-protected cache blocks are released from all write protection and all the contents to be stored in the storage 20 are stored in the storage 20. Therefore, To t = 90 may be understood to be repeated substantially the same.

한편 t=40에서 데이터 블록의 갱신된 컨텐츠 D2을 기록하는 시점부터는 실질적으로 캐시 블록 A의 캐싱된 컨텐츠인 D1은 더이상 쓸모가 없는 컨텐츠가라고 할 수 있다.On the other hand, from the point in time at which the updated content D2 of the data block is recorded at t = 40, the cached content D1 of the cache block A is substantially no longer usable.

이 경우에, 캐시 블록 A를 체크포인트 연산 시까지 쓰기 보호된 상태로 유지하는 것은 캐시 공간을 낭비하는 것이라고 볼 수 있다. 하지만, 그러한 상황이 있는지를 지속적으로 감지하여 캐시 블록을 반환하는 연산을 그때마다 수행하는 것은 성능 상의 오버헤드를 감수하여야 한다.In this case, keeping cache block A in a write-protected state until checkpoint operation is considered to be a waste of cache space. However, it is necessary to overcome the performance overhead by continuously detecting whether there is such a situation and performing an operation of returning a cache block each time.

이에 따라, 도 2와 같은 실시예에서는 체크포인트 연산 시까지 모든 쓰기 보호된 캐시 블록들을 유지하다가, 체크포인트 연산 시에 모든 쓰기 보호된 캐시 블록들에 대해 이전 더티 캐시이면 쓰기 보호 해제 및 삭제하여 빈 캐시로 반환하거나, 최신 더티 캐시이면 스토리지(20)에 저장하여 클린 캐시로 전환할 수 있다.Thus, in the embodiment of FIG. 2, all the write-protected cache blocks are maintained until the checkpoint operation. In the case of all the write-protected cache blocks in the checkpoint operation, Or if it is the latest dirty cache, it can be stored in the storage 20 and switched to the clean cache.

이에 반해 다른 실시예에서는, 쓰기 보호된 더티 캐시 블록에 관하여 갱신되는 컨텐츠를 새 캐시 블록에 저장한 후에는, 체크포인트 연산을 기다리지 않고 최신 버전의 데이터가 커밋되는 시점에, 이전의 쓰기 보호된 더티 캐시 블록을 쓰기 보호 해제 및 삭제하고 빈 캐시로 반환할 수도 있다.On the other hand, in another embodiment, after the content to be updated with respect to the write-protected dirty cache block is stored in the new cache block, at the time the latest version of the data is committed without waiting for the checkpoint operation, You can also unprotect and delete the cache block and return it to the empty cache.

도 3은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시 장치에서 어느 한 캐시 블록의 상태 변화를 예시한 상태 다이어그램이다.3 is a state diagram illustrating a state change of a cache block in a buffer cache apparatus incorporating a journaling function based on a nonvolatile memory according to an embodiment of the present invention.

도 3을 참조하면, 캐시 블록은 읽기/쓰기 연산, 제자리 커밋 연산, 체크포인트 연산에 따라 미사용 상태, 쓰기 가능 최신 클린 상태, 쓰기 가능 최신 더티 상태, 쓰기 보호 최신 더티 상태 및 쓰기 보호 이전 더티 상태 사이에서 전환된다.Referring to FIG. 3, the cache block is divided into an unused state according to a read / write operation, an in-place commit operation, a checkpoint operation, a latest writable clean state, a writable latest dirty state, a write protection latest dirty state, .

캐시 블록은 처음부터 비어 있거나 또는 삭제 및 반환되면서 미사용 상태의 빈 캐시 블록이 된다. 비어 있던 상태에서 캐시 쓰기 연산이 일어날 때, 쓰기되는 컨텐츠가 이전에 변경된 적 없는 최초의 컨텐츠라면 쓰기 가능 최신 클린 상태의 캐시 블록이 된다.The cache block is empty from the beginning or is erased and returned and becomes an empty cache block in an unused state. When the cache write operation is performed in the empty state, if the content to be written is the first content that has not been previously changed, the cache block becomes the latest writeable cache block.

쓰기 가능 최신 클린 상태의 캐시 블록에 다시 쓰기 연산이 일어나면, 캐시 블록은 쓰기 가능 최신 더티 상태로 된다. 캐시 블록이 쓰기 가능 상태에 있는 한 쓰기 연산은 계속 일어날 수 있다.When a rewrite operation is performed on a cache block in a write-enabled latest clean state, the cache block becomes the latest writeable dirty state. As long as the cache block is writable, write operations can still occur.

또한, 비어 있던 상태에서 캐시 쓰기 연산이 일어날 때, 쓰기 요청된 컨텐츠가 쓰기 보호된 다른 캐시 블록 대신에 해당 캐시 블록에 쓰이는 경우에도 쓰기 가능 최신 더티 상태의 캐시 블록이 될 수도 있다.Also, when the cache write operation is performed in the empty state, the write requested contents may be written in the cache block instead of the other write-protected cache block.

한편, 커밋 연산은 쓰기 가능 최신 더티 상태인 캐시 블록들에 관하여 일어나는데, 커밋 연산이 일어나면 쓰기 가능 최신 더티 상태인 캐시 블록들은 쓰기 보호 최신 더티 상태가 된다.On the other hand, a commit operation occurs with respect to cache blocks that are write-enabled in the latest dirty state. When a commit operation occurs, cache blocks that are write-enabled and latest dirty are in write-protection latest dirty state.

쓰기 보호 최신 더티 상태의 캐시 블록은 캐싱 중이던 데이터 블록의 컨텐츠가 변경되면 쓰기 연산의 대상이 될 수도 있고, 또는 조건이 만족되면 체크포인트 연산의 대상이 될 수도 있다.Write Protection The cache block in the latest dirty state may be subject to a write operation if the content of the data block being cached is changed or may be subject to a checkpoint operation if the condition is satisfied.

만약 캐시 블록이 쓰기 보호 최신 더티 상태일 때 체크포인트 연산이 일어나면, 이 캐시 블록의 컨텐츠는 스토리지(20)로 전송되어 최종적으로 저장되고, 이 캐시 블록의 컨텐츠는 더 이상 쓰기 보호될 필요가 없고 과거의 변경 내역도 이제 무의미하므로 쓰기 보호가 해제되면서 쓰기 가능 최신 클린 캐시 상태로 된다.If a checkpoint operation occurs when the cache block is in the write protection latest dirty state, the contents of the cache block are transferred to the storage 20 and finally stored. The contents of the cache block need not be write- Is now meaningless, so the write protection is released and the write-enabled latest clean cache state is established.

만약 쓰기 보호 최신 더티 상태의 캐시 블록에 쓰기 연산이 일어나면, 쓰기 보호된 상태이므로 이 캐시 블록에는 쓰기가 되지 않으며, 다만 이 캐시 블록은 이제 데이터 블록의 과거 컨텐츠를 가지게 되므로, 쓰기 보호 이전 더티 상태의 캐시 블록이 된다. 한편, 이 캐시 블록에 기록을 시도하였던 데이터 블록의 변경된 컨텐츠는 다른 미사용 상태의 캐시 블록을 찾아 기록된다.If a write operation is performed on the cache block of the latest dirty state, the cache block is not written to because it is write-protected. However, since this cache block now has the past contents of the data block, Becomes a cache block. On the other hand, the changed content of the data block which has attempted to be written to this cache block is found by searching for the cache block in another unused state.

쓰기 보호 이전 더티 상태의 캐시 블록은 다음 번의 제자리 커밋 연산이 트리거링되어 최신 데이터를 가진 캐시 블록이 제자리 커밋되면, 불용 블록 리스트에 포함되면서 체크포인트 트랜잭션으로부터 제거되거나, 또는 데이터 블록 헤더에서 불용화 플래그가 세팅됨으로써 불용화처리될 수 있다.The cache block in the write-protection-prior-dirty state is activated when the next-in-place commit operation is triggered and the cache block with the latest data is committed in place, either removed from the checkpoint transaction while being included in the unallowed block list, Can be set to be insolubilized.

한편, 최신의 컨텐츠를 가지는 캐시 블록들, 즉 쓰기 가능 최신 클린 상태, 쓰기 가능 최신 더티 상태 및 쓰기 보호 최신 더티 상태의 캐시 블록에 대해서는 읽기 연산이 자유롭다.On the other hand, read operations are free for the cache blocks having the latest contents, that is, the latest write-enabled clean state, the latest writable dirty state, and the write-protected latest dirty cache block.

반면에 쓰기 보호된 상태이지만 이전 더티 상태인 캐시 블록은 불용화된 캐시 블록으로서 운영체제에서 읽기 연산으로 찾지 않는 과거의 컨텐츠를 가지고 있을 분 아니라 현 시점에서는 최신의 데이터가 스토리지(20)에 반영될 것이 보장되기 때문에, 이 상태의 캐시 블록은 사실상 불필요하다. 따라서 상술하였듯이, 실시예에 따라 쓰기 보호 이전 더티 상태가 되면 즉시 또는 체크포인트 연산이 있을 때에, 불용화 처리, 즉 캐시 블록을 쓰기 보호 해제 및 삭제하고 미사용 상태의 빈 캐시 블록으로 반환할 수 있다.On the other hand, a cache block that is write-protected but is in the old dirty state is an insufficiently cached cache block, and the latest data will be reflected in the storage 20 at this point in time, The cache block in this state is virtually unnecessary. As described above, according to the embodiment, when the dirty state before the write protection is reached or when the checkpoint operation is performed, the non-use processing, that is, the write / read protection cancellation and deletion, can be returned to the empty cache block in the unused state.

도 4는 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법을 예시한 순서도이다.4 is a flowchart illustrating a journaling method using a buffer cache that incorporates a journaling function based on a nonvolatile memory according to an embodiment of the present invention.

도 4를 참조하면, 비휘발성 메모리 기반의 버퍼 캐시 통합 저널링 방법은, 먼저 단계(S41)에서, 읽기 연산 시에는 버퍼 캐시 장치(10)가 읽기 요청된 데이터 블록의 컨텐츠들을 캐싱하는 캐시 블록들 중에서 가장 최신의 컨텐츠를 가지는 캐시 블록을 읽어 출력한다.Referring to FIG. 4, in a buffer cache integrated journaling method based on a nonvolatile memory, in step S41, in a read operation, the buffer cache apparatus 10 selects one of cache blocks Reads and outputs the cache block having the latest contents.

단계(S42)에서, 이전에 캐싱된 적이 없는 신규 데이터 블록의 신규 쓰기 연산 시에는 버퍼 캐시 장치(10)가 쓰기 요청된 신규 데이터 블록의 컨텐츠를 미사용 상태의 캐시 블록에 기록한다.In step S42, at the time of a new write operation of a new data block that has not been previously cached, the contents of the new data block requested to be written by the buffer cache apparatus 10 are written to the unused cache block.

단계(S43)에서, 변경된 컨텐츠를 가지고 쓰기 요청된 데이터 블록의 갱신 쓰기 연산 시에, 버퍼 캐시 장치(10)가, 해당 데이터 블록을 캐싱 중인 캐시 블록의 쓰기 보호 설정에 따라, 해당 캐시 블록에 변경된 컨텐츠를 덮어쓰거나 또는 미사용 캐시 블록을 찾아 변경된 컨텐츠를 기록하고, 변경된 컨텐츠를 가진 최신 더티 상태의 캐시 블록들의 리스트를 유지한다.At the time of the update write operation of the data block requested to be written with the changed content, the buffer cache apparatus 10 stores the changed data block in the changed cache block according to the write protection setting of the cache block in which the data block is being cached in step S43 Overwrites the content or finds an unused cache block, records the changed content, and maintains a list of the latest dirty cache blocks with changed content.

구체적으로, 변경된 컨텐츠를 가진 최신 더티 상태의 캐시 블록들의 리스트는 미사용 상태 또는 클린 상태의 캐시 블록에 변경된 데이터 블록의 컨텐츠가 쓰기 요청되어 최신 더티 상태로 되는 캐시 블록에 관한 트랜잭션인 실행 트랜잭션 리스트로써 유지될 수 있다. 갱신 쓰기 연산 시에 존재하는 실행 트랜잭션 리스트는 쓰기 가능한 최신 더티 상태의 캐시 블록들의 리스트와 동일하다.Specifically, the list of the latest dirty cache blocks having changed contents is maintained as an execution transaction list, which is a transaction related to the cache block in which the content of the changed data block is written to the cache block in the unused state or the clean state to be in the latest dirty state . The execution transaction list present at the update write operation is the same as the list of cache blocks of the latest writable dirty state.

단계(S44)에서, 제자리 커밋 연산이 트리거링되면, 버퍼 캐시 장치(10)가, 최신 더티 상태의 캐시 블록들의 리스트에 의해 참조된 캐시 블록들을 쓰기 보호 설정하고, 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트를 유지한다.In step S44, when the in-place commit operation is triggered, the buffer cache apparatus 10 writes and protects the cache blocks referred to by the list of cache blocks in the latest dirty state, Lt; / RTI >

구체적으로, 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트는, 갱신 쓰기 연산 시에 갱신 쓰기되는 캐시 블록에 관하여 생성되어 관리되는 실행 트랜잭션 리스트 중에서 제자리 커밋 연산 중에 쓰기 보호 설정된 최신 더티 상태인 캐시 블록들에 관한 트랜잭션인 체크포인트 트랜잭션들의 리스트로써 유지될 수 있다.Specifically, the list of cache blocks in the latest dirty state with write protection is created and managed with respect to the cache block to be updated and written at the time of the update write operation. Among the managed transaction lists, the latest dirty cache blocks Lt; RTI ID = 0.0 > transaction. ≪ / RTI >

단계(S45)에서, 체크포인트 연산이 트리거링되면, 버퍼 캐시 장치(10)가, 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트에 의해 참조된 캐시 블록들을 각각 체크포인트함으로써 스토리지(20)를 갱신하고, 성공적으로 체크포인트된 캐시 블록을 클린 상태로 설정한다.In step S45, when the checkpoint operation is triggered, the buffer cache device 10 updates the storage 20 by checking the cache blocks referenced by the list of cache blocks in the latest dirty state with write protection, respectively , The cache block that has successfully been checkpointed is set to a clean state.

구체적으로, 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트는, 갱신 쓰기 연산 시에 갱신 쓰기되는 캐시 블록에 관하여 생성되어 관리되는 실행 트랜잭션 리스트 중에서 제자리 커밋 연산 중에 쓰기 보호 설정되고 또한 최신 더티 상태인 캐시 블록들에 관한 트랜잭션인 체크포인트 트랜잭션들의 리스트로써 유지될 수 있다.Specifically, the list of cache blocks in the latest dirty state with write protection is created in the execution transaction list created and managed with respect to the cache block to be updated and written in the update write operation, Can be maintained as a list of checkpoint transactions that are transactions on blocks.

단계(S46)에서, 제어부(30)에서 시스템 복구 연산이 트리거링되면, 버퍼 캐시 장치(10)가 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들의 리스트에 의해 참조된 캐시 블록들에 기초하여 스토리지(20)를 갱신함으로써 시스템을 복구한다.If the system recovery operation is triggered in the control unit 30 in step S46, the buffer cache apparatus 10 may start the storage 20 based on the cache blocks referenced by the list of cache blocks in the latest dirty state, To restore the system.

단계(S41) 내지 단계(S46)는 제어부(30)에서 트리거링되는 연산에 따라 비순차적으로 일어날 수 있다.Steps S41 to S46 may occur in a non-sequential manner in accordance with an operation triggered by the control unit 30. [

한편, 단계(S43)를 좀더 상세하게 설명하기 위해 도 5를 잠시 참조하면, 도 5는 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 갱신 쓰기 동작을 구체적으로 예시한 순서도이다.5 is a flowchart illustrating a journaling method using a buffer cache in which a journaling function is integrated based on a nonvolatile memory according to an embodiment of the present invention. Referring to FIG. 5, FIG. 4 is a flowchart specifically illustrating an update write operation of the integrated buffer cache. FIG.

도 5에서, 적어도 하나의 변경된 컨텐츠의 데이터 블록의 갱신 쓰기 연산에 관한 단계(S43)는, 단계(S431)에서, 버퍼 캐시 장치(10)가 변경된 컨텐츠로써 쓰기 요청된 데이터 블록의 변경 전 컨텐츠를 캐싱 중인 캐시 블록을 탐색한다.5, the step S43 of the update write operation of the data block of at least one changed content is executed by the buffer cache apparatus 10 in the step S431, Search the cache block being cached.

단계(S432)에서, 변경될 데이터 블록을 관리할 실행 트랜잭션이 존재하는지 확인하며, 만약 실행 트랜잭션이 없으면 단계(S433)에서 생성한다.In step S432, it is checked whether there is an execution transaction to manage the data block to be changed, and if there is no execution transaction, it is generated in step S433.

단계(S434)에서, 탐색된 캐시 블록이 쓰기 보호 설정되었는지 판정한다. 만약 쓰기 보호되었다면, 단계(S435)로 진행하고, 그렇지 않으면 단계(438)로 진행한다.In step S434, it is determined whether the found cache block is write-protected. If it is write protected, proceed to step S435, otherwise proceed to step 438. [

단계(S434)에서 쓰기 보호로 판정되면 단계(S435)에서, 버퍼 캐시 장치(10)가, 쓰기 보호된 캐시 블록이 아닌 새로운 미사용 상태의 캐시 블록을 찾고, 찾은 미사용 상태의 캐시 블록과 실행 트랜잭션을 연결하며, 새로 연결된 캐시 블록에 변경된 컨텐츠를 기록한다. If the write protection is determined in step S434, the buffer cache apparatus 10 searches for a new unused cache block, which is not a write-protected cache block, in step S435, And records the changed contents in the newly connected cache block.

단계(S436)에서, 버퍼 캐시 장치(10)가, 변경 전 컨텐츠를 캐싱 중인 쓰기 보호 설정된 캐시 블록을 최신 더티 상태에서 이전 더티 상태로 변경하고, 변경된 컨텐츠가 기록된 캐시 블록을 미사용 상태에서 최신 더티 상태로 변경한다. 캐시 상태의 변경에 따른 메타 데이터는 저널 관리부(11)에 기록될 수 있다.In step S436, the buffer cache apparatus 10 changes the write-protected cache block in which the pre-change content is being cached from the latest dirty state to the old dirty state, and updates the cache block in which the changed content is recorded from the latest dirty State. The metadata corresponding to the change of the cache state can be recorded in the journal management unit 11. [

단계(S434)에서 쓰기 보호되지 않았다고 판정되면, 단계(S437)에서, 버퍼 캐시 장치(10)가, 만약 쓰기 보호 설정되지 않은 캐시 블록이 실행 트랜잭션에 연결되지 않았다면 이를 연결하며, 쓰기 보호 설정되지 않은 캐시 블록에 변경된 컨텐츠를 기록한다. 이로써 캐시 블록은 최신 더티 상태가 된다.If it is determined in step S434 that the write protection is not performed, in step S437, the buffer cache apparatus 10 connects, if the cache block not set for write protection is not connected to the execution transaction, Record the changed contents in the cache block. This places the cache block in the latest dirty state.

실행 트랜잭션의 리스트는 저널 관리부(11)에 메타 데이터로서 기록될 수 있고, 리스트에 포함된 블록들은 최신 더티 상태의 캐시 블록들에 상응한다.The list of execution transactions may be recorded as metadata in the journal management unit 11, and the blocks included in the list correspond to the cache blocks of the latest dirty state.

단계(S438)에서, 변경된 컨텐츠가 기록된 캐시 블록이 갱신 쓰기 연산의 마지막 블록인지 판정한다. 만약 마지막 블록이 아니면 단계(S431)로 되돌아가고, 마지막 블록이면 단계(S43)의 갱신 쓰기 연산을 종료한다.In step S438, it is determined whether the cache block in which the changed content is recorded is the last block of the update write operation. If it is not the last block, the process returns to step S431, and if it is the last block, the update write operation of step S43 is terminated.

또한, 단계(S44)의 제자리 커밋 연산을 구체적으로 예시하기 위해 도 6을 참조하면, 도 6은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 제자리 커밋 연산을 구체적으로 예시한 순서도이다.6 is a block diagram illustrating a journaling method using a buffer cache incorporating a journaling function based on a nonvolatile memory according to an embodiment of the present invention. Referring to FIG. 6, Is a flowchart specifically illustrating the in-place commit operation of the journaling integrated buffer cache.

도 6에서, 제어부(30)에 의해 트리거링된 제자리 커밋 연산에 관한 단계(S44)는, 단계(S441)에서, 버퍼 캐시 장치(10)가 리스트된 실행 트랜잭션을 커밋 트랜잭션으로 전환하는 단계부터 시작한다.6, the step S44 of the in-place commit operation triggered by the control unit 30 starts from the step S441 in which the buffer cache apparatus 10 switches the listed executed transaction to the commit transaction .

커밋 트랜잭션으로 전환과 함께 실행 트랜잭션 리스트는 초기화되고 이후에 새로 갱신 쓰기 연산에 의해 발생하는 실행 트랜잭션은 새로 리스트된다.Execute with transition to commit transaction The transaction list is initialized and any subsequent execution transactions that are generated by the newly updated write operation are newly listed.

이어서 단계(S442)에서, 버퍼 캐시 장치(10)가 전환된 커밋 트랜잭션 리스트에 연결된 캐시 블록이 있는지 판정하고, 만약 없으면 제자리 커밋 연산 단계(S44)는 단계(S446)로 진행한다.Subsequently, in step S442, the buffer cache apparatus 10 determines whether or not there is a cache block connected to the switched commit transaction list. If not, the in-place commit operation step S44 proceeds to step S446.

단계(S442)에서 커밋 트랜잭션 리스트에 연결된 캐시 블록이 있는 경우에, 단계(S443)에서, 버퍼 캐시 장치(10)가, 커밋 트랜잭션에 상응하는 캐시 블록을 쓰기 보호 설정한다.If there is a cache block connected to the commit transaction list in step S442, the buffer cache apparatus 10 sets write protection for the cache block corresponding to the commit transaction in step S443.

단계(S444)에서, 버퍼 캐시 장치(10)가, 단계(S443)에서 쓰기 보호 설정된 캐시 블록에 관하여, 이전 버전의 컨텐츠를 가지는 캐시 블록이 있으면 이를 불용 블록 리스트에 포함시킨다.In step S444, if there is a cache block having a previous version of the content with respect to the write-protected cache block in step S443, the buffer cache apparatus 10 inserts the cache block into the unused block list.

단계(S445)에서, 버퍼 캐시 장치(10)가, 커밋 트랜잭션을 체크포인트 트랜잭션으로 전환한다.In step S445, the buffer cache device 10 switches the commit transaction to a checkpoint transaction.

단계(S446)에서, 버퍼 캐시 장치(10)가, 불용 블록 리스트에 포함된 캐시 블록들이 있으면 해당 블록이 연결된 트랜잭션으로부터 제거함으로써, 제자리 커밋 연산을 위한 단계(S44)가 종료된다.In step S446, if the buffer cache apparatus 10 has cache blocks included in the unused block list, the corresponding block is removed from the concatenated transaction, thereby completing the step S44 for the in-place commit operation.

체크포인트 연산의 한 주기 동안에 여러 차례의 제자리 커밋 연산이 일어날 수 있기 때문에, 여러 차례의 제자리 커밋 연산마다 커밋 트랜잭션들이 체크포인트 트랜잭션으로 전환되면서 체크포인트 트랜잭션 리스트에 추가되거나 또는 캐시 블록이 불용 블록 리스트에 포함되면서 체크포인트 트랜잭션 리스트에서 제거되며, 이로써 체크포인트 트랜잭션들의 리스트는 매번 제자리 커밋 연산때마다 변동할 수 있다.Since multiple in-place commit operations can occur during one cycle of a checkpoint operation, commit transactions are added to the checkpoint transaction list as a result of multiple in-place commit operations, or commit transactions are added to the checkpoint transaction list, And removed from the checkpoint transaction list, so that the list of checkpoint transactions can change each time the in-place commit operation is performed.

나아가, 단계(S45)의 체크포인트 연산을 구체적으로 예시하기 위해 도 7을 참조하면, 도 7은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 체크포인트 연산을 구체적으로 예시한 순서도이다.7 is a flowchart illustrating a journaling method using a buffer cache incorporating a journaling function based on a nonvolatile memory according to an embodiment of the present invention. Referring to FIG. 7, FIG. 5 is a flowchart illustrating a checkpoint operation of the journaling integrated buffer cache in detail.

도 7에서, 단계(S45)의 체크포인트 연산은, 단계(S451)에서, 버퍼 캐시 장치(10)가 체크포인트 트랜잭션의 리스트에 체크포인트 트랜잭션이 남아 있는지 판정하고, 만약 없으면 체크포인트 연산 단계(S45)는 단계(S453)로 진행한다.7, the checkpoint operation of step S45 determines whether the checkpoint transaction remains in the list of checkpoint transactions in step S451, and if not, the checkpoint operation step S45 ) Proceeds to step S453.

단계(S451)에서 체크포인트 트랜잭션이 있는 경우에, 단계(S452)에서, 버퍼 캐시 장치(10)가, 각 체크포인트 트랜잭션에 상응하는 캐시 블록을 순차적으로 스토리지(20)로 전송한다.If there is a checkpoint transaction in step S451, then in step S452, the buffer cache device 10 sequentially transfers the cache blocks corresponding to each checkpoint transaction to the storage 20.

단계(S453)에서, 버퍼 캐시 장치(10)가, 체크포인트 트랜잭션의 리스트를 초기화한다.In step S453, the buffer cache apparatus 10 initializes the list of checkpoint transactions.

나아가, 단계(S46)의 시스템 복구 연산을 구체적으로 예시하기 위해 도 8을 참조하면, 도 8은 본 발명의 일 실시예에 따른 비휘발성 메모리에 기반하여 저널링 기능을 통합한 버퍼 캐시를 이용한 저널링 방법에서 저널링 통합 버퍼 캐시의 시스템 복구 동작을 구체적으로 예시한 순서도이다.8 is a block diagram illustrating a journaling method using a buffer cache incorporating a journaling function based on a nonvolatile memory according to an embodiment of the present invention. Referring to FIG. 8, FIG. 4 is a flowchart illustrating a system recovery operation of the journaling integrated buffer cache in FIG.

단계(S46)의 시스템 복구 연산은, 단계(S461)에서, 제어부(30)에서 시스템 복구 연산이 트리거링되면, 버퍼 캐시 장치(10)가 저널 관리부(11)에 아직 체크포인트되지 않은(pending) 체크리스트 트랜잭션들에 따라 쓰기 보호 설정된 더티 상태의 캐시 블록들로써 스토리지(20)를 갱신한다.If the system recovery operation is triggered in the control unit 30 in step S461, the system recovery operation in step S46 is a check that the buffer cache apparatus 10 has not yet pended to the journal management unit 11 And updates the storage 20 with write-protected dirty cache blocks according to list transactions.

단계(S462)에서, 커밋이 완료되지 않은 커밋 트랜잭션이 있으면 무효화하고 커밋 트랜잭션을 초기화한다.At step S462, if there is a commit transaction that has not yet been committed, it is invalidated and the commit transaction is initialized.

단계(S463)에서, 남아있는 실행 트랜잭션이 있으면 무효화하고 실행 트랜잭션을 초기화한다.At step S463, if there are remaining executed transactions, they are invalidated and the execution transaction is initialized.

이로써, 단지 버퍼 캐시 장치(10)의 저널 관리부(11) 내에 비정상 종료 직전까지 유지되고 있던 체크리스트 트랜잭션들을 참조하는 것만으로 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들을 알 수 있고, 또한 그러한 쓰기 보호 설정된 최신 더티 상태의 캐시 블록들에 저장된 컨텐츠로써 스토리지(20) 내의 데이터 블록들을 갱신하는 것만으로 시스템의 비정상 종료에 대응할 수 있다.Thus, it is possible to know the cache blocks of the latest dirty state that are write-protected only by referring to the check list transactions held in the journal management unit 11 of the buffer cache apparatus 10 until immediately before the abnormal termination, It is possible to respond to an abnormal termination of the system simply by updating the data blocks in the storage 20 with the contents stored in the cache blocks of the latest dirty state.

따라서, 본 발명의 저널링 방법은 버퍼 캐시 외에 저널링 기능을 위한 별도의 저장 공간을 마련할 필요도 없고 또한 복사본을 생성 및 관리할 필요가 없기 때문에 속도와 비용 면에서 탁월한 장점을 가진다.Therefore, the journaling method of the present invention has an advantage of speed and cost because there is no need to provide a separate storage space for the journaling function in addition to the buffer cache, nor to generate and manage a copy.

또한 클라우드 네트워크 내에서 저널링을 위한 트래픽을 과도하게 유발하지 않기 때문에 클라우드 기반 스토리지 시스템에도 쉽게 적용할 수 있다.It can also be easily applied to cloud-based storage systems because it does not over-induce traffic for journaling within the cloud network.

이상과 같이 본 발명은 비록 한정된 실시예와 도면에 의해 설명되었으나, 본 발명이 상기의 실시예에 한정되는 것은 아니며, 이는 본 발명이 속하는 분야에서 통상의 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. 따라서, 본 발명의 사상은 아래에 기재된 특허청구범위에 의해서만 파악되어야 하고, 이와 균등하거나 또는 등가적인 변형 모두는 본 발명 사상의 범주에 속한다 할 것이다.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, Modification is possible. Accordingly, the spirit of the present invention should be understood only in accordance with the following claims, and all of the equivalent or equivalent variations will fall within the scope of the present invention.

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

10 버퍼 캐시 장치 11 저널 관리부
12 캐시 블록 20 스토리지
30 제어부
10 buffer cache device 11 journal management unit
12 cache blocks 20 storage
30 control unit

Claims (17)

중앙 처리 장치(CPU)와 스토리지 사이에서 데이터 버퍼링 기능을 제공하기 위해 휘발성 또는 비휘발성 메모리 소자들로써 구현되는 캐시 블록들 및 저널 관리부를 포함하는 버퍼 캐시 장치로서,
상기 버퍼 캐시 장치는,
연속하는 두 커밋 연산들 사이에 또는 커밋 연산과 체크포인트 연산 사이에 캐시 블록에 캐싱된 데이터 블록이 가장 최근의 커밋 연산 이후 처음으로 변경된 컨텐츠로써 갱신되면, 상기 데이터 블록을 캐싱하기 위해, 비어 있는 캐시 블록에 변경된 컨텐츠를 기록하도록 동작하고,
상기 저널 관리부는, 커밋 연산 시에 또는 체크포인트 연산 시에, 각각의 데이터 블록에 관하여 캐싱하는 적어도 하나의 캐시 블록들 중에 가장 마지막으로 변경된 컨텐츠가 캐싱된 캐시 블록에 관한 메타 데이터를 기록하도록 동작하는 것을 특징으로 하는 버퍼 캐시 장치.
1. A buffer cache device comprising cache blocks and journal management implemented with volatile or non-volatile memory elements to provide data buffering functionality between a central processing unit (CPU) and storage,
The buffer cache apparatus comprising:
If a data block cached in a cache block between two consecutive consecutive operations or between a commit operation and a checkpoint operation is updated with the contents changed first since the most recent commit operation, To write the changed content to the block,
The journal management unit is operable to record metadata relating to a cache block in which at least one of the at least one cache blocks cached with respect to each data block is cached at the time of a commit operation or a checkpoint operation And the buffer cache device.
스토리지;
중앙 처리 장치(CPU)와 상기 스토리지 사이에서 데이터 버퍼링 기능을 제공하기 위해 휘발성 또는 비휘발성 메모리 소자들로써 구현되는 캐시 블록들 및 저널 관리부를 포함하는 버퍼 캐시 장치; 및
상기 캐시 블록에 대한 읽기/쓰기, 커밋 연산 및 체크포인트 연산을 트리거링하는 제어부를 포함하는 파일 시스템으로서,
상기 버퍼 캐시 장치는
연속하는 두 커밋 연산들 사이에 또는 커밋 연산과 체크포인트 연산 사이에 캐시 블록에 캐싱된 데이터 블록이 가장 최근의 커밋 연산 이후 처음으로 변경된 컨텐츠로써 갱신되면, 상기 데이터 블록을 캐싱하기 위해, 비어 있는 캐시 블록에 변경된 컨텐츠를 기록하도록 동작하고,
상기 저널 관리부는, 커밋 연산 시에 또는 체크포인트 연산 시에, 각각의 데이터 블록에 관하여 캐싱하는 적어도 하나의 캐시 블록들 중에 가장 마지막으로 변경된 컨텐츠가 캐싱된 캐시 블록에 관한 메타 데이터를 기록하도록 동작하는 것을 특징으로 하는 파일 시스템.
storage;
A buffer cache device including cache blocks and a journal manager implemented with volatile or nonvolatile memory devices to provide a data buffering function between a central processing unit (CPU) and the storage; And
And a control unit for triggering a read / write operation, a commit operation, and a checkpoint operation on the cache block,
The buffer cache device
If a data block cached in a cache block between two consecutive consecutive operations or between a commit operation and a checkpoint operation is updated with the contents changed first since the most recent commit operation, To write the changed content to the block,
The journal management unit is operable to record metadata relating to a cache block in which at least one of the at least one cache blocks cached with respect to each data block is cached at the time of a commit operation or a checkpoint operation Lt; / RTI >
삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete 삭제delete
KR1020120152961A 2012-12-26 2012-12-26 Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache KR101474843B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020120152961A KR101474843B1 (en) 2012-12-26 2012-12-26 Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020120152961A KR101474843B1 (en) 2012-12-26 2012-12-26 Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache

Publications (2)

Publication Number Publication Date
KR20140083338A KR20140083338A (en) 2014-07-04
KR101474843B1 true KR101474843B1 (en) 2014-12-19

Family

ID=51733795

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020120152961A KR101474843B1 (en) 2012-12-26 2012-12-26 Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache

Country Status (1)

Country Link
KR (1) KR101474843B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10366021B2 (en) 2015-12-30 2019-07-30 Samsung Electronics Co., Ltd. Memory system including DRAM cache and cache management method thereof

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101567134B1 (en) 2013-03-29 2015-11-09 이화여자대학교 산학협력단 Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012014735A (en) * 2011-10-04 2012-01-19 Hitachi Ltd Storage device system and data restoring method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012014735A (en) * 2011-10-04 2012-01-19 Hitachi Ltd Storage device system and data restoring method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10366021B2 (en) 2015-12-30 2019-07-30 Samsung Electronics Co., Ltd. Memory system including DRAM cache and cache management method thereof
US11023396B2 (en) 2015-12-30 2021-06-01 Samsung Electronics Co., Ltd. Memory system including DRAM cache and cache management method thereof

Also Published As

Publication number Publication date
KR20140083338A (en) 2014-07-04

Similar Documents

Publication Publication Date Title
KR101567134B1 (en) Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache
US20240095233A1 (en) Persistent memory management
CN106471478B (en) Device controller and method for performing multiple write transactions atomically within a non-volatile data storage device
US9563566B2 (en) Device and method for integrated data management for nonvolatile buffer cache and nonvolatile storage
US10817421B2 (en) Persistent data structures
US9235524B1 (en) System and method for improving cache performance
US8074035B1 (en) System and method for using multivolume snapshots for online data backup
US8930947B1 (en) System and method for live migration of a virtual machine with dedicated cache
US8621144B2 (en) Accelerated resume from hibernation in a cached disk system
US10241711B2 (en) Multiversioned nonvolatile memory hierarchy for persistent memory
US20150039837A1 (en) System and method for tiered caching and storage allocation
US20170300250A1 (en) Write-Ahead Log Maintenance and Recovery
US20060224639A1 (en) Backup system, program and backup method
WO2015020811A1 (en) Persistent data structures
US20130339569A1 (en) Storage System and Method for Operating Thereof
US9087006B2 (en) Destaging cached data in multiple recurrences in a storage system
JP5012628B2 (en) Memory database, memory database system, and memory database update method
JP2010152747A (en) Storage system, cache control method and cache control program for storage
CN116069681A (en) Disk space recovery method and device, electronic equipment and storage medium
US9053033B1 (en) System and method for cache content sharing
KR101474843B1 (en) Buffer cache apparatus, journaling file system and journaling method for incorporating journaling features within non-volatile buffer cache
JP2015114750A (en) Examination program, information processing device, and information processing method
US10482013B2 (en) Eliding memory page writes upon eviction after page modification
KR100866513B1 (en) Data Process Method Using Journaling File System Based on Flash Memory
US9009416B1 (en) System and method for managing cache system content directories

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
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: 20180614

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20181217

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20191001

Year of fee payment: 6