US20050169058A1 - Data management apparatus and method used for flash memory - Google Patents

Data management apparatus and method used for flash memory Download PDF

Info

Publication number
US20050169058A1
US20050169058A1 US11/047,779 US4777905A US2005169058A1 US 20050169058 A1 US20050169058 A1 US 20050169058A1 US 4777905 A US4777905 A US 4777905A US 2005169058 A1 US2005169058 A1 US 2005169058A1
Authority
US
United States
Prior art keywords
data
flash memory
block
log
internal memory
Prior art date
Legal status (The legal status 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 status listed.)
Abandoned
Application number
US11/047,779
Inventor
Sung-ju Myoung
Jin-hyuk Kim
Jae-wook Cheong
Hyun-mo Chung
Tae-sun Chung
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Samsung Electronics Co Ltd
Original Assignee
Samsung Electronics 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 Samsung Electronics Co Ltd filed Critical Samsung Electronics Co Ltd
Assigned to SAMSUNG ELECTRONICS CO., LTD. reassignment SAMSUNG ELECTRONICS CO., LTD. ASSIGNMENT OF ASSIGNORS INTEREST (SEE DOCUMENT FOR DETAILS). Assignors: CHUNG, TAE-SUN, CHEONG, JAE-WOOK, CHUNG, HYUN-MO, KIM, JIN-HYUK, MYOUNG, SUNG-JU
Publication of US20050169058A1 publication Critical patent/US20050169058A1/en
Abandoned legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B3/00Line transmission systems
    • H04B3/54Systems for transmission via power distribution lines
    • H04B3/546Combination of signalling, telemetering, protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C16/00Erasable programmable read-only memories
    • G11C16/02Erasable programmable read-only memories electrically programmable
    • G11C16/06Auxiliary circuits, e.g. for writing into memory
    • G11C16/10Programming or data input circuits
    • G11C16/102External programming circuits, e.g. EPROM programmers; In-circuit programming or reprogramming; EPROM emulators
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B2203/00Indexing scheme relating to line transmission systems
    • H04B2203/54Aspects of powerline communications not already covered by H04B3/54 and its subgroups
    • H04B2203/5462Systems for power line communications
    • H04B2203/5479Systems for power line communications using repeaters

Definitions

  • the present invention relates to a data management apparatus and method used for a flash memory, and more particularly, to a data management apparatus and method used for a flash memory, which can prevent waste of memory space and deterioration of the performance of a large block flash memory caused by a difference between a logical operation unit and a physical operation unit of the large block flash memory.
  • non-volatile memories as storage devices for storing and processing data.
  • Flash memories are one type of non-volatile memory, in which data can be electrically erased and overwritten. Flash memories are suitable for portable devices because they consume less power than magnetic disc memory-based storage mediums, are as accessible as hard discs, and are compact-sized.
  • flash memories Due to the hardware characteristics of flash memories, data recorded on a flash memory is erased in units of blocks, unlike in the conventional random access memory (RAM), nonvolatile storage medium or magnetic storage medium.
  • RAM random access memory
  • FIG. 1 is a block diagram of such a typical flash memory system.
  • the typical flash memory system includes a flash memory 10 and a controller 20 .
  • the controller 20 having a user program 21 loaded therein controls a predetermined data operation to be performed on the flash memory 10 at a user's request.
  • the controller 20 includes a file system 22 , in which the user program 21 is loaded, and a flash translation layer (FTL) 23 , which transfers the predetermined data operation requested by the user, such as a read or write operation, to the flash memory 10 .
  • FTL flash translation layer
  • the FTL 23 is software that helps use the flash memory 10 as a block device, and generally supports a block re-mapping method for managing the flash memory 10 .
  • the block re-mapping method enables management of mapping information on the relationships between logical block numbers (LBNs) and physical block numbers (PBNs) of given data.
  • LBNs logical block numbers
  • PBNs physical block numbers
  • data recorded in the flash memory 10 is always accessible with the same logical block number (LBN) even though a pertinent PBN changes.
  • the PBN recorded in the flash memory 10 may change when the data stored in the flash memory 10 is modified or erased from the flash memory 10 .
  • a low level format operation should be performed on the flash memory 10 by the FTL 23 in order to make the flash memory 10 usable.
  • the flash memory 10 that has undergone the low level format operation is divided into a map area 31 , a log area 32 , a data area 33 , and a spare area 34 .
  • Each of the map area 31 , the log area 32 , the data area 33 , and the spare area 34 is comprised of at least one block.
  • the map area 31 includes a block mapping table, which converts an LBN into a PBN. Specifically, the block mapping table maps an LBN to a PBN of a block (hereinafter referred to as a data block) of the data area 33 . If the block mapping table is updated, the updated block mapping table is stored in a block (hereinafter referred to as map block) of the map area 31 .
  • the log area 32 is used ahead of the data area 33 .
  • a log table maps an LBN that has been used by the user to issue a request for performing the predetermined data operation on the flash memory 10 to a PBN of a block (hereinafter referred to as a log block) in the log area 32 .
  • the log table is stored in the log area 32 .
  • the log table includes a LBN 32 a , a PBN 32 b , which designates a predetermined log block and is mapped to the LBN 32 a , and page numbers 32 c , which designate pages of the predetermined log block where data exists.
  • a block of the flash memory 10 is comprised of a plurality of pages in which a data operation is performed on the flash memory 10 .
  • the page numbers 32 c specify pages to which the data should have been written.
  • the page numbers 32 c enable data stored in pages of a log block 32 d of the log area 32 to be transferred to the respective pages of a data block 33 a of the data area 33 , as shown in FIG. 4 .
  • the FTL 23 divides the data area 33 into a plurality of data blocks having a predetermined size. Thus, the data area 33 is accessed in units of data blocks. PBNs are sequentially allocated to the data blocks.
  • the spare area 34 is used when no memory space is left in the log area 32 so that data cannot be written to the log area 32 any longer.
  • FIG. 5 is a flowchart of a conventional method of writing data to a flash memory.
  • an LBN is converted into a PBN (hereinafter referred to as a data PBN of the data area 33 with reference to a block mapping table stored in the map area 31 .
  • the LBN is also converted into a PBN (hereinafter referred to as a log PBN) of the log area 32 with reference to a log table stored in the log area 32 .
  • a flash memory is classified into a small-block flash memory or a large-block flash memory.
  • a logical operation unit is identical to a physical operation unit, while in a large-block flash memory, a physical operation unit is larger than a logical operation unit.
  • a physical operation unit is comprised of at least one logical operation unit.
  • the present invention provides a data management apparatus and method used for a flash memory, which can prevent waste of memory space caused by a difference between a logical operation unit and a physical operation unit of the large block flash memory.
  • a data management apparatus used for a flash memory having an internal memory.
  • the data management apparatus copies data stored in a physical block to which a data operation is to be performed to the internal memory, performs the data operation on the internal memory, and transfers the data to the physical block.
  • data corresponding to physical operation units of the flash memory is copied to the internal memory.
  • the data copied from the physical block to the internal memory is preferably, but not necessarily, modified in logical operation units of the flash memory.
  • a data management method used for a flash memory having an internal memory comprising copying data stored in a physical block, to which a data operation is to be performed, to the internal memory, and performing the data operation on the internal memory.
  • the copying of the data stored in the physical block to internal memory may comprise searching for a physical block corresponding to a logical block to which the data operation is to be performed, and copying data stored in the physical block to the internal memory in physical operation units of the flash memory.
  • the searching for the physical block may comprise searching for the physical block with reference to a table that maps a logical block number to a physical block number.
  • the copying of the data stored in the physical block may comprise performing data operations on the data coped from the internal memory in units of logical operation units.
  • the data management method may further comprise transferring the data on which data operations have been completed from the internal memory to the physical block.
  • the transferring of the data may comprise updating the table after the data is transferred to the physical block.
  • FIG. 1 is a block diagram of a conventional data management apparatus used for a flash memory
  • FIG. 2 is a diagram illustrating the structure of a flash memory that has been subjected to a low level format operation
  • FIG. 3 is a diagram illustrating a typical log table
  • FIG. 4 is a diagram illustrating the transfer of data from a log block to a data block with reference to the typical log table of FIG. 3 ;
  • FIG. 5 is a diagram illustrating a conventional method of writing data to a flash memory
  • FIG. 6 is a diagram illustrating a conventional method of reading data from a flash memory
  • FIG. 7A is a diagram illustrating a typical small-block flash memory
  • FIG. 7B is a diagram illustrating a typical large-block flash memory
  • FIG. 8 is a block diagram of a data management apparatus used for a flash memory, according to an exemplary embodiment of the present invention.
  • FIG. 9 is a diagram illustrating the structure of a flash memory that has been subjected to a low-level format operation performed by a flash translation layer (FTL);
  • FTL flash translation layer
  • FIG. 10 is a diagram illustrating a block mapping table according to an exemplary embodiment of the present invention.
  • FIG. 11 is a diagram illustrating the mapping of blocks in a log area to blocks in a data area according to an exemplary embodiment of the present invention.
  • FIG. 12 is a diagram illustrating a log table according to an exemplary embodiment of the present invention.
  • FIG. 13A is a diagram illustrating a typical method of writing data to a single sector
  • FIG. 13B is a diagram illustrating a typical method of writing data to multiple sectors
  • FIG. 14 is a flowchart of a method of writing data to a flash memory according to an exemplary embodiment of the present invention.
  • FIG. 15 is a diagram illustrating the writing of data to sectors of a flash memory, according to an exemplary embodiment of the present invention.
  • FIG. 16 is a diagram illustrating the writing of data to a page of a log block, according to an exemplary embodiment of the present invention.
  • FIG. 17 is a diagram illustrating the copying of data stored in a page of a data block to an internal memory, according to an exemplary embodiment of the present invention.
  • FIG. 18 is a diagram illustrating the modification of data copied to an internal memory and the transfer of the modified data to a log block, according to an exemplary embodiment of the present invention.
  • FIG. 19 is a flowchart of a method of reading data from a flash memory according to an exemplary embodiment of the present invention.
  • a flash memory is generally classified into a small-block flash memory and a large-block flash memory.
  • the large-block flash memory has a physical operation unit having a size larger than that of a logical operation unit.
  • a unit in which logical operations are performed on the small-block flash memory i.e., a logical operation unit 51
  • a unit in which physical operations are performed on the small-block flash memory i.e., a physical operation unit 52 , as shown in FIG. 7A .
  • a physical operation unit 53 includes at least one logical operation unit 54 , as shown in FIG. 7B .
  • the logical operation units 51 and 54 which are data operation units used by a user, are generally called sectors
  • the physical operation units 52 and 53 which are data operation units used in the respective flash memories, are generally called pages.
  • Sizes of the logical and physical operation units may vary according to the type of an apparatus employing the flash memory.
  • the present invention is directed to a data management apparatus used for a flash memory, which is capable of preventing waste of memory space and deterioration of the performance of a large-block flash memory caused by a difference between a logical operation unit and a physical operation unit of the large-block flash memory.
  • the data management apparatus is shown in FIG. 8 . Referring to FIG. 8 .
  • the data management apparatus includes a flash translation layer (FTL) 200 , which enables a flash memory 100 including an internal memory 110 to be used as a block device and includes mapping information on the relationship between a logical block number (LBN) and a physical block number (PBN) of the flash memory 100 , and a controller 300 , which transfers data stored at a pertinent physical address to the internal memory 110 and allows a data operation to be performed on the internal memory 110 .
  • FTL flash translation layer
  • the FTL 200 performs a low level format operation on the flash memory 100 in order to make the flash memory 100 usable.
  • the flash memory 100 is divided into an FTL information area 101 , a log area 102 , a spare area 103 , and a data area 104 , as shown in FIG. 9 .
  • Each of the FTL information area 101 , the log area 102 , the spare area 103 , and the data area 104 is comprised of at least one block.
  • the FTL information area 101 includes a block mapping table that maps an LBN specified by the user to a data PBN.
  • the block mapping table is illustrated in FIG. 10 .
  • the block mapping table includes an LBN 510 specified by a user and a data PBN 520 corresponding to the LBN 510 .
  • a log table that maps the LBN specified by the user to a log PBN is stored in the log area 102 .
  • the data operation is performed on the log area 102 having the log table ahead of other areas of the flash memory 100 .
  • each log PBN of the log area 102 is mapped to a data PBN.
  • a log PBN 530 is mapped to a data PBN 540 .
  • the log table includes an LBN 610 , a PBN 620 , which is mapped to the LBN 610 , and page numbers 630 included in the PBN 620 .
  • the spare area 103 is used when no memory space is left in the log area 102 so that data cannot be written to the log area any longer.
  • the LBN specified by the user is mapped to a PBN of the spare area 104 , so data operations can be performed on the spare area 104 later on.
  • the controller 300 controls data stored at a PBN corresponding to the LBN specified by the user to be transferred to the internal memory 110 to perform a data operation on the internal memory 110 .
  • the LBN specified by the user specifies a corresponding PBN and information on logical and physical operation units included in a block designated by the corresponding PBN, i.e., information on sectors and pages in the block designated by the corresponding PBN.
  • a data operation may be performed on a single sector of a predetermined page 710 , as shown in FIG. 13A .
  • the data operation may also be performed on one or more sectors of a predetermined page 720 , 730 , or 740 , as shown in FIG. 13B .
  • the controller 300 copies data pre-stored in a pertinent page of the flash memory 100 to a pertinent page of the internal memory 110 , performs a data operation on one or more sectors of the pertinent page of the internal memory 110 , and writes the data to the page of the flash memory 100 .
  • FIG. 14 is a flowchart of a method of writing data to a flash memory according to an exemplary embodiment of the present invention.
  • operation SI 10 an LBN used by a user is converted into a log PBN with reference to a log table.
  • the LBN is converted into a log PBN.
  • a log PBN that matches with the LBN is added to the log table in operation S 130 .
  • operation S 150 it is determined whether to write data to all of a plurality of sectors of the searched page.
  • operation S 160 if it is determined to write the data to all of the sectors of the searched page, the data is written to all of the sectors of the searched page.
  • the data is copied to the internal memory 110 in operation S 170 .
  • the data written to page 1 of the log block of FIG. 16 instead of the data stored in page 3 of the data block of FIG. 17 , may be copied to the internal memory 110 .
  • data stored in sectors 1 and 2 of page 3 of the data block of FIG. 17 is copied to the internal memory 110 and then modified.
  • the modified data is written to sectors 1 and 2 of page 1 of the log block of FIG. 16 .
  • a user issues a request for reading data from the flash memory using a predetermined LBN.
  • operation S 220 it is determined whether a log PBN that matches with the predetermined LBN exists with reference to the log table stored in the FTL information area 101 .
  • the data management apparatus and method used for a flash memory according to the present invention have the following advantages.

Abstract

A data management apparatus and method used for a flash memory are provided. The data management apparatus and method can prevent waste of memory space and deterioration of the performance of a flash memory caused by a difference between logical and physical operation units of the flash memory. The data management apparatus copies data stored in a physical block to which a data operation is to be performed to the internal memory, performs the data operation on the internal memory, and transfers the data to the physical block.

Description

    CROSS-REFERENCE TO RELATED APPLICATION
  • This application claims priority from Korean Patent Application No. 10-2004-0007002 filed on Feb. 3, 2004 in the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference in its entirety.
  • BACKGROUND OF THE INVENTION
  • 1. Field of the Invention
  • The present invention relates to a data management apparatus and method used for a flash memory, and more particularly, to a data management apparatus and method used for a flash memory, which can prevent waste of memory space and deterioration of the performance of a large block flash memory caused by a difference between a logical operation unit and a physical operation unit of the large block flash memory.
  • 2. Description of the Related Art
  • In general, home appliances, communications devices, and embedded systems, such as set-top boxes, use non-volatile memories as storage devices for storing and processing data.
  • Flash memories are one type of non-volatile memory, in which data can be electrically erased and overwritten. Flash memories are suitable for portable devices because they consume less power than magnetic disc memory-based storage mediums, are as accessible as hard discs, and are compact-sized.
  • Due to the hardware characteristics of flash memories, data recorded on a flash memory is erased in units of blocks, unlike in the conventional random access memory (RAM), nonvolatile storage medium or magnetic storage medium.
  • FIG. 1 is a block diagram of such a typical flash memory system. Referring to FIG. 1, the typical flash memory system includes a flash memory 10 and a controller 20. The controller 20 having a user program 21 loaded therein controls a predetermined data operation to be performed on the flash memory 10 at a user's request.
  • The controller 20 includes a file system 22, in which the user program 21 is loaded, and a flash translation layer (FTL) 23, which transfers the predetermined data operation requested by the user, such as a read or write operation, to the flash memory 10.
  • The FTL 23 is software that helps use the flash memory 10 as a block device, and generally supports a block re-mapping method for managing the flash memory 10.
  • Here, the block re-mapping method enables management of mapping information on the relationships between logical block numbers (LBNs) and physical block numbers (PBNs) of given data. By doing so, data recorded in the flash memory 10 is always accessible with the same logical block number (LBN) even though a pertinent PBN changes. In fact, the PBN recorded in the flash memory 10 may change when the data stored in the flash memory 10 is modified or erased from the flash memory 10.
  • A low level format operation should be performed on the flash memory 10 by the FTL 23 in order to make the flash memory 10 usable. Referring to FIG. 2, the flash memory 10 that has undergone the low level format operation is divided into a map area 31, a log area 32, a data area 33, and a spare area 34.
  • Each of the map area 31, the log area 32, the data area 33, and the spare area 34 is comprised of at least one block.
  • The map area 31 includes a block mapping table, which converts an LBN into a PBN. Specifically, the block mapping table maps an LBN to a PBN of a block (hereinafter referred to as a data block) of the data area 33. If the block mapping table is updated, the updated block mapping table is stored in a block (hereinafter referred to as map block) of the map area 31.
  • In addition, when a predetermined data operation, such as a read or write operation, is performed on the flash memory 10 at a user's request, the log area 32 is used ahead of the data area 33.
  • A log table maps an LBN that has been used by the user to issue a request for performing the predetermined data operation on the flash memory 10 to a PBN of a block (hereinafter referred to as a log block) in the log area 32. The log table is stored in the log area 32.
  • Referring to FIG. 3, the log table includes a LBN 32 a, a PBN 32 b, which designates a predetermined log block and is mapped to the LBN 32 a, and page numbers 32 c, which designate pages of the predetermined log block where data exists.
  • A block of the flash memory 10 is comprised of a plurality of pages in which a data operation is performed on the flash memory 10.
  • When writing data to the log area 32, the data are written to any vacant pages in the log area 32. The page numbers 32 c specify pages to which the data should have been written.
  • Therefore, the page numbers 32 c enable data stored in pages of a log block 32 d of the log area 32 to be transferred to the respective pages of a data block 33 a of the data area 33, as shown in FIG. 4.
  • The FTL 23 divides the data area 33 into a plurality of data blocks having a predetermined size. Thus, the data area 33 is accessed in units of data blocks. PBNs are sequentially allocated to the data blocks.
  • The spare area 34 is used when no memory space is left in the log area 32 so that data cannot be written to the log area 32 any longer.
  • A data operation performed on the flash memory 10 will now be described in further detail.
  • FIG. 5 is a flowchart of a conventional method of writing data to a flash memory. Referring to FIG. 5, in operation S51, an LBN is converted into a PBN (hereinafter referred to as a data PBN of the data area 33 with reference to a block mapping table stored in the map area 31.
  • In operation S52, the LBN is also converted into a PBN (hereinafter referred to as a log PBN) of the log area 32 with reference to a log table stored in the log area 32.
  • If a log PBN that matches with the LBN exists in operation S53 and a page of a log block designated by the log PBN is empty in operation S54, data is written to the page of the log block in operation S55.
  • If the page of the log block is already filled with other data, it is determined whether another page of the log block can be allocated in operation S56.
  • In operation S57, if another page of the log block can be allocated, data is written to the corresponding page of the log block.
  • In operation S58, if the log block designated by the log PBN is determined to have already been filled with data, it is determined whether another log block can be allocated.
  • In operation S59, if no log block can be allocated, a new log block is generated through block merging.
  • In operation S60, data is written to the new log block.
  • In operation S61, if another log block can be allocated, data is written to the corresponding log block.
  • Alternatively, in order to read data from a flash memory, as shown in FIG. 6, in operation S71, a log PBN that matches with an LBN used by a user is searched for.
  • If the log PBN that matches with the LBN exists in operation S72, a page where data is written is searched for by accessing the log PBN that matches with the LBN in operation S73.
  • In operation S74, if data exists in the searched page, the data is read from the searched page.
  • In operation S75, if the log PBN that matches with the LBN does not exist or if no page where data is written is found at the log PBN that matches with the LBN, data is searched for and read from a data block designated by a data PBN that is determined to match with the LBN with reference to a block mapping table.
  • A flash memory is classified into a small-block flash memory or a large-block flash memory.
  • In a small-block flash memory, a logical operation unit is identical to a physical operation unit, while in a large-block flash memory, a physical operation unit is larger than a logical operation unit.
  • Specifically, in a large-block flash memory, a physical operation unit is comprised of at least one logical operation unit.
  • Thus, a considerable amount of the storage capacity of the large-block flash memory may be wasted due to such difference between the logical and physical operation units of the large-block flash memory.
  • For example, suppose that logical operations are performed on the large-block flash memory in units of 512 bytes and physical operations are performed on the large-block flash memory in units of 2048 bytes. If a user performs a data operation on the large-block flash memory in units of 512 bytes, only 512 bytes of each block of the large-block flash memory is used, and the remaining 1536 bytes of each block of the large-block flash memory, which accounts for 75% of the storage capacity of the large-block flash memory, is wasted.
  • SUMMARY OF THE INVENTION
  • The present invention provides a data management apparatus and method used for a flash memory, which can prevent waste of memory space caused by a difference between a logical operation unit and a physical operation unit of the large block flash memory.
  • According to an aspect of the present invention, there is provided a data management apparatus used for a flash memory having an internal memory. The data management apparatus copies data stored in a physical block to which a data operation is to be performed to the internal memory, performs the data operation on the internal memory, and transfers the data to the physical block.
  • Preferably, but not necessarily, data corresponding to physical operation units of the flash memory is copied to the internal memory.
  • The data copied from the physical block to the internal memory is preferably, but not necessarily, modified in logical operation units of the flash memory.
  • According to another aspect of the present invention, there is provided a data management method used for a flash memory having an internal memory, comprising copying data stored in a physical block, to which a data operation is to be performed, to the internal memory, and performing the data operation on the internal memory.
  • The copying of the data stored in the physical block to internal memory may comprise searching for a physical block corresponding to a logical block to which the data operation is to be performed, and copying data stored in the physical block to the internal memory in physical operation units of the flash memory.
  • The searching for the physical block may comprise searching for the physical block with reference to a table that maps a logical block number to a physical block number.
  • The copying of the data stored in the physical block may comprise performing data operations on the data coped from the internal memory in units of logical operation units.
  • The data management method may further comprise transferring the data on which data operations have been completed from the internal memory to the physical block.
  • The transferring of the data may comprise updating the table after the data is transferred to the physical block.
  • BRIEF DESCRIPTION OF THE DRAWINGS
  • The above and other features and advantages of the present invention will become more apparent by describing in detail exemplary embodiments thereof with reference to the attached drawings in which:
  • FIG. 1 is a block diagram of a conventional data management apparatus used for a flash memory;
  • FIG. 2 is a diagram illustrating the structure of a flash memory that has been subjected to a low level format operation;
  • FIG. 3 is a diagram illustrating a typical log table;
  • FIG. 4 is a diagram illustrating the transfer of data from a log block to a data block with reference to the typical log table of FIG. 3;
  • FIG. 5 is a diagram illustrating a conventional method of writing data to a flash memory;
  • FIG. 6 is a diagram illustrating a conventional method of reading data from a flash memory;
  • FIG. 7A is a diagram illustrating a typical small-block flash memory;
  • FIG. 7B is a diagram illustrating a typical large-block flash memory;
  • FIG. 8 is a block diagram of a data management apparatus used for a flash memory, according to an exemplary embodiment of the present invention;
  • FIG. 9 is a diagram illustrating the structure of a flash memory that has been subjected to a low-level format operation performed by a flash translation layer (FTL);
  • FIG. 10 is a diagram illustrating a block mapping table according to an exemplary embodiment of the present invention;
  • FIG. 11 is a diagram illustrating the mapping of blocks in a log area to blocks in a data area according to an exemplary embodiment of the present invention;
  • FIG. 12 is a diagram illustrating a log table according to an exemplary embodiment of the present invention;
  • FIG. 13A is a diagram illustrating a typical method of writing data to a single sector;
  • FIG. 13B is a diagram illustrating a typical method of writing data to multiple sectors;
  • FIG. 14 is a flowchart of a method of writing data to a flash memory according to an exemplary embodiment of the present invention;
  • FIG. 15 is a diagram illustrating the writing of data to sectors of a flash memory, according to an exemplary embodiment of the present invention;
  • FIG. 16 is a diagram illustrating the writing of data to a page of a log block, according to an exemplary embodiment of the present invention;
  • FIG. 17 is a diagram illustrating the copying of data stored in a page of a data block to an internal memory, according to an exemplary embodiment of the present invention;
  • FIG. 18 is a diagram illustrating the modification of data copied to an internal memory and the transfer of the modified data to a log block, according to an exemplary embodiment of the present invention; and
  • FIG. 19 is a flowchart of a method of reading data from a flash memory according to an exemplary embodiment of the present invention.
  • DETAILED DESCRIPTION OF THE INVENTION
  • Advantages and features of the present invention and methods of accomplishing the same may be understood more readily by reference to the following detailed description of preferred embodiments and the accompanying drawings. The present invention may, however, be embodied in many different forms and should not be construed as being limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete and will fully convey the concept of the invention to those skilled in the art, and the present invention will only be defined by the appended claims. Like reference numerals refer to like elements throughout the specification.
  • The present invention will now be described more fully with reference to the accompanying drawings in which exemplary embodiments of the invention are shown.
  • A flash memory is generally classified into a small-block flash memory and a large-block flash memory.
  • Whereas the small-block flash memory has a logical operation unit and a physical operation unit of the same size, the large-block flash memory has a physical operation unit having a size larger than that of a logical operation unit.
  • That is to say, in the small-block flash memory, a unit in which logical operations are performed on the small-block flash memory, i.e., a logical operation unit 51, is identical to a unit in which physical operations are performed on the small-block flash memory, i.e., a physical operation unit 52, as shown in FIG. 7A.
  • On the other hand, in the large-block flash memory, a physical operation unit 53 includes at least one logical operation unit 54, as shown in FIG. 7B.
  • Here, the logical operation units 51 and 54, which are data operation units used by a user, are generally called sectors, and the physical operation units 52 and 53, which are data operation units used in the respective flash memories, are generally called pages.
  • Sizes of the logical and physical operation units may vary according to the type of an apparatus employing the flash memory.
  • In such cases, data operations are more efficiently performed on a single-block flash memory than on a large-block flash memory because logical and physical operation units of a single-block flash memory are identical, while logical and physical operation units of a large-block flash memory are not identical.
  • For example, suppose that logical operations are performed on a large-block flash memory in units of 512 bytes and physical operations are performed on the large-block flash memory in units of 2048 bytes. If a user performs a data operation on the large-block flash memory in units of 512 bytes, only 512 bytes of each block of the large-block flash memory is used, and the remaining 1536 bytes of each block of the large-block flash memory is wasted.
  • The present invention is directed to a data management apparatus used for a flash memory, which is capable of preventing waste of memory space and deterioration of the performance of a large-block flash memory caused by a difference between a logical operation unit and a physical operation unit of the large-block flash memory. The data management apparatus is shown in FIG. 8. Referring to FIG. 8, the data management apparatus includes a flash translation layer (FTL) 200, which enables a flash memory 100 including an internal memory 110 to be used as a block device and includes mapping information on the relationship between a logical block number (LBN) and a physical block number (PBN) of the flash memory 100, and a controller 300, which transfers data stored at a pertinent physical address to the internal memory 110 and allows a data operation to be performed on the internal memory 110.
  • The FTL 200 performs a low level format operation on the flash memory 100 in order to make the flash memory 100 usable. As a result of the low level format operation, the flash memory 100 is divided into an FTL information area 101, a log area 102, a spare area 103, and a data area 104, as shown in FIG. 9. Each of the FTL information area 101, the log area 102, the spare area 103, and the data area 104 is comprised of at least one block.
  • In this case, the FTL information area 101 includes a block mapping table that maps an LBN specified by the user to a data PBN.
  • The block mapping table is illustrated in FIG. 10. Referring to FIG. 10, the block mapping table includes an LBN 510 specified by a user and a data PBN 520 corresponding to the LBN 510.
  • A log table that maps the LBN specified by the user to a log PBN is stored in the log area 102.
  • In other words, when performing a data operation on the flash memory 100, the data operation is performed on the log area 102 having the log table ahead of other areas of the flash memory 100.
  • In addition, each log PBN of the log area 102 is mapped to a data PBN. Referring to FIG. 11, a log PBN 530 is mapped to a data PBN 540.
  • Referring to FIG. 12, the log table includes an LBN 610, a PBN 620, which is mapped to the LBN 610, and page numbers 630 included in the PBN 620.
  • The spare area 103 is used when no memory space is left in the log area 102 so that data cannot be written to the log area any longer.
  • In other words, if the log area 102 is full of data so that data operations cannot be performed on the log area 102 any longer, the LBN specified by the user is mapped to a PBN of the spare area 104, so data operations can be performed on the spare area 104 later on.
  • The controller 300 controls data stored at a PBN corresponding to the LBN specified by the user to be transferred to the internal memory 110 to perform a data operation on the internal memory 110.
  • Here, the LBN specified by the user specifies a corresponding PBN and information on logical and physical operation units included in a block designated by the corresponding PBN, i.e., information on sectors and pages in the block designated by the corresponding PBN.
  • For example, suppose that a sector has a size of 512 bytes and a page has a size of 2048 bytes. Then, a data operation may be performed on a single sector of a predetermined page 710, as shown in FIG. 13A. Meanwhile, the data operation may also be performed on one or more sectors of a predetermined page 720, 730, or 740, as shown in FIG. 13B.
  • In other words, the controller 300 copies data pre-stored in a pertinent page of the flash memory 100 to a pertinent page of the internal memory 110, performs a data operation on one or more sectors of the pertinent page of the internal memory 110, and writes the data to the page of the flash memory 100.
  • In the present embodiment, a case where a physical address, in which the data operation is to be performed is occupied by predetermined data, that is, no empty space is available, will be described by way of example.
  • In this case, if the data of the pertinent page is copied to the internal memory 110 so that the data of sectors of the pertinent page may be overwritten, thereby preventing waste of memory space caused by a difference between the logical and physical operation units of the flash memory 100 is prevented.
  • The operation of the data management method used for a flash memory, according to the exemplary embodiment of the present invention, i.e., a data management method used for a flash memory, according to an exemplary embodiment of the present invention, will now be described.
  • FIG. 14 is a flowchart of a method of writing data to a flash memory according to an exemplary embodiment of the present invention. Referring to FIGS. 10 and 14, in operation SI 10, an LBN used by a user is converted into a log PBN with reference to a log table.
  • Here, since data is written to the log area 102 ahead of other areas of the flash memory 100, the LBN is converted into a log PBN.
  • If there is no log PBN that matches with the LBN in operation S120, a log PBN that matches with the LBN is added to the log table in operation S130.
  • Then, the data management method proceeds to operation S140.
  • Thereafter, if the log PBN that matches with the LBN exists in operation S120, a page of the corresponding log PBN is searched for in operation S140.
  • In operation S150, it is determined whether to write data to all of a plurality of sectors of the searched page.
  • In operation S160, if it is determined to write the data to all of the sectors of the searched page, the data is written to all of the sectors of the searched page.
  • If it is determined to write the data to some of the sectors of the searched page, the data is copied to the internal memory 110 in operation S170.
  • For example, in a case where data is written to sectors 1 and 2 of page 3 at a predetermined LBN, as shown in FIG. 15, and is written to page 1 of a log block of FIG. 16, designated by a log PBN corresponding to the predetermined LBN, data stored in page 3 of a data block of FIG. 17, designated by a data PBN corresponding to the predetermined LBN, is copied to the internal memory 110.
  • Alternatively, the data written to page 1 of the log block of FIG. 16, instead of the data stored in page 3 of the data block of FIG. 17, may be copied to the internal memory 110.
  • In operation S180, the data copied to the internal memory 110 is modified and then written to its original location.
  • For example, referring to FIG. 18, data stored in sectors 1 and 2 of page 3 of the data block of FIG. 17 is copied to the internal memory 110 and then modified. The modified data is written to sectors 1 and 2 of page 1 of the log block of FIG. 16.
  • In operation S190, if the writing of the data to the searched page is complete, the log table is updated.
  • A method of reading data from a flash memory according to another embodiment of the present invention will now be described.
  • In the method of reading data from a flash memory shown in FIG. 19, in operation S210, a user issues a request for reading data from the flash memory using a predetermined LBN.
  • In operation S220, it is determined whether a log PBN that matches with the predetermined LBN exists with reference to the log table stored in the FTL information area 101.
  • In operation S230, if the log PBN that matches with the predetermined LBN exists, it is determined whether data exists in a log block designated by the corresponding log PBN.
  • In operation S240, if data exists in the log block, data is read from a page of the log block.
  • In operation S250, if no data exists in the log block, data is read from a page of a data block designated by a data PBN that is determined to match with the predetermined LBN with reference to the log table.
  • Although the data management apparatus and method used for a flash memory according to the present invention have been described with reference to the illustrated drawings, the invention is not limited to the embodiments and drawings disclosed in the specification and various modifications and variations may be made within the spirit and scope of the invention.
  • As described above, the data management apparatus and method used for a flash memory according to the present invention have the following advantages.
  • First, it is possible to prevent waste of memory space of a large-block flash memory caused by a difference between logical and physical operation units of the large-block flash memory.
  • Second, it is possible to enhance the performance of a flash memory through the efficient use of the storage capacity of the flash memory.

Claims (9)

1. A data management apparatus used for a flash memory having an internal memory, comprising a controller configured to perform a control operation such that data stored in a physical block to which a data operation is to be performed is copied to the internal memory, the data operation is performed on the internal memory, and the data on which the data operation has been performed is transferred to the physical block.
2. The data management apparatus of claim 1, wherein data corresponding to physical operation units of the flash memory is copied to the internal memory.
3. The data management apparatus of claim 2, wherein the data copied from the physical block to the internal memory is modified in logical operation units of the flash memory.
4. A data management method used for a flash memory having an internal memory, comprising:
copying data stored in a physical block, to which a data operation is to be performed, to the internal memory; and
performing the data operation on the internal memory.
5. The data management method of claim 4, wherein the copying of the data stored in the physical block to internal memory, comprises:
searching for a physical block corresponding to a logical block to which the data operation is to be performed; and
copying data stored in the physical block to the internal memory in physical operation units of the flash memory.
6. The data management method of claim 5, wherein the searching for the physical block comprises searching for the physical block with reference to a table that maps a logical block number to a physical block number.
7. The data management method of claim 6, wherein the copying of the data stored in the physical block comprises performing data operations on the data copied from the internal memory in units of logical operation units.
8. The data management method of claim 7, further comprising transferring the data on which data operations have been completed from the internal memory to the physical block.
9. The data management method of claim 8, wherein the transferring of the data comprises updating the table after the data is transferred to the physical block.
US11/047,779 2004-02-03 2005-02-02 Data management apparatus and method used for flash memory Abandoned US20050169058A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR10-2004-0007002A KR100533683B1 (en) 2004-02-03 2004-02-03 Data managing device and method for flash memory
KR10-2004-0007002 2004-02-03

Publications (1)

Publication Number Publication Date
US20050169058A1 true US20050169058A1 (en) 2005-08-04

Family

ID=34675997

Family Applications (1)

Application Number Title Priority Date Filing Date
US11/047,779 Abandoned US20050169058A1 (en) 2004-02-03 2005-02-02 Data management apparatus and method used for flash memory

Country Status (5)

Country Link
US (1) US20050169058A1 (en)
EP (1) EP1562121A3 (en)
JP (1) JP2005222534A (en)
KR (1) KR100533683B1 (en)
CN (1) CN1652088A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090049229A1 (en) * 2005-12-09 2009-02-19 Matsushita Electric Industrial Co., Ltd. Nonvolatile memory device, method of writing data,and method of reading out data
US20100293309A1 (en) * 2009-05-13 2010-11-18 Yun-Ching Lin Production Tool For Low-Level Format Of A Storage Device
US9158469B2 (en) 2008-11-24 2015-10-13 Thomson Licensing Flash based memory comprising a Flash translation layer and method for storing a file therein

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007249662A (en) * 2006-03-16 2007-09-27 Toshiba Corp Memory card and control method of memory card
JP5066894B2 (en) * 2006-11-07 2012-11-07 富士ゼロックス株式会社 Storage medium control device
KR100843135B1 (en) * 2006-11-20 2008-07-02 삼성전자주식회사 Apparatus and method for managing nonvolatile memory
KR100823171B1 (en) * 2007-02-01 2008-04-18 삼성전자주식회사 Computer system having a partitioned flash translation layer and flash translation layer partition method thereof
JP2010518463A (en) * 2008-02-29 2010-05-27 株式会社東芝 Information processing apparatus and nonvolatile semiconductor memory drive
JP2010211618A (en) * 2009-03-11 2010-09-24 Toshiba Corp Semiconductor storage device

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5519847A (en) * 1993-06-30 1996-05-21 Intel Corporation Method of pipelining sequential writes in a flash memory
US5602987A (en) * 1989-04-13 1997-02-11 Sandisk Corporation Flash EEprom system
US5611067A (en) * 1992-03-31 1997-03-11 Kabushiki Kaisha Toshiba Nonvolatile semiconductor memory device having means for selective transfer of memory block contents and for chaining together unused memory blocks
US5847997A (en) * 1995-10-16 1998-12-08 Seiko Epson Corporation PC card
US6000006A (en) * 1997-08-25 1999-12-07 Bit Microsystems, Inc. Unified re-map and cache-index table with dual write-counters for wear-leveling of non-volatile flash RAM mass storage
US6040997A (en) * 1998-03-25 2000-03-21 Lexar Media, Inc. Flash memory leveling architecture having no external latch
US6076137A (en) * 1997-12-11 2000-06-13 Lexar Media, Inc. Method and apparatus for storing location identification information within non-volatile memory devices
US20010036109A1 (en) * 1999-12-17 2001-11-01 Sanjay Jha Mobile communication device having integrated embedded flash SRAM memory
US6646917B1 (en) * 2002-10-10 2003-11-11 Mitsubishi Denki Kabushiki Kaisha Storage device managing nonvolatile memory by converting logical address to physical address of nonvolatile memory
US6675281B1 (en) * 2002-01-22 2004-01-06 Icreate Technologies Corporation Distributed mapping scheme for mass storage system
US6772274B1 (en) * 2000-09-13 2004-08-03 Lexar Media, Inc. Flash memory system and method implementing LBA to PBA correlation within flash memory array
US7085879B2 (en) * 2002-02-27 2006-08-01 Microsoft Corporation Dynamic data structures for tracking data stored in a flash memory device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
GB2349242A (en) 1999-04-20 2000-10-25 Inventec Corp Flash memory architecture and rewrite method
GB2361783B (en) 2000-04-27 2004-11-10 Ubinetics Ltd Non-volatile storage method
KR100389867B1 (en) * 2001-06-04 2003-07-04 삼성전자주식회사 Flash memory management method
US6871257B2 (en) * 2002-02-22 2005-03-22 Sandisk Corporation Pipelined parallel programming operation in a non-volatile memory system
KR100484147B1 (en) * 2002-07-26 2005-04-18 삼성전자주식회사 Flash memory management method

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5602987A (en) * 1989-04-13 1997-02-11 Sandisk Corporation Flash EEprom system
US5611067A (en) * 1992-03-31 1997-03-11 Kabushiki Kaisha Toshiba Nonvolatile semiconductor memory device having means for selective transfer of memory block contents and for chaining together unused memory blocks
US5519847A (en) * 1993-06-30 1996-05-21 Intel Corporation Method of pipelining sequential writes in a flash memory
US5847997A (en) * 1995-10-16 1998-12-08 Seiko Epson Corporation PC card
US6000006A (en) * 1997-08-25 1999-12-07 Bit Microsystems, Inc. Unified re-map and cache-index table with dual write-counters for wear-leveling of non-volatile flash RAM mass storage
US6076137A (en) * 1997-12-11 2000-06-13 Lexar Media, Inc. Method and apparatus for storing location identification information within non-volatile memory devices
US6040997A (en) * 1998-03-25 2000-03-21 Lexar Media, Inc. Flash memory leveling architecture having no external latch
US20010036109A1 (en) * 1999-12-17 2001-11-01 Sanjay Jha Mobile communication device having integrated embedded flash SRAM memory
US6772274B1 (en) * 2000-09-13 2004-08-03 Lexar Media, Inc. Flash memory system and method implementing LBA to PBA correlation within flash memory array
US6675281B1 (en) * 2002-01-22 2004-01-06 Icreate Technologies Corporation Distributed mapping scheme for mass storage system
US7085879B2 (en) * 2002-02-27 2006-08-01 Microsoft Corporation Dynamic data structures for tracking data stored in a flash memory device
US6646917B1 (en) * 2002-10-10 2003-11-11 Mitsubishi Denki Kabushiki Kaisha Storage device managing nonvolatile memory by converting logical address to physical address of nonvolatile memory

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090049229A1 (en) * 2005-12-09 2009-02-19 Matsushita Electric Industrial Co., Ltd. Nonvolatile memory device, method of writing data,and method of reading out data
US8307149B2 (en) 2005-12-09 2012-11-06 Panasonic Corporation Nonvolatile memory device including a logical-to-physical logig-to-physical address conversion table, a temporary block and a temporary table
US9158469B2 (en) 2008-11-24 2015-10-13 Thomson Licensing Flash based memory comprising a Flash translation layer and method for storing a file therein
US20100293309A1 (en) * 2009-05-13 2010-11-18 Yun-Ching Lin Production Tool For Low-Level Format Of A Storage Device
TWI407442B (en) * 2009-05-13 2013-09-01 Skymedi Corp Production tool for low-level format of a storage device

Also Published As

Publication number Publication date
EP1562121A3 (en) 2007-12-05
KR100533683B1 (en) 2005-12-05
KR20050078916A (en) 2005-08-08
JP2005222534A (en) 2005-08-18
EP1562121A2 (en) 2005-08-10
CN1652088A (en) 2005-08-10

Similar Documents

Publication Publication Date Title
US8117374B2 (en) Flash memory control devices that support multiple memory mapping schemes and methods of operating same
US7516295B2 (en) Method of remapping flash memory
US7877569B2 (en) Reduction of fragmentation in nonvolatile memory using alternate address mapping
US8364931B2 (en) Memory system and mapping methods using a random write page mapping table
US6678785B2 (en) Flash management system using only sequential write
JP4931810B2 (en) FAT analysis for optimized sequential cluster management
US7711892B2 (en) Flash memory allocation for improved performance and endurance
EP2631916B1 (en) Data deletion method and apparatus
US7487303B2 (en) Flash memory device and associated data merge method
US8386698B2 (en) Data accessing method for flash memory and storage system and controller using the same
US7475185B2 (en) Nonvolatile memory system, nonvolatile memory device, memory controller, access device, and method for controlling nonvolatile memory device
US20050169058A1 (en) Data management apparatus and method used for flash memory
KR101465789B1 (en) Write and merge methods in memory card systems for reducing the number of page copies
US20080082729A1 (en) Device driver including a flash memory file system and method thereof and a flash memory device and method thereof
US20080098195A1 (en) Memory system including flash memory and mapping table management method
US8438325B2 (en) Method and apparatus for improving small write performance in a non-volatile memory
US8661186B2 (en) Nonvolatile memory device, access device, and nonvolatile memory system
KR100638638B1 (en) Method for controling flash memory device
CN114610228A (en) File management system and file management method and device thereof
US8341378B2 (en) Data storage device and data access method
CN112527692A (en) Data storage device and non-volatile memory control method

Legal Events

Date Code Title Description
AS Assignment

Owner name: SAMSUNG ELECTRONICS CO., LTD., KOREA, REPUBLIC OF

Free format text: ASSIGNMENT OF ASSIGNORS INTEREST;ASSIGNORS:MYOUNG, SUNG-JU;KIM, JIN-HYUK;CHEONG, JAE-WOOK;AND OTHERS;REEL/FRAME:016243/0091;SIGNING DATES FROM 20050118 TO 20050131

STCB Information on status: application discontinuation

Free format text: ABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTION