TWI381383B - Method for storing data in a flash memory medium - Google Patents

Method for storing data in a flash memory medium Download PDF

Info

Publication number
TWI381383B
TWI381383B TW96143097A TW96143097A TWI381383B TW I381383 B TWI381383 B TW I381383B TW 96143097 A TW96143097 A TW 96143097A TW 96143097 A TW96143097 A TW 96143097A TW I381383 B TWI381383 B TW I381383B
Authority
TW
Taiwan
Prior art keywords
block
flash memory
erasures
empty
partition
Prior art date
Application number
TW96143097A
Other languages
Chinese (zh)
Other versions
TW200921680A (en
Inventor
Lu Saiwen
Original Assignee
Netac Technology Co Ltd
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 Netac Technology Co Ltd filed Critical Netac Technology Co Ltd
Priority to TW96143097A priority Critical patent/TWI381383B/en
Publication of TW200921680A publication Critical patent/TW200921680A/en
Application granted granted Critical
Publication of TWI381383B publication Critical patent/TWI381383B/en

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Description

快閃記憶體的資料儲存方法Flash memory data storage method

本發明涉及一種半導體資料儲存領域,特別涉及一種在快閃記憶體中的資料儲存方法。The invention relates to the field of semiconductor data storage, and in particular to a data storage method in a flash memory.

現有快閃記憶體設備早已為人們所熟知,隨著人們對性價比要求的不斷提高。但生產快閃記憶體晶片(Flash Memory)的廠商為了降低成本,使得快閃記憶體晶片的壽命也越來越短。典型的,現在的Nand快閃記憶體的每個物理塊(即Block)的可讀寫次數為10000次,甚至更少的5000次。而另一方面,由於對快閃記憶體設備的寫操作的隨機性,使得快閃記憶體晶片的部分物理塊的操作較多,而部分物理塊的操作較少,同一塊快閃記憶體中的塊與塊之間擦寫次數相差非常大,使快閃記憶體晶片提前加速老化,極大地縮短了快閃記憶體晶片的使用壽命。為此,開發人員採用了各種各樣的磨損平衡演算法來平衡快閃記憶體晶片中各塊的使用次數。但是,隨著快閃記憶體晶片容量的不斷提高,單片快閃記憶體晶片中塊的個數也不斷增多,這就給原有的磨損平衡演算法增加了難度,很難在整片快閃記憶體晶片中做到真正的平衡。Existing flash memory devices have long been known, and as people's requirements for cost performance continue to increase. However, manufacturers of flash memory chips have made the life of flash memory chips shorter and shorter in order to reduce costs. Typically, each physical block (ie, Block) of the current Nand flash memory has 10,000 read and write times, or even 5,000 fewer. On the other hand, due to the randomness of the write operation to the flash memory device, some physical blocks of the flash memory chip operate more, and some physical blocks operate less, in the same flash memory. The number of erasing between the block and the block is very large, which accelerates the aging of the flash memory chip in advance, greatly shortening the service life of the flash memory chip. To this end, developers have used a variety of wear leveling algorithms to balance the number of uses of each block in a flash memory chip. However, as the capacity of flash memory chips continues to increase, the number of blocks in a single-chip flash memory chip is also increasing, which adds difficulty to the original wear-balance algorithm and is difficult to A true balance is achieved in flash memory chips.

現有的磨損平衡演算法大多是針對基於整個快閃記憶體晶片的,而當快閃記憶體晶片中的塊較多時,如快閃記憶體晶片有8192個塊,如果從前往後找一個可以搬遷(壽命小於平均壽命上限閾值)的邏輯塊,有可能在快閃記憶體晶片的前部分可以找到,但後面的塊可能根本都找不到;如果要找一個最年輕的塊,又要比較快閃記憶體晶片中每個塊的壽命,不僅效率很低,而且也不方便記錄整個快閃記憶體晶片的壽命表。Most of the existing wear leveling algorithms are based on the entire flash memory chip. When there are more blocks in the flash memory chip, for example, there are 8192 blocks in the flash memory chip. If you find one from the back, you can find one. The logic block of relocation (lifetime less than the average life threshold) may be found in the front part of the flash memory chip, but the latter block may not be found at all; if you want to find the youngest block, you have to compare The lifetime of each block in a flash memory chip is not only inefficient, but also inconvenient to record the life table of the entire flash memory chip.

本發明目的在於提供一種快閃記憶體的資料儲存方法,以延長快閃記憶體的使用壽命。It is an object of the present invention to provide a data storage method for flash memory to extend the life of a flash memory.

本發明提供一種快閃記憶體的資料儲存方法,所述快閃記憶體包括多個儲存塊,以及由部分儲存塊構成的空塊池,所述多個儲存塊被分成兩個或兩個以上的分區;所述快閃記憶體在儲存資料的過程中,包括:回收無效塊的步驟;從空塊池中獲取擦寫次數較少的空塊的步驟;判斷所獲取擦寫次數較少的空塊是否是已老化的塊的步驟。The present invention provides a data storage method for a flash memory, the flash memory comprising a plurality of storage blocks, and an empty block pool composed of partial storage blocks, the plurality of storage blocks being divided into two or more The partitioning process of the flash memory includes: a step of reclaiming an invalid block; a step of obtaining an empty block with a small number of erasing times from the empty block pool; and determining that the number of times of erasing and erasing is small Whether the empty block is an aging block.

優選地,還包括對已老化的塊執行靜態替換的步驟。Preferably, the step of performing a static replacement on the aged block is also included.

其中,所述回收無效塊的步驟包括:在快閃記憶體中尋找佔有額外塊較多的分區;從所述佔有額外塊較多的分區中找合適回收的邏輯塊;從空塊池中取出擦寫次數較少的空塊;用所述擦寫次數較少的空塊回收所述合適回收的邏輯塊中物理塊。The step of recovering the invalid block includes: searching for a partition occupying more extra blocks in the flash memory; finding a suitable logical block from the partition occupying more extra blocks; and taking out the empty block pool; An empty block with a small number of erasures; the physical block in the logical block that is properly recovered is recovered by the empty block having a small number of erasures.

其中,所述執行靜態替換的步驟包括:在所述快閃記 憶體中找出擦寫次數較少的分區的步驟;從擦寫次數較少的分區中找到擦寫次數較少的邏輯塊的步驟;從空塊池中取出擦寫次數較多的空塊的步驟;用所述擦寫次數較多的空塊回收擦寫次數較少的邏輯塊中物理塊的步驟。The step of performing static replacement includes: in the flash The step of finding a partition with a small number of erasing times in the memory; the step of finding a logical block with a small number of erasing times from a partition having a small number of erasing times; and taking out an empty block having a large number of erasing and erasing from the empty block pool The step of recovering the physical block in the logical block with a small number of erasures by using the empty block with a large number of erasures.

優選地,所述執行靜態替換的步驟還包括:判斷所述擦寫次數較少的邏輯塊是否是文件配置表(FAT)所在塊的步驟。Preferably, the step of performing static replacement further comprises the step of determining whether the logical block having a small number of erasures is a block in which a file configuration table (FAT) is located.

優選地,所述執行靜態替換的步驟還包括:判斷所述擦寫次數較少的邏輯塊是否是上次寫操作塊的步驟。Preferably, the step of performing static replacement further comprises: determining whether the logical block with the number of times of erasing is the last write operation block.

本發明提供的快閃記憶體的資料儲存方法,使得可以較為平均的使用快閃記憶體中的每個物理塊,從而使快閃記憶體中的所有物理塊的使用次數保持同步化、均勻化,防止某些物理塊因頻繁使用而過早地老化,從而延長整個快閃記憶體的使用壽命。The data storage method of the flash memory provided by the invention makes it possible to use each physical block in the flash memory more evenly, so that the usage times of all the physical blocks in the flash memory are synchronized and homogenized. Prevents some physical blocks from aging prematurely due to frequent use, thereby extending the life of the entire flash memory.

本發明目的的實現、功能特點及優點將結合實施例,參照附圖做進一步說明。The implementation, functional features, and advantages of the present invention will be further described in conjunction with the embodiments.

如本領技術人員所知,快閃記憶體即快閃記憶體晶片包括若干個儲存塊,每個儲存塊由多個頁構成,每個頁包括資料儲存位元和冗餘位元。在快閃記憶體中按順序分配給儲存塊的位址稱為物理塊,而在使用過程中所具有的劃分塊的虛構位址稱為邏輯位址。邏輯位址與物理位址之間通過映射的方法進行對應和轉換,由映射資訊組成位址映 射表,而由邏輯塊位址與物理塊位址之間通過映射關係建立的位址映射表稱為塊位址映射表。As is known to those skilled in the art, a flash memory, i.e., a flash memory chip, includes a plurality of memory blocks, each of which is comprised of a plurality of pages, each page including data storage bits and redundant bits. The address assigned to the storage block in order in the flash memory is called a physical block, and the fictitious address of the divided block which is used in use is called a logical address. The logical address and the physical address are mapped and converted by a mapping method, and the mapping information is used to form an address map. The address mapping table created by the mapping relationship between the logical block address and the physical block address is called a block address mapping table.

為了更有效地對快閃記憶體進行管理,可以將一個快閃記憶體的儲存空間從邏輯上劃分成若干個分區(Zone),每個分區包含若干個邏輯塊;通過掃描快閃記憶體各分區中的邏輯塊對應儲存塊的物理位址,生成區位址映射表。對於一個含有8192個邏輯塊的快閃記憶體,若每個分區包含256個塊,則可以分成32個分區。但由於快閃記憶體塊的特性,有些塊是無效塊,這會損失掉一部分空間。因此在劃分分區時,只有在當前分區分配滿塊時才將剩餘的塊分配給下一下分區,比如,若8192個塊中只有8100個有效塊用於邏輯分區,則仍然可以分成32個分區,只是前面31個分區包含256個邏輯塊,而第32個分區只包含164個邏輯塊,具體結構和分配方法如第一圖所示。In order to manage the flash memory more effectively, a flash memory storage space can be logically divided into a plurality of partitions, each partition containing a plurality of logical blocks; by scanning the flash memory each The logical block in the partition corresponds to the physical address of the storage block, and the area address mapping table is generated. For a flash memory with 8192 logical blocks, if each partition contains 256 blocks, it can be divided into 32 partitions. However, due to the characteristics of the flash memory block, some blocks are invalid blocks, which will lose some space. Therefore, when partitioning partitions, the remaining blocks are allocated to the next partition only when the current partition is allocated full blocks. For example, if only 8100 valid blocks in the 8192 blocks are used for logical partitions, they can still be divided into 32 partitions. Only the first 31 partitions contain 256 logical blocks, while the 32nd partition contains only 164 logical blocks. The specific structure and allocation method are shown in the first figure.

上述區位址映射表存放於快閃記憶體各區中相應的備用塊內;通過將備用區塊的區位址映射表讀出至RAM內進行邏輯位址和物理位址之間的轉換,從而實現快閃記憶體內的資料讀寫操作。通過分區方式實現快閃記憶體資料儲存方法具有提高資料存取速度的優點,例如,當快閃記憶體針對記錄於儲存塊中的資料進行寫操作時,需要生成新的區位址映射表,只需將新的區位址映射表存放于該區的備用塊中用於更新舊的區位址映射表即可。同樣,在下次資料操作且需要切換到該區的區位址映射表時,無需針對該區內的每個塊進行掃描,再根據每個塊的物理位址動態 生成相應的區位址映射表,只需將更新後的區位址映射表從相應的備用塊中讀出即可。The area address mapping table is stored in a corresponding spare block in each area of the flash memory; the area address mapping table of the spare block is read out into the RAM to perform conversion between the logical address and the physical address, thereby realizing Data read and write operations in flash memory. The flash memory data storage method by partitioning has the advantages of improving the data access speed. For example, when the flash memory writes the data recorded in the storage block, a new area address mapping table needs to be generated, only The new zone address mapping table needs to be stored in the spare block of the zone for updating the old zone address mapping table. Similarly, in the next data operation and need to switch to the area address mapping table of the area, it is not necessary to scan for each block in the area, and then according to the physical address dynamics of each block. The corresponding area address mapping table is generated, and only the updated area address mapping table is read out from the corresponding spare block.

另外,由於快閃記憶體在使用之前所有的有效物理塊都是空塊,因此在對有效物理塊進行邏輯位址和物理位址的映射時,保留一定數量的空塊不建立映射關係,並由此構成一個集合,稱之為空塊池;該空塊池用於記錄快閃記憶體中塊的使用情況,其中包括與空塊對應的物理位址和擦寫次數,實際上,空塊池在此可以作一個緩存看待。In addition, since all valid physical blocks of the flash memory are empty before use, when a logical physical address and a physical address are mapped to a valid physical block, a certain number of empty blocks are reserved, and no mapping relationship is established. Thus forming a set, called an empty block pool; the empty block pool is used to record the use of blocks in the flash memory, including the physical address and erasure times corresponding to the empty block, in fact, the empty block The pool can be viewed as a cache here.

快閃記憶體在初始化時,分區位址映射表中的邏輯位址和物理位址是一對一的映射關係;但是快閃記憶體在資料讀寫的過程中,部分原有儲存資料的塊變為空塊,此時部分邏輯塊可能會同時佔有兩個或兩個以上物理塊,這些多佔用的物理塊即稱為額外塊,分區中所有邏輯塊佔用額外塊的總和就是該分區佔有的額外塊,其中邏輯塊對應的額外塊從空塊池中取得。When the flash memory is initialized, the logical address and the physical address in the partition address mapping table are one-to-one mapping relationships; however, in the process of reading and writing data in the flash memory, some blocks of the original stored data are stored. When it becomes an empty block, some logical blocks may occupy two or more physical blocks at the same time. These multiple occupied physical blocks are called extra blocks, and the sum of all the logical blocks occupying the extra blocks in the partition is occupied by the partition. An extra block in which the extra block corresponding to the logical block is taken from the empty block pool.

同時,為了清楚快閃記憶體的使用情況,需建立一種記錄機制,在此稱之為壽命表,該壽命表包括塊壽命表和分區壽命表,其中塊壽命表記錄了快閃記憶體中每個邏輯塊的擦寫次數,分區壽命表記錄了分區擦寫次數,所述分區擦寫次數為該分區所有邏輯塊擦寫次數的總和;每個邏輯塊又有一個結構體來記錄它的相關參數,如物理塊塊號和相應的擦寫次數。該結構體中記錄了其邏輯塊所包含的所有物理塊的位址和對應的擦寫次數;邏輯塊的擦寫次數就是它所包含物理塊中擦寫次數最少的物理塊的擦寫次 數。At the same time, in order to understand the use of flash memory, a recording mechanism, referred to herein as a life table, is included, which includes a block life table and a partition life table, wherein the block life table records each flash memory. The number of erasures of logical blocks, the partition life table records the number of times of partition erasing, the number of times of erasing and erasing is the sum of the number of erasing of all logical blocks of the partition; each logical block has another structure to record its correlation. Parameters such as the physical block number and the corresponding number of erases. The structure records the address of all the physical blocks included in the logic block and the corresponding number of erasures; the number of erasures of the logical block is the erasure of the physical block with the least number of erasures in the physical block it contains. number.

所述塊壽命表和分區壽命表儲存在快閃記憶體的專用區間,由固件對其進行控制和操作。當快閃記憶體某個物理塊的資料被擦寫時,相應邏輯塊對應的結構體會將此物理塊的壽命加1,若加1後此物理塊是該邏輯塊中最年輕的一個,則塊壽命表中該邏輯塊的擦寫次數也增加1,同樣,該塊所在分區的分區擦寫次數也會相應增加1。擦寫後的物理塊變成空塊,將該空塊存放于空塊池中。The block life table and the partition life table are stored in a dedicated section of the flash memory, which is controlled and operated by firmware. When the data of a physical block of the flash memory is erased, the structure corresponding to the corresponding logical block adds 1 to the lifetime of the physical block. If the physical block is the youngest one of the logical blocks after adding 1 The number of erasures of the logic block in the block life table is also increased by 1. Similarly, the number of partition erases of the partition in which the block is located is also increased by one. The erased physical block becomes an empty block, and the empty block is stored in the empty block pool.

所述壽命表在使用過程中先由固件從快閃記憶體中讀到RAM中,壽命表不會頻繁地存取,只有在壽命表發生變化,而讀寫操作又跨區域或者跨邏輯塊時才需要進行保存。當一個邏輯塊的塊壽命表發生變化後,若下一次讀寫操作需要將另一個邏輯塊的相關資訊讀到RAM中,則需要將此塊壽命表寫到快閃記憶體中進行保存。同樣,當一個分區的分區壽命表發生變化後,若下一次讀寫操作需要將另一個分區的相關資訊讀到RAM中,則需要將此分區壽命表寫到快閃記憶體中進行保存,在保存分區壽命表之前需要先將RAM中的分區壽命表先進行保存。另外,若快閃記憶體處在空閒狀態下一段時間,並且壽命表又發生了變化,則可將壽命表先進行保存。The life table is first read into the RAM from the flash memory by the firmware during use, and the life table is not frequently accessed, only when the life table changes, and the read and write operations cross regions or cross logic blocks. Only need to save. When the block life table of a logic block changes, if the next read and write operation needs to read the information of another logic block into the RAM, the block life table needs to be written to the flash memory for saving. Similarly, when the partition life table of a partition changes, if the next read and write operation needs to read the information of another partition into the RAM, the partition life table needs to be written to the flash memory for saving. Before saving the partition life table, you need to save the partition life table in RAM first. In addition, if the flash memory is in an idle state for a while and the life table changes again, the life table can be saved first.

基於本發明的重點是闡述快閃記憶體的資料儲存方法,因此對有關快閃記憶體的結構、讀寫機制等相關技術不作詳細描述。The focus of the present invention is to explain the data storage method of the flash memory, and thus the related technologies related to the structure of the flash memory, the read/write mechanism, and the like are not described in detail.

第二圖示出了本實施例向快閃記憶體中寫資料操作的 流程。The second figure shows the operation of writing data into the flash memory in this embodiment. Process.

步驟S200,接收寫操作命令。Step S200, receiving a write operation command.

步驟S201,判斷是否需要從空塊池獲取空塊;若當前塊的剩餘空間不足以寫入寫操作命令的資料,則需要從空塊池中取空塊進行寫操作,執行步驟S202;否則,直接執行寫操作命令,向寫操作命令中的邏輯位址對應的物理位址寫入資料,執行步驟S207。In step S201, it is determined whether it is necessary to obtain an empty block from the empty block pool; if the remaining space of the current block is insufficient to write the data of the write operation command, the virtual block needs to be fetched from the empty block pool to perform a write operation, and step S202 is performed; otherwise, The write operation command is directly executed, and the data is written to the physical address corresponding to the logical address in the write operation command, and step S207 is performed.

步驟S202,若空塊池中空塊不足,則需要回收無效塊,執行步驟S203;否則,執行步驟S204。In step S202, if the empty block of the empty block is insufficient, the invalid block needs to be recovered, and step S203 is performed; otherwise, step S204 is performed.

所謂空塊不足,是個相對的概念,在快閃記憶體初始化時,每個邏輯塊對應一個物理塊;同時為了提高讀寫速度,還給整個快閃記憶體預留了一些空塊。在向快閃記憶體寫入資料的過程中,空塊可能不斷地被取走,空塊數量越來越少,當空塊數量少於設計人員預先設定的空塊數量時則為空塊不足。比如說空塊池總共有100個空塊,設定5個空塊為預留的空塊下限,當空塊池空塊少於5個時就判斷為空塊不足。The so-called empty block is a relative concept. When the flash memory is initialized, each logical block corresponds to one physical block. At the same time, in order to improve the read/write speed, some empty blocks are reserved for the entire flash memory. In the process of writing data to the flash memory, the empty block may be continuously taken away, and the number of empty blocks is less and less. When the number of empty blocks is less than the number of empty blocks preset by the designer, the empty block is insufficient. For example, the empty block pool has a total of 100 empty blocks, and 5 empty blocks are set as the reserved empty block lower limit. When there are less than 5 empty block empty blocks, it is judged that the empty block is insufficient.

步驟S203,將快閃記憶體中的無效塊進行回收,並將回收後的塊置於空塊池中,回收無效塊後執行步驟S204。In step S203, the invalid block in the flash memory is recovered, and the recovered block is placed in the empty block pool, and the invalid block is recovered, and then step S204 is performed.

步驟S204,從空塊池中取出最年輕的塊作為空塊供寫操作命令寫入上述資料,該最年輕的塊是固件通過比較空塊池中各空塊的擦寫次數,擦寫次數最少的塊即為最年輕的塊。Step S204, the youngest block is taken out from the empty pool as an empty block for writing a command to write the above data. The youngest block is the firmware to compare the number of erasures of each empty block in the empty block pool, and the number of erasing is the least. The block is the youngest block.

所述最年輕的塊或擦寫次數最少的塊是一個相對的概 念,是相對於擦寫次數較多的塊而言的。例如,空塊池中物理塊A的擦寫次數為N,物理塊A+1的擦寫次數為N+1,物理塊A+2的擦寫次數為N+2,物理塊A+3的擦寫次數為N+3,則物理塊A相對空塊池其他塊而言為擦寫次數最少的塊,而物理塊A+1相對於物理塊A+2和物理塊A+3而言為擦寫次數最少的塊。因此,該擦寫次數最少的塊不僅僅限定於物理塊A,也可以是擦寫次數次少的物理塊A+1或A+2等。在此,為了說明方便,仍以最年輕的塊或擦寫次數最少的塊等用語。因此,上述擦寫次數最少的塊或最年輕的塊也可以是擦寫次數較少的塊或較年輕的塊。The youngest block or the block with the least number of erasures is a relative It is relative to the block with a large number of erases. For example, the number of erasing of physical block A in the empty block pool is N, the number of erasing of physical block A+1 is N+1, the number of erasing of physical block A+2 is N+2, and the physical block A+3 If the number of erasures is N+3, the physical block A is the block with the least number of erasures relative to the other blocks of the empty block, and the physical block A+1 is relative to the physical block A+2 and the physical block A+3. The block with the least number of erases. Therefore, the block with the least number of erasures is not limited to the physical block A, and may be a physical block A+1 or A+2 with a small number of erasures. Here, for the convenience of explanation, the terms of the youngest block or the block with the least number of erasures are still used. Therefore, the block with the least number of erasures or the youngest block may be a block with a small number of erasures or a younger block.

步驟S205,若取得的擦寫次數最少的空塊是老化的塊,則空塊池中所有的空塊均會是老化的塊,此時則不繼續對所取得的最年輕的塊進行寫操作,而是進行靜態替換操作,執行步驟S206;若取得的最年輕的空塊是非老化的塊,則繼續進行寫操作,執行步驟S207;所謂老化的塊,是一個相對的概念,在寫操作的過程中,塊壽命表記錄每個邏輯塊的擦寫次數,並且還會有一個專門的結構體記錄整塊快閃記憶體所有物理塊的總擦寫次數和平均擦寫次數。當物理塊的擦寫次數超過平均擦寫次數一定閾值時,則認為此物理塊是老化的物理塊。平均擦寫次數是指對物理塊而言的,一些快閃記憶體中物理塊的個數並不一定是2的n次方,計算平均值時就不能通過移位獲得,如果用除法計算會非常麻煩。本發明實施例 中,平均擦寫次數是通過加減法來實現的,例如某一快閃記憶體的物理塊共有10000個,在對某一個物理塊執行擦寫操作時,該快閃記憶體的總擦寫次數就會增加1,當總的擦寫次數增加到物理塊總數即10000時,平均擦寫次數加1,總擦寫次數重新開始計算。設定平均擦寫次數閾值為5,當某一個物理塊的塊擦寫次數超過5次時,則該物理塊屬於老化的塊。Step S205, if the obtained empty block with the least number of erasures is an aging block, all the empty blocks in the empty block pool will be aging blocks, and at this time, the youngest block obtained is not continuously written. Instead, the static replacement operation is performed, and step S206 is performed; if the youngest empty block obtained is a non-aged block, the writing operation is continued, and step S207 is performed; the so-called aging block is a relative concept in the write operation. In the process, the block life table records the number of erasures of each logical block, and there is also a special structure to record the total number of erasures and the average number of erasures of all physical blocks of the entire block of flash memory. When the number of erasures of a physical block exceeds a certain threshold of the average number of erasures, the physical block is considered to be an aged physical block. The average number of erasures refers to the physical block. The number of physical blocks in some flash memory is not necessarily the nth power of 2, and the average value cannot be obtained by shifting. very troublesome. Embodiment of the present invention The average number of erasures is achieved by adding and subtracting. For example, if there are 10000 physical blocks in a flash memory, the total number of erasures of the flash memory when performing a erase operation on a physical block. It will increase by 1. When the total number of erasing times increases to 10,000 of the total number of physical blocks, the average number of erasing times is increased by one, and the total number of erasing times is restarted. The average erasure erasure threshold is set to 5. When the number of block erasures of a physical block exceeds 5, the physical block belongs to the aging block.

步驟S206,執行靜態替換操作,用空塊池中較老或最老的空塊從資料區中替換出一個相對更年輕的塊。In step S206, a static replacement operation is performed to replace a relatively younger block from the data area with the oldest or oldest empty block in the empty block pool.

步驟S207,執行寫操作,向快閃記憶體的物理塊中寫入資料。In step S207, a write operation is performed to write data into the physical block of the flash memory.

步驟S208,判斷寫操作是否執行完畢,如是,則結束寫操作;如否,則繼續執行步驟S201。In step S208, it is determined whether the write operation is completed, and if so, the write operation is ended; if not, the process proceeds to step S201.

所述回收無效塊的具體流程如第三圖所示。The specific process of recycling the invalid block is as shown in the third figure.

步驟S300,找到整塊快閃記憶體中佔用額外塊最多的分區,如此才能保證有足夠的邏輯塊供選擇用於回收。如前所述,該佔用額外塊最多的分區也可以是佔用額外塊較多的分區。In step S300, the partition occupying the most extra block in the entire flash memory is found, so as to ensure that there are enough logic blocks for selection for recycling. As mentioned before, the partition occupying the most extra blocks may also be a partition occupying more extra blocks.

在快閃記憶體初始化時,每個邏輯塊對應一個物理塊,此時每個邏輯塊佔用的額外塊都是0,每個分區佔用的額外塊也就是0。但在寫操作過程中,某些邏輯塊從空塊池取得空塊,即如前所述的一個邏輯塊對應若干個物理塊,它佔用的額外塊則會增加,相應分區佔用的額外塊也同樣會增多。本實施中,用一個陣列記錄了每個分區佔用 的額外塊數量。When the flash memory is initialized, each logical block corresponds to one physical block. At this time, each logical block occupies an additional block of 0, and the extra block occupied by each partition is also 0. However, during the write operation, some logic blocks obtain empty blocks from the empty block pool, that is, one logical block corresponding to a physical block as described above, and the extra block occupied by it increases, and the extra block occupied by the corresponding partition also It will also increase. In this implementation, each partition is recorded in an array. The number of extra blocks.

步驟S301,從佔用額外塊最多的分區中找到合適回收的邏輯塊,所述合適回收的邏輯塊包含兩個方面的因素,一是該邏輯塊中額外物理塊的數量,額外物理塊越多,其回收效率則越高,回收時優先選擇額外塊多的邏輯塊;二是該邏輯塊中的最年輕物理塊的擦寫次數,如果該邏輯塊中最年輕物理塊的擦寫次數太多,則也不能選用此邏輯塊。Step S301, finding a suitable recycled logical block from the partition occupying the most extra block, the suitable recycled logical block includes two factors, one is the number of additional physical blocks in the logical block, and the more physical blocks are added, The higher the recycling efficiency, the more logical blocks with extra blocks are preferred when recycling; the second is the number of erasures of the youngest physical block in the logical block. If the number of erasures of the youngest physical block in the logical block is too many, This logic block cannot be used either.

因此,為達到回收和平衡的目的,對於可以回收的邏輯塊(至少佔用兩個以上物理塊),建立了一個計算模型,通過該計算模型的計算,得出最合適回收的邏輯塊。該計算模型的計算式如下:c=10000+μa-b………(1)Therefore, for the purpose of recovery and balance, for a logical block that can be recycled (at least two physical blocks are occupied), a calculation model is established, and the calculation block of the calculation model is used to obtain the most suitable logic block for recovery. The calculation formula of this calculation model is as follows: c=10000+μa-b......(1)

計算式(1)中的c值越大,則該邏輯塊就越適合回收;上述模型中a表示額外物理塊數;b表示邏輯塊所包含物理塊的最小擦寫次數;μ是一係數,該係數直接決定a占的比重,μ的取值跟閾值T有關。通過固件獲得c值最大的邏輯塊,該邏輯塊即為合適回收的邏輯塊。The larger the value of c in equation (1), the more suitable the logic block is. In the above model, a represents the number of extra physical blocks; b represents the minimum number of erasures of the physical blocks contained in the logic block; μ is a coefficient. The coefficient directly determines the proportion of a, and the value of μ is related to the threshold T. The logical block with the largest c value is obtained by the firmware, which is the logical block that is suitable for recycling.

其中,所述閾值T的計算式如下:T=μ(E-A)………(2)Wherein, the calculation formula of the threshold T is as follows: T=μ(E-A)......(2)

計算式(2)中,E為快閃記憶體中每個物理塊能承受的擦寫次數,該值跟快閃記憶體的種類有關,在出廠時由廠商標誌;A為平均擦寫次數,在使用過程中會逐漸增大;由上述計算式可知,T就與E成正比,與A成反比。 對於不同的快閃記憶體,E越大,對應的閾值就越大;在快閃記憶體使用初期,對老化塊判斷的條件就越松,這樣就可以減少由於搬遷造成的額外損耗。而對於一個具體的應用快閃記憶體作為儲存介質的快閃記憶體設備,由於使用的快閃記憶體是固定的,因此E也是固定的,T的取值就只與A成反比。在使用過程中,隨著A不斷增大,T慢慢收縮,當整塊快閃記憶體逐漸老化,A接近E時,T也慢慢收縮直到0。快閃記憶體中所有的物理塊的擦寫次數就都慢慢的接近A。In the calculation formula (2), E is the number of times that each physical block in the flash memory can withstand the erasing, which is related to the type of the flash memory, and is marked by the manufacturer at the time of shipment; A is the average number of erasing times. It will gradually increase during use; from the above calculation formula, T is proportional to E and inversely proportional to A. For different flash memories, the larger the E is, the larger the corresponding threshold is. In the early stage of the flash memory, the condition for judging the aging block is looser, so that the extra loss due to the relocation can be reduced. For a specific flash memory device that uses flash memory as a storage medium, since the flash memory used is fixed, E is also fixed, and the value of T is only inversely proportional to A. During use, as A continues to increase, T slowly shrinks. As the entire flash memory ages, and A approaches E, T slowly shrinks to zero. The number of erases of all physical blocks in the flash memory is slowly approaching A.

在快閃記憶體設備使用初期,物理塊的擦寫次數波動範圍會比較大,這樣可以有效減少由於搬遷造成的額外損耗。隨著使用過程中A不斷增大,T逐漸收縮,物理塊的擦寫次數波動範圍也逐漸變窄,所有物理塊的擦寫次數也變得越來越平均,不至於很快超出E而使整塊快閃記憶體不能使用,這樣可以最大限度的利用所有塊。At the beginning of the use of the flash memory device, the frequency of erasing and writing of the physical block will be relatively large, which can effectively reduce the extra loss caused by the relocation. As the A increases, the T gradually shrinks, the fluctuation range of the physical block's erasing times is gradually narrowed, and the number of erasing and writing of all physical blocks becomes more and more average, so that it does not exceed E quickly. The entire block of flash memory can't be used, so you can make the most of all the blocks.

步驟S302,從空塊池中取出最年輕的空塊,即擦寫次數最少的空塊。如前所述,該擦寫次數最少的空塊或最年輕的空塊也可以是擦寫次數較少的空塊或較年輕的空塊。In step S302, the youngest empty block is taken out from the empty block pool, that is, the empty block with the least number of erasures. As mentioned earlier, the empty block or the youngest empty block with the least number of erasures may also be an empty block with a small number of erasures or a younger empty block.

步驟S303,用此最年輕的空塊回收找到的合適的邏輯塊,將此最年輕的空塊映射到此合適的邏輯塊,並將此合適的邏輯塊中的有效資料搬入此最年輕的空塊中,擦寫原邏輯塊中對應或包含的物理塊中的有效資料,並將此物理塊放入到空塊池中。Step S303, using the youngest empty block to recover the suitable logical block found, mapping the youngest empty block to the appropriate logical block, and moving the valid data in the appropriate logical block into the youngest space. In the block, the valid data in the physical block corresponding to or contained in the original logical block is erased, and the physical block is put into the empty block pool.

由此可見,所述回收無效塊是將佔用兩個以上物理塊 的邏輯塊中的有效資料搬到一個空塊中,並將此空塊與之前的邏輯塊建立好對應關係,擦寫搬出資料的幾個物理塊,並把它們放入空塊池,使空塊池中空塊數量增加。回收後放入空塊池中空塊還要加入到下一次識別擦寫次數最少的空塊的過程中。It can be seen that the recycling invalid block will occupy more than two physical blocks. The valid data in the logical block is moved to an empty block, and the empty block is associated with the previous logical block, and several physical blocks of the data are erased and put into the empty block pool, making it empty. The number of hollow blocks in the block pool increases. After being recycled, the hollow block that is placed in the empty block is added to the process of identifying the empty block with the least number of erasures.

所述執行靜態替換操作的具體流程如第四圖所示。The specific process of performing the static replacement operation is as shown in the fourth figure.

步驟S400,搬遷時先找到整塊快閃記憶體中擦寫次數最少的分區;所述擦寫次數最少的分區是指前述分區壽命表總擦寫次數最少的分區。如前所述,所述擦寫次數最少的分區可以是擦寫次數較少的分區。In step S400, when the relocation is performed, the partition with the least number of erasures in the entire flash memory is first found; the partition with the least number of erasures refers to the partition with the least number of erasures in the partition life table. As mentioned before, the partition with the least number of erasures may be a partition with fewer erases.

分區的平均壽命是指分區內所有邏輯塊的壽命的平均值。所述邏輯塊的壽命是指邏輯塊所包含的物理塊中最年輕一個塊即擦寫次數最少一個塊的壽命。The average lifetime of a partition is the average of the lifetimes of all logical blocks within the partition. The lifetime of the logical block refers to the life of the youngest block in the physical block included in the logical block, that is, the number of times of erasing is at least one block.

當分區中包含的邏輯塊的數量不是2的n次方時,如前所述的第32個分區只包含164個塊,就不能通過移位來計算平均值,如果用除法計算會非常麻煩。並且當分區內有效塊較少時,應該相應地減少在此分區內尋找邏輯塊做靜態搬遷的概率。本實施例中,採用近似取值的方法來求得邏輯塊的壽命的平均值。當邏輯塊數大於或者等於2的(n-1)次方小於2的n次方時,取近似值2的(n-1)次方。例如如前所述的164個塊,就是取128(2的7次方)計算,這樣求得的平均值會比實際值大,也就是邏輯塊的平均壽命偏大,相應地減少了找到此分區做靜態搬遷的概率,同時也方便了計算。When the number of logical blocks included in the partition is not 2 nth power, the 32nd partition as described above contains only 164 blocks, and the average value cannot be calculated by shifting, which is very troublesome if the division is performed. And when there are fewer valid blocks in the partition, the probability of finding logical blocks in the partition for static relocation should be reduced accordingly. In this embodiment, an approximate value is used to obtain an average value of the lifetime of the logic block. When the number of logical blocks is greater than or equal to 2, the (n-1) power is less than 2 nth power, and the (n-1) power of the approximation 2 is taken. For example, the 164 blocks mentioned above are taken as 128 (2 to the power of 7) calculation, so that the average value obtained is larger than the actual value, that is, the average life of the logic block is too large, correspondingly reducing the found The probability of a partition being statically relocated is also convenient for calculation.

步驟S401,在找到快閃記憶體中擦寫次數最少的分區後,再在這個擦寫次數最少的分區中根據所記錄的塊壽命表找到擦寫次數最少的邏輯塊。如前所述,所述擦寫次數最少的邏輯志可以是擦寫次數較少的邏輯塊。Step S401, after finding the partition with the least number of erasures in the flash memory, and finding the logical block with the least number of erasures according to the recorded block life table in the partition with the least number of erasures. As mentioned before, the logic with the least number of erasures may be a logical block with a small number of erasures.

步驟S402,為了避免對頻繁操作區域的資料進行搬遷,對找到的擦寫次數最少的邏輯塊需要有所限制;首先判斷該擦寫次數最少的邏輯塊是否是文件配置表(FAT)所在分區,如是,則不對其進行操作;否則,執行步驟S403。Step S402, in order to avoid relocation of the data of the frequently operated area, the logical block having the least number of erasing and erasing needs to be limited; first, it is determined whether the logical block with the least number of erasing times is the partition of the file configuration table (FAT). If so, it is not operated; otherwise, step S403 is performed.

步驟S403,判斷該擦寫次數最少的邏輯塊是否是上次寫操作塊,如是,則不對其進行操作;否則,執行步驟S404。Step S403, it is determined whether the logical block with the least number of erasures is the last write operation block, and if so, it is not operated; otherwise, step S404 is performed.

步驟S404,從空塊池中找擦寫次數最多的空塊,用此擦寫次數最多的空塊回收此擦寫次數最少的邏輯塊中的物理塊。In step S404, the empty block with the most erasure is found from the empty block pool, and the physical block in the logical block with the least number of erasures is recovered by the empty block with the most erasure.

若所述擦寫次數最少的邏輯塊中的物理塊存有資料,則將所找到的擦寫次數最少的邏輯塊中的物理塊存有的有效資料搬遷到所述擦寫次數最多的空塊中,並擦寫該邏輯塊中的物理塊並放入空塊池中;在完成資料搬遷後,用所述擦寫次數最多的空塊回此擦寫次數最少的邏輯塊的物理塊。If the physical block in the logical block with the least number of erasures has data, the valid data stored in the physical block in the logical block with the least number of times of erasing is relocated to the empty block with the most erasure And erasing the physical block in the logical block and putting it into the empty block pool; after completing the data relocation, returning the physical block of the logical block with the least number of erasures with the empty block with the most erasure.

以上所述僅為本發明的優選實施例,並非因此限制本發明的專利範圍,凡是利用本發明說明書及附圖內容所作的等效結構或等效流程變換,或直接或間接運用在其他相 關的技術領域,均同理包括在本發明的專利保護範圍內。The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the invention, and the equivalent structure or equivalent flow transformation made by the specification and the drawings of the present invention may be directly or indirectly applied to other phases. The technical fields of the related art are all included in the scope of patent protection of the present invention.

S200~S209‧‧‧步驟S200~S209‧‧‧Steps

S300~S304‧‧‧步驟S300~S304‧‧‧Steps

S400~S406‧‧‧步驟S400~S406‧‧‧Steps

第一圖 是本發明實施例的分區結構示意圖;第二圖 是本發明實施例的寫資料操作流程圖;第三圖 是本發明實施例的回收無效塊操作流程圖;第四圖 是本發明實施例的執行靜態替換操作的流程圖。The first figure is a schematic diagram of a partition structure according to an embodiment of the present invention; the second figure is a flow chart of the operation of writing data according to an embodiment of the present invention; the third figure is a flowchart of the operation of recovering invalid blocks according to an embodiment of the present invention; A flowchart of an embodiment performing a static replacement operation.

S200~S209S200~S209

Claims (10)

一種快閃記憶體資料儲存方法,所述快閃記憶體包括多個儲存塊,所述多個儲存塊被分成兩個或兩個以上的分區,所述快閃記憶體中設置有由空塊構成的空塊池;所述快閃記憶體在儲存資料的過程中,包括:回收無效塊的步驟;從空塊池中獲取擦寫次數較少的空塊的步驟;判斷所獲取擦寫次數較少的空塊是否是已老化的塊的步驟;其中,所述回收無效塊的步驟進一步包括:在快閃記憶體中尋找佔有額外塊較多的分區;從所述佔有額外塊較多的分區中找合適回收的邏輯塊;從空塊池中取出擦寫次數較少的空塊;以及用所述擦寫次數較少的空塊回收所述合適回收的邏輯塊中物理塊。 A flash memory data storage method, the flash memory includes a plurality of storage blocks, the plurality of storage blocks are divided into two or more partitions, and the flash memory is provided with an empty block In the process of storing data, the flash memory includes: a step of recovering an invalid block; a step of obtaining an empty block with a small number of erasing times from the empty block; determining the number of times of erasing and erasing The step of whether the empty block is an aged block; wherein the step of recovering the invalid block further comprises: searching for a partition occupying more extra blocks in the flash memory; and having more extra blocks from the occupying Finding a logical block suitable for recycling in the partition; taking out an empty block with a small number of erasures from the empty block pool; and recovering the physical block in the logical block that is properly recovered by using the empty block with a small number of erasures. 如請求項1所述的快閃記憶體資料儲存方法,其更包括:對已老化的塊執行靜態替換的步驟。 The flash memory data storage method of claim 1, further comprising the step of performing static replacement on the aged block. 如請求項1所述的快閃記憶體資料儲存方法,其更包括:將所述合適回收的邏輯塊中物理塊的有效資料搬入所述擦寫次數較少的空塊,並擦寫所述邏輯塊中物理塊有效資料的步驟。 The flash memory data storage method of claim 1, further comprising: moving valid data of the physical block in the appropriately recovered logical block into the empty block having a small number of erasures, and erasing the The step of validating the physical block in the logic block. 如請求項2所述的快閃記憶體資料儲存方法,其中, 所述執行靜態替換的步驟包括:在所述快閃記憶體中找出擦寫次數較少的分區的步驟;從擦寫次數較少的分區中找到擦寫次數較少的邏輯塊的步驟;從空塊池中取出擦寫次數較多的空塊的步驟;用所述擦寫次數較多的空塊回收擦寫次數較少的邏輯塊中物理塊的步驟。 The flash memory data storage method according to claim 2, wherein The step of performing static replacement includes: a step of finding a partition with a small number of erasures in the flash memory; and a step of finding a logical block having a small number of erasures from a partition having a small number of erasures; The step of extracting an empty block with a large number of erasures from the empty block pool; and recovering the physical block in the logical block with a small number of erasing times by using the empty block with a large number of erasures. 如請求項4所述的快閃記憶體資料儲存方法,其更包括:判斷所述擦寫次數較少的邏輯塊是否是文件配置表(FAT)所在塊的步驟。 The flash memory data storage method of claim 4, further comprising the step of determining whether the logical block having a small number of erasures is a block in which a file configuration table (FAT) is located. 如請求項4或5所述的快閃記憶體資料儲存方法,其更包括:判斷所述擦寫次數較少的邏輯塊是否是上次寫操作塊的步驟。 The flash memory data storage method of claim 4 or 5, further comprising: determining whether the logical block having a small number of erasures is the last write operation block. 如請求項1至4中之任一項所述的快閃記憶體資料儲存方法,其中,所述已老化的塊是指某一物理塊的擦寫次數超過所述快閃記憶體平均擦寫次數的物理塊。 The flash memory data storage method according to any one of claims 1 to 4, wherein the aged block means that the number of erasures of a certain physical block exceeds the average erase of the flash memory. The physical block of the number of times. 如請求項1或3所述的快閃記憶體資料儲存方法,其中,所述合適回收的邏輯塊是指所述佔有額外塊較多的分區中包含額外物理塊最多的邏輯塊。 The flash memory data storage method according to claim 1 or 3, wherein the logical block that is appropriately recovered refers to the logical block that contains the most physical blocks in the partition occupying more extra blocks. 如請求項1至4中之任一項所述的快閃記憶體資料儲存方法,其中,所述快閃記憶體包括塊壽命表和分區壽命表,該塊壽命表記錄了快閃記憶體中每個邏輯塊的擦寫次 數,分區壽命表記錄了分區擦寫次數,所述分區擦寫次數為該分區所有邏輯塊的擦寫次數的總和。 The flash memory data storage method of any one of claims 1 to 4, wherein the flash memory includes a block life table and a partition life table, the block life table recording the flash memory Number of erases per logical block The number, the partition life table records the number of times the partition is erased, and the number of times the partition is erased is the sum of the number of erases of all logical blocks of the partition. 如請求項9所述的快閃記憶體資料儲存方法,其中,所述邏輯塊的擦寫次數是該邏輯塊所包含物理塊中擦寫次數最少的物理塊的擦寫次數。The flash memory data storage method of claim 9, wherein the number of erasures of the logical block is the number of erasures of the physical block having the least number of erasures in the physical block included in the logical block.
TW96143097A 2007-11-14 2007-11-14 Method for storing data in a flash memory medium TWI381383B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW96143097A TWI381383B (en) 2007-11-14 2007-11-14 Method for storing data in a flash memory medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW96143097A TWI381383B (en) 2007-11-14 2007-11-14 Method for storing data in a flash memory medium

Publications (2)

Publication Number Publication Date
TW200921680A TW200921680A (en) 2009-05-16
TWI381383B true TWI381383B (en) 2013-01-01

Family

ID=44727966

Family Applications (1)

Application Number Title Priority Date Filing Date
TW96143097A TWI381383B (en) 2007-11-14 2007-11-14 Method for storing data in a flash memory medium

Country Status (1)

Country Link
TW (1) TWI381383B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN118113231B (en) * 2024-04-30 2024-07-23 山东云海国创云计算装备产业创新中心有限公司 Storage device garbage recycling method and device, target storage device and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TW200511008A (en) * 2003-09-05 2005-03-16 Megawin Technology Co Ltd Efficiently controlling method for access flash memory
US7039781B2 (en) * 2001-07-27 2006-05-02 Matsushtia Electric Industrial Co., Ltd. Flash memory apparatus and method for merging stored data items
US20060161728A1 (en) * 2005-01-20 2006-07-20 Bennett Alan D Scheduling of housekeeping operations in flash memory systems
US20070204128A1 (en) * 2003-09-10 2007-08-30 Super Talent Electronics Inc. Two-Level RAM Lookup Table for Block and Page Allocation and Wear-Leveling in Limited-Write Flash-Memories
US20070245064A1 (en) * 2006-04-15 2007-10-18 Yi-Chun Liu Method Of Flash Memory Management
US20070245069A1 (en) * 2004-09-10 2007-10-18 Syuichi Kikuchi Storage Device, Memory Management Method and Program

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7039781B2 (en) * 2001-07-27 2006-05-02 Matsushtia Electric Industrial Co., Ltd. Flash memory apparatus and method for merging stored data items
TW200511008A (en) * 2003-09-05 2005-03-16 Megawin Technology Co Ltd Efficiently controlling method for access flash memory
US20070204128A1 (en) * 2003-09-10 2007-08-30 Super Talent Electronics Inc. Two-Level RAM Lookup Table for Block and Page Allocation and Wear-Leveling in Limited-Write Flash-Memories
US20070245069A1 (en) * 2004-09-10 2007-10-18 Syuichi Kikuchi Storage Device, Memory Management Method and Program
US20060161728A1 (en) * 2005-01-20 2006-07-20 Bennett Alan D Scheduling of housekeeping operations in flash memory systems
US20070245064A1 (en) * 2006-04-15 2007-10-18 Yi-Chun Liu Method Of Flash Memory Management

Also Published As

Publication number Publication date
TW200921680A (en) 2009-05-16

Similar Documents

Publication Publication Date Title
KR100684887B1 (en) Data storing device including flash memory and merge method of thereof
JP5728672B2 (en) Hybrid memory management
KR100526190B1 (en) Remapping method for flash memory
KR101081716B1 (en) Memory device
TWI489373B (en) Data storage device and method for managing blocks of a flash memory
KR100771519B1 (en) Memory system including flash memory and merge method of thereof
TWI399644B (en) Block management method for a non-volatile memory
US20080104357A1 (en) Apparatus and method for managing nonvolatile memory
KR20130017748A (en) Memory controller and data management method
CN109471594B (en) M L C flash memory read-write method
WO2012081731A1 (en) Semiconductor storage device
CN107817945B (en) Data reading method and system of hybrid memory structure
KR101403922B1 (en) Apparatus and method for data storing according to an access degree
US20140223075A1 (en) Physical-to-logical address map to speed up a recycle operation in a solid state drive
US20150120989A1 (en) Tracking and Utilizing Second Level Map Index for Recycling of Solid State Drive Blocks
US10339045B2 (en) Valid data management method and storage controller
KR100914646B1 (en) Management Scheme for Flash Memory with the Multi-Plane Architecture
US9778862B2 (en) Data storing method for preventing data losing during flush operation, memory control circuit unit and memory storage apparatus
CN116540950B (en) Memory device and control method for writing data thereof
JP2010191983A (en) Storage device
TWI381383B (en) Method for storing data in a flash memory medium
JP4661191B2 (en) Memory controller, flash memory system, and flash memory control method
JP4558054B2 (en) Memory system
KR100703727B1 (en) Non-volatile memory, Mappping controlling apparatus and method for the same
CN101436431B (en) Data storage method of flash memory medium