FIG. (FIG.) 1 is a block diagram showing hardware architecture for a memory system incorporating conventional flash memory.
Embodiments of the invention will now be described with reference to the accompanying drawings. This invention may, however, be embodied in many different forms and should not be construed as being limited to only the embodiments set forth herein. Rather, these embodiments are presented as teaching examples. Throughout the written description and drawings, like numbers refer to like or similar elements.
In one embodiment, flash memory 130 is a NAND flash memory consisting of a plurality of memory cells arranged in an array of strings. The memory cell array of NAND flash memory 130 is assumed to be partitioned into a plurality of memory blocks, each including a plurality of pages. Each page includes data derived from a group of memory cells connected to a common word line.
NAND flash memory 130 is assumed to perform erase operations on a memory block unit basis, and read/write operations on a page unit basis. Further, it is assumed that NAND flash memory 130 does not support overwrite operations, unlike other semiconductor memory devices. For this reason, NAND flash memory 130 must perform an erase operation before each write operation.
In order to use NAND flash memory 130 in a manner allowing its replace of a hard disk drive and in view of the foregoing performance assumptions, NAND flash memory 130 requires some form of memory management with respect to read, write and erase operations. The provided FTL is used, wholly or in part, to provide a memory management capability.
NAND flash memory 130 is further assumed to include designated data, log, and meta regions. The data region consists of a plurality of data blocks designated to store user data. The log region consists of one or more log blocks, each of which is assigned to a given data block.
When data is to be stored in a given data block it is not written directly to this data block. Instead, the data is written to a corresponding log block. Afterwards, by means of a merge operation, valid data pages stored in the log block and the data block are copied to a new data block. The merge operation thus causes a change in mapping information which may be stored in the meta region.
In the illustrated embodiment, a mapping table used for address conversion is stored in RAM 120. Mapping methods may be discriminated based on mapping units. For example, mapping methods include a page mapping method of performing a mapping operation on a page unit basis, a block mapping method of performing a mapping operation on a block unit basis, and a hybrid mapping method using both page and block mapping methods.
One potential drawback to the use of the page mapping method is that more memory space is required for the page mapping table. However, one drawback to the use of the block mapping method is the requirement of a large number of merge operations. In contrast, the hybrid mapping method uses the page mapping method over a log block. As the hybrid mapping method uses both page and block mapping methods, it is possible to reduce the overall size of a competent mapping table while also reducing the number of required merge operations.
FTL 320 receives a logical sector number (LSN) from file system 310 and translates the LSN into a physical sector number (PSN) using a mapping table. FTL 320 then provides the PSN to flash memory 330.
Referring to
Once a write operation is requested, FTL 320 determines whether there exists a log block 410 assigned to data block 420. If so, a page write operation is made over the assigned log block. If not, a new log block is assigned and a page write operation is made over the newly assigned log block.
Referring to
Thus, it is assumed in the illustrated example that when a first write operation is requested to logic page 2, the write operation is carried out with respect to a first physical page of log block 410. Then when a second write operation is requested to logic page 3, a write operation is carried out with respect to a second physical page of log block 410. And then when a third write operation is requested to logic page 0, a write operation is carried out with respect to a third physical page of log block 410.
Under these conditions wherein log block 410 has a “free block” available and the overall log block requires additional space, FTL 320 may perform a merge operation. By means of this merge operation, logical pages 2, 3 and 0 stored in first through third physical pages of log block 410 are copy-combined within a new data block 430 with logical page 1.
Within this merge operation, logical page 0 in logic block 410 is copied to the first physical page of new data block 430. Next, logical page 1 in logic block 420 is copied to the second physical page of new data block 430. Logical pages 2 and 3 in logic block 410 are then copied to the third and fourth physical pages of new data block 430, respectively. Afterward the merge operation is complete, log block 410 and data block 420 may be erased and reallocated for subsequent use.
In accordance with the constituent hybrid mapping method, valid pages in log and data blocks 410 and 420 are copied to new data block 430 by means of the merge operation. First through fourth pages in new data block 430 are sequentially written with valid pages. An operation for sequentially writing pages in a block is referred to as an “in-place order”. On the other hand, an operation for randomly writing pages in a block is referred to as an “out-of-place order” or a “random-place order”.
If a write operation is sequentially directed to logical pages 0, 1, 2 and 3 in order, the logical pages are sequentially written in the corresponding first through fourth physical pages in log block 410. Pages written in log block 410 can be registered in a data block directly without an additional page copy operation. This is because pages are arranged so that log block 410 is suitable for the in-place order.
However, if a write operation is requested voluntarily, a page copy operation for rearranging page order is inevitably needed. Thus, assuming the example shown in
As can be understood from the foregoing description, although the hybrid mapping method is used, a plurality of page copy operations are required to re-order pages. Further, after the page copy operations are completed, multiple erase operations are required.
Embodiments of the invention effectively address these drawbacks in the context of a hybrid mapping method. Embodiments of the invention reduce the number of required page copy operations and associated erase operations by treating a portion of the out-of-place order as an in-place order. The resulting decrease in the number of required page copy and block erase operations allows improvement in the performance of the overall memory system. One embodiment of a memory system using a hybrid mapping method according to the present invention will now be described in some additional detail.
FTL 420 receives a logical sector number (LSN) from the file system 410 and converts it into a physical sector number (PSN) using a mapping table. FTL 420 then provides the PSN to flash memory 430.
In the illustrated example, FTL 420 includes a block mapping table 421, a wrap-around page mapping table 422, and a random page mapping table 423. Random page mapping table 423 enables a page conversion operation in relation to an out-of-place order. Random page mapping table 423 will be more fully described with reference to
Wrap-around page mapping table 422 enables a page translation operation in relation to a wrap-around order. The term “wrap-around order” denotes a page place order that is sequentially increased without necessarily using a starting page having a “0” value. For example, where one block consists of four pages, the following cases arise according to the wrap-around order:
Case 1: page ‘1’→page ‘2’→page ‘3’→page ‘0’
Case 2: page ‘2’→page ‘3’→page ‘0’→page ‘1’
Case 3: page ‘3’→page ‘0’→page ‘1’→page ‘2’
Like the in-place order, the wrap-around order supports sequential page write operations. However, in the case of a wrap-around order, the starting page need note be page ‘0’. The hybrid mapping method described in relation to
However, memory system 400 according to an embodiment of the invention includes wrap-around page mapping table 422 and processes a wrap-around order like the in-place order. As a result, this example requires only one page copy operation and one block erase operation, as will be more fully described with reference to
Collectively
Referring to
A flag value of ‘0’ indicates an in-place order, a flag value of ‘1’ indicates a wrap-around order, and a flag value of ‘2’ indicates an out-of-place order. However, this is just one example of block mapping table information that may be used to identify particular page place orders.
Within this context, an in-place order having a starting page set to page ‘0’, does not necessitate the use of offset information. On the other hand, a wrap-around order necessitates the definition of a starting page, and an out-of-place order necessitates the definition of a page order.
An exemplary sequence of page read operations will now be described with reference to
The page read operation is first directed to page No. 2 in a block No. 1. The FTL searches physical block No. 200, which corresponds to logical block No. 1, by referencing a block mapping table. The FTL identifies corresponding flag information by recourse to the block mapping table. As seen in
A next page read operation is directed to page No. 2 of block No. 4. The FTL searches physical block No. 500 corresponding to logical block No. 4 with reference to the block mapping table. The FTL identifies flag information of ‘1’ corresponding to logic block No. 4. This flag information indicates that physical block No. 500 includes pages arranged according to a wrap-around order.
Therefore, the FTL refers to the wrap-around page mapping table of
A next page read operation is directed to page No. 2 in block No. 6. The FTL searches physical block No. 700 corresponding to a logical block No. 6 with reference to the block mapping table. The FTL identifies flag information of ‘2’ corresponding to logic block No. 6. This flag information indicates that physical block No. 700 includes pages are arranged according to an out-of-place order.
Therefore, the FTL refers to the random page mapping table of
As illustrated in
In the illustrated example, page No. 1 in the second physical page is copied to the fourth physical page of log block 510. Log block 510 is registered as a new data block. In this embodiment, log block 510 is registered as a new data block where a block mapping table has a flag value of 1 and a wrap-around page mapping table has an offset value of 2. Data block 520 is erased. Accordingly, memory system 400 illustrated in
Additionally, a memory system according to an embodiment of the invention may include a random page mapping table when available memory space is insufficient. The memory system according to an embodiment of the invention processes the wrap-around order identically to the in-place order. Thus, within embodiments of the invention, it is possible to greatly reduce the number of required page copy and block erase operations needed to accomplish a merge operation.
Since the present invention performs a read operation with reference to flag information and offset information, it is unnecessary to fit a page order as illustrated in
Further, a block mapping table necessitates only a 2-bit memory space to store flag information, and a wrap-around page mapping table necessitates only a 1-bit or 2-bit memory space to store offset information. Accordingly, it is possible to reduce a page copy number and a block erase number without increasing of a memory space.
Although the present invention has been described in relation to certain embodiments illustrated in the accompanying drawings, it is not limited thereto. It will be apparent to those skilled in the art that various substitution, modifications and changes may be thereto without departing from the scope of the invention.
| Number | Date | Country | Kind |
|---|---|---|---|
| 2006-101961 | Oct 2006 | KR | national |