KR102062045B1 - Garbage Collection Method For Nonvolatile Memory Device - Google Patents

Garbage Collection Method For Nonvolatile Memory Device Download PDF

Info

Publication number
KR102062045B1
KR102062045B1 KR1020180078313A KR20180078313A KR102062045B1 KR 102062045 B1 KR102062045 B1 KR 102062045B1 KR 1020180078313 A KR1020180078313 A KR 1020180078313A KR 20180078313 A KR20180078313 A KR 20180078313A KR 102062045 B1 KR102062045 B1 KR 102062045B1
Authority
KR
South Korea
Prior art keywords
data
block
invalid
invalid data
page
Prior art date
Application number
KR1020180078313A
Other languages
Korean (ko)
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 KR1020180078313A priority Critical patent/KR102062045B1/en
Application granted granted Critical
Publication of KR102062045B1 publication Critical patent/KR102062045B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7205Cleaning, compaction, garbage collection, erase control

Abstract

The present invention relates to a garbage collection method of a nonvolatile memory device for improving data recovery performance of the nonvolatile memory device. The garbage collection method of a nonvolatile memory device comprises the steps of: storing valid data and invalid data in a plurality of pages in a memory area having a plurality of blocks including the plurality of pages; classifying the invalid data into first and second invalid data according to a possibility of a data recovery request; selecting a victim block among the plurality of blocks based on the valid data and the number of the first and second invalid data; transferring the valid data stored in the victim block to a free block among the plurality of blocks; and erasing the victim block.

Description

비휘발성 메모리 장치의 가비지 컬렉션 방법{Garbage Collection Method For Nonvolatile Memory Device}Garbage collection method for nonvolatile memory device

본 발명은 비휘발성 메모리 장치의 가비지 컬렉션 방법에 관한 것으로, 특히, 데이터 복구 성능을 향상시킬 수 있는 비휘발성 메모리 장치의 가비지 컬렉션 방법에 관한 것이다.The present invention relates to a garbage collection method of a nonvolatile memory device, and more particularly, to a garbage collection method of a nonvolatile memory device capable of improving data recovery performance.

텍스트, 음성 및 영상 등의 데이터를 저장하기 위해 저장 장치가 사용되며, 이러한 저장 장치로 반도체 메모리 장치가 사용되고 있다. Storage devices are used to store data such as text, audio, and video, and semiconductor memory devices are used as such storage devices.

반도체 메모리 장치는 크게 휘발성(volatile) 메모리 장치와 비휘발성(nonvolatile) 메모리 장치로 구분된다.Semiconductor memory devices are classified into volatile memory devices and nonvolatile memory devices.

여기서, 휘발성 메모리 장치에 저장된 데이터는 전원 공급이 중단되면 소멸되는 반면에, 비휘발성 메모리 장치에 저장된 데이터는 전원 공급이 중단된 경우에도 소멸되지 않는다.Here, data stored in the volatile memory device is destroyed when the power supply is interrupted, whereas data stored in the nonvolatile memory device is not destroyed even when the power supply is interrupted.

비휘발성 메모리 장치의 일종으로 플래시 메모리 장치가 있으며, 컴퓨터 시스템이 모바일 영역으로 이동함에 따라 플래시 메모리 장치에 대한 요구가 증가하고 있다. One type of nonvolatile memory device is a flash memory device. As a computer system moves to a mobile area, a demand for a flash memory device is increasing.

이러한 플래시 메모리 장치는 낮은 소비 전력, 고 집적도, 작은 크기 및 경량화의 장점을 가진다. 최근 들어서는, 휴대폰, PDA, 디지털 카메라 등과 같은 휴대용 정보 기기의 사용이 급증함에 따라, 하드 디스크 대신 플래시 메모리 장치가 저장 장치로서 널리 사용되고 있다.Such flash memory devices have the advantages of low power consumption, high integration, small size and light weight. In recent years, as the use of portable information devices such as mobile phones, PDAs, digital cameras, and the like proliferates, flash memory devices are widely used as storage devices instead of hard disks.

플래시 메모리는 하드 디스크와 달리, 데이터 덮어쓰기(overwrite)를 지원하지 않는다. 따라서, 플래시 메모리에 데이터를 프로그램하기 위해서는 소거 동작이 선행되어야 한다. Flash memory, unlike hard disks, does not support data overwrite. Therefore, an erasing operation must be preceded in order to program data into the flash memory.

이와 같은 플래시 메모리의 소거 동작에는 일반적으로 프로그램 동작에 비해 매우 긴 시간이 소요된다. 또한, 플래시 메모리의 소거 단위(블록)는 프로그램 단위(페이지)보다 훨씬 크기 때문에, 소거되지 않아도 되는 부분까지 함께 소거될 수 있다.Such an erase operation of the flash memory generally takes a very long time compared to a program operation. In addition, since the erase unit (block) of the flash memory is much larger than the program unit (page), it can be erased together to a portion that does not need to be erased.

또한, 플래시 메모리에 저장된 데이터는 사용자의 명령에 의해 삭제될 수 있는데, 일반적으로 데이터의 삭제는 플래시 메모리의 저장 용량을 증가시키기 위해 수행된다. In addition, data stored in the flash memory can be deleted by a user's command. In general, erasing of data is performed to increase the storage capacity of the flash memory.

그러나, 경우에 따라 삭제된 데이터를 복구해야 하는 경우가 발생한다. 예를 들어, 사용자의 실수 또는 저장 장치의 손상 등으로 데이터가 삭제, 덮어 쓰기 또는 손상된 경우 이들 데이터를 복구할 수 있어야 한다.In some cases, however, there is a need to recover deleted data. For example, if data is deleted, overwritten or corrupted due to a user's mistake or damage to the storage device, the data should be recoverable.

한편, 플래시 메모리 영역에서 새로 쓴 데이터는 프리 페이지에 저장되어 유효 데이터로 표시되고 삭제되거나 덮어 쓴 데이터는 무효 데이터로 표시된다. 그러나, 이와 같은 무효 데이터가 증가함에 따라 플래시 메모리 영역에서 쓰기 작업을 위한 여유 공간이 줄어들게 된다.On the other hand, newly written data in the flash memory area is stored in the free page and displayed as valid data, and deleted or overwritten data is displayed as invalid data. However, as such invalid data increases, free space for write operations in the flash memory area is reduced.

이를 해결하기 위해, 플래시 메모리 장치는 내부 메커니즘으로서 가비지 컬렉션(Garbage Collection)을 수행한다.To solve this problem, the flash memory device performs garbage collection as an internal mechanism.

이러한 가비지 컬렉션은 무효 데이터가 저장된 메모리 영역을 쓰기 작업을 위한 공간으로 재순환시킨다.This garbage collection recycles the memory area where invalid data is stored to the space for write operations.

도 1은 일반적인 가비지 컬렉션을 설명하기 위한 도면이다.1 is a diagram illustrating a general garbage collection.

도 1에 도시한 바와 같이, 메모리 영역은 복수의 블록(Block)으로 이루어져 있으며, 이러한 복수의 블록(Block)은 복수의 페이지(Page)를 포함한다. 그리고, 유효 데이터(Valid Data) 및 무효 데이터(Invalid data)는 각 블록(Block)에 포함된 각 페이지(Page)에 저장된다. As shown in FIG. 1, the memory area includes a plurality of blocks, and the plurality of blocks includes a plurality of pages. Valid data and invalid data are stored in each page included in each block.

여기서, 유효 데이터(Valid Data)가 저장된 페이지(Page)를 유효 페이지(Valid Page)라고 지칭하고, 무효 데이터(Invalid data)가 저장된 페이지(Page)를 무효 페이지(Invalid Data)라고 지칭하고, 데이터가 저장되지 않은 페이지(Page)를 프리 페이지(Free Page)라고 지칭하겠다.Here, a page in which valid data is stored is referred to as a valid page, a page in which invalid data is stored is referred to as an invalid page, and data is stored. An unsaved page will be referred to as a free page.

일반적인 가비지 컬렉션은, 먼저, 복수의 블록(Block) 중 소거 대상인 희생 블록(Victim Block)을 선택한다. 여기서, 무효 페이지(Invalid Page)가 가장 많은 블록(Block 2)을 희생 블록(Victim Block)으로 선택할 수 있다.In general garbage collection, first, a victim block (Victim Block) to be erased is selected from among a plurality of blocks. Herein, a block 2 having the most invalid pages may be selected as the victim block.

다음, 희생 블록(Victim Block)의 유효 페이지(Valid Page)에 저장된 유효 데이터(Valid Data)를 프리 페이지(Free Page)만으로 이루어진 다른 블록(Block 3) 즉, 데이터가 저장되지 않은 프리 블록(Free Block)으로 이전시킨다.Next, another block (Block 3) including only free pages of valid data stored in a valid page of a victim block, that is, a free block in which no data is stored, is included. ).

다음, 희생 블록(Victim Block)을 소거하여 메모리 영역에서 쓰기 작업을 위한 여유 공간을 확보한다.Next, the victim block is erased to free space for a write operation in the memory area.

이와 같은 가비지 컬렉션은 유효 데이터(Valid Data)를 이전하는 작업으로 인해 메모리의 성능 저하를 초래한다. 따라서, 무효 페이지(Invalid Page)가 가장 많은 블록(Block)을 희생 블록(Victim Block)으로 선택하여 이를 소거함으로써, 유효 데이터(Valid Data)의 이전 작업을 최소화한다.Garbage collection like this causes memory performance to be lost due to the transfer of valid data. Accordingly, the previous operation of valid data is minimized by selecting the block having the most invalid pages as the victim block and erasing it.

그러나, 희생 블록(Victim Block)이 소거됨에 따라 희생 블록에 저장된 무효 데이터(Invalid data)는 복구가 불가능하게 된다. 이에 따라, 비휘발성 메모리 장치의 데이터 복구 기능을 저하시키는 문제점이 발생한다.However, as the victim block is erased, invalid data stored in the victim block becomes impossible to recover. As a result, a problem may occur that degrades the data recovery function of the nonvolatile memory device.

공개특허공보 제10-2016-0075229호Patent Publication No. 10-2016-0075229

본 발명은, 유효 데이터와 데이터 복구 요청 가능성이 높은 무효 데이터의 개수가 많은 블록이 희생 블록으로 선택되어 소거되는 것을 방지하여 데이터 복구 요청 가능성이 높은 무효 데이터의 수명을 연장할 수 있고, 이를 통해, 데이터 복구 성능을 향상시킬 수 비휘발성 메모리 장치의 가비지 컬렉션 방법을 제공하는 것을 목적으로 한다.The present invention can prevent a block having a large number of valid data and invalid data having a high possibility of requesting data recovery from being selected and erased as a victim block, thereby extending the lifespan of invalid data having a high possibility of requesting data recovery. It is an object of the present invention to provide a garbage collection method of a nonvolatile memory device that can improve data recovery performance.

본 발명에서 이루고자 하는 기술적 과제들은 이상에서 언급한 기술적 과제로 제한되지 않으며, 언급하지 않은 또 다른 기술적 과제들은 아래의 기재로부터 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에게 명확하게 이해될 수 있을 것이다.Technical problems to be achieved in the present invention are not limited to the technical problems mentioned above, and other technical problems not mentioned above may be clearly understood by those skilled in the art from the following description. There will be.

이러한 과제를 해결하기 위해, 본 발명은, 복수의 페이지를 포함하는 복수의 블록으로 이루어진 메모리 영역에서, 유효 데이터 및 무효 데이터를 복수의 페이지에 저장하는 단계와, 무효 데이터를 데이터 복구 요청 가능성에 따라 제1 및 제2 무효 데이터로 분류하는 단계와, 유효 데이터와 제1 및 제2 무효 데이터의 개수를 기초로 복수의 블록 중 희생 블록을 선택하는 단계와, 희생 블록에 저장된 유효 데이터를 복수의 블록 중 프리 블록으로 이전하는 단계와, 희생 블록을 소거하는 단계를 포함하는 비휘발성 메모리 장치의 가비지 컬렉션 방법을 제공한다.In order to solve this problem, the present invention provides a method for storing invalid data and invalid data in a plurality of pages in a memory area including a plurality of blocks including a plurality of pages, and according to a possibility of requesting data recovery. Classifying the first and second invalid data into a plurality of blocks; selecting a victim block among a plurality of blocks based on the valid data and the number of the first and second invalid data; and valid data stored in the victim block. A method of garbage collection of a nonvolatile memory device is provided. The method includes moving to a heavy free block and erasing a victim block.

여기서, 제2 무효 데이터는 제1 무효 데이터의 이전 버전 데이터로서 제1 무효 데이터 보다 데이터 복구 요청 가능성이 낮은 데이터이다.Here, the second invalid data is data having a lower probability of a data recovery request than the first invalid data as previous version data of the first invalid data.

또한, 희생 블록을 선택하는 단계는, 복수의 블록 중 유효 데이터 및 제1 무효 데이터의 개수가 가장 작은 블록을 희생 블록으로 선택하는 단계이다.In addition, the selecting of the victim block includes selecting a block having the smallest number of valid data and first invalid data among the plurality of blocks as the victim block.

또한, 희생 블록을 선택하는 단계는 복수의 블록 중 중요 블록 값이 가장 작은 블록을 희생 블록으로 선택하는 단계이다.In addition, the step of selecting the victim block is selecting a block having the smallest significant block value among the plurality of blocks as the victim block.

여기서, 중요 블록 값은 <수학식> 중요 블록 값=(유효 데이터 개수/블록 내 페이지 수)+(제1 무효 데이터 개수/블록 내 페이지 수)×가중치에 의해 정의된다.Here, the critical block value is defined by <Equation> significant block value = (number of valid data / number of pages in a block) + (number of first invalid data / number of pages in a block) × weight.

여기서, 가중치는 0에서 1 사이의 범위에서 결정된다.Here, the weight is determined in the range of 0 to 1.

또한, 희생 블록을 선택하는 단계는, 메모리 영역 중 사용 가능한 메모리 영역이 임계값 이하인 경우 실행된다.In addition, the selecting of the victim block is performed when the available memory area among the memory areas is less than or equal to the threshold value.

또한, 제2 무효 데이터는 제1 무효 데이터의 이전 버전 데이터이고, 제1 무효 데이터는 유효 데이터의 이전 버전 데이터이다.Further, the second invalid data is the previous version data of the first invalid data, and the first invalid data is the previous version data of the valid data.

또한, 제1 및 제2 무효 데이터로 분류하는 단계는, 유효 데이터, 제1 무효 데이터 및 제2 무효 데이터의 관계를 추적하기 위한 추적 테이블을 이용하여 분류한다.The classifying into the first and second invalid data may be classified using a tracking table for tracking the relationship between the valid data, the first invalid data, and the second invalid data.

또한, 프리 블록으로 이전하는 단계 희생 블록에 저장된 제1 무효 데이터를 복수의 블록 중 프리 블록으로 이전하는 단계를 포함한다.The method may further include transferring first invalid data stored in the victim block to a free block among the plurality of blocks.

본 발명에 따르면, 유효 데이터와 데이터 복구 요청 가능성이 높은 무효 데이터의 개수가 많은 블록이 희생 블록으로 선택되어 소거되는 것을 방지하여 데이터 복구 요청 가능성이 높은 무효 데이터의 수명을 연장할 수 있고, 이를 통해, 데이터 복구 성능을 향상시킬 수 있는 효과가 있다.According to the present invention, a block having a large number of valid data and invalid data having a high probability of requesting data recovery can be selected as a victim block and erased, thereby extending the lifespan of invalid data having a high possibility of requesting data recovery. This has the effect of improving data recovery performance.

본 발명의 효과는 이상에서 언급된 것들에 한정되지 않으며, 언급되지 아니한 다른 효과들은 아래의 기재로부터 당해 기술분야에 있어서의 통상의 지식을 가진 자가 명확하게 이해할 수 있을 것이다.The effects of the present invention are not limited to those mentioned above, and other effects not mentioned above will be clearly understood by those skilled in the art from the following description.

도 1은 일반적인 가비지 컬렉션을 설명하기 위한 도면이다.
도 2는 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법을 설명하기 위한 도면이다.
도 3은 페이지의 상태 전이 다이어그램이다.
도 4는 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법의 흐름도이다.
도 5는 희생 블록을 선택하기 위한 가중치 및 중요 블록 값을 도시한 도면이다.
도 6은 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법에서 적용되는 추적 테이블을 도시한 표이다.
1 is a diagram illustrating a general garbage collection.
2 is a diagram for describing a garbage collection method of a nonvolatile memory device according to an exemplary embodiment of the present invention.
3 is a state transition diagram of a page.
4 is a flowchart of a garbage collection method of a nonvolatile memory device according to an embodiment of the present invention.
5 is a diagram illustrating weights and significant block values for selecting a victim block.
FIG. 6 is a table illustrating a tracking table applied to a garbage collection method of a nonvolatile memory device according to an embodiment of the present invention.

본 명세서 및 청구범위에 사용된 용어나 단어는 통상적이거나 사전적인 의미로 한정해서 해석되어서는 아니 되며, 발명자는 그 자신의 발명을 가장 최선의 방법으로 설명하기 위해 용어의 개념을 적절하게 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야만 한다.The terms or words used in this specification and claims are not to be construed as limiting in their usual or dictionary meanings, and the inventors may appropriately define the concept of terms in order to best explain their invention in the best way possible. It should be interpreted as meaning and concept corresponding to the technical idea of the present invention based on the principle that the present invention.

따라서 본 명세서에 기재된 실시예와 도면에 도시된 구성은 본 발명의 가장 바람직한 실시예에 불과할 뿐이고 본 발명의 기술적 사상을 모두 대변하는 것은 아니므로, 본 출원 시점에 있어서 이들을 대체할 수 있는 다양한 균등물과 변형 예들이 있을 수 있음을 이해하여야 한다.Therefore, the embodiments shown in the specification and the configuration shown in the drawings are only the most preferred embodiments of the present invention and do not represent all of the technical idea of the present invention, various equivalents that may be substituted for them at the time of the present application It should be understood that there may be variations and examples.

이하, 첨부된 도면을 참조하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다.DETAILED DESCRIPTION Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art may easily implement the present invention.

본 발명의 실시예에 따른 비휘발성 메모리 장치는 애플리케이션, 파일 시스템, 플래시 변환 계층 및 플래시 메모리 순으로 소프트웨어 계층 구조를 가질 수 있다.A nonvolatile memory device according to an embodiment of the present invention may have a software hierarchy in order of an application, a file system, a flash translation layer, and a flash memory.

파일 시스템은 애플리케이션으로부터 데이터 저장(store) 명령, 데이터 읽기(read) 명령, 데이터 이동(move) 명령, 데이터 삭제(delete) 명령, 그리고 데이터 복구(recovery) 명령을 받으며, 처리될 데이터의 논리 주소(logical address)를 플래시 변환 계층에 전달한다.The file system receives data store commands, data read commands, data move commands, data delete commands, and data recovery commands from the application, and the logical address of the data to be processed ( logical address) to the flash translation layer.

플래시 변환 계층은, 파일 시스템으로부터 논리 주소를 입력 받고, 주소 맵핑 테이블(mapping table)을 참조하여 논리 주소를 물리 주소(physical address)로 변환한다.The flash translation layer receives a logical address from a file system and converts the logical address into a physical address by referring to an address mapping table.

여기서, 주소 맵핑 테이블은 복수의 맵핑 데이터를 포함하며, 각각의 맵핑 데이터는 논리 주소와 물리 주소의 대응 관계를 정의한다. 그리고, 물리 주소는 플래시 메모리로 제공된다.Here, the address mapping table includes a plurality of mapping data, and each mapping data defines a correspondence relationship between a logical address and a physical address. The physical address is then provided to the flash memory.

플래시 메모리는 메타 데이터 영역(meta data area)과 유저 데이터 영역(user data area)으로 구분된다.The flash memory is divided into a meta data area and a user data area.

여기서, 유저 데이터 영역에는 텍스트, 영상 및 음성 등의 유저 데이터(user data)가 저장되고, 메타 데이터 영역에는 유저 데이터에 관한 정보 예컨대, 유저 데이터의 위치 정보(location information)가 저장된다. 이에 따라, 파일 시스템은 메타 데이터 영역을 참조함으로써 유저 데이터의 저장 위치를 파악할 수 있다.Here, user data such as text, video, and audio are stored in the user data area, and information regarding the user data, for example, location information of the user data, is stored in the meta data area. Accordingly, the file system can grasp the storage location of the user data by referring to the metadata area.

도 2는 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법을 설명하기 위한 도면이고, 도 3은 페이지의 상태 전이 다이어그램이고, 도 4는 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법의 흐름도이고, 도 5는 희생 블록을 선택하기 위한 가중치 및 중요 블록 값을 도시한 도면이다.2 is a diagram for describing a garbage collection method of a nonvolatile memory device according to an embodiment of the present invention, FIG. 3 is a state transition diagram of a page, and FIG. 4 is a diagram of a nonvolatile memory device according to an embodiment of the present invention. 5 is a flowchart illustrating a garbage collection method, and FIG. 5 illustrates weights and significant block values for selecting a victim block.

도 2에 도시한 바와 같이, 본 발명의 실시예에 따른 플래시 메모리 장치는 메모리 영역이 복수의 블록(Block)으로 이루어져 있으며, 이러한 복수의 블록(Block)은 복수의 페이지(Page)를 포함하고 있다.As shown in FIG. 2, in a flash memory device according to an exemplary embodiment of the present invention, a memory area includes a plurality of blocks, and the plurality of blocks includes a plurality of pages. .

본 발명의 실시예에 따른 플래시 메모리 장치의 가비지 컬렉션 방법은 플래시 메모리 영역 중 사용 가능한 메모리 영역이 임계값 이하인 경우 실행되는 것이 바람직하다.The garbage collection method of the flash memory device according to an embodiment of the present invention is preferably executed when the usable memory area of the flash memory area is less than or equal to a threshold.

본 발명의 실시예에 따른 플래시 메모리 장치의 가비지 컬렉션(Garbage Collection) 방법은 데이터 복구 요청 가능성이 높은 무효 데이터(Invalid Data)를 예측하여 예측된 무효 데이터(Invalid Data)의 수명을 연장함으로써, 데이터 복구 성능을 향상시키는 것을 특징으로 한다.According to an embodiment of the present invention, a garbage collection method of a flash memory device recovers data by predicting invalid data having a high probability of requesting data recovery, thereby extending the life expectancy of invalid data. It is characterized by improving the performance.

여기서, 유효 데이터(Valid Data)는 데이터가 저장되지 않은 프리 페이지(Free Page)에 새로 쓴 데이터이며, 이 유효 데이터(Valid Data)가 저장된 페이지는 프리 페이지(Free Page)에서 유효 페이지(Valid Page)로 변경된다.Here, valid data is data newly written to a free page in which no data is stored, and a page in which the valid data is stored is a valid page from a free page. Is changed to

그리고, 무효 데이터(Invalid Data)는 삭제되거나 덮어 쓴 데이터이며, 이 무효 데이터(Invalid Data)가 저장된 페이지는 유효 페이지(Valid Page)에서 무효 페이지(Invalid Page)로 변경된다.The invalid data is data that is deleted or overwritten, and the page in which the invalid data is stored is changed from a valid page to an invalid page.

본 발명의 실시예에 따른 플래시 메모리 장치의 가비지 컬렉션 방법은 데이터 복구 요청 가능성을 예측하기 위해 무효 데이터(Invalid Data)의 버전(Version)을 이용한다. The garbage collection method of a flash memory device according to an embodiment of the present invention uses a version of invalid data to predict a possibility of a data recovery request.

즉, 무효 데이터(Invalid Data)는 여러 버전의 무효 데이터(Invalid Data)가 있을 수 있으며, 이 경우 가장 최신 버전의 무효 데이터(Invalid Data)가 복구 데이터로 채택될 가능성이 높다. 따라서, 가장 최신 버전의 무효 데이터(Invalid Data)의 수명을 연장시킴으로써 데이터 복구 성능을 향상시킨다.That is, the invalid data may include several versions of invalid data, and in this case, it is highly likely that the most recent version of invalid data is used as the recovery data. Therefore, the data recovery performance is improved by extending the life of the most recent version of Invalid Data.

여기서, 가장 최신 버전의 무효 데이터(Invalid Data)를 제1 무효 데이터(Shallow Invalid Data; sInvalid Data)라고 정의하고, 그 이전 버전의 무효 데이터(Invalid Data)를 제2 무효 데이터(Deep Invalid Data; dInvalid Data)라고 정의 하겠다.Here, the most recent version of Invalid Data is defined as first invalid data (sInvalid Data), and the previous version of Invalid Data is defined as second invalid data (dInvalid). Data).

즉, 제2 무효 데이터(dInvalid Data)는 제1 무효 데이터(sInvalid Data)의 이전 버전 데이터이고, 제1 무효 데이터(sInvalid Data)는 유효 데이터(Valid Data)의 이전 버전 데이터이다.That is, the second invalid data dInvalid Data is previous version data of the first invalid data sInvalid Data, and the first invalid data sInvalid Data is previous version data of valid data.

도 3에 도시한 바와 같이, 각 페이지(Page)는 프리 상태(Free State), 유효 상태(Valid State), 제1 무효 상태(sInvalid State) 및 제2 무효 상태(dInvalid State) 등으로 상태가 전이 된다.As shown in FIG. 3, each page transitions to a free state, a valid state, a first invalid state, a second invalid state, and the like. do.

첫 번째 전이(Transition 1)는 쓰기 동작에 의해 첫 번째 데이터가 프리 페이지(Free Page)에 저장될 때 수행되며, 이 경우 페이지 상태는 프리 상태(Free State)에서 유효 상태(Valid State)로 전이된다. 즉, 첫 번째 데이터는 유효 데이터(Valid Data)가 되고 프리 페이지(Free Page)는 유효 페이지(Valid Page)로 변경된다. The first transition (Transition 1) is performed when the first data is stored in a free page by a write operation, in which case the page state transitions from the free state to the valid state. . That is, the first data becomes valid data and the free page is changed to a valid page.

두 번째 전이(Transition 2)는 삭제 또는 덮어 쓰기 동작에 의해 두 번째 데이터가 다른 프리 페이지(Free Page)에 저장될 때 수행되며, 이 경우 페이지 상태는 유효 상태(Valid State)에서 제1 무효 상태(sInvalid State)로 전이된다. 즉, 유효 데이터(Valid Data)는 제1 무효 데이터(sInvalid Data)가 되고, 유효 페이지(Valid Page)는 제1 무효 페이지(sInvalid Page)로 변경된다. The second transition (Transition 2) is performed when the second data is stored in another free page by a delete or overwrite operation, in which case the page state is from the valid state to the first invalid state ( sInvalid State). That is, the valid data becomes first invalid data and the valid page is changed to a first invalid page.

여기서, 두 번째 데이터는 유효 데이터(Valid Data)가 되고 이 유효 데이터(Valid Data)가 저장된 프리 페이지(Free Page)는 유효 페이지(Valid Page)로 변경된다.Here, the second data becomes valid data and a free page in which the valid data is stored is changed to a valid page.

세 번째 전이(Transition 3)는 다음 삭제 또는 덮어 쓰기 동작에 의해 세 번째 데이터가 또 다른 프리 페이지(Free Page)에 저장될 때 수행되며, 이 경우 페이지 상태는 제1 무효 상태(sInvalid State)에서 제2 무효 상태(dInvalid State)로 전이된다. 즉, 제1 무효 데이터(sInvalid Data)는 제2 무효 데이터(dInvalid Data)가 되고, 제1 무효 페이지(sInvalid Page)는 제2 무효 페이지(dInvalid Page)로 변경된다.The third transition (Transition 3) is performed when the third data is stored in another free page by the next delete or overwrite operation, in which case the page state is removed from the first invalid state (sInvalid State). 2 transition to the invalid state (dInvalid State). That is, the first invalid data sInvalid Data becomes the second invalid data dInvalid Data, and the first invalid page sInvalid Page is changed to the second invalid page dInvalid Page.

여기서, 두 번째 데이터는 제1 무효 데이터(sInvalid Data)가 되고 이 제1 무효 데이터(sInvalid Data)가 저장된 유효 페이지(Valid Page)는 제1 무효 페이지(sInvalid Page)로 변경되고, 세 번째 데이터는 유효 데이터(Valid Data)가 되고 이 유효 데이터(Valid Data)가 저장된 프리 페이지(Free Page)는 유효 페이지(Valid Page)로 변경된다.Here, the second data becomes the first invalid data (sInvalid Data), the valid page in which the first invalid data (sInvalid Data) is stored is changed to the first invalid page (sInvalid Page), and the third data is The free page that becomes valid data and stores the valid data is changed to a valid page.

네 번째 전이(Transition 4)는 소거 동작에 의해 제1 무효 페이지(sInvalid Page)에 저장된 제1 무효 데이터(sInvalid Data)가 소거될 때 수행되며, 이 경우 페이지 상태는 제1 무효 상태(sInvalid State)에서 프리 상태(Free State)로 전이된다. 즉, 제1 무효 데이터(sInvalid Data)는 소거 되고, 제1 무효 페이지(sInvalid Page)는 프리 페이지(Free Page)로 변경된다.The fourth transition (Transition 4) is performed when the first invalid data (sInvalid Data) stored in the first invalid page (sInvalid Page) by the erase operation is erased, in which case the page state is the first invalid state (sInvalid State) Transitions to the free state. That is, the first invalid data sInvalid Data is erased, and the first invalid page sInvalid Page is changed to a free page.

여기서, 제1 무효 데이터(sInvalid Data)는 이미 소거되었기 때문에 복구 대상이 될 수 없음은 당연하다Here, it is obvious that the first invalid data may not be a recovery target because the first invalid data has already been erased.

다섯 번째 전이(Transition 5)는 소거 동작에 의해 제2 무효 페이지(dInvalid Page)에 저장된 제2 무효 데이터(dInvalid Data)가 소거될 때 수행되며, 이 경우 페이지 상태는 제2 무효 상태(dInvalid State)에서 프리 상태(Free state)로 전이된다. 즉, 제2 무효 데이터(dInvalid Data)는 소거 되고, 제2 무효 페이지(dInvalid Page)는 프리 페이지(Free Page)로 변경된다.The fifth transition (Transition 5) is performed when the second invalid data (dInvalid Data) stored in the second invalid page (dInvalid Page) by the erase operation, in which case the page state is the second invalid state (dInvalid State) Transitions to the free state. That is, the second invalid data dInvalid Data is erased and the second invalid page dInvalid Page is changed to a free page.

한편, 본 발명의 실시예에 따른 비휘발성 메모리 장치의 플래시 메모리 영역은 복수의 블록(Block)으로 이루어져 있는데, 복수의 블록(Block) 중 소거 대상인 블록(Block)을 희생 블록(Victim Block)이라고 정의하고, 데이터가 저장되어 있지 않은 블록(Block)을 프리 블록(Free Block)이라고 정의하겠다.Meanwhile, the flash memory area of the nonvolatile memory device according to an embodiment of the present invention includes a plurality of blocks, and a block to be erased among the blocks is defined as a victim block. A block in which no data is stored will be defined as a free block.

전술한 바와 같이, 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법은 페이지 간 상태 전이를 통해 무효 데이터(Invalid Data)를 제1 무효 데이터(sInvalid Data)와 제2 무효 데이터(dInvalid Data)로 분류하고, 유효 데이터(Valid Data) 및 제1 무효 데이터(sInvalid Data)의 개수가 가장 적은 블록(Block)을 희생 블록(Victim Block)으로 선택한다.As described above, in the garbage collection method of the nonvolatile memory device according to the embodiment of the present invention, invalid data (Invalid Data) and second invalid data (dInvalid Data) are converted into invalid data through transitions between pages. ), And a block having the smallest number of valid data and first invalid data is selected as a victim block.

다시 말해, 유효 데이터(Valid Data)와 데이터 복구 요청 가능성이 높은 제1 무효 데이터(sInvalid Data)의 개수가 많은 블록(Block)이 희생 블록(Victim Block)으로 선택되는 것을 방지하여 제1 무효 데이터(sInvalid Data)의 수명을 연장할 수 있고, 이를 통해, 데이터 복구 성능을 향상시킬 수 있다.In other words, a block having a large number of valid data and first invalid data having a high probability of requesting data recovery is prevented from being selected as a victim block, thereby preventing the first invalid data ( sInvalid Data) can be extended, thereby improving data recovery performance.

또한, 희생 블록(Victim Block)에 저장된 유효 데이터(Valid Data) 및 제1 무효 데이터(sInvalid Data)는 희생 블록(Victim Block)이 소거되기 전에 프리 블록(Free Block)에 이전될 수 있다.In addition, valid data and first invalid data stored in the victim block may be transferred to a free block before the victim block is erased.

이와 같은 가비지 컬렉션은 유효 데이터(Valid Data)를 이전하는 작업으로 인해 메모리의 성능 저하를 초래할 수 있다. Such garbage collection can cause performance degradation of memory due to the transfer of valid data.

그러나, 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법은, 제2 무효 페이지(dInvalid Page)가 가장 많은 블록(Block)을 희생 블록(Victim Block)으로 선택하여 이를 소거함으로써, 유효 데이터(Valid Data) 및 제1 무효 데이터(sInvalid Data)의 이전 작업을 최소화함과 동시에 데이터 복구 성능을 향상시킬 수 있다.However, the garbage collection method of the nonvolatile memory device according to an embodiment of the present invention selects a block having the largest number of second invalid pages as a victim block and erases the valid data. The data recovery performance can be improved while minimizing the previous operations of the Valid Data and the first Invalid Data.

도 4에 도시한 바와 같이, 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법은, 유효 데이터(Valid Data) 및 무효 데이터(Invalid Data)를 복수의 페이지(Page)에 저장하는 단계(S10)와, 무효 데이터(Invalid Data)를 데이터 복구 요청 가능성에 따라 제1 무효 데이터(sInvalid Data) 및 제2 무효 데이터(dInvalid Data)로 분류하는 단계(S20)와, 유효 데이터(Valid Data), 제1 무효 데이터(sInvalid Data) 및 제2 무효 데이터(dInvalid Data)의 개수를 기초로 복수의 블록(Block) 중 희생 블록(Victim Block)을 선택하는 단계(S30)와, 희생 블록(Victim Block)에 저장된 유효 데이터(Victim Block)를 복수의 블록(Block) 중 프리 블록(Free Block)으로 이전하는 단계(S40)와, 희생 블록(Victim Block)을 소거하는 단계(S50)를 포함한다.As shown in FIG. 4, the garbage collection method of the nonvolatile memory device according to an embodiment of the present invention includes storing valid data and invalid data in a plurality of pages. S10) and classifying invalid data into first invalid data and second invalid data according to the possibility of a data recovery request (S20), valid data (Valid Data), Selecting a victim block from among the plurality of blocks based on the number of the first invalid data and the second invalid data in operation S30, and the victim block; Transferring the valid data stored in the (Victim Block) to a free block of the plurality of blocks (S40) and the step of erasing the victim block (Victim Block) (S50).

여기서, 제2 무효 데이터(dInvalid Data)는 제1 무효 데이터(sInvalid Data)의 이전 버전 데이터로서 제1 무효 데이터(sInvalid Data) 보다 데이터 복구 요청 가능성이 낮은 데이터이다.Here, the second invalid data dInvalid Data is data of a previous version of the first invalid data sInvalid Data, and the data recovery request probability is lower than that of the first invalid data sInvalid Data.

희생 블록(Victim Block)을 선택하는 단계(S30)는 복수의 블록(Block) 중 유효 데이터(Valid Data) 및 제1 무효 데이터(sInvalid Data)의 개수가 가장 작은 블록(Block)을 희생 블록(Victim Block)으로 선택하는 단계이다.In step S30 of selecting a victim block, the victim block may include a block having the smallest number of valid data and first invalid data among the plurality of blocks. Block) step.

구체적으로, 희생 블록(Victim Block)을 선택하는 단계(S30)는 복수의 블록(Block) 중 중요 블록 값이 가장 작은 블록을 희생 블록(Victim Block)으로 선택하는 단계일 수 있다.In detail, in operation S30 of selecting a victim block, the block having the smallest significant block value among the plurality of blocks may be selected as the victim block.

여기서, 중요 블록 값은 아래의 수학식에 의해 정의된다.Here, the important block value is defined by the following equation.

<수학식>Equation

중요 블록 값=(유효 데이터(Valid Data) 개수/블록(Block) 내 페이지(Page) 수)+(제1 무효 데이터(sInvalid Data) 개수/블록(Block) 내 페이지(Page) 수)×가중치(Weight)Critical Block Value = (Number of Valid Data / Number of Pages in Block) + (Number of First Invalid Data / Number of Pages in Block) x Weight ( Weight)

여기서, 가중치(Weight)는 0에서 1 사이의 범위에서 결정될 수 있다.Here, the weight may be determined in a range of 0 to 1.

도 5를 참조하면, 제1 블록(Block 1) 및 제2 블록(Block 2)은 두 개의 유효 데이터(Valid Data)와 두 개의 무효 데이터(Invalid Data)를 저장하고 있다. 그러나, 제1 블록(Block 1)은 두 개의 제2 무효 데이터(dInvalid Data)를 저장하고 있고, 제2 블록(Block 2)은 한 개의 제1 무효데이터(sInvalid Data)와 한 개의 제2 무효 데이터(dInvalid Data)를 저장하고 있다.Referring to FIG. 5, the first block Block 1 and the second block Block 2 store two valid data and two invalid data. However, the first block (Block 1) stores two second invalid data (dInvalid Data), and the second block (Block 2) has one first invalid data (sInvalid Data) and one second invalid data. (dInvalid Data) is stored.

여기서, 제1 무효 데이터(sInvalid Data)의 가중치(Weight)를 0으로 결정하면, 상기 수학식에 의해 제1 블록(Block 1) 및 제2 블록(Block 2)의 중요 블록 값은 0.5로 같기 때문에 제1 블록(Block 1) 및 제2 블록(Block 2) 모두 희생 블록(Victim Block)으로 선택될 수 있다.Herein, if the weight of the first invalid data is determined as 0, the important block values of the first block Block 1 and the second block Block 2 are equal to 0.5 according to the above equation. Both the first block Block 1 and the second block Block 2 may be selected as victim blocks.

또한, 제1 무효 데이터(sInvalid Data)의 가중치(Weight)를 1로 결정하면, 상기 수학식에 의해 제1 블록(Block 1)의 중요 블록 값은 0.5이고 제2 블록(Block 2)의 중요 블록 값은 0.75이기 때문에 중요 블록 값이 작은 제1 블록(Block 1)이 희생 블록(Victim Block)으로 선택된다.In addition, if the weight of the first invalid data (sInvalid Data) is determined as 1, the critical block value of the first block Block 1 is 0.5 and the critical block of the second block Block 2 according to the above equation. Since the value is 0.75, the first block (Block 1) having a small important block value is selected as the victim block.

또한, 제1 무효 데이터(sInvalid Data)의 가중치(Weight)를 0.5로 결정하면, 상기 수학식에 의해 제1 블록(Block 1)의 중요 블록 값은 0.5이고 제2 블록(Block 2)의 중요 블록 값은 0.625이기 때문에 중요 블록 값이 작은 제1 블록(Block 1)이 희생 블록(Victim Block)으로 선택된다.In addition, if the weight of the first invalid data (sInvalid Data) is determined as 0.5, the value of the significant block of the first block (Block 1) is 0.5 by the above equation and the significant block of the second block (Block 2). Since the value is 0.625, the first block (Block 1) having a small important block value is selected as the victim block.

희생 블록(Victim Block)을 선택하는 단계(S30)는, 메모리 영역 중 사용 가능한 메모리 영역이 임계값 이하인 경우 실행되는 것이 바람직하다.Selecting a victim block (S30) is preferably performed when the available memory area among the memory areas is less than or equal to a threshold value.

다시 도 2를 참조하면, 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법은, 먼저, 복수의 블록(Block) 중 소거 대상인 희생 블록(Victim Block)을 선택한다. 여기서, 유효 페이지(Valid Page) 및 제1 무효 페이지(sInvalid Page)가 가장 적은 블록(Block 2) 즉, 제2 무효 페이지(dInvalid Page)가 가장 많은 블록(Block 2)을 희생 블록(Victim Block)으로 선택할 수 있다.Referring back to FIG. 2, in the garbage collection method of the nonvolatile memory device according to an embodiment of the present invention, first, a victim block is selected from among a plurality of blocks. In this case, a block having the smallest valid page and the first invalid page (Block 2), that is, a block having the largest number of the second invalid page (dInvalid page) is a victim block (Victim Block). Can be selected.

다음, 희생 블록(Victim Block)의 유효 페이지(Valid Page)에 저장된 유효 데이터(Valid Data) 및 제1 무효 페이지(sInvalid Page)에 저장된 제1 무효 데이터(sInvalid Data)를 프리 페이지(Free Page)만으로 이루어진 다른 블록(Block 3) 즉, 데이터가 저장되지 않은 프리 블록(Free Block)으로 이전시킨다.Next, the valid data stored in the valid page of the victim block and the first invalid data stored in the first invalid page are converted into free pages only. It is transferred to another block (Block 3) that is made, that is, a free block in which data is not stored.

다음, 희생 블록(Victim Block)을 소거하여 메모리 영역에서 쓰기 작업을 위한 여유 공간을 확보한다.Next, the victim block is erased to free space for a write operation in the memory area.

도 6은 본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법에서 적용되는 추적 테이블을 도시한 표이다.FIG. 6 is a table illustrating a tracking table applied to a garbage collection method of a nonvolatile memory device according to an embodiment of the present invention.

도 6에 도시한 바와 같이, 추적 테이블(Track Table)은, 희생 블록을 선택하기 위한 페이지의 상태 정보를 처리하고, 유효 페이지(Valid Page), 제1 무효 페이지(sInvalid Page) 및 제2 무효 페이지(dInvalid Page) 사이의 관계를 추적하기 위해 사용된다.As shown in FIG. 6, a track table processes state information of a page for selecting a victim block, and includes a valid page, a first invalid page, and a second invalid page. Used to track the relationship between (dInvalid Page).

즉, 무효 데이터(Invalid Data)를 제1 무효 데이터(sInvalid Data) 및 제2 무효 데이터(dInvalid Data)로 분류하는 단계(S20)는, 유효 데이터(Valid Data), 제1 무효 데이터(sInvalid Data) 및 제2 무효 데이터(dInvalid Data)의 관계를 추적하기 위한 추적 테이블을 이용하여 분류할 수 있다.That is, in the step S20 of classifying invalid data into first invalid data and second invalid data, the valid data and the first invalid data are valid data. And a tracking table for tracking the relationship between the second invalid data (dInvalid Data).

구체적으로, 추적 테이블의 각 항목은 인덱스(Index), 이전 버전 페이지의 물리 주소(Physical Page Adress; PPA) 및 플래그(Flag)를 나타내며, 여기서, 인덱스는 페이지의 물리 주소(Physical Page Adress; PPA)를 나타내고, 플래그는 페이지 상태 정보를 나타낸다. 그리고, 추적 테이블의 각 항목은 페이지 상태 전이에 따라 변경되며, 데이터 복구 시 이를 인식하여 희생 블록(Victim Block) 선택에 사용된다.Specifically, each entry in the tracking table represents an index, a physical page address (PPA), and a flag of a previous version page, where the index represents a physical page address (PPA) of the page. The flag indicates page status information. Each item in the tracking table changes according to the page state transition, and is used to select a victim block by recognizing this when recovering data.

예를 들어, 도 6을 참조하면, PPA(400)의 페이지는 현재 유효 상태이고, PPA(300)의 페이지는 PPA(400)의 페이지가 유효 상태가 되기 전에 유효 상태이었기 때문에, PPA(300)의 페이지는 현재 제1 무효 상태(sInvalid State)이다. 그리고, PPA(200)의 페이지는 PPA(300)의 페이지가 유효 상태가 되기 전에 유효 상태이었기 때문에, PPA(200)의 페이지는 현재 제2 무효 상태(dInvalid State)이다.For example, referring to FIG. 6, the page of PPA 400 is currently valid, and the page of PPA 300 was valid before the page of PPA 400 became valid. The page of is currently the first invalid state (sInvalid State). Since the page of the PPA 200 was valid before the page of the PPA 300 became valid, the page of the PPA 200 is currently in the second invalid state.

본 발명의 실시예에 따른 비휘발성 메모리 장치의 가비지 컬렉션 방법에 있어서, 프리 블록(Free Block)으로 이전하는 단계(S40)는 희생 블록(Victim Block)에 저장된 제1 무효 데이터(sInvalid Data)를 복수의 블록(Block) 중 프리 블록(Free Block)으로 이전하는 단계를 포함할 수 있다.In a garbage collection method of a nonvolatile memory device according to an embodiment of the present invention, the step of transferring to a free block (S40) includes a plurality of first invalid data stored in a victim block. The method may include transferring to a free block among blocks of the block.

이를 통해, 제1 무효 데이터(sInvalid Data)의 수명을 연장할 수 있고, 데이터 복구 성능을 향상시킬 수 있다.Through this, the lifespan of the first invalid data may be extended and data recovery performance may be improved.

이상의 상세한 설명은 본 발명을 예시하는 것이다. 또한 전술한 내용은 본 발명의 바람직한 실시 형태를 나타내고 설명하는 것에 불과하며, 본 발명은 다양한 다른 조합, 변경 및 환경에서 사용할 수 있다. 즉, 본 명세서에 개시된 발명의 개념의 범위, 저술한 개시 내용과 균등한 범위 및/또는 당업계의 기술 또는 지식의 범위 내에서 변경 또는 수정이 가능하다. 전술한 실시예들은 본 발명을 실시하는데 있어 최선의 상태를 설명하기 위한 것이며, 본 발명과 같은 다른 발명을 이용하는데 당업계에 알려진 다른 상태로의 실시, 그리고 발명의 구체적인 적용 분야 및 용도에서 요구되는 다양한 변경도 가능하다. 따라서 이상의 발명의 상세한 설명은 개시된 실시 상태로 본 발명을 제한하려는 의도가 아니다. 또한 첨부된 청구범위는 다른 실시 상태도 포함하는 것으로 해석되어야 한다.The foregoing detailed description illustrates the present invention. In addition, the foregoing description merely shows and describes preferred embodiments of the present invention, and the present invention can be used in various other combinations, modifications, and environments. That is, changes or modifications may be made within the scope of the concept of the invention disclosed in this specification, the scope equivalent to the disclosed contents, and / or the skill or knowledge in the art. The above-described embodiments are for explaining the best state in carrying out the present invention, the use of other inventions such as the present invention in other state known in the art, and the specific fields of application and uses of the present invention. Various changes are also possible. Thus, the detailed description of the invention is not intended to limit the invention to the disclosed embodiments. Also, the appended claims should be construed to include other embodiments.

Valid Page: 유효 페이지
sInvalid Page: 제1 무효 페이지
dInvalid Page: 제2 무효 페이지
Free Page: 프리 페이지
Victim Block: 희생 블록
Valid Page: Valid Page
sInvalid Page: First Invalid Page
dInvalid Page: Second Invalid Page
Free Page: Free Page
Victim Block: Sacrifice Block

Claims (10)

복수의 페이지를 포함하는 복수의 블록으로 이루어진 메모리 영역에서,
유효 데이터 및 무효 데이터를 상기 복수의 페이지에 저장하는 단계;
상기 무효 데이터를 데이터 복구 요청 가능성에 따라 제1 및 제2 무효 데이터로 분류하는 단계;
상기 유효 데이터와 상기 제1 및 제2 무효 데이터의 개수를 기초로 상기 복수의 블록 중 희생 블록을 선택하는 단계;
상기 희생 블록에 저장된 상기 유효 데이터를 상기 복수의 블록 중 프리 블록으로 이전하는 단계; 및
상기 희생 블록을 소거하는 단계를 포함하고,
상기 제2 무효 데이터는 상기 제1 무효 데이터의 이전 버전 데이터이고, 상기 제1 무효 데이터는 상기 유효 데이터의 이전 버전 데이터이고,
상기 제1 및 제2 무효 데이터로 분류하는 단계는,
상기 유효 데이터, 상기 제1 무효 데이터 및 상기 제2 무효 데이터의 관계를 추적하기 위한 추적 테이블을 이용하여 분류하는
비휘발성 메모리 장치의 가비지 컬렉션 방법.
In a memory area composed of a plurality of blocks including a plurality of pages,
Storing valid data and invalid data in the plurality of pages;
Classifying the invalid data into first and second invalid data according to a possibility of a data recovery request;
Selecting a victim block among the plurality of blocks based on the valid data and the number of the first and second invalid data;
Transferring the valid data stored in the victim block to a free block among the plurality of blocks; And
Erasing the sacrificial block;
The second invalid data is previous version data of the first invalid data, the first invalid data is previous version data of the valid data,
The classifying into the first and second invalid data may include:
Classifying using a tracking table for tracking the relationship between the valid data, the first invalid data and the second invalid data
Garbage collection method for nonvolatile memory devices.
제 1 항에 있어서,
상기 제2 무효 데이터는
상기 제1 무효 데이터의 이전 버전 데이터로서 상기 제1 무효 데이터 보다 상기 데이터 복구 요청 가능성이 낮은 데이터인
비휘발성 메모리 장치의 가비지 컬렉션 방법.
The method of claim 1,
The second invalid data is
The previous version data of the first invalid data is data having a lower probability of the data recovery request than the first invalid data.
Garbage collection method for nonvolatile memory devices.
제 2 항에 있어서,
상기 희생 블록을 선택하는 단계는,
상기 복수의 블록 중 상기 유효 데이터 및 상기 제1 무효 데이터의 개수가 가장 작은 블록을 상기 희생 블록으로 선택하는 단계인
비휘발성 메모리 장치의 가비지 컬렉션 방법.
The method of claim 2,
Selecting the sacrificial block,
Selecting a block having the smallest number of the valid data and the first invalid data among the plurality of blocks as the victim block;
Garbage collection method for nonvolatile memory devices.
제 2 항에 있어서,
상기 희생 블록을 선택하는 단계는
상기 복수의 블록 중 중요 블록 값이 가장 작은 블록을 상기 희생 블록으로 선택하는 단계인
비휘발성 메모리 장치의 가비지 컬렉션 방법.
The method of claim 2,
Selecting the sacrificial block
Selecting a block having the smallest significant block value among the plurality of blocks as the victim block;
Garbage collection method for nonvolatile memory devices.
제 4 항에 있어서,
상기 중요 블록 값은
<수학식>
중요 블록 값=(유효 데이터 개수/블록 내 페이지 수)+(제1 무효 데이터 개수/블록 내 페이지 수)×가중치
에 의해 정의되는
비휘발성 메모리 장치의 가비지 컬렉션 방법.
The method of claim 4, wherein
The critical block value is
Equation
Significant block value = (number of valid data / number of pages in block) + (number of first invalid data / number of pages in block) × weight
Defined by
Garbage collection method for nonvolatile memory devices.
제 5 항에 있어서,
상기 가중치는
0에서 1 사이의 범위에서 결정되는
비휘발성 메모리 장치의 가비지 컬렉션 방법.
The method of claim 5,
The weight is
Determined in the range 0 to 1.
Garbage collection method for nonvolatile memory devices.
제 1 항에 있어서,
상기 희생 블록을 선택하는 단계는,
상기 메모리 영역 중 사용 가능한 메모리 영역이 임계값 이하인 경우 실행되는
비휘발성 메모리 장치의 가비지 컬렉션 방법.
The method of claim 1,
Selecting the sacrificial block,
Executed when an available memory area of the memory area is equal to or less than a threshold
Garbage collection method for nonvolatile memory devices.
삭제delete 삭제delete 제 1 항에 있어서,
상기 프리 블록으로 이전하는 단계
상기 희생 블록에 저장된 상기 제1 무효 데이터를 상기 복수의 블록 중 상기 프리 블록으로 이전하는 단계를 포함하는
비휘발성 메모리 장치의 가비지 컬렉션 방법.




The method of claim 1,
Transferring to the free block
Transferring the first invalid data stored in the victim block to the free block among the plurality of blocks;
Garbage collection method for nonvolatile memory devices.




KR1020180078313A 2018-07-05 2018-07-05 Garbage Collection Method For Nonvolatile Memory Device KR102062045B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020180078313A KR102062045B1 (en) 2018-07-05 2018-07-05 Garbage Collection Method For Nonvolatile Memory Device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020180078313A KR102062045B1 (en) 2018-07-05 2018-07-05 Garbage Collection Method For Nonvolatile Memory Device

Publications (1)

Publication Number Publication Date
KR102062045B1 true KR102062045B1 (en) 2020-01-03

Family

ID=69155603

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180078313A KR102062045B1 (en) 2018-07-05 2018-07-05 Garbage Collection Method For Nonvolatile Memory Device

Country Status (1)

Country Link
KR (1) KR102062045B1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130076429A (en) * 2011-12-28 2013-07-08 삼성전자주식회사 Method for managing storage space in memory device and storage device using method thereof
KR20160075229A (en) 2014-12-19 2016-06-29 삼성전자주식회사 Method for operating garbage collection and RAID storage system adopting the same
KR20170044780A (en) * 2015-10-15 2017-04-26 에스케이하이닉스 주식회사 Memory system and operating method for the same
KR20170118594A (en) * 2016-04-15 2017-10-25 웨스턴 디지털 테크놀로지스, 인코포레이티드 Validity tracking for garbage collection

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20130076429A (en) * 2011-12-28 2013-07-08 삼성전자주식회사 Method for managing storage space in memory device and storage device using method thereof
KR20160075229A (en) 2014-12-19 2016-06-29 삼성전자주식회사 Method for operating garbage collection and RAID storage system adopting the same
KR20170044780A (en) * 2015-10-15 2017-04-26 에스케이하이닉스 주식회사 Memory system and operating method for the same
KR20170118594A (en) * 2016-04-15 2017-10-25 웨스턴 디지털 테크놀로지스, 인코포레이티드 Validity tracking for garbage collection

Similar Documents

Publication Publication Date Title
JP4832521B2 (en) Data management method in flash memory media
KR100484147B1 (en) Flash memory management method
US7562202B2 (en) Systems, methods, computer readable medium and apparatus for memory management using NVRAM
KR100684942B1 (en) Adaptive flash memory control device with multiple mapping schemes and flash memory system havintg the same
KR100526190B1 (en) Remapping method for flash memory
US8738882B2 (en) Pre-organization of data
JP5405513B2 (en) MEMORY SYSTEM, NONVOLATILE MEMORY DEVICE, NONVOLATILE MEMORY DEVICE CONTROL METHOD, AND PROGRAM
KR20090062754A (en) Semiconductor memory system and wear-leveling method thereof
JP6034183B2 (en) Semiconductor memory device
KR102615007B1 (en) Garbage collection - automatic data placement
KR20100042455A (en) Flash memory system and method of flash translation layer design thereof
JP2009525511A (en) Multistage error correction method and apparatus
TW201301030A (en) Fast translation indicator to reduce secondary address table checks in a memory device
JP2013239099A (en) Control device, storage device, and storage control method
JP2016525240A (en) Erase management in memory systems
US20130304972A1 (en) Control device, storage device, and storage control method
KR101883637B1 (en) Method and appartus for managing cache mapping table
KR102062045B1 (en) Garbage Collection Method For Nonvolatile Memory Device
JP2015053075A (en) Memory system, information processing device, and storage device
KR101699779B1 (en) Indexing method for flash memory
KR101676175B1 (en) Apparatus and method for memory storage to protect data-loss after power loss
KR20180076276A (en) Method for garbage collection of flash memory and storage device using the same
CN111324284B (en) Memory device
KR100982440B1 (en) System for managing data in single flash memory
Yang et al. An efficient dynamic hash index structure for NAND flash memory

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant