KR20080038613A - The method of managing flash memory - Google Patents

The method of managing flash memory Download PDF

Info

Publication number
KR20080038613A
KR20080038613A KR1020060105732A KR20060105732A KR20080038613A KR 20080038613 A KR20080038613 A KR 20080038613A KR 1020060105732 A KR1020060105732 A KR 1020060105732A KR 20060105732 A KR20060105732 A KR 20060105732A KR 20080038613 A KR20080038613 A KR 20080038613A
Authority
KR
South Korea
Prior art keywords
block
physical
logical
flash memory
super block
Prior art date
Application number
KR1020060105732A
Other languages
Korean (ko)
Other versions
KR100868674B1 (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 KR1020060105732A priority Critical patent/KR100868674B1/en
Publication of KR20080038613A publication Critical patent/KR20080038613A/en
Application granted granted Critical
Publication of KR100868674B1 publication Critical patent/KR100868674B1/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/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0638Combination of memories, e.g. ROM and RAM such as to permit replacement or supplementing of words in one module by words in another module
    • 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/06Addressing a physical block of locations, e.g. base addressing, module addressing, memory dedication
    • G06F12/0646Configuration or reconfiguration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1847File system types specifically adapted to static storage, e.g. adapted to flash memory or SSD

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

A method for managing a flash memory is provided to reduce a required memory amount of an address table for remapping, manage the flash memory efficiently by remapping data of a physical block to a logical block, and manage remapping information in the flash memory without any additional device. A super logical block including more than one logical block is generated. Pages of the logic block included in the super logical block are remapped to a physical block included in a super physical block. Remapping information for the pages of the logical block included in the super logical block is stored to a flash memory together with data by checking whether the remapping information for the logical block is stored in a ram, finding a location of the remapping information when the remapping information is not found, reading the remapping information stored in the found location, and storing the read remapping information to the RAM.

Description

플래시메모리 관리방법 {THE METHOD OF MANAGING FLASH MEMORY}How to manage flash memory {THE METHOD OF MANAGING FLASH MEMORY}

도 1은 본 발명의 일 실시 예에 따른 플래시메모리 관리방법에 기초한 시스템의 블록도를 나타낸 도면.1 is a block diagram of a system based on a flash memory management method according to an embodiment of the present invention;

도 2는 본 발명의 일 실시 예에 따른 플래시메모리 관리방법에 있어서의 슈퍼블록을 설명하기 위한 도면. 2 is a diagram illustrating a superblock in a flash memory management method according to an exemplary embodiment of the present invention.

도 3은 본 발명의 일 실시 예에 따른 플래시메모리 관리방법에 있어서의 재사상 방법을 설명하기 위한 도면.3 is a view for explaining a re-imaging method in a flash memory management method according to an embodiment of the present invention.

도 4는 도 3의 재사상 방법에 대한 구체적인 예를 나타낸 도면.4 is a view showing a specific example of the re-imaging method of FIG.

도 5는 본 발명에 따른 플래시 메모리에 데이터와 함께 저장되는 재사상 정보의 구조를 나타낸 도면.5 is a diagram illustrating a structure of re-imaging information stored together with data in a flash memory according to the present invention.

도 6은 덮어쓰기 빈도가 비슷한 페이지들을 특정 물리 블록으로 모으는 방법을 설명하기 위한 도면.FIG. 6 is a diagram for explaining a method of collecting pages having similar overwriting frequencies into specific physical blocks. FIG.

본 발명은 플래시메모리 관리방법에 관한 것이다.The present invention relates to a flash memory management method.

플래시메모리는 전기적으로 데이터를 지우거나 쓸 수 있는 비휘발성 기억소자이다. 마그네틱 디스크 메모리를 기반으로 한 저장장치에 비해 플래시메모리를 기반으로 한 저장장치는 전력소모가 적으며 크기가 작아서 마그네틱 디스크 메모리의 대안으로서 연구 및 개발이 활발하게 진행되고 있다. 특히, 플래시 메모리는 디지털 카메라, 모바일 폰, PDA(Personal Digital Assistant)와 같은 모바일 컴퓨팅 기기를 위한 저장장치로서 각광받을 것이 예상된다.Flash memory is a nonvolatile memory device that can erase or write data electrically. Compared to magnetic disk memory-based storage devices, flash memory-based storage devices consume less power and are smaller in size, and are being actively researched and developed as an alternative to magnetic disk memory. In particular, flash memory is expected to be in the spotlight as storage for mobile computing devices such as digital cameras, mobile phones, and personal digital assistants (PDAs).

그러나, 플래시메모리는 데이터의 덮어쓰기가 자유로운 마그네틱 디스크 메모리와 달리 데이터의 덮어쓰기가 불가능하다. 플래시메모리에 데이터를 덮어쓰기 위해서는 먼저 데이터를 지워야한다. 즉, 메모리 셀들을 쓰기 가능한 초기상태로 되돌려놓아야 한다. 이러한 작업을 지우기(erase)라고 한다. 지우기는 일반적으로 쓰기에 비해 매우 긴 시간이 소요된다. 더욱이, 지우기는 쓰기보다 훨씬 큰 블록 단위로 수행되기 때문에 쓰기가 요청되지 않은 부분까지 함께 지워지는 결과를 초래할 수 있다. 부득이하게 지워진 부분은 다시 쓰기를 통해 복원되어야 하므로 최악의 경우 데이터 하나의 쓰기 요청이 하나의 지우기와 지워진 단위만큼의 쓰기를 필요로 하게 된다. 이와 같이 지우기와 쓰기의 실행 단위의 불일치로 인해 쓰기의 수행 성능은 읽기의 그것에 비해 현저히 떨어지며, 심지어 기계동작으로 인한 필연적인 지연을 수반하게 되는 마그네틱 디스크 기반의 저장장치의 그것보다 낮다. 따라서 플래시 메모리를 기반으로 한 저장장치의 설계에 있어서 쓰기의 성능개선은 핵심기술에 해당된다.However, unlike a magnetic disk memory in which a flash memory is free to overwrite data, the flash memory cannot be overwritten. To overwrite the data in the flash memory, you must first erase the data. That is, the memory cells must be returned to the initial state in which they can be written. This operation is called erasing. Erasing generally takes much longer than writing. Moreover, since the erasure is performed in units of blocks larger than the write, it may result in erasing even the portion where the write is not requested. Inevitable erasure must be restored by writing back, so in the worst case, a write request for one data requires one erase and one write for the erased unit. As such, the performance of writes is significantly lower than that of reads due to mismatches in the execution units of erase and writes, and even lower than that of magnetic disk-based storage, which inevitably incurs delays due to machine operation. Therefore, the improvement of write performance is a key technology in the design of storage devices based on flash memory.

미국특허 No. 5,845,313은 저장장치를 초기화할 때 플래시메모리에 저장된 논리적 주소를 스캐닝하여 별도의 RAM에 직접 주소 변환을 수행할 수 있는 선형적 인 주소변환 테이블을 구축하는 방법을 제시하고 있다. 그러나 주소변환 테이블을 저장하기 위해서는 대용량 RAM이 필요하다. 예를 들어, 전체 저장용량이 32MB이고 페이지의 크기가 512B인 플래시메모리 기반 저장장치의 주소변환 테이블을 저장하기 위해서는 65,536개의 페이지 당 2B가 필요하므로 총 128KB의 RAM이 필요하게 된다. 이러한 요구량은 모바일 기기 등 자원이 귀한 소규모 시스템에 있어서는 지나치게 크다는 문제점이 있다.U.S. Patent No. 5,845,313 proposes a method of constructing a linear address translation table that scans logical addresses stored in flash memory and initializes the address directly in separate RAM when the storage device is initialized. However, a large amount of RAM is required to store the address translation table. For example, to store the address translation table of a flash memory-based storage device with a total storage capacity of 32MB and a page size of 512B, 2B per 65,536 pages is required, which requires a total of 128KB of RAM. This requirement is too large for small systems with invaluable resources such as mobile devices.

미국특허 No. 5,404,485는 쓰기를 위해 새로운 블록(교체 블록)을 할당하고 할당된 블록에 쓰기를 수행하는 방식을 제안하고 있다. 그러나 이에 따르면, 1) 쓰기를 위해 계속 새로운 블록이 할당되므로 동일한 페이지가 기록된 서로 다른 버전의 복수개의 블록이 존재하게 된다. 즉, 묵시적으로 모든 블록마다 적어도 하나의 교체 블록이 존재할 것을 요구하여 플래시메모리의 용량이 상당히 줄어드는 문제점이 있다. 또한, 2) 새로운 블록에 쓰여지는 페이지는 항상 이전 블록의 그것과 동일한 위치에 쓰여져야 하므로, 특정 페이지에 대해서만 잦은 갱신이 이루어지고 나머지 페이지는 갱신이 거의 없는 경우 특정 페이지의 내용만 상이할 뿐 나머지 페이지의 내용은 동일한 교체 블록이 복수개 존재하게 되어 플래시 메모리의 저장공간의 낭비가 심하게 되고, 모바일 기기 등 소규모 시스템에 적합하지 않은 문제점이 있다.U.S. Patent No. 5,404,485 proposes a method of allocating a new block (replacement block) for writing and writing to the allocated block. However, according to this, 1) new blocks are continuously allocated for writing, and thus there are a plurality of blocks of different versions in which the same page is written. That is, there is a problem that the capacity of the flash memory is considerably reduced by implicitly requiring at least one replacement block for every block. Also, 2) pages written in a new block should always be written in the same position as that of the previous block, so if frequent updates are made only for a specific page, and the remaining pages are rarely updated, only the content of a specific page is different. The content of the page is that the same replacement block is present in a plurality of waste of the storage space of the flash memory is severe, there is a problem that is not suitable for small systems such as mobile devices.

대한민국특허 특2002-0092487은 플래시메모리 자원의 낭비를 줄이기 위해서 로그블록 내에서는 자유롭게 페이지들을 재사상할 수 있는 플래시 메모리 관리 기법을 제안하였다. 하나의 논리 블록에 속한 데이터를 덮어쓸 때, 해당 논리 블록에 로그블록을 할당하기 위해서 로그블록을 가지고 있는 다른 논리 블록을 합병한다. 합병하는 과정은 논리블록과 로그블록 안에 있는 유효한 데이터를 새로운 블록으로 복사한 후, 지움 연산을 통해서 생긴 블록을 로그블록으로 재사용한다. 하지만, 하나의 논리블록에 속한 데이터는 하나의 물리블록(데이터블록)과 논리블록에 할당 받은 로그블록에만 데이터를 저장해야 하는 제약 때문에 성능이 떨어지는 문제점이 있다.Korean Patent Laid-Open No. 2002-0092487 proposed a flash memory management technique that can freely re-think pages within a log block in order to reduce the waste of flash memory resources. When overwriting data belonging to one logical block, other logical blocks having log blocks are merged to allocate log blocks to the logical block. The merging process copies the valid data in the logical block and the log block into a new block, and then reuses the block created by the erase operation as the log block. However, there is a problem in that the data belonging to one logical block is inferior in performance due to the limitation of storing data only in one physical block (data block) and a log block allocated to the logical block.

이러한 문제점을 해결하기 위한 본 발명은 재사상을 위한 주소테이블의 메모리 요구량을 낮추고, 논리블록의 데이터를 물리블록에 자유롭게 저장할 수 있는 재사상 방법을 통하여, 플래시메모리를 효율적으로 관리할 수 있는 플래시메모리 관리방법을 제공하는 것을 목적으로 한다.The present invention to solve this problem is to reduce the memory requirements of the address table for re-imaging, flash memory that can efficiently manage the flash memory through the re-imaging method that can freely store the data of the logical block in the physical block It aims to provide a management method.

또한, 재사상 정보를 별도의 추가 장치 없이 플래시메모리 내에서 관리할 수 있는 플래시메모리 관리방법을 제공하는 것을 목적으로 한다.In addition, an object of the present invention is to provide a flash memory management method capable of managing re-imaging information in a flash memory without an additional device.

이러한 기술적 과제를 달성하기 위한 본 발명의 일 실시 예에 따른 플래시메모리 관리방법은 하나 이상의 논리블록을 포함하는 논리슈퍼블록을 생성하는 단계 및 상기 논리슈퍼블록을 대응하는 물리슈퍼블록으로 재사상하는 단계를 포함한다.In accordance with an aspect of the present invention, there is provided a method of managing a flash memory, the method comprising: generating a logical super block including one or more logical blocks and rethinking the logical super block into a corresponding physical super block; It includes.

상기 논리슈퍼블록에 포함된 논리블록의 페이지들이 상기 물리슈퍼블록에 포함된 물리블록으로 재사상되는 것이 바람직하다.Preferably, pages of a logical block included in the logical super block are re-imagined into physical blocks included in the physical super block.

상기 논리슈퍼블록에 포함된 논리블록의 페이지들에 대한 재사상 정보를 상기 플래시메모리에 데이터와 함께 관리하는 것이 바람직하다.It is preferable to manage re-imaging information on pages of a logical block included in the logical super block together with data in the flash memory.

상기 논리블록에 대한 재사상 정보가 RAM에 저장되어 있는 지 확인하는 단계와, 상기 논리블록에 대한 재사상 정보가 상기 RAM에 없는 경우, 상기 논리블록에 대한 재사상 정보의 위치를 찾는 단계와, 상기 위치에 저장된 재사상 정보를 읽고, 상기 RAM에 저장하는 단계를 포함하는 것이 바람직하다.Checking whether re-throne information for the logical block is stored in RAM, and if re-throne information for the logical block is not in the RAM, finding a location of the rethrone information for the logical block; And reading the re-imaging information stored in the location and storing in the RAM.

데이터의 위치가 바뀌는 경우, 상기 재사상 정보를 변경하는 단계와, 상기 변경된 재사상 정보를 상기 데이터와 함께 저장하는 단계를 더 포함하는 것이 바람직하다.When the location of the data is changed, the method may further include changing the re-throne information and storing the changed re-throne information together with the data.

상기 논리슈퍼블록에 포함된 논리블록의 페이지들에 대한 재사상 정보는 나무 구조에 따라 여러 페이지에 나누어 관리되는 것이 바람직하다. Re-imaging information on the pages of the logical block included in the logical super block is preferably divided into several pages according to the tree structure.

상기 논리슈퍼블록에 포함된 논리블록의 페이지들에 대한 재사상 정보를 상기 나무 구조에 따라 상기 플래시메모리에 저장할 때, 상기 나무 구조의 중간 노드들을 함께 저장하는 것이 바람직하다.When re-imaging information on pages of a logical block included in the logical super block is stored in the flash memory according to the tree structure, intermediate nodes of the tree structure are preferably stored together.

상기 물리슈퍼블록은 상기 논리슈퍼블록에 포함된 논리블록의 수보다 크거나 같은 수의 물리블록을 포함하고, 상기 물리슈퍼블록에 포함된 물리블록의 수는 증가 또는 감소될 수 있다. The physical super block includes a number of physical blocks greater than or equal to the number of logical blocks included in the logical super block, and the number of physical blocks included in the physical super block may be increased or decreased.

상기 물리슈퍼블록 내에 데이터가 기입되지 않은 자유 페이지가 없는 경우, 상기 물리슈퍼블록에 포함된 물리블록들을 병합하여 데이터가 기입되지 않은 자유 페이지들로 이루어진 자유물리블록을 생성하는 단계를 더 포함하는 것이 바람직하다.If there is no free page in which no data is written in the physical super block, merging the physical blocks included in the physical super block to generate a free physical block including free pages in which no data is written. desirable.

상기 병합을 수행할 물리슈퍼블록을 선정하는 단계와, 상기 선정된 물리슈퍼블록에 포함된 물리블록들 중 지움 연산을 수행할 물리블록을 선정하는 단계와, 상기 선정된 물리블록에 저장된 유효 데이터를 상기 물리슈퍼블록에 포함된 다른 물리블록 내의 자유 페이지로 복사하는 단계와, 상기 복사 후 상기 선정된 물리블록을 지움 연산을 통하여 데이터가 기입되지 않은 자유물리블록으로 변경하는 단계와, 상기 물리슈퍼블록에서 상기 자유물리블록을 제거하는 단계를 포함하는 것이 바람직하다.Selecting a physical super block to perform the merging, selecting a physical block to perform an erase operation among physical blocks included in the selected physical super block, and valid data stored in the selected physical block Copying to a free page in another physical block included in the physical super block, and changing the selected physical block to a free physical block to which data is not written through an erase operation after the copying; It is preferable to include the step of removing the free physical block.

이하에서는 첨부된 도면을 참조하여 본 발명의 바람직한 실시 예를 상세히 설명한다.Hereinafter, with reference to the accompanying drawings will be described a preferred embodiment of the present invention;

도 1은 본 발명의 일 실시 예에 따른 플래시메모리 관리방법에 기초한 시스템의 블록도를 나타낸 도면이다.1 is a block diagram of a system based on a flash memory management method according to an exemplary embodiment.

도 1을 참조하면, 본 발명의 일 실시 예에 따른 플래시메모리 관리방법에 기초한 시스템은 플래시 메모리(101), ROM(102), RAM(103), 및 CPU(104)를 포함한다.Referring to FIG. 1, a system based on a flash memory management method according to an exemplary embodiment includes a flash memory 101, a ROM 102, a RAM 103, and a CPU 104.

ROM(102)에는 플래시 메모리(101)를 제어하는 프로그램이 저장되어 있다.The ROM 102 stores a program for controlling the flash memory 101.

RAM(103)은 재사상 정보 및 데이터를 읽고 쓰기위한 버퍼로 사용된다.The RAM 103 is used as a buffer for reading and writing rethink information and data.

CPU(104)는 ROM(102)에 저장된 프로그램을 수행한다. The CPU 104 executes a program stored in the ROM 102.

도 2는 본 발명의 일 실시 예에 따른 플래시메모리 관리방법에 있어서의 슈퍼블록을 설명하기 위한 도면이다.FIG. 2 is a diagram for describing a superblock in a flash memory management method according to an exemplary embodiment.

도 2를 참조하면, 하나의 논리슈퍼블록은 연속적인 2개의 논리블록으로 이루어지고, 하나의 물리슈퍼블록은 2개 이상의 물리블록으로 이루어진다. 이를 보다 상세히 설명하면 다음과 같다. 즉, 제1 논리슈퍼블록(201)은 2개의 논리블록(Logical Block 0, Logical Block 1)으로 이루어지고, 제2 논리슈퍼블록(204)은 다른 2개의 논리블록(Logical Block 2, Logical Block 3)으로 이루어진다. 또한, 제1 논리슈퍼블록(201)에 대응하는 제1 물리슈퍼블록(203)은 4개의 물리블록(Physical Block 1, Physical Block 7, Physical Block 2, Physical Block 3)으로 이루어지고, 제2 논리슈퍼블록(204)에 대응하는 제2 물리슈퍼블록(205)은 다른 2개의 물리블록(Physical Block 4, Physical Block 0)으로 이루어진다. Referring to FIG. 2, one logical super block consists of two consecutive logical blocks, and one physical super block consists of two or more physical blocks. This will be described in more detail as follows. That is, the first logical super block 201 is composed of two logical blocks (Logical Block 0, Logical Block 1), and the second logical super block 204 is composed of two other logical blocks (Logical Block 2, Logical Block 3). ) In addition, the first physical super block 203 corresponding to the first logical super block 201 is composed of four physical blocks 1 (Physical Block 1, Physical Block 7, Physical Block 2, Physical Block 3), and the second logic. The second physical super block 205 corresponding to the super block 204 is composed of two other physical blocks (Physical Block 4 and Physical Block 0).

논리슈퍼블록을 구성하는 논리블록의 수는 변할 수 있으며, 논리슈퍼블록에 대응하는 물리슈퍼블록을 구성하는 물리블록의 수는 논리블록의 수보다 크거나 같다. 논리슈퍼블록을 구성하는 논리블록은 고정되지만, 논리슈퍼블록에 대응하는 물리슈퍼블록을 구성하는 물리블록은 플래시메모리 내의 임의의 물리블록일 수 있으며, 후술하는 본 발명의 재사상 방법을 통하여 물리블록의 위치는 변경될 수 있고, 물리블록의 수는 증가 또는 감소될 수 있으며, 하나의 논리슈퍼블록을 이루는 논리블록에 속한 페이지들은 논리슈퍼블록에 대응하는 물리슈퍼블록을 이루는 물리블록의 임의의 위치에 저장될 수 있다.The number of logical blocks constituting the logical super block may vary, and the number of physical blocks constituting the physical super block corresponding to the logical super block is greater than or equal to the number of logical blocks. The logical block constituting the logical super block is fixed, but the physical block constituting the physical super block corresponding to the logical super block may be any physical block in the flash memory, and may be a physical block through the re-imaging method of the present invention described below. The position of may be changed, the number of physical blocks may be increased or decreased, and pages belonging to a logical block forming one logical super block may be located at any position of the physical block forming a physical super block corresponding to the logical super block. Can be stored in.

도 3은 본 발명의 일 실시 예에 따른 플래시메모리 관리방법에 있어서의 재사상 방법을 설명하기 위한 도면이다.3 is a view for explaining a re-imaging method in a flash memory management method according to an embodiment of the present invention.

도 3을 참조하면, 논리블록 단위의 재사상 정보인 PGD(Page global directory, 302)는 RAM에 저장되어 있으며, 논리슈퍼블록 내에서의 재사상 정보를 가지고 있는 PMD(Page middle directory, 303)의 위치를 가지고 있다. PGD(302)의 크기는 논리슈퍼블록의 크기와 동일하다. PMD(303)는 후술할 플래시메모리의 스페어 영역에 저장되어 있으며 실제 데이터가 저장되어 있는 위치를 가지고 있는 4개의 PT(Page table, 304)의 위치를 가지고 있다. PT(304)는 PMD(303)와 함께 플래시메모리의 스페어 영역에 저장되어 있으며 16개의 페이지 주소를 가지고 있다. 따라서 하나의 PMD(303)와 4개의 PT(304)를 이용해서 64개의 페이지 주소를 지시할 수 있다.Referring to FIG. 3, a page global directory (PGD) 302, which is re-imaging information in units of logical blocks, is stored in a RAM and includes a page middle directory 303 (PMD) having re-imaging information in a logical super block. Has a location. The size of the PGD 302 is equal to the size of the logical superblock. The PMD 303 is stored in a spare area of a flash memory, which will be described later, and has four PT (Page Table, 304) positions having positions where actual data is stored. The PT 304 is stored in the spare area of the flash memory along with the PMD 303 and has 16 page addresses. Accordingly, 64 page addresses may be indicated using one PMD 303 and four PTs 304.

본 발명에 따르면, 논리슈퍼블록에 포함된 논리블록의 페이지들에 대한 재사상 정보를 플래시메모리에서 관리한다. 이를 위하여, 본 발명의 일 실시 예에 따른 플래시메모리 재사상 방법은 1) 논리슈퍼블록에 포함된 논리블록에 대한 재사상 정보가 RAM에 저장되어 있는 지 확인하고, 2) 논리슈퍼블록에 포함된 논리블록에 대한 재사상 정보가 RAM에 없는 경우, 논리슈퍼블록에 포함된 논리블록에 대한 재사상 정보의 위치를 찾고, 3) 찾은 위치에 저장된 논리슈퍼블록에 포함된 논리블록에 대한 재사상 정보를 읽은 후, RAM에 저장하고, 4) 데이터의 위치가 바뀌는 경우, 논리슈퍼블록에 포함된 논리블록에 대한 재사상 정보를 변경하고, 5) 변경된 재사상 정보를 데이터와 함께 저장한다.According to the present invention, re-imaging information on pages of a logical block included in a logical super block is managed in a flash memory. To this end, the flash memory re-imaging method according to an embodiment of the present invention 1) check whether the re-imaging information for the logical block included in the logical super block is stored in the RAM, and 2) included in the logical super block If the re-imaging information for the logical block is not in RAM, find the location of the re-imaging information for the logical block included in the logical super block, and 3) the re-imaging information for the logical block included in the logical super block stored at the found location. After reading, store in RAM, 4) if the location of the data is changed, change the re-imaging information for the logical block included in the logical super block, and 5) store the changed re-imaging information with the data.

이를 보다 상세히 설명하면 다음과 같다.This will be described in more detail as follows.

먼저, 논리슈퍼블록에 포함된 논리블록에 대한 재사상 정보가 RAM에 없는 경우, 논리슈퍼블록에 포함된 논리블록에 대한 재사상 정보의 위치를 찾기 위하여, 논리 주소를 슈퍼블록 번호, PGD 번호, PMD 번호, PTE 번호로 나누고, 슈퍼블록 번호를 이용해서 PGD에서 해당 PGD를 찾고, PGD 번호를 이용해서 해당 PMD의 위치를 읽는다. PGD에 저장된 PMD의 위치 정보를 이용해서 플래시메모리로부터 PMD를 읽은 후, PMD 번호를 이용하여 해당 PT의 위치를 찾아서, 다시 플래시메모리로부터 PT를 읽는다. 읽은 PT에서 PTE 번호를 이용해서 논리 주소에 해당하는 데이터가 저장된 물리 주소를 알아낸다. First, when re-imaging information of a logical block included in a logical super block is not present in RAM, the logical address may be assigned to a superblock number, a PGD number, Divide into PMD number and PTE number, find the corresponding PGD in PGD using superblock number, and read the position of corresponding PMD using PGD number. After reading the PMD from the flash memory using the location information of the PMD stored in the PGD, the location of the PT is found using the PMD number, and the PT is read from the flash memory again. From the read PT, the PTE number is used to find the physical address where the data corresponding to the logical address is stored.

한번 읽은 PMD(303)와 PT(304)는 RAM(103)에 임시로 보관하며, 동일한 PMD(303) 혹은 PT(304)를 사용하는 논리 주소(301)가 왔을 때, 플래시메모리로부터 읽지 않고 바로 RAM(103)에 임시로 보관된 정보를 사용한다. RAM(103)의 크기가 제한적이므로 임시로 저장된 PMD(303)와 PT(304)는 다른 논리 주소에 해당하는 PMD(303)와 PT(304)로 교체된다. 본 발명에서는 교체 알고리즘에 대해 특별히 규정하지 않으므로, 본 발명을 구현하기 위해 LRU(Least Recently Used)와 같은 일반화된 교체 알고리즘을 사용하는 것도 가능하다.Once read, the PMD 303 and the PT 304 are temporarily stored in the RAM 103. When the logical address 301 using the same PMD 303 or the PT 304 comes, the PMD 303 and the PT 304 are stored immediately without reading from the flash memory. The information stored temporarily in the RAM 103 is used. Since the size of the RAM 103 is limited, the temporarily stored PMD 303 and PT 304 are replaced with PMD 303 and PT 304 corresponding to different logical addresses. Since the present invention does not specifically define a replacement algorithm, it is also possible to use a generalized replacement algorithm such as Least Recently Used (LRU) to implement the present invention.

도 4는 도 3을 통하여 설명한 재사상 방법에 대한 구체적인 예를 나타낸 도면이다.4 is a diagram illustrating a specific example of the re-imaging method described with reference to FIG. 3.

도 4를 참조하면, 논리슈퍼블록의 크기가 4이고 하나의 논리블록 내에 64개의 논리 페이지가 있을 경우, 논리블록 번호가 17이고 논리 페이지 번호가 12인 논 리 주소를 참조할 때, 슈퍼블록 번호는 4, PGD 번호는 1, PMD 번호는 0, PTE 번호는 12가 된다. PGD에는 물리블록 번호 6번의 24번째 페이지에 해당 PMD(303)가 저장되어 있다는 정보가 있다. 따라서, PMD를 읽기 위해서 물리블록 번호 6번의 24번째 페이지의 스페어 영역을 읽는다. PMD 번호를 이용해서 PT의 위치를 찾는다. 이 때, PMD는 항상 하나의 PT와 함께 저장된다. 따라서 해당 PT가 PMD와 같이 저장되어 있었다면, RAM에 해당 정보가 이미 존재하게 된다. 도 4와 같이 다른 페이지에 해당 PT가 저장되어 있다면, 다시 플래시메모리에서 PT를 읽는다. PT로부터 PT 번호를 이용해서 데이터가 저장된 물리 주소를 찾는다. 찾은 물리 주소를 이용해서 원하는 데이터를 읽는다.Referring to FIG. 4, when the size of the logical superblock is 4 and there are 64 logical pages in one logical block, when referring to a logical address having a logical block number of 17 and a logical page number of 12, the superblock number Is 4, PGD number is 1, PMD number is 0, and PTE number is 12. In the PGD, there is information that the corresponding PMD 303 is stored in the 24th page of the physical block number 6. Therefore, the spare area of the 24th page of the physical block number 6 is read in order to read the PMD. Use the PMD number to locate the PT. At this time, the PMD is always stored with one PT. Therefore, if the PT is stored together with the PMD, the information already exists in the RAM. If the corresponding PT is stored in another page as shown in FIG. 4, the PT is read from the flash memory again. Use PT number from PT to find the physical address where data is stored. Read the desired data using the physical address found.

논리블록 번호 17, 논리 페이지 번호 12 인 데이터가 덮어쓰기를 시도하면 앞서 설명한 방법으로 해당 PMD와 PT를 읽은 후, 물리슈퍼블록 내에 존재하는 데이터가 기입되지 않은 자유 페이지를 찾는다. 자유 페이지가 존재하지 않으면, 물리슈퍼블록에 포함된 물리블록들을 병합하여 데이터가 기입되지 않은 자유 페이지들로 이루어진 자유물리블록을 생성하여 물리슈퍼블록에 추가한다. 이를 위하여, 1) 병합을 수행할 물리슈퍼블록을 선정하고, 2) 선정된 물리슈퍼블록에 포함된 물리블록들 중 지움 연산을 수행할 물리블록을 선정하고, 3) 선정된 물리블록에 저장된 유효 데이터를 물리슈퍼블록에 포함된 다른 물리블록 내의 자유 페이지로 복사하고, 4) 복사 후 선정된 물리블록을 지움 연산을 통하여 데이터가 기입되지 않은 자유물리블록으로 변경하고, 5) 물리슈퍼블록에서 자유물리블록을 제거한다.When data with logical block number 17 and logical page number 12 attempts to overwrite, the corresponding PMD and PT are read by the method described above, and then a free page is found in which data existing in the physical super block is not written. If the free page does not exist, the physical blocks included in the physical super block are merged to generate a free physical block including free pages in which no data is written, and add the free physical block to the physical super block. To this end, 1) select a physical superblock to be merged, 2) select a physical block to perform an erase operation among physical blocks included in the selected physical superblock, and 3) validate the stored physical block. 4) Copy the data to a free page in another physical block included in the physical super block, and 4) change the selected physical block to a free physical block to which no data is written through the erase operation, and 5) free the physical super block. Remove the physical block.

자유 페이지의 주소로 RAM에 저장되어 있는 해당 PT의 값을 변경한 후, RAM 에 역시 저장되어있는 해당 PMD도 빈 자유 페이지를 지시하도록 변경한다. 자유 페이지에 덮어쓸 데이터와 함께 변경된 PMD와 PT를 저장한다. 해당 PMD를 지시하고 있는 PGD의 엔트리를 새로 저장된 주소로 변경한다.After changing the value of the corresponding PT stored in RAM at the address of the free page, the corresponding PMD also stored in RAM is also changed to indicate an empty free page. Store the changed PMD and PT with the data to be overwritten on the free page. Change the entry of the PGD indicating the PMD to the newly stored address.

도 5는 본 발명에 따른 플래시 메모리에 데이터와 함께 저장되는 재사상 정보의 구조를 나타낸 도면이다.5 is a diagram showing the structure of re-imaging information stored with data in a flash memory according to the present invention.

도 5의 (a)를 참조하면, 스페어 영역에는 데이터 정보(DI), 물리 블록 사상 정보(PBMT), PMD(303), PT(304)가 저장된다.Referring to FIG. 5A, the spare area stores data information DI, physical block mapping information PBMT, PMD 303, and PT 304.

도 5의 (b)를 참조하면, 데이터 정보(DI)에는 배드 블록 정보, 데이터의 안정성을 위한 에러 보정 코드(ECC), 복구를 위한 데이터의 논리 주소가 저장된다.Referring to FIG. 5B, the data information DI stores bad block information, an error correction code ECC for stability of data, and a logical address of data for recovery.

도 5의 (c)를 참조하면, 물리블록 사상 정보(PBMT)에는 7개의 물리블록 번호가 기록된다.Referring to FIG. 5C, seven physical block numbers are recorded in the physical block mapping information PBMT.

도 5의 (d)와 (e)를 참조하면, PMD와 PT에 물리 주소를 저장하기 위해서 물리블록 사상 정보(PBMT)의 번호와 블록 내에서의 페이지 번호가 기록된다. Referring to FIGS. 5D and 5E, in order to store physical addresses in PMDs and PTs, numbers of physical block mapping information (PBMT) and page numbers within blocks are recorded.

도 6은 덮어쓰기 빈도가 비슷한 페이지들을 특정 물리 블록으로 모으는 방법을 설명하기 위한 도면이다.FIG. 6 is a diagram for describing a method of collecting pages having similar overwriting frequencies into specific physical blocks.

도 6을 참조하면, 슈퍼블록의 크기가 3이고, 2개의 추가적인 로그 블록을 할당받아서 5개의 물리 블록으로 구성된 슈퍼블록을 재생할 때의 예가 나타나 있다. 본 발명에서는 특별한 경우를 제외하고, 선택 알고리즘에 대해 특별히 규정하지 않으므로, 본 발명을 구현하기 위해 LRU와 같은 일반화된 선택 알고리즘을 사용하는 것도 가능하다.Referring to FIG. 6, an example of a superblock having a size of 3 and receiving two additional log blocks to play a superblock composed of five physical blocks is shown. Since the present invention does not specifically define the selection algorithm except in special cases, it is also possible to use a generalized selection algorithm such as LRU to implement the present invention.

선택된 물리슈퍼블록에서 유효하지 않은 페이지를 포함한 물리블록을 선택하여, 물리슈퍼블록 내의 자유 페이지로 복사한다. 만약 자유 페이지를 다 사용한 후에도 선택한 물리블록 내에 유효한 페이지가 존재하면, 그 유효한 페이지는 새로운 빈 자유물리블록을 할당해서 자유물리블록에 복사한다. 모든 유효한 페이지를 복사한 후 선택한 물리블록을 지움 연산을 통해서 빈 자유물리블록으로 만든 후, 물리슈퍼블록에서 제거한다. 이러한 과정을 물리슈퍼블록이 가지고 있는 물리블록의 개수가 논리슈퍼블록이 가지고 있는 논리블록의 개수와 동일해 질 때 까지 반복한다.Select a physical block including an invalid page in the selected physical super block and copy it to a free page in the physical super block. If a valid page exists in the selected physical block even after the free page is exhausted, the valid page allocates a new empty free physical block and copies it to the free physical block. After copying all valid pages, the selected physical block is deleted into an empty free physical block and then removed from the physical super block. This process is repeated until the number of physical blocks in the physical super block is equal to the number of logical blocks in the logical super block.

이상에서 보는 바와 같이, 본 발명이 속하는 기술 분야의 당업자는 본 발명이 그 기술적 사상이나 필수적 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로 이상에서 기술한 실시 예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로서 이해해야만 하고, 본 발명의 범위는 상기 상세한 설명보다는 후술하는 특허청구범위에 의하여 나타내어지며, 특허청구범위의 의미 및 범위 그리고 그 등가개념으로부터 도출되는 모든 변경 또는 변형된 형태가 본 발명의 범위에 포함되는 것으로 해석되어야 한다.As described above, those skilled in the art will appreciate that the present invention can be implemented in other specific forms without changing the technical spirit or essential features. Therefore, the exemplary embodiments described above are to be understood as illustrative and not restrictive in all respects, and the scope of the present invention is indicated by the following claims rather than the detailed description, and the meaning and scope of the claims and All changes or modifications derived from the equivalent concept should be interpreted as being included in the scope of the present invention.

이상에서 상세히 설명한 바와 같이, 본 발명은 블록 단위의 재사상 테이블을 RAM에서 관리하고, 페이지 단위의 재사상 테이블을 플래시메모리에서 관리하여 플래시 저장장치를 위한 추가적인 자원을 최소화하면서, 연속적인 복수개의 논리블록 을 하나의 슈퍼블록으로 관리하여서 플래시메모리 저장장치의 성능을 개선시킬 수 있는 방법을 제공한다.As described above in detail, the present invention manages a plurality of logical blocks continuously while minimizing additional resources for a flash storage device by managing a block-based reimaging table in a RAM and managing a page-based reimaging table in a flash memory. It provides a way to improve the performance of flash memory storage device by managing blocks as one super block.

또한, 슈퍼블록에 속해 있는 여러 논리블록안의 데이터를 서로 다른 복수개의 물리블록에 자유롭게 저장할 수 있는 유연성을 제공하는 장점이 있다.In addition, there is an advantage of providing flexibility that can freely store data in multiple logical blocks belonging to a superblock in a plurality of different physical blocks.

또한, 유연성을 활용한 재생방법을 통하여 쓰기 연산과 삭제 연산의 횟수를 감소시켜, 삭제 연산 횟수에 한계가 있는 플래시메모리의 전체적 수명을 보다 연장시켜주는 효과가 있다.In addition, it is possible to reduce the number of write operations and erase operations through a reproducing method utilizing flexibility, thereby extending the overall life of the flash memory having a limited number of erase operations.

Claims (10)

하나 이상의 논리블록을 포함하는 논리슈퍼블록을 생성하는 단계; 및Generating a logical super block including one or more logical blocks; And 상기 논리슈퍼블록을 대응하는 물리슈퍼블록으로 재사상하는 단계;Rethinking the logical superblock into a corresponding physical superblock; 를 포함하는 플래시메모리 관리방법.Flash memory management method comprising a. 제1 항에 있어서,According to claim 1, 상기 논리슈퍼블록에 포함된 논리블록의 페이지들이 상기 물리슈퍼블록에 포함된 물리블록으로 재사상되는 플래시메모리 관리방법.And re-imaging pages of a logical block included in the logical super block into physical blocks included in the physical super block. 제2 항에 있어서,The method of claim 2, 상기 논리슈퍼블록에 포함된 논리블록의 페이지들에 대한 재사상 정보를 상기 플래시메모리에 데이터와 함께 관리하는 플래시메모리 관리방법.And re-imaging information on pages of a logical block included in the logical super block in the flash memory together with data. 제3 항에 있어서,The method of claim 3, wherein 상기 논리블록에 대한 재사상 정보가 RAM에 저장되어 있는 지 확인하는 단계;Checking whether re-imaging information for the logical block is stored in a RAM; 상기 논리블록에 대한 재사상 정보가 상기 RAM에 없는 경우, 상기 논리블록에 대한 재사상 정보의 위치를 찾는 단계;Finding relocation information for the logical block if the re-imaging information for the logical block is not present in the RAM; 상기 위치에 저장된 재사상 정보를 읽고, 상기 RAM에 저장하는 단계;Reading re-imaging information stored in the location and storing in the RAM; 를 포함하는 플래시메모리 관리방법.Flash memory management method comprising a. 제4 항에 있어서,The method of claim 4, wherein 데이터의 위치가 바뀌는 경우, 상기 재사상 정보를 변경하는 단계;Changing the re-imaging information when the position of data is changed; 상기 변경된 재사상 정보를 상기 데이터와 함께 저장하는 단계;Storing the changed re-imaging information with the data; 를 더 포함하는 플래시메모리 관리방법.Flash memory management method further comprising. 제3 항에 있어서,The method of claim 3, wherein 상기 논리슈퍼블록에 포함된 논리블록의 페이지들에 대한 재사상 정보는 나무 구조에 따라 여러 페이지에 나누어 관리되는 플래시메모리 관리방법. Re-imaging information on the pages of the logical block included in the logical super block is divided into several pages according to the tree structure management method. 제6 항에 있어서,The method of claim 6, 상기 논리슈퍼블록에 포함된 논리블록의 페이지들에 대한 재사상 정보를 상기 나무 구조에 따라 상기 플래시메모리에 저장할 때, 상기 나무 구조의 중간 노드들을 함께 저장하는 플래시메모리 관리방법.And storing intermediate images of the tree structure in the flash memory according to the tree structure, when the re-imaging information on the pages of the logical block included in the logical super block is stored in the flash memory. 제1 항에 있어서,According to claim 1, 상기 물리슈퍼블록은 상기 논리슈퍼블록에 포함된 논리블록의 수보다 크거나 같은 수의 물리블록을 포함하고,The physical super block includes a number of physical blocks greater than or equal to the number of logical blocks included in the logical super block, 상기 물리슈퍼블록에 포함된 물리블록의 수는 증가 또는 감소될 수 있는 플 래시메모리 관리방법. The number of physical blocks included in the physical super block may increase or decrease. 제8 항에 있어서,The method of claim 8, 상기 물리슈퍼블록 내에 데이터가 기입되지 않은 자유 페이지가 없는 경우, 상기 물리슈퍼블록에 포함된 물리블록들을 병합하여 데이터가 기입되지 않은 자유 페이지들로 이루어진 자유물리블록을 생성하는 단계를 더 포함하는 플래시메모리 관리방법.If there is no free page in which no data is written in the physical super block, merging the physical blocks included in the physical super block to generate a free physical block including free pages in which no data is written. Memory management method. 제9 항에 있어서,The method of claim 9, 상기 병합을 수행할 물리슈퍼블록을 선정하는 단계;Selecting a physical super block to perform the merging; 상기 선정된 물리슈퍼블록에 포함된 물리블록들 중 지움 연산을 수행할 물리블록을 선정하는 단계;Selecting a physical block to perform an erase operation among physical blocks included in the selected physical super block; 상기 선정된 물리블록에 저장된 유효 데이터를 상기 물리슈퍼블록에 포함된 다른 물리블록 내의 자유 페이지로 복사하는 단계;Copying valid data stored in the selected physical block to a free page in another physical block included in the physical super block; 상기 복사 후 상기 선정된 물리블록을 지움 연산을 통하여 데이터가 기입되지 않은 자유물리블록으로 변경하는 단계;Changing the selected physical block to a free physical block in which data is not written through the erase operation after the copying; 상기 물리슈퍼블록에서 상기 자유물리블록을 제거하는 단계;Removing the free physical block from the physical super block; 를 포함하는 플래시메모리 관리방법.Flash memory management method comprising a.
KR1020060105732A 2006-10-30 2006-10-30 The method of managing flash memory KR100868674B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020060105732A KR100868674B1 (en) 2006-10-30 2006-10-30 The method of managing flash memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020060105732A KR100868674B1 (en) 2006-10-30 2006-10-30 The method of managing flash memory

Publications (2)

Publication Number Publication Date
KR20080038613A true KR20080038613A (en) 2008-05-07
KR100868674B1 KR100868674B1 (en) 2008-11-13

Family

ID=39647045

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020060105732A KR100868674B1 (en) 2006-10-30 2006-10-30 The method of managing flash memory

Country Status (1)

Country Link
KR (1) KR100868674B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100929371B1 (en) * 2009-03-18 2009-12-02 한국과학기술원 A method to store data into flash memory in a dbms-independent manner using the page-differential
KR100973496B1 (en) * 2008-05-16 2010-08-03 명지대학교 산학협력단 Read-ahead swap-in method considering flash memory erase block

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6141249A (en) 1999-04-01 2000-10-31 Lexar Media, Inc. Organization of blocks within a nonvolatile memory unit to effectively decrease sector write operation time

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100973496B1 (en) * 2008-05-16 2010-08-03 명지대학교 산학협력단 Read-ahead swap-in method considering flash memory erase block
KR100929371B1 (en) * 2009-03-18 2009-12-02 한국과학기술원 A method to store data into flash memory in a dbms-independent manner using the page-differential

Also Published As

Publication number Publication date
KR100868674B1 (en) 2008-11-13

Similar Documents

Publication Publication Date Title
KR100389867B1 (en) Flash memory management method
US8180955B2 (en) Computing systems and methods for managing flash memory device
US7890550B2 (en) Flash memory system and garbage collection method thereof
US7191306B2 (en) Flash memory, and flash memory access method and apparatus
KR100849221B1 (en) Method for managing non-volatile memory, and memory-based apparatus including the non-volatile memory
KR100684887B1 (en) Data storing device including flash memory and merge method of thereof
JP4933269B2 (en) Non-volatile memory and method with memory plane array
CN102779096B (en) Page, block and face-based three-dimensional flash memory address mapping method
US7680977B2 (en) Page and block management algorithm for NAND flash
US8341336B2 (en) Region-based management method of non-volatile memory
KR20070060070A (en) Fat analysis for optimized sequential cluster management
KR20070096429A (en) Fast mounting for a file system on nand flash memory
KR101430097B1 (en) Non-volatile memory and method for class-based update block replacement rules
KR20100115090A (en) Buffer-aware garbage collection technique for nand flash memory-based storage systems
US20100318726A1 (en) Memory system and memory system managing method
US20050005057A1 (en) [nonvolatile memory unit with page cache]
KR20090024971A (en) Method and apparatus for cache using sector set
KR101077901B1 (en) Apparatus and method for managing flash memory using log block level mapping algorithm
Lee et al. An efficient buffer management scheme for implementing a B-tree on NAND flash memory
KR100868674B1 (en) The method of managing flash memory
KR100745163B1 (en) Method for managing flash memory using dynamic mapping table
KR100982440B1 (en) System for managing data in single flash memory
KR101022001B1 (en) Flash memory system and method for managing flash memory
KR20100099888A (en) A method for log management in flash memory-based database systems
Lin et al. Alleviating the Impact of Fingerprint Operations on NAND Flash Memory Storage Performance

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: 20111102

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20121031

Year of fee payment: 5

LAPS Lapse due to unpaid annual fee