KR20060087958A - Method of cleaning the flash memory for minimizing overhead of erasing operation - Google Patents

Method of cleaning the flash memory for minimizing overhead of erasing operation Download PDF

Info

Publication number
KR20060087958A
KR20060087958A KR1020050008854A KR20050008854A KR20060087958A KR 20060087958 A KR20060087958 A KR 20060087958A KR 1020050008854 A KR1020050008854 A KR 1020050008854A KR 20050008854 A KR20050008854 A KR 20050008854A KR 20060087958 A KR20060087958 A KR 20060087958A
Authority
KR
South Korea
Prior art keywords
data
flash memory
area
erase
erasing
Prior art date
Application number
KR1020050008854A
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 KR1020050008854A priority Critical patent/KR20060087958A/en
Publication of KR20060087958A publication Critical patent/KR20060087958A/en

Links

Images

Classifications

    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B1/00Control systems of elevators in general
    • B66B1/24Control systems with regulation, i.e. with retroactive action, for influencing travelling speed, acceleration, or deceleration
    • B66B1/28Control systems with regulation, i.e. with retroactive action, for influencing travelling speed, acceleration, or deceleration electrical
    • BPERFORMING OPERATIONS; TRANSPORTING
    • B66HOISTING; LIFTING; HAULING
    • B66BELEVATORS; ESCALATORS OR MOVING WALKWAYS
    • B66B5/00Applications of checking, fault-correcting, or safety devices in elevators
    • B66B5/02Applications of checking, fault-correcting, or safety devices in elevators responsive to abnormal operating conditions
    • B66B5/14Applications of checking, fault-correcting, or safety devices in elevators responsive to abnormal operating conditions in case of excessive loads
    • B66B5/145Applications of checking, fault-correcting, or safety devices in elevators responsive to abnormal operating conditions in case of excessive loads electrical

Landscapes

  • Engineering & Computer Science (AREA)
  • Automation & Control Theory (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

본 발명은 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법에 관한 것으로서, 플래시 메모리에 데이터를 기록할 때는 갱신 빈도가 유사한 데이터들을 군집화시키도록 처리하고, 지우기를 실행할 때는 현재 데이터를 기록할 수 없는 상태의 데이터 블록 수와 현재까지 지운 횟수에 관한 정보를 통해 지우기에 가장 적합한 지우기 단위(Erase Unit)를 찾아낸다. 또한, 현재 Free 상태에 있는 EU의 수를 통해 지우기를 실행할 가장 적합한 시점을 찾아내어 지우기를 실행하도록 한다. 이에 따라 플래시 메모리의 수명을 최대한 연장할 수 있고, 지우기 연산의 비용 및 횟수를 최소화하여 플래시 파일 시스템의 성능을 향상 시킬 수 있게 된다.The present invention relates to a flash memory management method for minimizing the overhead of an erase operation. The present invention relates to a process of grouping data having similar update frequency when writing data to a flash memory, and unable to write current data when performing an erase operation. Information about the number of data blocks in the state and the number of times erased so far is used to find the Erase unit that is most suitable for erasing. In addition, the number of EUs currently in the free state is used to find the most suitable time for erasing and to perform erasing. As a result, the lifetime of the flash memory can be extended to the maximum, and the performance of the flash file system can be improved by minimizing the cost and the number of erase operations.

플래시 메모리, EU, 지우기, 오버헤드 최소화Flash memory, EU, erase, minimize overhead

Description

지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법{ Method of cleaning the flash memory for minimizing overhead of erasing operation }Method of cleaning the flash memory for minimizing overhead of erasing operation}

도 1은 EU 단위로 관리되는 플래시 메모리의 개요,1 is an overview of a flash memory managed in EU units;

도 2는 본 발명에 따라 데이터를 군집화시키는 일 실시예의 흐름도,2 is a flow diagram of an embodiment of clustering data in accordance with the present invention;

도 3은 논리적으로 복수개의 영역을 구분하는 개요,3 is an overview for logically separating a plurality of regions;

도 4는 갱신 빈도에 따라 데이터를 군집화하는 일 실시예,4 illustrates an embodiment of clustering data according to an update frequency;

도 5는 본 발명에 따라 데이터를 이동시키는 일 실시예의 흐름도,5 is a flowchart of an embodiment of moving data in accordance with the present invention;

도 6은 영역별로 데이터의 이동이 이루어지는 과정에 관한 개요,6 is an overview of a process of moving data for each region;

도 7은 각 영역별 데이터 관리 구조의 예,7 is an example of a data management structure for each area;

도 8은 본 발명에 따라 지우기를 실행하는 일 실시예의 흐름도,8 is a flow diagram of one embodiment for performing an erase in accordance with the present invention;

도 9는 본 발명에 따라 지우기 시점을 결정하는 일 실시예의 흐름도,9 is a flowchart of an embodiment of determining an erasure time point according to the present invention;

도 10은 지우기 시점의 결정 과정을 설명하기 위한 그래프이다.10 is a graph for explaining a determination process of erasing time.

* 도면의 주요부분에 대한 부호의 설명* Explanation of symbols for main parts of the drawings

10: 플래시 메모리 11-1: EU 헤더10: flash memory 11-1: EU header

11-2: 블록 헤더 11-3: 데이터 블록11-2: Block Header 11-3: Data Block

71: EU 리스트 72: 영역 테이블71: EU listing 72: area table

73: Free EU 테이블73: Free EU Table

본 발명은 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법에 관한 것으로서, 특히 느린 지우기 시간을 갖고 데이터를 지울 수 있는 횟수에 제한이 있는 플래시 메모리를 마모 평준화를 고려하여 더욱 효율적으로 관리할 수 있도록 해주는 방법에 관한 것이다.The present invention relates to a flash memory management method for minimizing the overhead of an erase operation, and more particularly, to manage a flash memory having a slow erase time and a limited number of times to erase data in consideration of wear leveling. It's about how to do it.

최근 PDA, HPC, 셋탑박스, 정보가전 등 다양한 임베디드(embedded) 시스템이 개발되고 있는데, 이러한 시스템을 운영하기 위해서는 실시간 운영체제와 파일 시스템이 필수적으로 요구된다. 이 때, 휴대의 용이성과 빠른 접근시간 그리고 저전력을 요구하는 임베디드 시스템의 특성상 데이터를 저장하기 위한 저장매체로 플래시 메모리가 주로 사용되고 있다.Recently, various embedded systems such as PDAs, HPCs, set-top boxes, and information appliances have been developed. Real-time operating systems and file systems are required to operate such systems. In this case, flash memory is mainly used as a storage medium for storing data due to the characteristics of an embedded system requiring easy portability, fast access time, and low power.

플래시 메모리는 읽기 연산은 빠르지만 쓰기와 지우기 연산은 상대적으로 느리고, 다음과 같은 문제점을 가지고 있다.Flash memory has fast read operations but relatively slow write and erase operations, and has the following problems.

첫째, 플래시 메모리는 일반 저장매체와는 달리 한번 데이터를 기록한 영역에 바로 다시 쓸 수 없다. 즉, 새로운 데이터를 기록하기 전에 플래시 메모리를 지워야 하며, 지우기 작업 역시 다른 저장매체와는 달리 일정 크기의 지우기 단위(Erase Unit: 이하 EU라 한다)로 지워야 하는 제한이 있다. 이러한 EU는 세그먼트(segment)라고도 불리는데, 그 용어와 관계없이 플래시 메모리를 관리하기 위하여 사용되는 지우기 단위를 포괄적으로 의미하는 것으로 사용하기로 한다.First, unlike general storage media, flash memory cannot be rewritten to an area where data has been written once. In other words, before writing new data, the flash memory must be erased, and unlike other storage media, the erase operation must be erased by a certain size erase unit (EU). This EU, also called a segment, will be used as a generic meaning of the erase unit used to manage flash memory regardless of the term.

둘째, 플래시 메모리는 지울 수 있는 횟수가 제한되어 있다. 즉, 일정 EU를 계속해서 사용하게 되면 한계 수명에 도달하게 되고 더 이상 사용할 수 없게 된다. 이는 플래시 메모리의 크기가 줄어드는 결과를 가져오고 새로운 데이터를 기록하기 위하여 지우기 과정이 더욱 빈번히 발생하게 되어 시스템의 이용에 치명적인 악영향을 준다.Second, flash memory is limited in the number of times it can be erased. In other words, if you continue to use a certain EU, you will reach the end of its useful life and will no longer be usable. This results in a reduction in the size of the flash memory and the erasing process occurs more frequently to write new data, which is fatal to the use of the system.

이에 본 발명은 상기와 같은 문제점을 해결하기 위하여 안출된 것으로서, 플래시 메모리의 지우기 연산에 관한 오버헤드를 최소화하고 지우기 작업이 일어나는 EU를 골고루 분산시켜 마모 평준화가 효율적으로 이루어지도록 하여, 플래시 메모리를 사용하는 각종 장치의 성능을 향상시킬 수 있는 방법을 제공하는데 그 목적이 있다.Accordingly, the present invention has been made to solve the above problems, to minimize the overhead of the erase operation of the flash memory and to evenly distribute the EU in which the erase operation is performed to make the wear leveling efficiently, using a flash memory It is an object of the present invention to provide a method for improving the performance of various devices.

상기와 같은 목적을 달성하기 위하여, 본 발명에 따라 데이터의 군집화를 수행하는 실시예는, 플래시 메모리를 각각 하나 이상의 EU를 갖는 복수개의 영역으로 이루어지도록 논리적으로 구분하는 단계; 및 상기 플래시 메모리에 데이터를 기록할 때는 해당 데이터의 갱신 빈도와 유사한 갱신 빈도를 갖는 데이터들이 기록되어 있는 영역에 기록될 수 있도록 처리하는 단계를 포함하여 이루어진다.In order to achieve the above object, an embodiment of performing clustering of data according to the present invention includes: logically dividing a flash memory into a plurality of regions each having at least one EU; And processing data to be recorded in the area in which data having an update frequency similar to the update frequency of the corresponding data is recorded in the flash memory.

상기 논리적으로 구분된 각각의 영역은 타 영역과 다른 범위의 갱신 빈도를 갖는 데이터를 기록하도록 설정할 수 있다.Each logically divided area may be set to record data having a different update frequency than that of other areas.

이 때, 어느 영역에 속한 데이터가 갱신될 때는 해당 데이터가 속한 현재 영 역보다 갱신 빈도가 높은 데이터를 저장하도록 설정되어 있는 인접 영역에 갱신 데이터를 기록하도록 구성할 수 있다.At this time, when data belonging to a certain area is updated, the updated data may be recorded in an adjacent area set to store data having a higher update frequency than the current area to which the corresponding data belongs.

또한, 어느 영역에 속한 EU에 대하여 지우기가 실행될 때는 해당 EU가 속한 현재 영역보다 갱신 빈도가 낮은 데이터를 저장하도록 설정되어 있는 인접 영역에 해당 EU의 유효 데이터를 기록하도록 구성할 수 있다. 이 때, 상기 유효 데이터는 현재 영역에 머문 시간이 일정 값 이하일 경우에는 타 영역으로 이동시키지 않고 현재 영역에 속한 타 EU에 기록하도록 구성할 수도 있다.When erasing is performed for an EU belonging to a certain area, the data of the EU may be recorded in an adjacent area set to store data having a lower update frequency than the current area to which the EU belongs. In this case, the valid data may be configured to be recorded in another EU belonging to the current area without moving to another area when the time spent in the current area is less than or equal to a predetermined value.

상기 플래시 메모리는 상기 논리적으로 구분된 영역에 속하지 않는 EU(Free EU)를 더 포함하도록 구성할 수 있다.The flash memory may further include a free EU that does not belong to the logically divided region.

이 때, 상기 논리적으로 구분된 각 영역에 속한 어느 EU에 대하여 지우기가 실행되면 지워진 해당 EU는 Free EU에 속하도록 구성할 수 있다.At this time, if the erasing is performed for any EU belonging to each of the logically divided areas, the deleted EU may be configured to belong to the free EU.

또한, 데이터를 기록할 영역에 EU 공간이 부족한 경우에는 Free EU 중 하나를 해당 영역에 속한 EU로 포함시키고, 그 EU에 데이터를 기록할 수 있다.
In addition, when there is not enough EU space in the area to record data, one of the free EUs may be included as an EU belonging to the corresponding area, and data may be recorded in the EU.

본 발명에 따라 최적의 지우기를 실행하기 위한 실시예는, 플래시 메모리의 각 EU에 대하여 현재 데이터를 기록할 수 없는 상태(Invalid 상태)의 데이터 블록 수와 현재까지 지운 횟수에 관한 정보를 확인하는 단계; 상기 Invalid 상태의 데이터 블록 수와 현재 지운 횟수 정보를 일정 수학식을 이용하여 연산함으로써 지우기에 가장 적합한 EU를 찾아내는 단계; 및 상기 찾아낸 EU에 대하여 지우기를 실행하는 단계를 포함하여 이루어진다. According to an embodiment of the present invention, an optimal erasing operation may include: verifying, for each EU of a flash memory, information about the number of data blocks in a state in which the current data cannot be written (Invalid state) and the number of times of erasing so far; ; Finding the EU most suitable for erasing by calculating the number of data blocks in the Invalid state and information on the number of times of erasing using a predetermined equation; And performing erasing on the found EU.                         

상기 연산은 각 EU를 구성하는 최대 데이터 블록 수에 대한 Invalid 상태의 데이터 블록의 비율, 및 가능한 최대 지우기 횟수에 대한 현재 지운 횟수의 비율을 이용하여 이루어지도록 구성할 수 있다.The operation may be configured to use the ratio of the data block in the Invalid state to the maximum number of data blocks constituting each EU, and the ratio of the current erase count to the maximum possible erase count.

또한, 상기 연산에는 Invalid 상태의 데이터 블록 수와 현재까지 지운 횟수 중 어느 부분을 중요시할 것인지를 설정할 수 있도록 하기 위하여 일정 가중치를 반영하도록 구성할 수도 있다.
In addition, the calculation may be configured to reflect a certain weight in order to be able to set which part of the number of data blocks in the invalid state and the number of times erased so far is important.

본 발명에 따라 지우기를 실행할 시점을 결정하는 실시예는, 현재 데이터를 기록할 수 있는 상태인 EU(Free EU)의 수에 대한 기준값을 하나 이상 설정하는 단계; 및 현재 Free EU의 수와 상기 기준값을 비교한 결과에 따라 일정 개수의 EU에 대한 지우기를 실행하는 단계를 포함하여 이루어진다.According to an embodiment of the present invention, an embodiment of determining when to perform erasing includes: setting one or more reference values for the number of free EU (EU) states in which data can be recorded at present; And deleting the predetermined number of EUs according to a result of comparing the current number of Free EUs with the reference value.

이 때, 상기 기준값은 N1, N2(N1 < N2)로 이루어지고, 현재 Free EU의 수가 상기 N2 이상이면 지우기 연산을 실행하지 않고, 현재 Free EU의 수가 상기 N1 이상 N2 미만일 경우에는 (N2-N1) 만큼의 EU에 대하여 지우기를 실행하도록 구성할 수 있다. 또한, 현재 Free EU의 수가 상기 N1 미만인 경우에는 최우선적으로 지우기를 실행하여 데이터를 기록할 EU 공간을 확보하도록 구성할 수도 있다.
At this time, the reference value is N1, N2 (N1 < N2), and if the current number of Free EU is greater than or equal to N2, no erase operation is performed. If the current number of Free EU is greater than or equal to N1 and less than N2, (N2-N1). ) Can be configured to perform erase for EU. In addition, when the number of free EUs is less than N1, erasing may be prioritized to secure EU space for recording data.

이하, 첨부된 도면을 참조하여 본 발명의 바람직한 실시예를 상세히 설명하기로 한다.Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1을 참조하자면 플래시 메모리(10)는 지우기의 단위가 되는 여러개의 EU로 구분될 수 있다. 각 EU는 여러개의 데이터 블록으로 이루어질 수 있으며, 일반적으로 첫번째 데이터 블록에는 EU 헤더(11-1)와 블록 헤더(11-2)가 기록된다. EU 헤더(11-1)는 지우기 횟수, 시간 정보, EU의 상태, EU 식별정보(ID) 등의 정보를 포함하고 있으며, 블록 헤더(11-2)는 데이터 블록의 상태, 파일 식별자, 블록 식별자, 데이터의 길이, 시간 정보, 갱신 횟수 등의 정보를 포함하고 있다. 그 이외의 각 데이터 블록(11-3)은 실제 데이터를 저장하는 장소이다.Referring to FIG. 1, the flash memory 10 may be divided into a plurality of EUs that are units of erase. Each EU may be composed of a plurality of data blocks. In general, an EU header 11-1 and a block header 11-2 are recorded in the first data block. The EU header 11-1 includes information such as erase count, time information, EU status, EU identification information (ID), etc. The block header 11-2 includes a data block status, a file identifier, and a block identifier. It includes information such as data length, time information, and update count. Each other data block 11-3 is a place for storing actual data.

한편, EU에 지우기가 실행되면 EU의 모든 데이터 블록은 'Free' 상태로 되고, 유효한 데이터가 저장되면 해당 데이터 블록은 'Valid' 상태로 된다. 'Valid' 상태의 데이터를 갱신하는 경우에는 플래시 메모리의 특성상 기존에 저장된 위치에 바로 저장하는 것이 불가능 하므로 다른 Free 상태의 데이터 블록에 저장하고 이전 데이터 블록은 'Invalid' 상태로 변경한다. 또한, 지워진 데이터 블록은 바로 'Invalid' 상태가 되며, EU를 지울 때는 해당 EU에 존재하는 Invalid 상태의 데이터 블록은 그대로 지우고, 'Valid' 상태의 데이터 블록은 다른 EU로 옮기고 난 후 지운다.On the other hand, when erasing is performed in the EU, all data blocks of the EU become 'Free' state, and when valid data is stored, the corresponding data block becomes 'Valid' state. When updating the data in 'Valid' state, it is impossible to save the data in the existing saved location directly due to the characteristics of flash memory. Therefore, save it in another free state data block and change the previous data block to 'Invalid' state. In addition, the erased data block immediately becomes 'Invalid' state. When deleting the EU, the invalid data block existing in the EU is erased as it is, and the data block in the 'Valid' state is deleted after moving to another EU.

이 때, 플래시 메모리는 기본적으로 쓰기 연산이 읽기 연산에 비해 매우 느릴 뿐만 아니라 가용 공간이 없어 지우기 연산을 수행하는 것도 외부에서는 쓰기 연산으로 보이기 때문에 EU를 지우는 횟수를 줄이는 것이 매우 중요하다. 그러므로 EU를 지울 때는 Invalid 상태의 데이터 블록이 가장 많은 것을 골라서 지우도록 하는 것이 바람직하다.In this case, it is very important to reduce the number of times of erasing the EU since the write operation is basically slower than the read operation and there is no available space, so performing the erase operation is seen as a write operation externally. Therefore, when erasing the EU, it is desirable to select the largest number of invalid data blocks.

도 2를 참조하여 본 발명에 따라 데이터를 군집화시키는 일 실시예를 설명하자면, 먼저 플래시 메모리를 논리적으로 나누어지는 복수개의 영역(Region)으로 구분한다(S21). 여기서 각각의 '영역'은 도 3에 도시한 예와 같이 하나 이상의 EU를 포함할 수 있으며, 각각의 영역은 서로 다른 범위의 갱신 빈도를 갖는 데이터를 기록하도록 설정할 수 있다.An embodiment of grouping data according to the present invention will be described with reference to FIG. 2. First, a flash memory is divided into a plurality of regions logically divided (S21). Here, each 'region' may include one or more EUs as in the example shown in FIG. 3, and each region may be set to record data having a different range of update frequencies.

그리고, 데이터의 갱신이나 지우기가 실행되어 플래시 메모리에 데이터를 기록하는 경우에는 각 영역 중에서 해당 데이터의 갱신 빈도와 유사한 갱신 빈도를 갖는 데이터들이 기록되어 있는 영역에 기록되도록 처리한다(S22,S23).When data is updated or erased and data is recorded in the flash memory, the data is processed to be recorded in areas in which data having an update frequency similar to that of the corresponding data is recorded in each area (S22 and S23).

도 4를 참조하여 단계 S23을 수행하는 과정의 일 예를 설명하자면, 각 영역은 최하위 영역(영역 #1)으로부터 최상위 영역(영역 #n)으로 갈수록 갱신 빈도가 높은 데이터를 기록하는 영역으로 설정할 수 있다. 즉, 갱신 빈도가 가장 낮은 데이터는 최하위 영역(영역 #1)에 기록되고, 갱신 빈도가 가장 높은 데이터는 최상위 영역(영역 #n)에 기록된다.An example of a process of performing step S23 will be described with reference to FIG. 4. Each area may be set as an area for recording data having a higher update frequency from the lowest area (area # 1) to the highest area (area #n). have. That is, data with the lowest update frequency is recorded in the lowest region (area # 1), and data with the highest update frequency is recorded in the highest region (area #n).

그리고, 각 영역에 속한 데이터들은 그 갱신 빈도에 따라 상위 영역 또는 하위 영역으로 이동하여 기록되도록 처리함으로서, 유사한 갱신 빈도를 갖는 데이터들끼리 군집화를 이루도록 한다. 예로서, 데이터의 갱신이 이루어지면 해당 데이터는 갱신이 이루어지지 않은 타 데이터보다 갱신 빈도가 높아지므로 현재 영역의 상위 영역으로 이동하여 기록되고, 어느 영역에 오래 머무른 데이터는 그렇지 않은 타 데이터에 비하여 갱신 빈도가 낮은 것으로 간주할 수 있으므로 현재 영역의 하위 영역으로 이동하여 기록된다.Then, the data belonging to each area are processed to be recorded by moving to the upper area or the lower area according to the update frequency, so that the data having similar update frequency are clustered. For example, when data is updated, the data is updated more frequently than other data that has not been updated, so the data is moved and recorded in the upper region of the current region, and data that stays in one region for a long time is updated compared to other data. The frequency can be regarded as low, so it is recorded by moving to the lower area of the current area.

그러나, 최하위 영역에서는 더 이상의 하위 영역이 없으므로, 자체 EU 사이에서의 기록이 이루어지고, 최상위 영역에서는 더 이상의 상위 영역이 없으므로 자체 EU 사이에서의 기록이 이루어지게 된다.However, since there is no further subregion in the lowest region, recording is made between its own EU, and since there is no further upper region in the highest region, recording is made between its own EU.

도 5를 참조하여 도 2에 도시한 단계 S23을 수행하는 일 실시예를 보다 구체적으로 설명하기로 한다.An embodiment of performing step S23 shown in FIG. 2 will be described in more detail with reference to FIG. 5.

데이터를 갱신하는 경우에는(S51), 갱신 데이터를 현재 해당 데이터가 속한 영역보다 갱신 빈도가 높은 데이터를 저장하도록 설정되어 있는 인접 영역의 EU에 기록한다(S52).When the data is updated (S51), the updated data is recorded in the EU of the adjacent area set to store data having a higher update frequency than the area to which the data currently belongs (S52).

즉, 어느 데이터가 갱신된다면 그 데이터는 플래시 메모리의 특성상 그 데이터 블록에 바로 쓸 수 없으므로 타 데이터 블록에 써야 한다. 이 때문에 해당 데이터는 갱신되지 않는 타 데이터보다 갱신 빈도가 높은 것으로 간주할 수 있다. 도 6a를 참조하자면, 현재 영역(61)의 어느 EU에 "HCHCCCHHHCCHCCHH"의 데이터가 기록되어 있고 'H'로 표시된 데이터가 갱신된다고 가정할 때, 'H'로 표시된 데이터는 갱신 빈도가 높은 것으로 간주할 수 있으므로 보다 높은 갱신 빈도의 데이터를 저장하는 다음 영역(62)의 EU에 저장한다.That is, if any data is updated, the data cannot be written directly to the data block because of the characteristics of the flash memory. Therefore, the data must be written to another data block. For this reason, the data can be regarded as having a higher update frequency than other data that is not updated. Referring to FIG. 6A, assuming that data of "HCHCCCHHHCCHCCHH" is recorded in any EU of the current area 61, and data indicated by "H" is updated, the data indicated by "H" is regarded as having a high update frequency. The data can be stored in the EU of the next area 62, which stores data of a higher update frequency.

한편, 어느 EU에 대하여 지우기가 실행되는 경우에는(S53), 해당 EU에 기록되어 있는 Valid 상태의 유효 데이터를 보존해야 하므로, 유효 데이터를 타 EU에 옮겨 기록한 후 해당 EU를 지워야 한다. 이 때, 데이터의 군집화를 더욱 정확하게 수행하기 위하여 지우기를 실행하려는 EU에 기록되어 있는 Valid 상태의 데이터가 현재 영역에 머문 시간도 함께 반영해 줄 수 있다.On the other hand, if the erasing is performed for a certain EU (S53), since valid data of the valid state recorded in the EU must be preserved, the EU must be deleted after transferring the valid data to another EU. In this case, in order to more accurately perform clustering of data, the valid state data recorded in the EU to be erased may be reflected in the current area.

즉, 지우기를 실행할 EU에 기록되어 있는 Valid 상태의 데이터의 최근 갱신 시점을 확인하고(S54), 최근 갱신 시간으로부터 기 규정된 일정 기준 시간이 경과되었는지를 판단한다(S55).That is, the latest update time of the data of the valid state recorded in the EU to be erased is checked (S54), and it is determined whether a predetermined reference time elapses from the latest update time (S55).

그리고, 단계 S55에서의 판단 결과 최근 갱신 시점으로부터 기준 시간 이상 경과되지 않았을 경우에는 도 6b에 도시한 예와 같이 현재 영역(63)에 속한 타 EU에 옮겨 쓰도록 한다(S56). 도 6b에서 'V' 표시 데이터는 Valid 상태의 데이터를 의미한다. 그러나, 단계 S55에서의 판단 결과 최근 갱신 시점으로부터 기준 시간 이상 경과된 경우에는 그 만큼 갱신 빈도가 낮을 확율이 높으므로 도 5c에 도시한 예와 같이 현재 자신이 속한 영역(64)보다 갱신 빈도가 낮은 데이터를 저장하는 인접 영역(65)의 EU에 기록한다(S57).When it is determined in step S55 that the reference time has not elapsed since the last update time, the process is transferred to another EU belonging to the current area 63 as shown in FIG. 6B (S56). In FIG. 6B, 'V' display data means data in a valid state. However, as a result of the determination in step S55, when more than a reference time has elapsed since the last update time, the probability of the update being low is high. Therefore, the update frequency is lower than that of the region 64 to which the current one belongs, as shown in FIG. 5C. The data is recorded in the EU of the adjacent area 65 that stores data (S57).

즉, 데이터가 어느 정도의 변동성을 갖는지는 데이터의 갱신 빈도에 따라 결정될 수 있지만, 데이터가 현재 영역에 머문 시간이 증가할수록 그 변동성이 감소되는 상황을 적절하게 반영할 수 있다.That is, the degree of variability of the data may be determined according to the update frequency of the data, but it may appropriately reflect the situation in which the variability decreases as the time the data stays in the current area increases.

이상에서 설명한 바와 같이, 갱신이 빈번하게 일어나는 데이터와 그렇지 않은 데이터를 분리하고, 유사한 갱신 빈도를 가지는 데이터를 군집화함으로써 지우는 횟수를 줄일 수 있다. 또한, 갱신이 빈번하게 일어나는 데이터의 경우에는 다시 변경될 확률도 높기 때문에 이러한 데이터가 대부분인 EU는 가장 많은 Invalid 상태의 데이터 블록을 가지게 된다. 결과적으로 이러한 EU에 대한 지우기 연산은 Valid 상태의 데이터 블록을 다른 EU로 이동시키는 과정을 줄일 수 있게 되므로, 많은 가용 공간을 확보하고 성능을 향상시킬 수 있게 된다.As described above, the number of times of erasing can be reduced by separating data that frequently occurs from data that does not occur frequently and clustering data having similar update frequencies. In addition, since data that is frequently updated is highly likely to change again, the EU, which has most of such data, has the most invalid data block. As a result, the erase operation on the EU can reduce the process of moving the data block in the valid state to another EU, thereby freeing up a lot of available space and improving performance.

한편, 플래시 메모리는 위에서 설명한 각 실시예와 같이 논리적으로 구분되는 영역에 속하는 EU 이외에 어느 영역에도 속하지 않고 현재 데이터를 기록할 수 있는 상태의 EU를 포함하도록 구성할 수 있다. 이하에서는 이러한 EU를 Free EU라 칭하기로 한다.Meanwhile, the flash memory may be configured to include an EU in a state in which data can be recorded without belonging to any region other than the EU belonging to logically divided regions as in the above-described embodiments. Hereinafter, such an EU will be referred to as a free EU.

도 7을 참조하자면, 플래시 메모리는 논리적으로 구분되는 각 영역(영역 #1 내지 영역 #n)과 어느 영역에도 포함되지 않는 Free EU(75)를 포함하고 있다.Referring to FIG. 7, the flash memory includes logically divided regions (regions # 1 to #n) and free EU 75 which are not included in any regions.

EU 리스트(71)는 각 영역에 할당된 EU를 식별하기 위한 정보를 유지하는 리스트이다. 영역 테이블(72)은 각 영역에 할당된 EU에 관한 정보와, 해당 영역에서 현재 데이터 블록을 할당할 수 있는 EU(즉 Free 데이터 블록을 가지고 있는 EU)를 나타내는 Active EU 정보 등 각 EU에 관한 정보를 유지하는 테이블이다. 이 때, 모든 데이터 블록 할당은 Active EU(74)에서 이루어 진다. 또한, Free EU 테이블(73)은 Free EU에 관한 정보를 유지하는 테이블이다.The EU list 71 is a list that holds information for identifying the EU assigned to each area. The area table 72 contains information about each EU, such as information about the EU assigned to each area, and Active EU information indicating the EU (ie, EU having a free data block) to which the current data block can be allocated in the area. Table that holds. At this time, all data block allocation is made in the active EU 74. In addition, the Free EU table 73 is a table for holding information about the Free EU.

도 7에 도시한 실시예에서 논리적으로 구분된 각 영역에 속한 어느 EU에 대하여 지우기가 실행되면 해당 EU는 더 이상 해당 영역에 속하지 않고 Free EU에 속하도록 구성할 수 있다. 즉, Free EU 리스트(73)는 지우기가 실행된 EU를 Free EU로서 관리하게 된다.In the embodiment shown in FIG. 7, when erasing is performed for a certain EU belonging to each of the logically divided regions, the EU may be configured to belong to the free EU without being in the corresponding region anymore. That is, the Free EU list 73 manages the EU on which the erasing is performed as the Free EU.

또한, 현재 영역의 EU에 데이터를 기록할 수 있는 공간이 부족하면 Free EU 중 하나를 해당 영역에 속한 EU로 포함시키고, 그 EU에 데이터를 기록하도록 구성할 수 있다. 즉, 각 Active EU가 데이터 저장을 위한 공간이 부족할 때는 Free EU에서 EU를 하나 할당 받고 할당 받은 EU를 Active EU로 설정하게 된다.In addition, if there is not enough space to record data in the EU of the current region, one of the free EUs may be included as an EU belonging to the corresponding region, and the data may be configured to be recorded in the EU. That is, when each active EU does not have enough space for data storage, one EU is allocated from the free EU and the assigned EU is set as the active EU.

도 8을 참조하여 본 발명에 따라 지우기 연산의 대상이 될 EU를 효과적으로 선택하는 일 실시예를 상세히 설명하기로 한다.An embodiment of effectively selecting an EU to be an object of an erase operation according to the present invention will be described in detail with reference to FIG. 8.

먼저, 지우기가 실행될 때는 플래시 메모리의 각 EU에 대하여 Invalid 상태의 데이터 블록 수와 지운 횟수에 관한 정보를 확인한다(S81).First, when the erasing is executed, information about the number of data blocks in the Invalid state and the number of times of erasing is confirmed for each EU of the flash memory (S81).

그리고, 단계 S81에서 확인된 Invalid 상태의 데이터 블록 수와 현재 지운 횟수 정보를 일정 수식에 따라 연산하여 지우기에 가장 적합한 EU를 찾아낸 후(S82), 찾아낸 EU에 대하여 지우기를 실행한다(S83).The data block number of the invalid state and the current erase count information identified in step S81 are calculated according to a predetermined formula to find the EU most suitable for erasing (S82), and then the erase is performed on the found EU (S83).

이 때, Invalid 상태의 데이터 블록 수와 현재 지운 횟수 정보는 차원이 서로 상이한 정보이므로, 상기 수식에 따라 연산을 수행할 때는 하나의 EU를 구성하는 최대 데이터 블록 수에 대한 Invalid 상태의 데이터 블록 수의 비율, 및 가능한 최대 지우기 횟수에 대한 현재 지운 횟수의 비율을 이용하도록 구성할 수 있다.At this time, the information of the number of data blocks in the invalid state and the information of the number of times of erasing are different from each other. And use the ratio of the current erase count to the maximum possible erase count.

이제 단계 S82에서 지우기에 가장 적합한 EU를 찾아 내는 일 실시예를 구체적으로 설명하기로 한다.An embodiment of finding an EU most suitable for erasing in step S82 will now be described in detail.

EU를 지울 때는 해당 EU에 존재하는 Valid 상태의 데이터 블록은 다른 EU로 옮기고 지워야 하기 때문에 Invalid 상태의 데이터 블록이 가장 많은 EU를 선택하여 지우도록 하는 것이 바람직하다. 즉, 지우기 연산 비용이 가장 적은 것을 선택하여 지우도록 한다.When the EU is deleted, the data block in the valid state existing in the EU must be moved to another EU and deleted. Therefore, it is preferable to select and delete the EU with the largest data block in the invalid state. In other words, the lowest erase operation cost is selected and erased.

이 때, EU의 지우기 연산 비용은 다음의 수학식 1에 나타낸 바와 같이 지우기 연산의 대상으로 선택된 EU에서 Valid 상태의 데이터 블록을 다른 EU로 옮기는 비용과 해당 EU를 지우는 비용으로 표현할 수 있다.In this case, the erase operation cost of the EU may be expressed as a cost of moving a data block in a valid state from another EU selected as an erase operation to another EU and a cost of deleting the EU, as shown in Equation 1 below.

Cost(TE) = Cost(VRM) + Cost(ER)Cost (TE) = Cost (VRM) + Cost (ER)

여기서, Cost(TE)는 지우기 연산 비용이고, Cost(VRM)은 해당 EU에서 Valid 상태의 데이터 블록을 다른 EU로 옮기는 비용이며, Cost(ER)은 선택된 EU를 지우는 비용이다. 이 때, Valid 상태의 데이터 블록, Invalid 상태의 데이터 블록, Free 상태의 데이터 블록, 및 EU의 크기를 각각 V, I, F, E라 하고, 플래시 메모리에 읽기, 쓰기, 및 지우기 연산을 수행하는데 소요되는 시간을 각각 r, w, e라 하면, 수학식 1은 다음의 수학식 2와 같이 표현할 수 있다.Here, Cost (TE) is a cost of erasing operation, Cost (VRM) is a cost of moving a valid data block from another EU to another EU, and Cost (ER) is a cost of erasing the selected EU. At this time, the data block in the valid state, the data block in the invalid state, the data block in the free state, and the size of the EU are called V, I, F, and E, respectively, and read, write, and erase operations are performed in the flash memory. When the time required is r, w, and e, respectively, Equation 1 may be expressed as Equation 2 below.

Cost(TE) = V(r+w) + E*e Cost (TE) = V (r + w) + E * e

이 때, r은 w에 비해 매우 적은 값이며, w와 e는 그 값이 비슷하기 때문에 다음의 수학식 3과 같이 표현할 수 있다.At this time, r is a very small value compared to w, and since w and e have similar values, it can be expressed as in Equation 3 below.

Cost(TE) = (V + E + F) * wCost (TE) = (V + E + F) * w

E와 w는 플래시 메모리의 특성에 따라 결정되는 값이기 때문에 지우기 연산 비용을 I로 나타내면 다음의 수학식 4와 같이 표현할 수 있다.Since E and w are values determined according to the characteristics of the flash memory, the erase operation cost can be expressed by Equation 4 below.

Cost(TE) = (2E - I) * wCost (TE) = (2E-I) * w

즉, 지우기 연산 비용이 가장 적은 EU를 선택하기 위해서는 Invalid 상태의 데이터 블록이 가장 많은 EU를 선택해야 한다.In other words, in order to select the EU with the lowest erase operation cost, the EU with the most invalid data block must be selected.

한편, 효율적인 지우기를 실행하기 위해서는 지우기 연산 비용 이외에 플래시 메모리의 수명을 결정하는 지우기 횟수를 고려해야 한다. 즉, 플래시 메모리의 전 영역에 걸쳐 마모 평준화가 이루어지도록 지우기 연산 대상 EU를 선택하는 것이 바람직하다. 지우기 횟수를 고려하여 지우기 연산 대상 EU를 선택하는 방법을 설명하기로 한다.On the other hand, in order to perform an efficient erase, in addition to the erase operation cost, the erase count that determines the lifetime of the flash memory must be considered. That is, it is preferable to select the erasing target EU so that the wear leveling is performed over the entire area of the flash memory. A method of selecting an erase operation target EU in consideration of the number of erase operations will be described.

k번째 EU가 지우기 연산 대상으로 선택될 확률 P(k)는 지우기 연산 비용과 현재 지우기 횟수에 반비례하고, 지우기 횟수가 최대 지우기 가능 횟수에 도달하면 P(k)는 줄어들어야 한다.The probability P (k) at which the k-th EU is selected for the erase operation is inversely proportional to the cost of the erase operation and the current erase count. When the erase count reaches the maximum eraseable count, P (k) should be reduced.

어느 EU에 대한 최대 지우기 가능회수를 E최대지우기가능횟수, 현재 지우기 횟수를 E현재지우기횟수라 하면, 남은 지우기 횟수는 다음의 수학식 5와 같이 표현될 수 있다.If the maximum number of erasable times for an EU is E maximum erasable number and the current erasing number is E current erasing frequency , the remaining erasing number may be expressed as Equation 5 below.

E남은지우기횟수 = E최대지우기가능횟수 - E현재지우기횟수 E number of remaining erases = E maximum number of erase possible -E number of current erases

그러면, P(k)는 지우기 연산 비용에 반비례하고 남은 지우기 횟수에 비례하므로 P(k)를 다음의 수학식 6 또는 수학식 7과 같이 표현할 때 P(k) 값이 적은 EU를 지우기 연산 대상 EU로 선택할 수 있다. 이 때, 지우기 연산 비용에 더 큰 비중을 둘 것인지 또는 지우기 횟수에 더 큰 비중을 둘 것인지를 결정할 수 있는 일정 가중치 α를 적용할 수도 있다.Then, since P (k) is inversely proportional to the erase operation cost and is proportional to the remaining erase counts, when P (k) is expressed as in Equation 6 or Equation 7 below, the EU having a small P (k) value is expressed as the EU to be erased. Can be selected. In this case, a certain weight α may be applied to determine whether to give a greater weight to the erase operation cost or a larger weight to the erase count.

Figure 112005005930556-PAT00001
Figure 112005005930556-PAT00001

Figure 112005005930556-PAT00002
Figure 112005005930556-PAT00002

이 때, 지우기 연산 비용과 지우기 횟수의 단위는 서로 상이한데 이를 해결하기 위한 하나의 방법은 각각에 대하여 최대값에 대한 비율을 이용하는 것이다. 지우기 연산 비용에 대한 최대값은 EU내 모든 데이터 블록이 Valid 상태일 때 해당 EU를 지우기 위해 소요되는 비용이다. 각각의 비율은 다음의 수학식 8 및 수학식 9와 같이 표현될 수 있다.At this time, the unit of the erase operation cost and the number of erase times are different from each other. One way to solve this problem is to use a ratio with respect to the maximum value for each. The maximum value for the erase operation cost is the cost of erasing the EU when all data blocks in the EU are valid. Each ratio may be expressed as Equation 8 and Equation 9 below.

Figure 112005005930556-PAT00003
Figure 112005005930556-PAT00003

Figure 112005005930556-PAT00004
Figure 112005005930556-PAT00004

수학식 8과 9를 이용하여 P(k)는 다음의 수학식 10 및 11과 같이 표현될 수 있다.Using Equations 8 and 9, P (k) may be expressed as Equations 10 and 11 below.

Figure 112005005930556-PAT00005
Figure 112005005930556-PAT00005

Figure 112005005930556-PAT00006
Figure 112005005930556-PAT00006

이제 가중치 α를 정하면 지우기 연산 대상 EU를 결정할 수 있다.Now, by determining the weight α, it is possible to determine the target EU for the erase operation.

이 때, 현재 지우기 횟수가 최대값에 근접하면, P(k) 값을 높여 지우기 연산 대상에서 제외시켜야 한다. 즉, 최대값에 대한 남은 지우기 횟수가 0에 근접하면 P(k) 값은 증가해야 한다. 따라서 α를 최대값에 대한 지우기 횟수에 반비례로 하면 최종적으로 다음의 수학식 12와 같이 표현될 수 있다.At this time, if the current erase count approaches the maximum value, the P (k) value must be increased to exclude the erase operation. That is, if the number of erases remaining for the maximum value approaches zero, the P (k) value should increase. Therefore, if α is inversely proportional to the number of erases to the maximum value, it can be finally expressed as in Equation 12 below.

Figure 112005005930556-PAT00007
Figure 112005005930556-PAT00007

이제 본 발명에 따라 지우기 연산의 시작 시점을 결정하는 실시예에 관하여 설명하기로 한다. 플래시 메모리를 사용할 때 EU에 일단 데이터가 기록된 후에는 해당 EU를 지운 후에야 다시 기록할 수 있다. 그러므로, 플래시 메모리 전반에 걸쳐서 언제 어떠한 EU를 지우는가 하는 것이 성능에 지대한 영향을 미친다.An embodiment of determining a start time of an erase operation according to the present invention will now be described. When using flash memory, once data has been written to the EU, it can only be written back after the EU is erased. Therefore, when and which EU is erased throughout flash memory has a significant impact on performance.

도 9를 참조하여, 본 발명에 따라 지우기 연산 시점을 결정하는 하나의 실시예를 설명하자면, 먼저 현재 데이터를 기록할 수 있는 상태로 유지되는 Free EU의 수에 대한 기준값을 설정한다(S91). 이하에서는 단계 S91에서 기준값으로 N1과 N2(N1 < N2)를 설정한 경우의 예를 통해 설명하기로 한다. 이 때, N1은 안정적인 동작을 위해 필요한 최소값의 의미를 갖고, N2는 최대값의 의미를 가질 수 있다.Referring to FIG. 9, one embodiment of determining an erasing time point according to the present invention will be described. First, a reference value for the number of free EUs that are maintained in a state capable of recording current data is set (S91). Hereinafter, an example in which N1 and N2 (N1 <N2) are set as reference values in step S91 will be described. In this case, N1 may have a meaning of a minimum value necessary for stable operation, and N2 may have a meaning of a maximum value.

그리고, 현재 Free EU의 수가 N2 이상인 경우에는 데이터를 기록할 Free EU가 충분히 확보되어 있는 것으로 간주할 수 있으므로 성능에 영향을 줄 수 있는 지우기 연산을 실행하지 않도록 한다(S92,S93).If the number of free EUs is greater than or equal to N2, the free EU to record data may be regarded as sufficiently secured. Therefore, the erase operation that may affect performance may not be executed (S92 and S93).

그러나, 현재 Free EU의 수가 N1 이상이고 N2 미만일 경우에는 데이터를 기록할 Free EU가 존재하기는 하지만 충분하지 않은 것으로 간주하여 일정 개수의 EU에 대하여 지우기를 실행함으로써 Free EU를 확보한다(S94,S95). 이 때, 지우기를 실행하는 EU의 개수는 N2-N1 만큼으로 처리하는 것이 바람직하다.However, if the number of Free EUs is greater than or equal to N1 and less than N2, the Free EUs are secured by performing the erasure on a certain number of EUs, although there is a Free EU to record data, but not enough (S94, S95). ). At this time, it is preferable to process the number of EUs to be erased by N2-N1.

또한, 현재 Free EU의 수가 N1 미만이면 가용 메모리가 부족한 상태로 간주할 수 있으므로 타 동작에 대하여 지우기 연산을 최우선적으로 실행한다(S96). 만일, 단계 S96에서의 지우기가 실행된 후에도 Free EU의 개수가 N1 미만이면 경고 메시지를 출력하는 등 가용 메모리의 부족 상황을 알리기 위한 임의의 동작을 수행할 수 있다(S97,S98).In addition, if the current number of Free EU is less than N1, the available memory may be regarded as inadequate, and thus, the erase operation is first performed with respect to other operations (S96). If the number of Free EUs is less than N1 even after the erasing is performed in step S96, an arbitrary operation for notifying a shortage of available memory, such as outputting a warning message, may be performed (S97, S98).

도 10을 참조하여 설명하자면, N2 이상의 Free EU를 확보하고 있는 경우에는 지우기 연산이 발생하지 않고, Free EU의 개수가 N2 에서 N1 사이에 있을 때는 N2 이상의 Free EU 확보를 위해 N2 - N1 만큼의 EU를 지운다. 만일 Free EU의 개수가 N1 이하이면 지우기 연산 작업을 최우선적으로 실행하고, 지우기 연산 후에도 Free EU의 수가 N1 이하이면 더 이상 가용 공간이 없다는 것으로 판단할 수 있다.Referring to FIG. 10, when N2 or more Free EUs are secured, an erase operation does not occur. When the number of Free EUs is between N2 and N1, N2-N1 EUs are used to secure N2 or more Free EUs. Clears. If the number of free EUs is less than or equal to N1, the erase operation is performed first and the number of free EUs after N1 is N1. If it is below, it can be judged that there is no more available space.

본 발명은 상술한 실시예에 한정되지 않고 본 발명의 기술적 사상을 벗어나지 않는 범위내에서 당업자에 의해 다양하게 변형하여 실시할 수 있는 것이다.The present invention is not limited to the above-described embodiments and can be variously modified and implemented by those skilled in the art without departing from the technical spirit of the present invention.

본 발명에 따른 각 실시예를 플래시 메모리를 이용하는 파일 시스템에 사용 하면 다음과 같은 효과를 얻을 수 있다.When the embodiments of the present invention are used in a file system using a flash memory, the following effects can be obtained.

1) 마모 평준화를 고려하여 지우기 연산 대상 EU를 선택함으로써 플래시 메모리의 수명을 최대한 연장시킬 수 있다.1) By selecting the EU for the erase operation in consideration of the wear leveling, the life of the flash memory can be extended as much as possible.

2) 플래시 메모리를 저장 매체로 이용할 때 가장 큰 오버헤드인 지우기 연산의 비용 및 횟수를 최소화 하여 플래시 파일 시스템의 성능을 향상 시킬 수 있다.2) The performance of flash file system can be improved by minimizing the cost and number of erase operations, which is the biggest overhead when using flash memory as a storage medium.

3) 종래의 단순 지우기 방법을 이용하는 플래시 파일 시스템을 최소한도로 수정하여 본 발명을 적용할 수 있으며, 이를 통해 플래시 파일 시스템의 성능을 증가 시킬 수 있다.3) The present invention can be applied to the minimum modification of the flash file system using the conventional simple erasing method, thereby increasing the performance of the flash file system.

Claims (14)

플래시 메모리를 각각 하나 이상의 지우기 단위(EU: Erase Unit)를 갖는 복수개의 영역으로 이루어지도록 논리적으로 구분하는 단계; 및Logically dividing the flash memory into a plurality of regions each having at least one erase unit (EU); And 상기 플래시 메모리에 데이터를 기록할 때는 해당 데이터의 갱신 빈도와 유사한 갱신 빈도를 갖는 데이터들이 기록되어 있는 영역에 기록될 수 있도록 처리하는 단계를 포함하여 이루어지는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.A method of managing flash memory for minimizing the overhead of an erasing operation, including processing data to be written in the flash memory so that data having an update frequency similar to the update frequency of the data can be recorded in an area in which the data is recorded. . 제 1 항에 있어서,The method of claim 1, 상기 논리적으로 구분된 각각의 영역은 타 영역과 다른 범위의 갱신 빈도를 갖는 데이터를 기록하도록 설정되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.And each of the logically divided regions is configured to record data having an update frequency in a range different from that of other regions. 제 2 항에 있어서,The method of claim 2, 어느 영역에 속한 데이터가 갱신될 때는 해당 데이터가 속한 현재 영역보다 갱신 빈도가 높은 데이터를 저장하도록 설정되어 있는 인접 영역에 기록하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.When data belonging to a certain area is updated, the flash memory management method for minimizing the overhead of an erase operation is configured to write to an adjacent area set to store data having a higher update frequency than the current area to which the data belongs. . 제 2 항에 있어서,The method of claim 2, 어느 영역에 속한 EU에 대하여 지우기가 실행될 때는 해당 EU가 속한 현재 영역보다 갱신 빈도가 낮은 데이터를 저장하도록 설정되어 있는 인접 영역에 해당 EU의 유효 데이터를 기록하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.When erasing is performed for an EU belonging to an area, the erase operation over is configured to write valid data of the corresponding EU in an adjacent area set to store data having a lower update frequency than the current area to which the EU belongs. How to manage flash memory to minimize heads. 제 4 항에 있어서,The method of claim 4, wherein 상기 유효 데이터가 현재 영역에 머문 시간이 일정 값 이하일 경우에는 현재 영역에 속한 타 EU에 상기 유효 데이터를 기록하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.And writing the valid data to another EU belonging to the current area when the valid data stays in the current area is less than or equal to a predetermined value. 제 1 항 내지 제 5 항 중 어느 하나의 항에 있어서,The method according to any one of claims 1 to 5, 상기 플래시 메모리는 상기 논리적으로 구분된 영역에 속하지 않는 EU(Free EU)를 더 포함하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.The flash memory management method for minimizing the overhead of an erase operation, characterized in that it further comprises a free EU (EU) which does not belong to the logically divided area. 제 6 항에 있어서,The method of claim 6, 상기 논리적으로 구분된 각 영역에 속한 어느 EU에 대하여 지우기가 실행되면 지워진 해당 EU는 Free EU에 속하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.And erasing is performed on any EU belonging to each of the logically divided regions, and the erased EU is configured to belong to a free EU. 제 6 항에 있어서,The method of claim 6, 데이터를 기록할 영역에 EU 공간이 부족한 경우에는 Free EU 중 하나를 해당 영역에 속한 EU로 포함시키고, 그 EU에 데이터를 기록하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.When there is not enough EU space in the area to record data, one of the free EUs is included as an EU belonging to the corresponding area, and flash memory management for minimizing the overhead of the erase operation, characterized in that it is configured to write data to the EU. Way. 플래시 메모리의 각 EU에 대하여, 현재 데이터를 기록할 수 없는 상태(Invalid 상태)의 데이터 블록 수와 현재까지 지운 횟수에 관한 정보를 확인하는 단계;For each EU of the flash memory, checking information on the number of data blocks in a state where the current data cannot be written (Invalid state) and the number of times of erasing so far; 상기 Invalid 상태의 데이터 블록 수와 현재 지운 횟수 정보를 일정 수학식을 이용하여 연산함으로써 지우기에 가장 적합한 EU를 찾아내는 단계; 및Finding the EU most suitable for erasing by calculating the number of data blocks in the Invalid state and information on the number of times of erasing using a predetermined equation; And 상기 찾아낸 EU에 대하여 지우기를 실행하는 단계를 포함하여 이루어지는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.And performing an erase operation on the found EU. 제 9 항에 있어서,The method of claim 9, 상기 연산은 각 EU를 구성하는 최대 데이터 블록 수에 대한 Invalid 상태의 데이터 블록의 비율, 및 가능한 최대 지우기 횟수에 대한 현재 지운 횟수의 비율을 이용하여 이루어지도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.The operation may be performed by using a ratio of data blocks in an invalid state to a maximum number of data blocks constituting each EU, and a ratio of a current erase count to a maximum possible erase count. How to manage flash memory for minimization. 제 10 항에 있어서,The method of claim 10, 상기 연산에는 일정 가중치를 반영하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.The operation of the flash memory for minimizing the overhead of the erase operation, characterized in that configured to reflect a certain weight. 현재 데이터를 기록할 수 있는 상태인 EU(Free EU)의 수에 대한 기준값을 하나 이상 설정하는 단계; 및Setting one or more reference values for the number of free EUs in which data can be recorded; And 현재 Free EU의 수와 상기 기준값을 비교한 결과에 따라 일정 개수의 EU에 대한 지우기를 실행하는 단계를 포함하여 이루어지는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.And erasing a predetermined number of EUs according to a result of comparing the current number of Free EUs with the reference value. 제 12 항에 있어서,The method of claim 12, 상기 기준값은 N1, N2(N1 < N2)로 이루어지고, 현재 Free EU의 수가 상기 N2 이상이면 지우기 연산을 실행하지 않고, 현재 Free EU의 수가 상기 N1 이상 N2 미만일 경우에는 (N2-N1) 만큼의 EU에 대하여 지우기를 실행하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.The reference value is composed of N1 and N2 (N1 <N2). If the current number of free EUs is greater than or equal to N2, no erase operation is performed. If the current number of free EUs is greater than or equal to N1 and less than N2, (N2-N1) Flash memory management method for minimizing the overhead of erase operations, characterized in that it is configured to perform erase for the EU. 제 13 항에 있어서,The method of claim 13, 현재 Free EU의 수가 상기 N1 미만인 경우에는 (N2-현재 Free EU의 수) 만큼의 EU에 대하여 최우선적으로 지우기 실행을 시도하도록 구성되는 것을 특징으로 하는 지우기 연산의 오버헤드 최소화를 위한 플래시 메모리 관리 방법.If the number of the current free EU is less than the N1, the flash memory management method for minimizing the overhead of the erase operation, characterized in that configured to attempt to perform the highest priority for the (E2-number of the current free EU) as EU. .
KR1020050008854A 2005-01-31 2005-01-31 Method of cleaning the flash memory for minimizing overhead of erasing operation KR20060087958A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020050008854A KR20060087958A (en) 2005-01-31 2005-01-31 Method of cleaning the flash memory for minimizing overhead of erasing operation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020050008854A KR20060087958A (en) 2005-01-31 2005-01-31 Method of cleaning the flash memory for minimizing overhead of erasing operation

Publications (1)

Publication Number Publication Date
KR20060087958A true KR20060087958A (en) 2006-08-03

Family

ID=37176602

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020050008854A KR20060087958A (en) 2005-01-31 2005-01-31 Method of cleaning the flash memory for minimizing overhead of erasing operation

Country Status (1)

Country Link
KR (1) KR20060087958A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8332573B2 (en) 2007-09-11 2012-12-11 Samsung Electronics Co., Ltd. Method and apparatus for performing address mapping in virtual file system of storage unit having a plurality of non-volatile data storage media

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8332573B2 (en) 2007-09-11 2012-12-11 Samsung Electronics Co., Ltd. Method and apparatus for performing address mapping in virtual file system of storage unit having a plurality of non-volatile data storage media

Similar Documents

Publication Publication Date Title
CN107622022B (en) Cache over-provisioning in a data storage device
KR100849221B1 (en) Method for managing non-volatile memory, and memory-based apparatus including the non-volatile memory
US6571326B2 (en) Space allocation for data in a nonvolatile memory
US7882300B2 (en) Apparatus and method for managing nonvolatile memory
US10552317B2 (en) Cache allocation in a computerized system
CN107622023B (en) Limiting access operations in a data storage device
KR100526190B1 (en) Remapping method for flash memory
TWI446345B (en) Method for performing block management, and associated memory device and controller thereof
KR100974954B1 (en) Read-time Wear-Leveling Method in Storage System using Flash Memory Device
US9218277B2 (en) Wear leveling
US9720820B2 (en) Data storage device and flash memory control method
US20080313505A1 (en) Flash memory wear-leveling
KR101929584B1 (en) Data storage device and operating method thereof
JP2014522537A (en) Use to manage data placement on flash-based storage
CN110674056B (en) Garbage recovery method and device
JP4910064B2 (en) Storage control device, storage device, and data movement control method
US9710176B1 (en) Maintaining wear spread by dynamically adjusting wear-leveling frequency
CN110968266B (en) Storage management method and system based on heat degree
KR20090024971A (en) Method and apparatus for cache using sector set
KR100941382B1 (en) Apparatus and method for managing page buffer linked with flash memory and apparatus and method for changing page of flash memory
CN111949569A (en) Storage device and control method and control device thereof
KR20050079991A (en) An efficient wear-leveling scheme for flash memory(k-leveling)
CN110286848B (en) Data processing method and device
US20200104384A1 (en) Systems and methods for continuous trim commands for memory systems
KR20060087958A (en) Method of cleaning the flash memory for minimizing overhead of erasing operation

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application