KR100908637B1 - How to manage data in flash memory - Google Patents

How to manage data in flash memory Download PDF

Info

Publication number
KR100908637B1
KR100908637B1 KR1020070102197A KR20070102197A KR100908637B1 KR 100908637 B1 KR100908637 B1 KR 100908637B1 KR 1020070102197 A KR1020070102197 A KR 1020070102197A KR 20070102197 A KR20070102197 A KR 20070102197A KR 100908637 B1 KR100908637 B1 KR 100908637B1
Authority
KR
South Korea
Prior art keywords
page
data
buffer
flash memory
empty space
Prior art date
Application number
KR1020070102197A
Other languages
Korean (ko)
Other versions
KR20090036900A (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 KR1020070102197A priority Critical patent/KR100908637B1/en
Publication of KR20090036900A publication Critical patent/KR20090036900A/en
Application granted granted Critical
Publication of KR100908637B1 publication Critical patent/KR100908637B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • 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/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Read Only Memory (AREA)

Abstract

플래시 메모리의 데이터를 관리하기 위한 방법이 개시된다. 플래시 메모리의 페이지에 프로그래밍하는 횟수를 최소화하기 위해 버퍼 상에 할당된 각각의 페이지에는 우선순위 플래그가 부여된다. 우선순위 플래그의 부여에 의해 각각의 페이지는 데이터의 기록이 가능한 경우와 기록이 불가능하여 추방 가능한 페이지로 구분된다. 또한, 빈 공간 리스트에 새롭게 추가되는 페이지는 빈 공간 리스트의 첫 번째 페이지로 설정되지 아니한다. 따라서 데이터가 기록되는 페이지에는 빈 공간이 존재하지 않을 때까지 데이터의 기록이 가능해진다. 빈 공간이 존재하지 않는 페이지에는 구별되는 우선순위 플래그가 설정되고, 이후의 동작에 의해 버퍼로부터 추방된다.A method for managing data in flash memory is disclosed. Priority flags are assigned to each page allocated on the buffer to minimize the number of programming times of pages in flash memory. By assigning a priority flag, each page is classified into a case where data can be recorded and a page that cannot be written and can be deported. Also, a page newly added to the empty space list is not set as the first page of the empty space list. Therefore, data can be recorded until there is no empty space in the page where the data is recorded. A distinct priority flag is set for a page where no free space exists and is expelled from the buffer by subsequent operations.

Description

플래시 메모리의 데이터 관리방법{Method of Managing Data of Flash Memory}Data management method of flash memory {Method of Managing Data of Flash Memory}

본 발명은 플래시 메모리의 데이터를 관리하기 위한 방법에 관한 것으로, 더욱 상세하게는 데이터의 갱신 시에 최소한의 프로그래밍 동작을 통해 데이터를 관리할 수 있는 방법에 관한 것이다.The present invention relates to a method for managing data in a flash memory, and more particularly, to a method for managing data through a minimal programming operation at the time of data update.

플래시 메모리는 비휘발성 메모리(nonvolatile memory)의 일종으로 전원이 차단되는 경우에도 저장된 데이터가 소멸하지 않는 특성을 가진다. 이러한, 플래시 메모리는 그 구조상 낸드 플래시 메모리와 노아 플래시 메모리로 구분된다.The flash memory is a kind of nonvolatile memory, and the stored data does not disappear even when power is cut off. Such a flash memory is divided into NAND flash memory and Noah flash memory.

특히, 낸드 플래시 메모리는 셀 어레이로 구성되며, 셀 어레이는 다수의 블록들로 구성된다. 또한, 각각의 블록은 다수의 페이지로 이루어진다. 플래시 메모리의 동작은 크게 읽기, 프로그래밍, 소거 동작으로 나누어진다. 특히, 낸드 플래시 메모리는 그 하드웨어적인 구조상, 소거 동작은 블록 단위로 이루어지며, 프로그래밍 및 읽기 동작은 페이지 단위로 이루어진다. 즉, 소거 동작과 프로그래밍 동작은 그 단위가 서로 상이하므로 이에 관련된 데이터의 관리가 별도로 이루어진다. 예컨대, 플래시 메모리를 하드디스크처럼 사용하기 위해서는, 기록되는 데이터의 물리적 어드레스와 논리적 어드레스를 독립적으로 관리하는 어드레스 매핑 동작 등이 요구된다. In particular, the NAND flash memory consists of a cell array, and the cell array consists of a plurality of blocks. In addition, each block consists of a plurality of pages. Flash memory operation is divided into read, program, and erase operations. In particular, in the hardware structure of the NAND flash memory, erase operations are performed in units of blocks, and programming and read operations are performed in units of pages. That is, since the erase operation and the programming operation are different from each other, management of data related thereto is performed separately. For example, in order to use a flash memory as a hard disk, an address mapping operation for managing physical and logical addresses of data to be recorded independently is required.

또한, 낸드 플래시 메모리의 경우, 프로그래밍은 Hot-Carrier Injection을 통해 이루어지고, 소거동작은 F-N(Fowler-Nordheim) Tunneling 현상을 이용하여 이루어진다. 또한, 읽기 연산은 각각의 셀의 문턱전압의 변화를 감지하는 것을 통해 이루어진다. 따라서 프로그래밍 동작은 읽기 연산에 비해 속도가 느린 특성을 가진다.In addition, in the case of NAND flash memory, programming is performed through hot-carrier injection, and erasing is performed by using a Fowler-Nordheim (F-N) tunneling phenomenon. In addition, the read operation is performed by detecting a change in the threshold voltage of each cell. Therefore, the programming operation is slower than the read operation.

만일, 플래시 메모리에 데이터를 갱신하고자 하는 경우, 기존의 DRAM과는 달리 소거 동작이 먼저 수행되어야 한다. 즉, 새로운 데이터로 기존의 페이지를 갱신하고자 하는 경우, 기존의 데이터가 프로그램 된 페이지가 속한 블록을 소거하고, 해당하는 페이지에 새로운 데이터를 프로그래밍 하여야 한다. 특히, 소거 동작은 플래시 메모리의 구조상 오버헤드가 매우 큰 동작이다. 통상의 경우, 플래시 메모리의 제조사가 보장하는 소거 연산의 횟수는 10만 번 이하로 제한된다. 이러한 소거 연산을 최소화하여 플래시 메모리의 동작 수명을 향상시키기 위해서는, 프로그래밍 동작의 횟수가 감소되어야 한다. 이는 일반적으로 프로그래밍 이전에 소거 동작이 선행되어야 하기 때문이다.If data is to be updated in a flash memory, an erase operation must be performed first, unlike a conventional DRAM. That is, when updating an existing page with new data, it is necessary to erase the block to which the page in which the existing data is programmed belongs and program the new data in the corresponding page. In particular, the erase operation is an operation in which the overhead of the flash memory is very large. In general, the number of erase operations guaranteed by the manufacturer of the flash memory is limited to 100,000 or less. In order to minimize such erase operations to improve the operating life of the flash memory, the number of programming operations should be reduced. This is generally because an erase operation must be preceded before programming.

플래시 메모리에 저장되는 데이터의 관리 방법은 데이터의 삽입, 삭제, 배치 등을 결정하는 자료구조이다. 이러한 데이터의 관리 방법으로는 논-클러스터링 방법(non-clustering method)이 있다. 논-클러스터링 방법은 기록되는 데이터의 키 값을 고려하지 않고, 빈 공간이 존재하는 페이지에 데이터를 저장하는 방법이다. 일반적으로 빈 공간이 존재하는 것으로 판정된 페이지들 중 첫 번째 페이지에 데이터는 저장된다. 또한, 빈 공간이 존재하는 것으로 판정된 페이지들은 빈 공간 리스트(free space list)에 의해 관리된다.The data management method stored in the flash memory is a data structure that determines the insertion, deletion, placement, and the like of data. There is a non-clustering method of managing such data. The non-clustering method is a method of storing data in a page in which empty space exists without considering key values of data to be recorded. In general, data is stored in the first page of pages in which empty space is determined to exist. In addition, pages determined to have free space are managed by a free space list.

도 1은 종래의 빈 공간 리스트를 설명하기 위한 개념도이다.1 is a conceptual diagram illustrating a conventional empty space list.

도 1을 참조하면, 빈 공간 리스트에 의해 관리되는 페이지는 페이지 1, 페이지 2, 페이지 3 및 페이지 4의 순으로 이루어진다. 만일, 페이지 1에 저장된 데이터가 삭제되는 경우, 페이지 1에는 새로운 빈 공간이 발생한다. 따라서 페이지 1은 빈 공간 리스트에 추가되어야 한다. 이 때, 페이지 1은 빈 공간 리스트의 시작 부분에 추가된다. 또한, 새로운 데이터가 추가되는 경우, 추가되는 데이터는 빈 공간 리스트의 첫 번째 페이지인 페이지 1에 저장된다.Referring to FIG. 1, the pages managed by the empty space list are in the order of page 1, page 2, page 3, and page 4. If data stored in page 1 is deleted, new empty space is generated in page 1. Therefore, page 1 should be added to the empty space list. Page 1 is then added to the beginning of the free space list. Also, when new data is added, the added data is stored in page 1, which is the first page of the empty space list.

도 2는 데이터의 삽입이 있는 경우, 종래의 논-클러스터링 방법을 설명하기 위한 프로우 차트이다.2 is a flowchart for explaining a conventional non-clustering method when there is an insertion of data.

도 2를 참조하면, 삽입될 데이터가 발생(S10)하면, 새로운 데이터가 삽입될 페이지가 버퍼 상에 존재하는 지를 확인한다(S20). 상기 버퍼는 프로세서와 메모리 사이의 속도차이를 보완해주는 역할을 수행한다. 따라서 컴퓨터의 메인 메모리의 일부 영역을 버퍼로 사용하거나, 플래시 메모리 내에 별도로 추가된 메모리를 버퍼로 사용할 수 있다.Referring to FIG. 2, when data to be inserted is generated (S10), it is checked whether a page into which new data is to be inserted exists in the buffer (S20). The buffer serves to compensate for the speed difference between the processor and the memory. Therefore, a portion of the main memory of the computer may be used as a buffer, or a memory added separately in the flash memory may be used as a buffer.

또한, 버퍼 상에 존재하는 페이지는 플래시 메모리의 실제 페이지가 버퍼 상에 존재하는 것이 아니라, 플래시 메모리의 해당하는 페이지를 구성하는 특정 어드레스 및 상기 특정 어드레스에 저장된 데이터를 지칭한다. 즉, 버퍼는 실제 플래시 메모리의 페이지에 데이터를 기록하기 위해 해당하는 페이지의 어드레스에 적합한 데이터를 추가하거나, 삭제한다.In addition, the page present on the buffer refers to the specific address constituting the corresponding page of the flash memory and the data stored in the specific address, rather than the actual page of the flash memory on the buffer. That is, the buffer adds or deletes data appropriate to the address of the corresponding page in order to write data to the page of the actual flash memory.

이어서, 해당하는 페이지가 버퍼 상에 존재하는 경우, 별도의 처리 과정 없이 페이지에 새로운 데이터를 저장한다(S30). Subsequently, when the corresponding page exists in the buffer, new data is stored in the page without additional processing (S30).

만일 해당하는 페이지가 버퍼에 존재하지 않는 경우, 버퍼에 페이지를 올리는 과정이 필요하다. 즉, 메모리의 페이지가 가지는 용량을 버퍼에서 설정하는 과정이 필요하다. 이 때, 버퍼에 해당하는 페이지를 설정할 수 있는 공간이 있는지를 판단한다(S40). If the corresponding page does not exist in the buffer, it is necessary to load the page in the buffer. In other words, it is necessary to set the capacity of the memory page in the buffer. At this time, it is determined whether there is a space for setting a page corresponding to the buffer (S40).

만일, 버퍼에 해당하는 페이지를 설정할 공간이 충분한 경우, 해당하는 페이지를 버퍼에 설정하고(S50), 새로운 데이터를 페이지에 기록한다(S30).If there is enough space to set the page corresponding to the buffer, the corresponding page is set in the buffer (S50), and new data is written to the page (S30).

만일, 버퍼에 충분한 공간이 존재하지 않는 경우, 버퍼에 여유 공간을 확보하기 위해 특정의 페이지를 버퍼로부터 추방(flush)하는 과정이 필요하다. 추방을 위해서는 먼저 추방될 페이지를 선택하는 동작이 선행되어야 한다. 이처럼 추방될 페이지를 선택하는 알고리즘을 버퍼 교체 알고리즘(buffer replacement algorithm)이라 하고, 추방되는 페이지를 희생자(victim) 페이지라 한다. 희생자 페이지를 선정한 경우(S60), 희생자 페이지에 내용의 변경이 있는지를 확인한다(S70).If there is not enough space in the buffer, a process of flushing a specific page from the buffer is necessary to free up space in the buffer. In order to be deported, an operation of selecting a page to be deported must first be performed. The algorithm for selecting a page to be deported is called a buffer replacement algorithm, and the deported page is called a victim page. When the victim page is selected (S60), it is checked whether the contents of the victim page are changed (S70).

만일, 희생자 페이지에 내용의 변경이 없으면, 버퍼에서 희생자 페이지를 추방하고, 새로운 페이지를 버퍼에 설정한다(S50).If there is no change in the content of the victim page, the victim page is expelled from the buffer and a new page is set in the buffer (S50).

또한, 버퍼 교체 알고리즘을 통해 선택된 희생자 페이지에 내용의 변경이 있는 경우, 희생자 페이지의 데이터는 프로그래밍 동작을 통해 플래시 메모리의 해당 하는 페이지에 기록된다(S80). 플래시 메모리에 희생자 페이지의 데이터가 반영된 후, 희생자 페이지는 버퍼로부터 추방되고, 버퍼에는 새로운 페이지가 할당된다(S50).In addition, when there is a change in the content of the victim page selected through the buffer replacement algorithm, the data of the victim page is recorded in the corresponding page of the flash memory through a programming operation (S80). After the data of the victim page is reflected in the flash memory, the victim page is expelled from the buffer, and a new page is allocated to the buffer (S50).

그러나 상술한 논-클러스터링 방법은 페이지에 데이터를 더 기록할 수 있음에도 불구하고, 프로그래밍 연산을 수행하는 경우가 발생한다. 이는 기존의 버퍼 교체 알고리즘이 페이지 내의 빈공간의 크기를 고려하지 않고, 빈 공간이 있음에도 불구하고 희생자 페이지로 선정하기 때문이다.However, although the non-clustering method described above can write more data to a page, a case of performing a programming operation occurs. This is because the existing buffer replacement algorithm does not consider the size of the empty space in the page and selects the victim page despite the empty space.

도 3a 내지 도 3f는 종래의 버퍼 교체 알고리즘을 통해 프로그래밍 동작을 수행하는 과정을 도시한 개념도이다.3A to 3F are conceptual views illustrating a process of performing a programming operation through a conventional buffer replacement algorithm.

도 3a를 참조하면, 버퍼(100)에 설정된 페이지 1에 데이터가 삽입된다. 즉, 플래시 메모리(120)의 페이지 1에 대한 읽기 연산을 통해, 페이지 1이 버퍼에 올라오면, 버퍼(100)에서는 데이터가 페이지 1에 삽입된다. 만일, 버퍼(100)의 페이지 1이 희생자 페이지로 선정되면, 도 3b와 같이 플래시 메모리(120)에 대한 프로그래밍 동작이 수행된다. 프로그래밍 동작이 수행되어 페이지 1의 데이터가 플래시 메모리(120)에 기록되면, 버퍼(100)에 할당된 페이지 1은 삭제된다. 만일, 페이지 3에 빈 공간이 발생되고, 이에 데이터를 기록하는 경우, 도 3c와 같이 페이지 3은 버퍼(100)로 올라온다. Referring to FIG. 3A, data is inserted into page 1 set in the buffer 100. That is, when page 1 is loaded into the buffer through a read operation on page 1 of the flash memory 120, the data is inserted into the page 1 in the buffer 100. If page 1 of the buffer 100 is selected as the victim page, a programming operation for the flash memory 120 is performed as shown in FIG. 3B. When a programming operation is performed to write data of page 1 to flash memory 120, page 1 allocated to buffer 100 is deleted. If an empty space is generated in page 3 and data is recorded therein, page 3 is loaded into the buffer 100 as shown in FIG. 3C.

또한, 페이지 1에 빈 공간이 존재하는 경우, 새로운 데이터가 페이지 1에 기록될 수 있다. 따라서 도 3d에 도시된 바와 같이 읽기 동작을 통해 플래시 메모리(120)의 페이지 1은 다시 버퍼(100)로 올라오며, 버퍼(100)의 페이지 1에는 새로 운 데이터의 기록이 수행된다. 버퍼(100)의 페이지 1에서 데이터의 저장이 수행된 후, 페이지 1이 희생자 페이지로 선정되면, 도 3e에 도시된 바와 같이 다시 페이지 1에 대한 프로그래밍 동작이 수행되어야 한다. 계속해서 도 3f처럼 페이지 3에 빈 공간이 발생되고, 해당하는 페이지에 데이터를 기록하여야 하는 경우, 플래시 메모리(120)의 페이지 3의 영역은 버퍼(100)에서 읽기 동작을 통해 설정된다.In addition, when empty space exists in page 1, new data may be recorded in page 1. Accordingly, as shown in FIG. 3D, page 1 of the flash memory 120 is returned to the buffer 100 through a read operation, and new data is written to page 1 of the buffer 100. After storing data in page 1 of buffer 100, if page 1 is selected as the victim page, a programming operation for page 1 should be performed again, as shown in FIG. 3E. Subsequently, when an empty space is generated in page 3 as shown in FIG. 3F and data must be written in the corresponding page, the area of page 3 of the flash memory 120 is set through a read operation in the buffer 100.

상술한 바와 같이, 논-클러스터링 방법에서는 데이터가 삽입되는 횟수만큼 페이지의 프로그래밍 동작이 발생할 수 있다. 이러한 잦은 프로그래밍 동작으로 인해 데이터를 버퍼에 기록하는 시간이 지연되며, 플래시 메모리에서의 소거 동작이 증가되어 플래시 메모리의 수명이 단축되는 문제가 발생된다. As described above, in the non-clustering method, a page programming operation may occur as many times as data is inserted. This frequent programming operation delays the time for writing data to the buffer and increases the erase operation in the flash memory, thereby shortening the life of the flash memory.

이를 해결하기 위해서는 데이터가 삽입되는 페이지에는 최대한 많은 데이터가 삽입되도록 한 다음, 프로그래밍 연산이 수행되는 버퍼 교체 알고리즘이 요청된다 할 것이다.To solve this problem, as much data as possible is inserted into a page into which data is inserted, and then a buffer replacement algorithm for performing a programming operation will be requested.

상술한 문제점을 해결하기 위해 본 발명의 목적은 데이터의 프로그래밍 동작 횟수를 최소화할 수 있는 플래시 메모리의 데이터 관리방법을 제공하는데 있다.An object of the present invention to solve the above problems is to provide a data management method of a flash memory that can minimize the number of programming operations of the data.

상기 목적을 달성하기 위한 본 발명은, 플래시 메모리의 페이지 할당되는 데이터를 관리하는 방법에 있어서, 버퍼 상에 할당된 페이지에 우선순위 플래그를 설정하는 단계; 상기 우선순위 플래그를 반영하여 희생자를 선정하는 단계; 및 새롭게 빈 공간이 발생한 페이지를 빈 공간 리스트의 첫 번째 페이지로의 설정을 회피하여 추가하는 단계를 포함하는 플래시 메모리의 데이터 관리 방법을 제공한다.According to an aspect of the present invention, there is provided a method of managing page-allocated data in a flash memory, the method comprising: setting a priority flag on a page allocated on a buffer; Selecting a victim by reflecting the priority flag; And a step of avoiding the setting of the newly generated empty space as the first page of the empty space list and adding the new page.

본 발명에 따르면, 프로그래밍 동작 및 소거 동작에 따른 로드가 매우 큰 플래시 메모리에서는 데이터들이 삽입되는 페이지에는 가능한 많은 데이터들이 삽입된 이후에 프로그래밍 동작이 수행되어야 한다. 따라서 각각의 페이지에 데이터의 기록에 따른 빈 공간이 발생되지 않도록 데이터를 관리한다. 이를 통하여 프로그래밍 동작의 횟수는 감소되며, 프로그래밍 횟수의 감소는 소거 동작의 감소로 이어진다. 이러한 소거 동작의 감소는 플래시 메모리의 수명을 연장시킨다.According to the present invention, a programming operation should be performed after inserting as much data as possible in a page into which data is inserted in a flash memory having a large load due to a programming operation and an erase operation. Therefore, the data is managed so that no blank space is generated in accordance with data recording on each page. This reduces the number of programming operations, and reducing the number of programming leads to the reduction of erase operations. This reduction in erase operation extends the life of the flash memory.

본 발명은 다양한 변경을 가할 수 있고 여러 가지 형태를 가질 수 있는 바, 특정 실시 예들을 도면에 예시하고 본문에 상세하게 설명하고자 한다. 그러나 이는 본 발명을 특정한 개시 형태에 대해 한정하려는 것이 아니며, 본 발명의 사상 및 기술 범위에 포함되는 모든 변경, 균등물 내지 대체물을 포함하는 것으로 이해되어야 한다. 각 도면을 설명하면서 유사한 참조부호를 유사한 구성요소에 대해 사용하였다.As the inventive concept allows for various changes and numerous embodiments, particular embodiments will be illustrated in the drawings and described in detail in the text. However, this is not intended to limit the present invention to a specific disclosed form, it should be understood to include all modifications, equivalents, and substitutes included in the spirit and scope of the present invention. In describing the drawings, similar reference numerals are used for similar elements.

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

이하, 첨부한 도면들을 참조하여, 본 발명의 바람직한 실시 예를 보다 상세하게 설명하고자 한다.Hereinafter, with reference to the accompanying drawings, it will be described in detail a preferred embodiment of the present invention.

실시예Example

본 발명에 따른 버퍼 교체 알고리즘에서는 데이터가 삽입되는 페이지에는 우선순위 플래그(priority flag)가 설정된다. 따라서 희생자 페이지의 선정 시, 우선순위 플래그를 고려한다.In the buffer replacement algorithm according to the present invention, a priority flag is set on a page into which data is inserted. Therefore, the priority flag is considered when selecting the victim page.

상기 우선순위 플래그는 데이터가 삽입되는 페이지 또는 희생자 페이지로 선택되어 추방 될 수 있는 페이지를 나타낸다. 즉, 버퍼 상에 설정된 각각의 페이지에 빈 공간이 존재하는 경우와 빈 공간이 존재하지 않는 경우를 구별하여 우선순위 플래그를 설정한다.The priority flag indicates a page into which data is inserted or a page which may be selected and deported to a victim page. That is, a priority flag is set by distinguishing between a case where an empty space exists and a case where there is no empty space in each page set on the buffer.

예컨대, 특정의 페이지에 새로운 데이터가 삽입되는 경우, 해당하는 페이지의 우선순위 플래그는 1로 설정된다. 우선순위 플래그가 1로 설정된 페이지는 희생자 페이지를 선택하는 과정에서 제외된다. 만일 해당 페이지에 더 이상 데이터를 삽입할 수 있는 공간이 없는 경우에는 해당 페이지의 우선순위 플래그는 0으로 설정된다. 우선순위 플래그가 0으로 설정된 페이지는 버퍼의 공간에 여유가 없는 상태에서 새로운 페이지를 할당하여야 하는 경우, 버퍼로부터 추방된다.For example, when new data is inserted into a specific page, the priority flag of the corresponding page is set to one. The page with the priority flag set to 1 is excluded in the process of selecting the victim page. If there is no more space for inserting data on the page, the priority flag of the page is set to zero. A page whose priority flag is set to 0 is expelled from the buffer when it is necessary to allocate a new page without sufficient space in the buffer.

또한, 빈 공간 리스트에 새로운 페이지가 추가되는 경우, 빈 공간 리스트의 시작 부분을 제외한 다른 부분에 새로운 페이지가 추가된다. In addition, when a new page is added to the free space list, a new page is added to a portion other than the beginning of the free space list.

도 4a 내지 도 4c는 본 발명의 바람직한 실시 예에 따라 버퍼 교체 알고리즘을 이용한 빈 공간 리스트의 관리방법을 도시한 개념도들이다.4A to 4C are conceptual views illustrating a method of managing an empty space list using a buffer replacement algorithm according to an exemplary embodiment of the present invention.

도 4a를 참조하면, 먼저 페이지 1(200)이 빈 공간 리스트의 시작 부분에 해당한다. 또한, 페이지 1(200)에 이어서 페이지 7(210)이 빈 공간 리스트에 의해 관리된다.Referring to FIG. 4A, first, page 1 200 corresponds to the beginning of an empty space list. Also, page 7 (200) is followed by page 7 (210) by the empty space list.

도 4b를 참조하면, 페이지 3에 새롭게 빈 공간이 발생하는 경우, 페이지 3(220)은 빈 공간 리스트에 추가되어야 한다. 추가되는 페이지 3(220)은 빈 공간 리스트의 시작 부분에 삽입되지 아니하고, 다른 부분에 삽입된다. 예컨대, 상기 도 4b에서는 리스트의 두 번째에 삽입된다. Referring to FIG. 4B, if a new empty space occurs on page 3, page 3 220 should be added to the empty space list. The added page 3 220 is not inserted at the beginning of the empty space list, but is inserted at another portion. For example, in FIG. 4B, the second page is inserted into the second list.

도 4c를 참조하면, 새로운 데이터가 삽입되는 경우, 데이터의 삽입은 빈 공간 리스트에서 첫 번째 페이지인 페이지 1(200)에서 발생된다. 따라서 페이지 1(200)에 새로운 데이터가 모두 기록되어 페이지 1(200)에 빈 공간이 존재하지 않을 때까지, 데이터의 기록은 계속된다. 또한, 데이터의 삽입에 의해 페이지 1(200)에 빈 공간이 존재하지 않으면, 페이지 1(200)의 우선순위 플래그는 0으로 설정된다.Referring to FIG. 4C, when new data is inserted, insertion of data occurs at page 1 200, which is the first page in the empty space list. Therefore, recording of data continues until all new data is written to page 1 200 and there is no empty space on page 1 200. In addition, if there is no empty space in the page 1 200 due to the insertion of data, the priority flag of the page 1 200 is set to zero.

또한, 버퍼 교체 알고리즘은 빈 공간이 발생된 페이지를 버퍼 상에 어떻게 설정하는가에 대한 것이다.Also, the buffer replacement algorithm is about how to set the page on which the empty space is generated on the buffer.

만일, 데이터를 기록하기 위해 새로운 페이지가 버퍼에 할당되어야 하는 경우, 먼저 버퍼에 새로운 페이지를 올릴 공간이 있는 지를 확인한다.If a new page needs to be allocated to the buffer to record data, first check whether there is room for the new page in the buffer.

새로운 페이지를 올릴 공간이 있는 경우에는 빈 공간 리스트의 시작 부분의 페이지를 버퍼에 올린다. If there is space for a new page, the page at the beginning of the free space list is buffered.

또한, 새로운 페이지를 버퍼에 올릴 공간이 부족한 경우, 버퍼 교체 알고리즘을 수행하여 희생자 페이지를 선정한다. In addition, when there is not enough space to put a new page in the buffer, a buffer replacement algorithm is performed to select the victim page.

상기 버퍼 교체 알고리즘에서 우선순위 플래그가 0인 페이지는 버퍼로부터 추방된다. 즉, 우선순위 플래그가 0인 페이지는 플래시 메모리에 프로그래밍 되고, 새로운 페이지는 추방된 페이지를 대체하여 할당된다. 우선순위가 플래그가 0인 페이지는 데이터가 기록되는 페이지가 아니거나 페이지 내에 데이터가 삽입될 빈 공간이 존재하지 않는 페이지이다. In the buffer replacement algorithm, pages with a priority flag of 0 are expelled from the buffer. That is, a page with a priority flag of zero is programmed in flash memory, and a new page is allocated to replace the deported page. A page whose priority is flag 0 is not a page in which data is written or a page in which there is no empty space in which data is inserted.

만일, 새로운 페이지에 데이터가 삽입되어야 하는 경우, 추방된 페이지를 대체하여 할당되는 새로운 페이지는 빈 공간 리스트의 시작 부분에서 할당된다. If data is to be inserted into a new page, a new page allocated in place of the deported page is allocated at the beginning of the free space list.

따라서 기존의 빈 공간 리스트에서 시작 부분의 페이지에 데이터의 삽입이 일어나고, 시작 부분의 페이지에 빈 공간이 존재하는 경우, 시작 부분의 페이지에는 다른 데이터가 기록될 수 있다. 즉, 시작 부분의 페이지에 빈 공간이 존재하지 않을 때까지 데이터의 기록이 수행되며, 빈 공간이 존재하지 않은 경우에는 우선순위 플래그는 0으로 설정된다.Therefore, when data is inserted into the starting page in the existing empty space list and empty space exists in the starting page, other data may be recorded in the starting page. That is, data recording is performed until there is no empty space in the start page, and when no empty space exists, the priority flag is set to zero.

특히, 도 4c에 도시된 바와 같이, 페이지 1(200)에 새로운 데이터를 삽입하는 과정에서, 페이지 3(220)에 빈 공간이 발생하는 경우, 페이지 3(220)은 빈 공간 리스트의 시작 부분에 삽입되지 않으므로, 빈 공간 리스트의 시작 부분인 페이지 1(200)에는 지속적인 데이터의 삽입이 가능해진다. In particular, as shown in FIG. 4C, in the case of inserting new data into page 1 200, if blank space occurs in page 3 220, page 3 220 is located at the beginning of the free space list. Since it is not inserted, page 1 (200), which is the beginning of the empty space list, allows continuous insertion of data.

종래의 경우, 페이지 3(220)에 빈 공간이 발생하면, 페이지 3(220)이 빈 공간 리스트의 시작 부분으로 설정되고, 페이지 3(220)에서 데이터의 삽입이 발생한다. 따라서 이전의 시작 페이지인 페이지 1(200)에 빈 공간이 있음에도 불구하고 새로운 데이터가 페이지 1(200)에 더 이상 기록되지 아니하고, 우선순위 플래그가 1로 설정되는 문제가 발생하였다. 그러나 본 발명에 따를 경우, 빈 공간이 발생된 페이지는 리스트의 중간에 삽입되므로, 기록중이거나 기록예정인 페이지에서는 빈 공간이 존재하지 않을 때까지 지속적인 데이터의 기록이 가능해진다.In the conventional case, if a blank space occurs in page 3 220, page 3 220 is set as the beginning of the free space list, and insertion of data occurs in page 3 220. Therefore, although there is a blank space in the previous start page, page 1 (200), there is a problem that the new data is no longer written to the page 1 (200), the priority flag is set to 1. However, according to the present invention, the page in which the empty space is generated is inserted in the middle of the list, so that in the page being recorded or to be recorded, continuous data can be recorded until there is no empty space.

이후에, 우선순위 플래그가 0로 설정되고, 빈 공간이 존재하지 않는 페이지는 버퍼 교체 알고리즘을 통해 희생자 페이지로 선정된다. 희생자 페이지로 선정된 빈 공간이 존재하지 않는 페이지는 프로그래밍 동작을 통해 플래시 메모리에 기록된다. 따라서 종래에 비해 빈번한 프로그래밍 동작에 의한 플래시 메모리의 수명 단축은 방지된다.Afterwards, the priority flag is set to 0, and pages without empty space are selected as victim pages through a buffer replacement algorithm. Pages with no free space selected as victim pages are written to flash memory through a programming operation. Therefore, the shortening of the life of the flash memory due to the frequent programming operation is prevented as compared with the related art.

또한, 본 실시 예에서는 우선순위 플래그를 데이터가 삽입되는 페이지의 상태에 따라 0과 1의 두 가지 등급으로만 구별하였다. 그러나 우선순위를 부여하는 기준을 달리하고, 기준에 따라 여러 단계의 우선순위를 부여하는 것도 가능하다. 특히, 각 페이지 그룹의 최상위 페이지인 루트 페이지에 대해서 최상의 등급을 부여하고, 차상위의 페이지에 대해서는 차상의 등급을 부여하는 방법을 통해, 우선순위에 따라 버퍼 교체 알고리즘을 적용할 수도 있다. In addition, in the present embodiment, the priority flag is distinguished into only two classes, 0 and 1, according to the state of the page into which data is inserted. However, it is possible to vary the criteria for assigning priorities, and to assign several levels of priority according to the criteria. In particular, the buffer replacement algorithm may be applied according to the priority by assigning the highest rank to the root page, which is the top page of each page group, and the next rank of the next higher page.

상술한 바와 같이, 버퍼에 할당된 각각의 페이지에 대해 우선순위 플래그를 설정하고, 새로이 빈 공간이 발생된 페이지를 빈 공간 리스트에서 첫 번째 페이지 이외의 리스트에 삽입하는 경우, 새로운 데이터를 기록하는 페이지는 변경되지 아니하고, 빈 공간이 없어질 때까지 기록할 수 있는 이점이 있으며, 데이터의 삽입마다 발생하는 페이지의 프로그래밍 및 이에 따른 소거 동작의 횟수는 최소화될 수 있다. 따라서 빈번한 소거 동작에 의한 플래시 메모리의 수명 저하가 개선된다.As described above, when a priority flag is set for each page allocated to the buffer, and a new page is inserted into a list other than the first page in the free space list, a page for recording new data Is not changed, and there is an advantage that the data can be recorded until there is no empty space, and the number of times of programming and subsequent erasing operation of the page occurring every insertion of data can be minimized. Therefore, the deterioration of the life of the flash memory due to frequent erase operations is improved.

도 1은 종래의 빈 공간 리스트를 설명하기 위한 개념도이다.1 is a conceptual diagram illustrating a conventional empty space list.

도 2는 데이터의 삽입이 있는 경우, 종래의 논-클러스터링 방법을 설명하기 위한 프로우 차트이다.2 is a flowchart for explaining a conventional non-clustering method when there is an insertion of data.

도 3a 내지 도 3f는 종래의 버퍼 교체 알고리즘을 통해 프로그래밍 동작을 수행하는 과정을 도시한 개념도이다.3A to 3F are conceptual views illustrating a process of performing a programming operation through a conventional buffer replacement algorithm.

도 4a 내지 도 4c는 본 발명의 바람직한 실시 예에 따라 버퍼 교체 알고리즘을 이용한 빈 공간 리스트의 관리방법을 도시한 개념도들이다.4A to 4C are conceptual views illustrating a method of managing an empty space list using a buffer replacement algorithm according to an exemplary embodiment of the present invention.

Claims (5)

플래시 메모리의 페이지 할당되는 데이터를 관리하는 방법에 있어서, In the method for managing page-allocated data of flash memory, 버퍼 상에 할당된 페이지에 우선순위 플래그를 설정하는 단계; Setting a priority flag on a page allocated on the buffer; 상기 우선순위 플래그를 반영하여 희생자 페이지를 선정하는 단계;Selecting a victim page by reflecting the priority flag; 상기 희생자 페이지에 기록된 데이터를 상기 플래시 메모리에 프로그래밍하고, 상기 희생자 페이지를 상기 버퍼로부터 추방하는 단계; 및 Programming data written to the victim page into the flash memory and expelling the victim page from the buffer; And 빈 공간 리스트에서 첫 번째 페이지 이외의 공간에 상기 플래시 메모리의 페이지를 상기 버퍼에 할당하는 단계를 포함하되, 상기 첫 번째 페이지는 데이터가 기록될 공간이 없을 때까지 수행되고, 상기 버퍼에 새롭게 할당되는 페이지는 데이터가 기록될 수 있는 저장 공간을 가지는 것을 특징으로 하는 플래시 메모리의 데이터 관리방법.Allocating a page of the flash memory to the buffer in a space other than the first page in an empty space list, wherein the first page is performed until there is no space to write data, and is newly allocated to the buffer. And a page has a storage space in which data can be written. 제1항에 있어서, 상기 우선순위 플래그는, The method of claim 1, wherein the priority flag, 상기 버퍼 상의 페이지에 빈 공간이 존재하는 경우 및 상기 버퍼 상의 페이지에 빈 공간이 존재하지 않는 경우로 나누어 다른 값으로 설정되는 것을 특징으로 하는 플래시 메모리의 데이터 관리방법.And a case in which empty space exists in a page on the buffer and a case in which empty space does not exist in a page on the buffer. 삭제delete 제1항에 있어서, 상기 우선순위 플래그가 빈 공간이 없는 페이지를 나타내는 경우, 빈 공간 리스트로부터 추방되는 것을 특징으로 하는 플래시 메모리의 데이터 관리방법.The data management method of claim 1, wherein when the priority flag indicates a page having no empty space, the priority flag is expelled from the empty space list. 제4항에 있어서, 상기 빈 공간 리스트로부터의 추방은 상기 빈 공간이 없는 페이지의 데이터를 플래시 메모리에 프로그래밍 하는 것을 특징으로 하는 플래시 메모리의 데이터 관리방법.The method of claim 4, wherein the expulsion from the free space list comprises programming data of a page having no free space into a flash memory.
KR1020070102197A 2007-10-10 2007-10-10 How to manage data in flash memory KR100908637B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020070102197A KR100908637B1 (en) 2007-10-10 2007-10-10 How to manage data in flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020070102197A KR100908637B1 (en) 2007-10-10 2007-10-10 How to manage data in flash memory

Publications (2)

Publication Number Publication Date
KR20090036900A KR20090036900A (en) 2009-04-15
KR100908637B1 true KR100908637B1 (en) 2009-07-21

Family

ID=40761733

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020070102197A KR100908637B1 (en) 2007-10-10 2007-10-10 How to manage data in flash memory

Country Status (1)

Country Link
KR (1) KR100908637B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI557744B (en) * 2015-01-27 2016-11-11 緯創資通股份有限公司 Data storing method and embedded system

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101144321B1 (en) * 2010-10-04 2012-05-11 주식회사 알티베이스 Methods of managing buffer cache using solid state disk as an extended buffer and apparatuses for using solid state disk as an extended buffer

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040054352A (en) * 2002-12-18 2004-06-25 한국전자통신연구원 Apparatus and method for controlling memory allocation for variable sized packets
KR20070068796A (en) * 2005-12-27 2007-07-02 삼성전자주식회사 Storage apparatus using non volatile memory and method for managing the same

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040054352A (en) * 2002-12-18 2004-06-25 한국전자통신연구원 Apparatus and method for controlling memory allocation for variable sized packets
KR20070068796A (en) * 2005-12-27 2007-07-02 삼성전자주식회사 Storage apparatus using non volatile memory and method for managing the same

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI557744B (en) * 2015-01-27 2016-11-11 緯創資通股份有限公司 Data storing method and embedded system

Also Published As

Publication number Publication date
KR20090036900A (en) 2009-04-15

Similar Documents

Publication Publication Date Title
US7882300B2 (en) Apparatus and method for managing nonvolatile memory
KR100849221B1 (en) Method for managing non-volatile memory, and memory-based apparatus including the non-volatile memory
US11704239B2 (en) Garbage collection method for storage medium, storage medium, and program product
US7562202B2 (en) Systems, methods, computer readable medium and apparatus for memory management using NVRAM
JP5571691B2 (en) Maintaining mapping address tables in storage
US8180955B2 (en) Computing systems and methods for managing flash memory device
EP2200045A1 (en) Method of updating contents of a multibit flash memory
US20080091901A1 (en) Method for non-volatile memory with worst-case control data management
US20080091871A1 (en) Non-volatile memory with worst-case control data management
US10073771B2 (en) Data storage method and system thereof
KR20080037282A (en) Hybrid-flash memory device and method for assigning reserved blocks therof
JP4682261B2 (en) Method for non-volatile memory and class-based update block replacement rules
JP5570406B2 (en) Memory controller and data recording apparatus
US8271721B2 (en) Data writing method and data storage device
KR100908637B1 (en) How to manage data in flash memory
CN113010111A (en) SSD access acceleration method and device, computer equipment and storage medium
KR100998212B1 (en) Method for buffer access of nand flash menory
US10877698B2 (en) Semiconductor device for managing cold addresses of nonvolatile memory device
US8429366B2 (en) Device and method for memory control and storage device
KR100859989B1 (en) Apparatus for managing space information of flash memory and method of the same
US20240143223A1 (en) Storage device and method of operating the same
US8838878B2 (en) Method of writing to a NAND memory block based file system with log based buffering
JP2005174468A (en) Access control method of flash memory
KR100876148B1 (en) Flash memory management device and method
CN117251108A (en) SLC cache allocation method and device based on solid state disk and computer equipment

Legal Events

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

Payment date: 20130701

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20140624

Year of fee payment: 6

LAPS Lapse due to unpaid annual fee