KR101157763B1 - Variable space page mapping method and apparatus for flash memory device with trim command processing - Google Patents

Variable space page mapping method and apparatus for flash memory device with trim command processing Download PDF

Info

Publication number
KR101157763B1
KR101157763B1 KR1020100135998A KR20100135998A KR101157763B1 KR 101157763 B1 KR101157763 B1 KR 101157763B1 KR 1020100135998 A KR1020100135998 A KR 1020100135998A KR 20100135998 A KR20100135998 A KR 20100135998A KR 101157763 B1 KR101157763 B1 KR 101157763B1
Authority
KR
South Korea
Prior art keywords
block
fusion
group
memory management
blocks
Prior art date
Application number
KR1020100135998A
Other languages
Korean (ko)
Inventor
권훈기
이동희
Original Assignee
서울시립대학교 산학협력단
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 서울시립대학교 산학협력단 filed Critical 서울시립대학교 산학협력단
Priority to KR1020100135998A priority Critical patent/KR101157763B1/en
Application granted granted Critical
Publication of KR101157763B1 publication Critical patent/KR101157763B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0253Garbage collection, i.e. reclamation of unreferenced memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/0802Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
    • G06F12/0891Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
    • 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/08Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
    • G06F12/10Address translation
    • G06F12/1009Address translation using page tables, e.g. page table structures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7201Logical to physical mapping or translation of blocks or pages
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7205Cleaning, compaction, garbage collection, erase control

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Memory System (AREA)

Abstract

A method and apparatus for implementing a Flash Translation Layer (FTL) in a storage device including a flash memory and processing it when a TRIM command is given are provided. The FTL of the present invention stores data by applying a page mapping scheme to a block included in a fusion group, and a page invalidated by a TRIM command in an FTL that applies a block mapping scheme to a block included in a sequential group or sequentially stores data. Considering this, we propose a cost model and processing method that can optimally classify blocks into fusion or sequential groups. The present invention can improve the overall efficiency of the flash memory storage device by increasing the efficiency of the garbage collection operation of the FTL performed using the limited spare block. The present invention also proposes a method of using the difference between the reference model and the actually measured value in order to increase the accuracy in predicting the utilization of the garbage collection target block from the total fusion region utilization in calculating the cost model.

Description

VARIABLE SPACE PAGE MAPPING METHOD AND APPARATUS FOR FLASH MEMORY DEVICE WITH TRIM COMMAND PROCESSING}

The present invention relates to a memory device and a method for managing the memory device, and more particularly, to a memory device and a method for managing the memory device based on non-volatile memory.

Storage devices for storing data may include magnetic disks, semiconductor memories, and the like. Since storage devices have different physical characteristics by type, a management method corresponding to the physical characteristics is required.

Magnetic disks have been widely used as conventional storage devices. Magnetic disks have an average read / write time of a few milliseconds per kilobyte. In addition, the magnetic disk has a characteristic that the read / write time is different because the time that the arm arrives varies depending on the physical location where the data is stored.

Recently, nonvolatile memory devices, which have shorter read / write times, consume less power, and occupy smaller volumes than magnetic disks, are rapidly replacing magnetic disks. This is a possible result because the capacity of the nonvolatile memory device has been increased.

A nonvolatile memory device is a semiconductor memory device capable of electrically reading, writing, and erasing and maintaining stored data even without a power supply. In addition to writing, the process of storing data for nonvolatile memory devices is also called programming.

Programming of the nonvolatile memory device may be performed in units of pages, and erase may be performed in units of blocks. The block may include a plurality of pages. The controller of the nonvolatile memory device may provide a logical address to an external host or processor, and may provide a physical address to the nonvolatile memory device. The controller may manage the nonvolatile memory device using the physical address and convert the physical address into a logical address or a logical address into a physical address. The layer in which the physical address and logical address translation is performed is sometimes referred to as a flash translation layer. Operations such as determination, classification, and sorting performed in the FTL are also called management methods of the flash memory device.

The present invention provides a memory management apparatus and method for managing a plurality of blocks of a nonvolatile memory into a sequential group and a fusion group, and processing the blocks when a TRIM command is given.

In calculating the cost model, the present invention uses the error information between the reference model and the actual measured value to increase the accuracy when predicting the utilization rate of the garbage collection target block from the total fusion group utilization rate. It provides a technique to accurately infer the utilization rate of.

The memory management apparatus or method according to an embodiment of the present invention may designate and manage out-of-order blocks and spare blocks as a fusion group in order to increase the efficiency of garbage collection operations using limited spare blocks.

The memory management apparatus or method according to an embodiment of the present invention may designate blocks in which data is sequentially stored in a sequential group and separately manage them in order to reduce reuse costs of blocks in which data is sequentially stored.

The apparatus or method for managing a memory according to an embodiment of the present invention may apply a page mapping technique in a block selected as a fusion group in order to reduce a data update cost due to an out of order reference operation.

A memory management apparatus or method according to an embodiment of the present invention distinguishes sequential references and nonsequential references and reduces switch merge or garbage collection for each reference operation in order to reduce data update costs for the entire nonvolatile memory. Garbage collection operations can be optionally applied.

Memory management apparatus or method according to an embodiment of the present invention, when the TRIM command is given, when the utilization (utilization) of the sequential block in which the data is stored by the TRIM command or the previous TRIM command is lowered (management) by moving it to a fusion group can do.

The memory management apparatus or method according to an embodiment of the present invention may establish and use a mathematical model for a reference operation cost and a garbage collection operation cost to optimize a fusion group. This mathematical model calculates the reference operation cost and garbage collection operation cost in consideration of the number of sectors invalidated by the TRIM instruction.

The memory management apparatus or method according to an embodiment of the present invention measures an error with a standard reference utilization derived mathematically or by sample survey from the group utilization in predicting the utilization of the garbage collection target block from the convergence group utilization, By using the error information, the prediction value may be corrected to accurately predict the utilization rate of the garbage collection target block.

A memory management apparatus according to an embodiment of the present invention includes a block designation unit that divides a plurality of blocks included in a nonvolatile memory into a sequential group and a fusion group based on the locality of an access operation for each of the plurality of blocks, and The data sector may be sequentially stored in the blocks included in the sequential group, and the map unit may be configured to store the data sectors by applying a page mapping technique to the blocks included in the fusion group.

According to an embodiment of the present invention, a memory management method includes dividing an entire flash memory block into a meta block storing a map, a data block storing data, and an initial spare block, and a plurality of blocks included in the nonvolatile memory. Determining a locality of an access operation for each, dividing each of the plurality of data blocks into sequential blocks, non-sequential blocks, and free blocks based on the determined locality, the non-sequential block, and the initial free block Designating a part of as a fusion group, and storing a data sector by applying a page mapping technique to a block included in the fusion group.

According to an embodiment of the present invention, when a TRIM command is given to a storage device, invalidating a sector when the target sector of the TRIM command exists in a sequential block or in a fusion group, Updating the map to display on the map, and incorporating the sequential block into the fusion group by appropriate decision criteria when there are a large number of invalidated sectors in the sequential block.

In the memory management method according to an embodiment of the present invention, calculating the utilization of the fusion group in consideration of the number of initial free blocks and data blocks included in the fusion group and the number of sectors invalidated by the TRIM command, Calculating the page update cost of the fusion group based on utilization, and providing a minimum page update cost by estimating the page update cost when including another data block in the fusion group or removing an existing data block from the fusion group. Estimating the utilization rate of the fusion group, and may include adding a new data block to the fusion group or removing an existing data block from the fusion group due to the prediction result.

A memory management apparatus or method according to an embodiment of the present invention designates and manages a data block showing some out of order write locality and some initial free blocks as a fusion group, thereby making a garbage collection operation using a limited number of free blocks. Can increase the efficiency.

Memory management apparatus or method according to an embodiment of the present invention can reduce the reuse cost of the blocks in which data is sequentially stored by designating the blocks in which the data is sequentially stored in a sequential group and separately managed.

The apparatus or method for managing memory according to an embodiment of the present invention can reduce data update costs due to non-sequential reference operations by applying a page mapping technique in a block selected as a fusion group.

An apparatus or method for managing memory according to an embodiment of the present invention distinguishes sequential references and nonsequential references and selectively applies merge or garbage collection operations to each reference operation, thereby updating data for the entire nonvolatile memory. Can be reduced.

Memory management apparatus or method according to an embodiment of the present invention to improve the performance by flexibly coping with the reference pattern by dynamically converting the blocks belonging to the fusion group into a sequential block, and dynamically including the sequential blocks in the fusion group Can be.

The memory management apparatus or method according to an embodiment of the present invention may optimize the page update cost of the fusion group by establishing and using a mathematical model of the reference operation cost and the garbage collection operation cost.

A memory management apparatus or method according to an embodiment of the present invention updates a map to invalidate a TRIM command when it is given a sector belonging to a sequential block or a fusion group, and performs such invalidation when performing a garbage collection or merge operation. Calculate the fusion group utilization to minimize page update cost by considering invalidated sectors in the mathematical model, and move the data block between the fusion group and the sequential group so that the utilization rate is the same. Can be minimized.

In the memory management apparatus or method according to an embodiment of the present invention, when the mathematical model predicts the utilization rate of the garbage collection target block from the utilization rate of the fusion group, the memory management apparatus or method may more accurately predict the error rate based on the error rate from the standard reference utilization rate.

1 is a diagram illustrating an example of a flash memory 100 managed by a memory management apparatus according to an embodiment of the present invention.
2 is a diagram illustrating a memory management apparatus 200 according to an embodiment of the present invention.
3 is a diagram illustrating an example of an operation of the memory management apparatus 200 of FIG. 2.
4 is a diagram illustrating an example of an operation of the memory management apparatus 200 of FIG. 2 and illustrates an example of a fusion operation.
FIG. 5 is a diagram illustrating an example of a fusion operation and a garbage collection operation of the memory management apparatus 200 of FIG. 2.
FIG. 6 is a diagram illustrating an example of a TRIM command operation of the memory management apparatus 200 of FIG. 2.
FIG. 7 is a diagram illustrating an example of a fusion operation in which the memory management apparatus 200 of FIG. 2 fuses a block having a low utilization rate using a TRIM command.
FIG. 8 is a diagram illustrating an example of a defusion operation of the memory management apparatus 200 of FIG. 2.
FIG. 9 is a diagram illustrating an example in which the memory management apparatus 200 of FIG. 2 performs garbage collection after a de-fusion operation.
FIG. 10 is a diagram illustrating an example in which the memory management apparatus 200 of FIG. 2 obtains correction data from G F , G R , U F , U R , and U B , and derives G B using the same.
11 is a diagram illustrating a hit ratio when the number of logical blocks included in a fusion group changes.
12 is a diagram illustrating a page update cost graph when the number of logical blocks included in a fusion group changes.

Hereinafter, with reference to the accompanying drawings a preferred embodiment according to an embodiment of the present invention will be described in detail. However, the present invention is not limited or limited by the embodiments. Like reference symbols in the drawings denote like elements.

The memory management method proposed in the present invention adds TRIM command processing to Variable Space Page Mapping (VSPM) specified in Patent No. 10-0965051, "Variable with added TRIM command processing. Space page Mapping with TRIM command processing, but it is obvious to those skilled in the art that such names should not be interpreted to limit the scope of the present invention. In predicting the utilization rate of the garbage collection target block in the variable space page mapping (VSPM) specified in Patent No. 10-0965051, an error rate-based correction technique is applied to provide a more precise prediction method.

As used herein, a memory device is a concept including a storage device for storing data and a non-volatile memory.

1 is a diagram illustrating an example of a flash memory 100 managed by a memory management apparatus according to an embodiment of the present invention.

The memory management apparatus may divide the plurality of blocks of the flash memory 100 into a meta block 110, a sequential group 120, a fusion group 130, and a free block 140. .

The meta block 110 may store logical block and logical page information mapped to each of the plurality of blocks of the flash memory 100, and store information necessary for booting.

A block in which logical data such as sector data recognized by a higher layer such as a file system in a memory management apparatus is stored may be referred to as a data block. Such data blocks may be in sequential group 120 or fusion group 130.

In this specification, the "physical block" and the "physical page" mean a block and a page of the flash memory 100, respectively. The "logical blocks" and "logical pages" refer to blocks and pages recognized by a host external to the flash memory 100. The memory management apparatus may map (or map) one logical page to one physical page. Sector data is sequentially stored in the logical page. The number of sectors stored in the logical page is determined according to the size of the logical page.

The memory management apparatus may designate a block in which logical pages are sequentially stored in the logical blocks among the plurality of blocks of the flash memory 100 to the sequential group 120.

The memory management apparatus may designate some of the blocks in which data is stored and the spare blocks among the plurality of blocks of the flash memory 100 as the fusion group 130. The memory management apparatus may store a logical page included in at least one logical block in a physical block included in the fusion group 130 by applying a page level mapping technique.

The spare block 140 is a block used by the FTL for other purposes in addition to a block for storing logical data. Some of the free blocks belong to fusion group 130 and are used for garbage collection, and some are used for the merge operation of sequential blocks.

As described above, in the present specification, 'physical block' and 'physical page' refer to blocks and pages of the flash memory 100, respectively. The "logical blocks" and "logical pages" refer to blocks and pages recognized by a host external to the flash memory 100. The memory management device may map one logical page to one physical page. Sector data is sequentially stored in the logical page. The number of sectors stored in the logical page is determined according to the size of the logical page.

The memory management method proposed in the present invention may be referred to as Variable Space Page Mapping (VSPM). However, it is apparent to those skilled in the art that the name VSPM should be interpreted so as not to limit the scope of the present invention.

When the memory management device uses a block mapping scheme, one entry in the map maps (maps) a logical block to one or more physical blocks, and one entry in the map maps a logical block number to a physical block number or a physical block number to a logical block. Map by number. Alternatively, when a memory management device, such as a fusion group, applies page mapping techniques, certain logical blocks are not mapped to specific physical blocks and each logical page is mapped to a physical page independently, so that one entry in the map is logical. Map page numbers to physical page numbers or physical page numbers to logical page numbers.

2 is a diagram illustrating a memory management apparatus 200 according to an embodiment of the present invention.

The memory management apparatus 200 receives an access operation and / or a reference operation and a TRIM command for the flash memory 100 from an upper software layer such as the file system 240 or a database program.

File system 240 is recognized by the host and also associated with an operating system. The file system 240 generates an access command to the memory management apparatus 200 from file and process information recognized by the host. The memory management apparatus 200 may convert the sector number requested by the file system 240 into logical address information about the flash memory 100. The logical address information may include a logical block address (or logical block number) and a logical page address (or logical page number).

The memory management apparatus 200 is also called a flash translation layer (FTL). The memory management apparatus 200 may not only convert the sector number into the logical address information but also convert the logical address information into the physical address information of the flash memory 100 by using an appropriate mapping technique. The apparatus 200 may map logical blocks and logical pages into physical blocks and physical pages.

The software layer on top of the file system 240 or the storage device can transfer an access operation or reference operation to the memory management device 200. The access operation or the reference operation may include read and / or write operations for one or more sectors of the flash memory 100.

According to an embodiment of the present invention, the file system 240 or the software layer on top of the storage device may transmit a TRIM command to the memory management device 200. In this case, the memory management apparatus 200 may invalidate the existence of the sector which is the target of the TRIM command itself, thereby reducing the cost of a future merge operation or garbage collection operation.

The memory management apparatus 200 may include a pattern detector 210, a block designation unit 220, and a mapping unit 230.

The memory management apparatus 200 may divide the plurality of blocks into a sequential group and a fusion group based on the locality of the access operation for each of the plurality of blocks included in the flash memory 100.

Hosts tend to read or write data stored in flash memory 100 sequentially. This is also called spatial locality.

Hosts, on the other hand, tend to access data once they have accessed it. The host accesses the data once it has been accessed in a relatively close time, sometimes referred to as temporal locality.

The pattern detector 210 may detect an access operation pattern for each of the plurality of blocks of the flash memory 100. For example, if the access operation accesses more consecutive data than the threshold, the pattern detector 210 may consider the access operation to be sequential access.

Conversely, if the access operation accesses discrete data or if the number of consecutive data is less than the threshold, the pattern detector 210 may consider the access operation to be a non-sequential access.

The block designator 220 may designate blocks in which data is stored as the sequential group 120 or the fusion group 130 based on whether the access operation for each of the plurality of data is a sequential access.

The block designation unit 220 designates a block corresponding to the access operation as the sequential group 120 when the access operation is a sequential access, and designates a block corresponding to the access operation as the fusion group 130 when the access operation is a sequential access. Can be.

Sequential group 120 is a set of blocks corresponding to sequential access and is not limited by logical or physical addresses. The sequential group 120 may be referred to as a refined area.

Fusion group 130 is also a collection of blocks corresponding to initial free blocks and out of order access, and is not limited by logical or physical addresses.

The mapping unit 230 sequentially stores data sectors in blocks included in the sequential group 120 and applies a block mapping scheme, and stores data by applying a page mapping scheme to blocks included in the fusion group 130. .

The mapping unit 230 selects some of the blocks (physical blocks) included in the fusion group 130 as buffering blocks, and records the updated pages therein. There may be logical pages included in one or more logical blocks in the buffering block.

Some of the spare blocks in which no data is initially stored may be assigned to the fusion group 130. A pure set of spare blocks in which no data is stored is shown as spare block 140.

Some of the free blocks 140 are included in the fusion group, some have a pure form that is not included in the fusion group 130, and may be used as a temporary buffer block for a concatenation operation or a sequential block in the future. have.

The block designator 220 may dynamically move the logical block belonging to the sequential group to the fusion group 130 based on the locality of the access operation. This is sometimes called a fusion operation. In addition, the block designator 220 may move logical blocks belonging to the fusion group 130 to the sequential group. This is also called a defusion operation.

Although the block designator 220 or the pattern detector 210 is a block currently included in the sequential group 120, if the reference to the block is not sequential, the block designator 220 or the pattern detector 210 designates the block as the fusion group 130 through a fusion operation. Can be.

The block designator 220 determines, according to the pattern detector 210, that the block designator 220 is associated with the number of invalid pages of the first block due to the TRIM command for the first block included in the current sequential group 120. If it is determined that one condition is satisfied, the first block may be designated as the fusion group 130.

The first condition is when the number of valid pages of the first block is equal to or greater than a first threshold value or when the block utilization of the first block is lower than the utilization of the current fusion group 130. Is a condition that satisfies at least one case.

Here, the block utilization of the first block may be a valid page number among the number of pages in the first block.

Meanwhile, in some cases, the first condition may include application examples of various cases depending on the situation in addition to the two cases.

The meaning of the utilization of the block or the utilization of the current fusion group 130 and the calculation thereof are mentioned again below.

On the contrary, when it is determined by the pattern detector 210 that an update request for at least some pages of the second block in the sequential group has arrived, the block designation unit 220 determines that an unused page of the fusion group is received. The second block may be moved to the fusion group by a fusion operation.

However, in some cases, when it is not desirable to move the second block to the fusion group, for example, when it is determined that it does not help to lower the utilization rate of the fusion group, the block designation unit 220 may The second block may not be moved to the fusion group.

If the second block is not moved to the fusion group, the memory management apparatus 200 displays on the map that the logical page of the second block is included in the fusion group. The logical page is included in the sequential group again through a merge operation with the block.

The block designation unit 220 determines that the data of the block is not referred to in a non-sequential order in the fusion group, even if it is a logical block currently included in the fusion group 130 by the pattern detector 210. If it is determined that group 130 is needed to reduce the garbage collection computation cost, such a block may be removed from the fusion group and moved to sequential group 120.

Within the block designated by sequential group 120, logical pages satisfy the sequential condition. A sequential condition can be established if pages in a block are stored in the order on the address or if each page is stored once in a block. That is, the block designation unit 220 may designate a block in which each data sector is stored once among the plurality of blocks to the sequential group 120.

The memory management apparatus 200 may perform a garbage collection operation on blocks included in the fusion group 130. Garbage collection operation refers to the process of relocating data stored in a block to obtain a free block.

The memory management apparatus 200 may apply the page mapping scheme to the fusion group 130 and apply the block mapping scheme to the sequential group 120. In this case, the page mapping scheme may serve as a superset of the block mapping scheme, and thus, the page mapping scheme is similar to that of applying the page mapping scheme to all blocks in the flash memory 100.

When the page mapping scheme serves as a superset of the block mapping scheme, the memory management apparatus 200 may obtain a result similar to that of the block mapping scheme by allocating all logical pages corresponding to the sequential group 120 in a specific logical block. have.

According to an embodiment of the present invention, when a TRIM command is transmitted to a sector so that valid data no longer exists in the page occupied by the sector, the page may be invalidated. Such invalidated pages may exist in sequential groups and may also exist in fusion group 130.

When a page is invalidated by the TRIM command, the memory management apparatus 200 updates the map to indicate that the corresponding sector or page is invalidated. Here, a technique for indicating invalidation in a map is applied by various techniques such as writing a specific value in an entry of a map that maps a logical page in which a corresponding sector or page exists or using a separate map that registers invalidated sectors. It is possible.

When a page existing in a sequential block is invalidated, the memory management apparatus 200 does not need to copy the invalidated page when performing a merge operation. In addition, when a page existing in the fusion group 130 is invalidated, the memory management apparatus 200 does not need to copy the invalidated page when performing a garbage collection operation or performing a fusion release operation.

If no invalidated page exists, the utilization of the fusion group 130 is determined from the number of free blocks included in the fusion group 130 (N empty ) and the number of logical blocks included in the fusion group 130 (N fused ). It can be calculated by a simple formula such as N fused / (N empty + N fused ).

However, according to an embodiment of the present invention, when the page invalidated by the TRIM command exists in the fusion group 130, the utilization of the fusion group 130 needs to be calculated in consideration of the invalidated page.

The memory management apparatus 200 maintains at least a pure empty block in which all pages are not used at all in the fusion group 130 for garbage collection operations and de-fusion operations. This lowest value is 1 or more, which can be larger depending on the system situation. If the lowest value is 2, fusion group 130 maintains two or more empty blocks. However, it is possible to keep two or more empty blocks inside the fusion group or to take empty blocks from the free block 140 when necessary and to keep one block after the operation is finished, without keeping the empty blocks inside the fusion group 130. Returning to the spare block 140 is all the same technique with the same effect.

3 is a diagram illustrating an example of an operation of the memory management apparatus 200 of FIG. 2.

The pattern detector 210 can designate a block as either the sequential group 120 or the fusion group 130.

Workload detector 240 may adjust the number of logical blocks included in fusion group 130 by detecting the nature of the request being re-referenced within fusion group 130. If one logical block is removed from the fusion group 130 and designated as a sequential block (unfusion operation), a physical block for storing the logical block is needed, and thus, the physical block included in the fusion group 130 The number decreases.

The memory management apparatus 200 may convert a space used inside the fusion group 130 into an empty space for another write request by performing a garbage collection operation on a block included in the fusion group 130. In addition, a garbage collection operation may be performed to convert the used block into an empty block or a spare block 140.

The memory management apparatus 200 may update a current state (group included) of each block of the flash memory 100 in a map on the main memory, and store the updated map in the meta block 110.

4A is a diagram illustrating an example of an operation of the memory management apparatus 200 of FIG. 2, according to an exemplary embodiment.

Fusion group 400 initially includes physical blocks B2 ', B1', B0 'that are some of the total spare blocks. Block numbers with a '(prime) symbol, such as B2', B1 ', B0', refer to a particular physical block included in the fusion group 400.

Blocks B2 ', B1', and B0 'may or may not be erased. If not, the memory management apparatus 200 must perform a process of erasing them before using them.

The sequential area includes sequential blocks B3, B2, B1, and B0 in which pages are stored according to sequential conditions. Block numbers B3, B2, B1, and B0 in the sequential area indicate logical block numbers. Block mapping scheme is applied to blocks existing in the sequential region. Accordingly, logical block numbers B3, B2, B1, and B0 may be mapped to specific physical block numbers through a block mapping technique.

The sequential block B1 included in the sequential group stores logical pages P10, P11, P12, P13, and P14. The sequential block B2 stores logical pages P20, P21, P22, P23, and P24.

Since the page mapping technique is applied to the fusion group 400, one logical block may not correspond to one physical block. More precisely, there is no logical block concept in fusion group 400.

However, the memory management apparatus 200 manages a list of which logical blocks are fused (included) in the fusion group. Each logical page in the fusion group may be mapped to a specific physical page through a page mapping technique.

Referring to FIG. 4B, when the logical page P03 included in the logical block B0 is changed, the memory management apparatus 200 may refer to the corresponding logical block B0 or the physical block B3 'in which the logical block B0 is stored. In the fusion region 500. Logical block B0 no longer exists in the sequential region.

The memory management apparatus 200 may select the physical block B2 'as a buffering block. In the buffering block, a new page that is changed among the logical pages of all the logical blocks included in the fusion group 500 (physical block B3 'in the example of FIG. 4B) may be recorded. The memory management apparatus 200 may select one or a plurality of blocks as buffering blocks.

The logical page P03 changed in FIG. 4B is written in the first page of the buffering block B2 'within the fusion region, and P03 of B3' is invalidated. In the following, an X on the page number indicates that the page is invalid.

Each logical block within a fusion group is limited to a specific physical block and is not mapped. For example, the logical block B0 included in the fusion group does not correspond to a specific physical block. Pages P00, P01, P02, P03, and P04, which now belong to logical block B0, can exist in any block in the fusion group.

5 illustrates a fusion calculation process according to an embodiment of the present invention.

When writing to P11 of logical block B1 existing in the sequential group of FIG. 4 is requested, the memory management apparatus 200 includes the logical block B1 in the fusion group. Thus, in FIG. 5A, logical block B1 no longer exists in the sequential region and belongs to the fusion group 600.

In FIG. 5A, the logical page P11 included in the logical block B1 is now written to the second page of the buffering block B2 '. When a write to P14 is requested, a new logical page P14 is written to the third page of B2 '. In addition, existing pages corresponding to existing P11 or P14 at B4 'are invalidated.

When writes to P00 and P01 are requested in FIG. 5A, they are written to the fourth and fifth pages of the buffering block B2 ', and the existing pages corresponding to P00 or P01 at B3' are invalidated. .

Then, all pages of the buffering block B2 'are used in FIG.

According to an embodiment of the present invention, when the number of empty blocks in the fusion group is equal to or less than a threshold value, the memory management apparatus 200 performs a garbage collection (or garbage collection) operation to make a new buffering block. In this embodiment, the threshold value is assumed to be 2.

5B is a diagram illustrating an example of garbage collection operation according to an embodiment of the present invention.

Referring back to FIG. 5A, the memory management apparatus 200 may select any one of the physical blocks B4 'and B3' having the smallest number of valid pages as a target of a garbage collection operation. However, garbage collection target selection criteria have various forms and should not be specified as an example.

For example, it is assumed that the memory management apparatus 200 selects the physical block B3 'as a target of a garbage collection operation.

 The memory management apparatus 200 selects one of the empty blocks B1 'and B0' as a buffering block.

For example, in FIG. 5B, the block B1 ′ is selected as the buffering block. If B1 'has not been erased, B1' is erased. The memory management apparatus 200 copies the valid pages P02 and P04 of the block B3 'to the buffering block B1'. After the copy is complete, there is no valid page in block B3 ', so block B3' is completely empty.

The memory management apparatus 200 maintains the number of empty blocks in the fusion group 600 that is greater than or equal to a threshold value (in this example, the threshold value is 2) for the garbage collection operation and the defusion operation. For example, the memory management apparatus 200 may maintain empty blocks B3 'and B0' in the fusion group 600 shown in FIG.

However, the present invention is not limited to some embodiments, and in other embodiments, it may not maintain empty blocks in the fusion group 600, in which case it is necessary to bring empty blocks out of the spare blocks 140 when needed. After the operation, the same number of empty blocks are returned to the spare block 140. However, the description of the following embodiments assumes that two or more empty blocks are maintained within the fusion group 600.

In addition, the memory management apparatus 200 may make a large number of empty blocks by performing a de-fusion operation in advance during system idle time, which is called a "background de-fusion operation". Creating a large number of empty blocks in system idle time with a "background de-fusion operation" reduces the utilization of the fusion group (600) and allows write requests to be processed without performing garbage collection operations or de-fusion operations for the time being. Is improved.

Referring to FIG. 6A, when a write to the logical page P14 existing in the fusion group 600 is requested, P14 is written to the third page of the buffering block B1 ', and the existing logical page P14 in the block B4'. Is invalidated.

According to an embodiment of the present invention, the memory management apparatus 200 receives and processes a TRIM command.

Referring to (b) of FIG. 6, for example, a TRIM command is requested for a sector existing in P22, P23, P24, P02, and P03. In this case, the memory management apparatus 200 invalidates the logical pages for which a TRIM command is requested. This invalidation request is performed by updating the map.

According to an embodiment of the present invention, after performing this invalidation process, the utilization rate of the first logical block B2 in which the pattern detector 210 of the memory management apparatus 200 exists in the sequential group (= effective pages / block If the first condition is satisfied, the block designation unit 220 includes the logical block B2 in the fusion group 600 even if there is no write request for the page of the block.

Here, the first condition may be a condition that satisfies various criteria, such as a case where the utilization rate of the logic block B2 is equal to or less than a first threshold value (for example, a value such as 0.4) or lower than the utilization rate of the fusion group 600. .

7 illustrates that the pattern detector 210 determines that the first condition for the utilization rate of the logic block B2 is satisfied, so that the block designation unit 220 of the memory management apparatus 200 assigns the logic block B2 to the fusion group 700. It is a figure which shows the state immediately after inclusion.

In FIG. 7, the logical block B2 no longer exists in the sequential region, and the physical block used by the logical block B2 is included in the fusion region.

FIG. 8 is a diagram illustrating an example of a defusion operation of the memory management apparatus 200 of FIG. 2.

7 and 8, pages P02 and P03 of logical block B0 are no longer present in any area by the TRIM command. The remaining logical pages of the logical block B0 are stored in the physical blocks B2 'and B1'.

The memory management apparatus 200 may separate the logical block B0 from the fusion group 700 by various needs such as infrequently accessing a page belonging to the logical block B0 or adjusting the utilization rate of the fusion group. .

The memory management apparatus 200 may copy logical pages P00 and P01 from physical block B2 'to physical block B3; and copy logical page P04 from physical block B1' to physical block B3 '. After the copy is finished, the memory management apparatus 200 may invalidate the logical pages in the physical blocks B2 'and B1'.

Since the memory management apparatus 200 stores the pages of the logical block B0 in sequential conditions in the physical block B3 ', the fusion group 700 combines the physical block B3' and the logical block B0 as shown in FIG. 8B. It can be separated from and included in the sequential group.

As shown in (b) of FIG. 8, when the number of empty blocks in the fusion group 800 is less than the threshold value (2 in this example) after the de-fusion operation, the memory management apparatus 200 performs a garbage collection operation to perform empty collection operations. You can add

In this case, the memory management apparatus 200 may select the physical block B2 'having the smallest number of valid pages as a target of the garbage collection operation. Alternatively, the criteria for garbage collection operations can be selected by other criteria, and the selection criteria should not be limited to one.

The memory management apparatus 200 copies all valid pages of the branch ratio collection target block to the buffering block. Since the physical block B2 'selected as the garbage collection target block in FIG. 8B includes a valid page P11, the memory management apparatus 200 copies the page P11 to the buffering block B1'.

If the number of valid pages present in the garbage collection target block is greater than the number of unused pages present in the buffering block, separate garbage collection may be needed to create a new buffering block while copying the pages.

In this case, a separate garbage collection operation is performed using the remaining empty block B0 'to create a new buffering block. Then use the newly created buffering block to continue the copy you were doing in the original garbage collection.

Then, as the garbage collection operation completes, the fusion group 800 has an empty block above the threshold (2 in this example).

In FIG. 9B, the fusion group 800 includes two empty blocks B2 'and B0'.

When a new write request arrives, it is processed using the unused page of the buffering block B1 '. And subsequent requests are processed while applying the operations repeatedly.

Meanwhile, referring again to FIG. 2, the block designation unit 220 participates in the fusion group 130 and the number of logical blocks included in the fusion group 130 (or the number of physical blocks that were previously corresponding to the logical blocks). The number of spare blocks can be determined. Also, the block designation unit 220 may calculate a ratio of an access operation for the fusion group 130 among the access operations for the flash memory 100.

For convenience of description, the ratio of the access operation to the fusion group 130 among the access operations to the flash memory 100 will be defined as a reference probability.

When there are no pages invalidated by the TRIM command, when the number of logical blocks participating in the fusion group 130 is N fused and the number of free blocks participating in the fusion group 130 is N init_empty , the utilization rate of the fusion group is N fused. It can be defined as / (N fused + N init_empty ). If the number of free blocks participating in the fusion group 130 is fixed, the utilization rate increases as the number of logical blocks participating in the fusion group 130 increases.

For example, assuming that 10 spare blocks are fixedly included in the fusion group 130, if five logical blocks are included in the fusion group 130, the utilization rate of the fusion group 130 may be 5/15. If ten logical blocks are included in the fusion group 130, the utilization rate of the fusion group 130 is 10/20.

If there is a page invalidated by the TRIM instruction, the utilization of the fusion group 130 is now not calculated simply by the number of free and logical blocks included in the fusion group 130.

It is assumed that the memory management apparatus 200 may calculate the number of invalidated pages among logical pages of all logical blocks included in the fusion group 130. The memory management apparatus 200 increases the number of invalidated pages in the fusion group 130 by increasing the number of invalidated pages each time a TRIM command is requested for a sector or a page belonging to all logical blocks included in the fusion group 130. You can maintain the number of pages.

Also, whenever a logical block belonging to a sequential group moves to a fusion group 130 or a logical block belonging to a sequential group 130 moves to a sequential group, the number of invalidated pages of the block is calculated to calculate the number of invalidated pages in the fusion group 130. By adding or subtracting the total number of invalidated pages, the total number of invalidated pages in the fusion group 130 can be maintained accurately.

When the page of the sequential block is referred to, the memory management apparatus 200 reflects this even when only a specific page of the sequential block is included in the fusion group without being included in the fusion group. The number of invalidated pages can be maintained accurately.

The memory management apparatus 200 may calculate the number of valid pages existing in the fusion group with the number of invalidated pages. Alternatively, the valid page count may be calculated by calculating the valid page count in the process of calculating the invalid page count.

Assume that the number of pages per block of flash memory is N P. In addition, it is assumed that the total number of valid pages in the fusion group 130 is N total_valid . Assume that the number of free blocks included in the fusion group 130 is N init_empty and the number of logical blocks included in the fusion group 130 is N fused . Then, the utilization U F of the fusion group 130 may be calculated as in Equation 1.

The utilization rate of one logical block is determined by the number of valid pages in the logical block. If the utilization rate of a logical block is U B , and there is no invalid page in the logical block, there are N p valid pages in this logical block, in which case the utilization rate of the logical block U B is 1 (= N p / N p ). If there is an invalid page N p_inv in the logical block, the utilization rate U B of the logical block is (N p -N p_inv ) / N p .

If a logical block belonging to the sequential group has an invalid page by the TRIM command, the utilization rate of the fusion group 130 may be lowered when the block is moved to the fusion group 130. In particular, when the utilization rate U B of the sequential block is lower than the utilization rate U F of the fusion group 130, by moving the sequential block to the fusion group, the utilization rate U F of the fusion group 130 may be lowered.

Moving a block from the sequential group to the fusion group 130 requires a cost, such as a map change. When the gain obtained by moving the logical block is greater than the cost required for the moving, the memory management apparatus 200 may move the logical block having the utilization ratio U B to the fusion group 130.

Utilization factor is moving the U B block to the utilization factor U F fusion group 130 fusion group 130 will have a new utilization U F 'memory management unit can be calculated in advance. The memory management apparatus 200 according to the above-described formula, the new utilization U F 'based on the initial free block number, the number of logical blocks in the fusion group when a new logical block is added, and the newly changed number of invalidated pages or valid pages. Can be calculated.

Eventually, the memory management apparatus 200 determines that the gain that can be obtained by the lower utilization rate (U F -U F ') of the fusion group 130 is greater than the cost required to move the logical block from the sequential group to the fusion group 130. If so, the logical block may be moved to the fusion group 130.

The memory management apparatus 200 may use a formula for quantitatively calculating this gain. Alternatively, the memory management apparatus 200 may infer the gain using empirical or statistical figures.

As the number of logical blocks participating in the fusion group 130 increases with the number of initial free blocks allocated to the fusion group 130, or as the number of valid pages participating in the fusion group increases, the fusion group 130 The utilization rate of s increases, and as the utilization rate of the fusion group 130 increases, the cost of garbage collection operations for the fusion group 130 increases.

On the other hand, as the number of logical blocks participating in the fusion group 130 increases, or as the number of valid pages increases, there is a high probability that a page (or sector data in this page) located in the fusion group 130 is referred to (updated). . The case where a page located in the fusion group 130 is updated may be referred to as a fusion group 130 hit. If a large number of logical blocks or valid pages participate in the fusion group 130, the hit ratio is high.

When a write is requested to a page (sector) in the fusion group 130, the page can be updated in the write buffering block at a relatively low cost. To calculate the average cost for page updates in fusion group 130, a model in which the update of each page shares the garbage collection cost may be considered.

Hosts are more likely to refer to sector data with temporal and spatial locality, so if a relatively recently referenced (or updated) logical page (sector) is included in the fusion group 130 or if the block containing that page is If included in the fusion group 130, it is highly likely that the same page is referenced again or adjacent sectors in the same block are referenced. Therefore, the higher the number of logical blocks in the fusion group 130 or the greater the number of valid logical pages in the fusion group, the higher the hit ratio for the fusion group 130.

On the other hand, as the utilization of the fusion group 130 increases, the cost of garbage collection operations increases. In summary, as the utilization increases, the hit ratio for the fusion group 130 increases (see FIG. 11), while the garbage collection computation cost is expected to increase. Therefore, the memory management apparatus 200 may calculate an optimal utilization rate for the fusion group 130 using a mathematical model of the utilization rate and the average cost of garbage collection operations. The memory management apparatus 200 may gradually adjust the number of valid pages or the number of logical blocks present in the fusion group 130 to reach an optimal utilization rate.

The memory management apparatus 200 may control the number of valid pages or the number of logical blocks included in the fusion group so that the fusion group 130 maintains an optimal utilization rate. If the utilization of the fusion group 130 is higher than the optimal utilization, some valid pages may be removed from the fusion group by the merge operation or the logical blocks may be moved from the fusion group 130 to the sequential group by the defusion operation. The utilization rate of the fusion group 130 can be lowered. Conversely, if the utilization of the fusion group 130 is lower than the optimal utilization, the fusion operation may move the block from the sequential group to the fusion group. Alternatively, a gradual method may be used to include a page in the fusion group whenever a page in the sequential group is referenced or a block in which the page exists.

To maintain optimal utilization of the fusing group, include a few more logical blocks in the fusing group or remove them from the fusing group, or include or remove some valid pages in the fusing group to achieve fusing group utilization U F. When X changes from X to X ', the page update cost of the entire flash memory storage device should be predictable. If the page update cost is less than the current page update cost, the memory management apparatus 200 may gradually move logical blocks or valid pages.

The utilization rate U F of the fusion group may be calculated by the memory management apparatus 200 as described above. However, in order to calculate the garbage collection cost, the utilization rate U B of the block to be garbage collected is required, not the utilization rate U F of the fusion group 130.

11 is a graph illustrating a curve G F of a utilization rate of a fusion group according to the number of logical blocks included in the fusion group when the number of initial free blocks is given. Hereinafter, the utilization curve of the fusion group is referred to as G F.

The curve of FIG. 10 is a graph drawn according to the number of logical blocks included in the fusion group for convenience, and it is obvious that such a utilization graph is also possible according to the number of effective pages included in the fusion group. The embodiments described below will be described based on the number of logical blocks included in the fusion group for convenience, but this is obviously applicable to the example of using the effective number of pages.

The memory management apparatus 200 may calculate the utilization rate U F of the current fusion group from the number of logical blocks included in the fusion group at some point during the operation. The utilization U F of the current fusion group means a point on the utilization curve G F.

When the utilization rate of the current fusion group is U F , the memory management apparatus 200 may determine the utilization rate U B of the garbage collection target block by calculating the number of valid pages in the garbage collection target block at the moment when the garbage collection operation is performed. .

In summary, it is assumed that the memory management apparatus 200 knows the utilization curve G F of the fusion group, the utilization U F of the current fusion group, and the utilization U B of the garbage collection target block. The memory management apparatus 200 may use the three pieces of information to predict the utilization curve G B of the garbage collection target block. When the G B curve is predicted, the memory management apparatus 200 may draw a page update cost graph according to the number of logical blocks included in the fusion group by using Equations 1 to 6, and the convergence that makes the page update cost the smallest The number of logical blocks in the group can be determined.

The memory management apparatus 200 may use the reference curve G R to accurately predict the G B curve. The reference curve G R is a curve drawn by mathematically calculating or experimentally collecting how the garbage collection target block utilization U B changes with the change of the fusion group utilization curve G F in the reference workload or the standard workload.

One example of a reference curve is the equation used in the study of the Log-structured File System (LFS). In this study, the relationship between the utilization U D of the entire file system and the utilization U S of the segment to be cleaned (garbage collection) was estimated as shown in Equation 2. Applying this formula to the flash memory storage device, it assigns the U D instead of U F, and also the relationship between the U S instead Substituting U B, utilization U B of the fused group usage rate U F and of non-collection of the current block It can also be applied to analogy. However, it is obvious that the reference curve is not limited to this one example, and that the reference curve can be derived by using other equations or by collecting experimental results.

Obviously, these reference curves are measured from standard workloads and cannot be accurately applied to a variety of actual workloads. In addition, when there are pages invalidated in the fusion group by the TRIM command, the reference pattern may have a higher concentration. As a result, predicting garbage collection target block utilization from the fusion group utilization may have a lot of errors. Therefore, a method for correcting such an error may be necessary.

It is assumed that the memory management apparatus 200 now knows the utilization curve G F of the fusion group, the utilization U F of the current fusion group, and the utilization U B of the garbage collection target block, and the reference curve G R. The memory management device may designate a point U R on the reference curve G R when the current convergence group utilization is U F. The memory management apparatus 200 may quantify the utilization rates U B and U F , and the relationship U B and U R of the garbage collection target block and infer the graph G B using a correction formula.

Various methods can be applied as the correction equation, and one example is as follows. First, a relation value C as shown in Equation 7 is calculated from U F , U R , and U B that can be measured from the current memory management device configuration.

The garbage collection target block utilization rate U B ′ may be calculated when the fusion group utilization rate is an unknown value U F 'using the relation value C. As an example, when the fusion group utilization rate is U F ', and the value on the graph G R is U R ', U B 'is calculated as in Equation 7. And if we calculate all the different U B ', we can draw the graph G B.

In another example, the same but different forms exist. For example, the relation values C and U B ′ may be calculated as shown in Equation 8.

10 shows a graph G B inferred by the above correction equation. The memory management apparatus 200 infers that the garbage collection target block utilization is changed as G B when the fusion group utilization is changed as the graph G F by removing or including some logical blocks in the fusion group, and again the garbage collection target. It can be inferred that block utilization changes like G B. Now, when the fusion group hit ratio r according to the number of logical blocks is given, the memory management apparatus 200 may derive an average page update cost graph of all flash memory storage devices by applying Equations 1 to 6.

Each time a logical block is included in a fusion group, the utilization rate of the fusion group increases, and the hit ratio r of the fusion group also increases. 11 shows that the hit ratio r of the fusion group increases with the number of logical blocks. When a hit ratio graph according to an increase in utilization rate of the fusion group is given as shown in FIG. 11, Equation 1 to 6 may be applied to derive a graph of average page update cost of the entire flash memory storage device. Shows. In particular, the optimal point in FIG. 12 indicates the number of logical blocks in the fusion group that minimizes page update costs.

The memory management apparatus 200 may gradually adjust the utilization rate of the fusion group in order to minimize the page update cost according to the average page update cost graph. Such adjustment may be performed by including or removing logical blocks into the fusion group or by adding or removing valid pages to the fusion group.

In FIG. 12, the left side of the optimal point increases steeply in the page update cost, while the right side slowly increases the page update cost. In a real computing environment, workloads can vary significantly, so the optimal point must change frequently. Given these changes and measurement errors, a safe point that is shifted δ to the right than the optimal point may be more appropriate in a real environment. The memory management apparatus 200 may adjust the fusion group utilization to be the optimal point derived by the formula of the present invention, or may adjust the fusion group utilization to be a safety point moved by δ from the optimal point, both of which are the same. Should be considered an action.

In this specification, the cost of an operation means a resource needed for the operation to be performed. The resource may mean, for example, time, or may mean energy consumption or space of the flash memory 100. In the following specification a mathematical model of time is presented, but it is apparent to those skilled in the art that the present invention is not limited to time.

The memory management apparatus 200 may define a mathematical model of the cost of the fusion operation, the cost of the defusion operation, and the page update cost of the fusion group 130. In addition, the update cost for the map information stored in the meta block 110 or the main memory of the flash memory 100 may also be defined as a map update cost. If the map update cost can be considered significantly smaller than the cost of other operations, the memory management apparatus 200 may not consider the update cost of the map information.

To define the cost of the defusion operation, the cost of the page update of the fusion group 130 and the garbage collection operation of the fusion group 130 must be defined. The cost of garbage collection operations is proportional to the utilization of the fusion group 130.

The utilization U F of the fusion group 130 is as follows: the initial free block number N init_empty included in the fusion group 130, the number of logical blocks N fused included in the fusion group 130, and in the fusion group 130 as follows. The effective page number N may be defined as Equation 1 from total_valid .

Figure 112010086459838-pat00001

If the utilization of the file system in the LFS is U D , the utilization U S of the segment to be cleaned may be defined as in Equation 1 below.

Figure 112010086459838-pat00002

Where ln means natural logarithm.

The average cost C GC of the garbage collection operation may be defined as in Equation 2 below.

Figure 112010086459838-pat00003

Where N P is the number of pages a block can contain, C CP is the cost of copying a page from one block to another block, and C E is the erase cost of the block. U B is the utilization rate of the garbage collection target block and can be inferred from the graph G B when the fusion group utilization rate is a specific value.

The garbage collection operation is performed by erasing the block at the cost of C E to generate a spare block, and copying U B x N P pages from the block selected as the target of the garbage collection operation to the generated free block.

When the garbage collection operation is performed, the block to which the page is copied becomes a write buffering block, and the write buffering block has (1-U B ) x N P empty pages for writing new data. Thus, on average, each garbage collection 130 may be considered to perform one garbage collection operation every time (1-U B ) x N P pages are written.

Since the map update cost is assumed to be small, the garbage collection operation cost does not include the map update cost. However, it is obvious that the following formula including the cost of updating the map is possible. In the formula below, C M is the map update cost.

C GC = U B x N P x C CP + C E + C M

The garbage collection cost to be shared when performing a page write operation is as follows, and this cost is defined as the average page write cost. The average page write cost C PW may be defined as in Equation 4 below. If the page write requires a map update, it is obvious that the page update cost C M can be added to the right side of Equation 4 below.

Figure 112010086459838-pat00004

The de-fusion operation selects the de-fusion target logical block, then erases the empty block at the cost of C E , and copies all the pages of the de-fusion target logical block distributed in the fusion group 130 to the generated free block. do. The copy cost at this time is N P x C CP .

If the number of empty blocks in the fusion group 130 is smaller than the lowest value after copying, garbage collection is performed to generate empty blocks. One example is to select a block with the smallest number of valid pages in the fusion group 130 and then copy all the pages of the selected block into a write buffering block to create a free block, the cost of U B x N P x C PW . The copy cost is calculated as the average page write cost because additional garbage collection may be performed during the copy. Putting these together, the cost C DEF of the defusion operation may be defined as in Equation 5 below. If the page write requires a map update, it is obvious that the page update cost C M can be added to the right side of Equation 5 below.

Figure 112010086459838-pat00005

In order for the memory management apparatus 200 to maintain the utilization rate of the fusion group at U F , when the new logical block is included in the fusion group 130, the memory management apparatus 200 may de-fuse other logical blocks included in the fusion group 130.

If the probability of the reference (update request) to the page in the fusion group among the update requests to the flash memory 100 is r, a reference to a page outside the fusion group 130 is requested with a probability of 1-r.

The average write cost Cavgw of the memory management apparatus 200 is the cost at which page writes are performed with a probability of r rx C PW and the cost at which a defusion operation is performed with a probability of (1-r) (1-r) xC DEF Will be added. This relationship may be defined as in Equation 6 below.

Figure 112010086459838-pat00006

The reference probability r depends on the utilization U F of the fusion group 130. Since the host accesses the flash memory 100 with temporal locality and spatial locality, it can be predicted that r will tend to increase as U F increases.

Depending on the application, the host may access the flash memory 100 with relatively large locality, and the host may access the flash memory 100 relatively randomly.

Although the reference probability r increases as the utilization rate U F increases, the increasing tendency of the reference probability r may be saturated according to the access tendency of the host.

For example, when the host accesses the flash memory 100 with relatively large locality, the reference probability r may converge to 0.8 when the utilization U F is 3/4 or more. On the contrary, when the host relatively randomly accesses the flash memory 100, if the utilization U F is 3/5 or more, the reference probability r may converge to 0.7.

As the utilization U F increases from a value close to zero, the average write cost Cavgw decreases as the reference probability r increases. However, as the utilization U F increases further, the increasing tendency of the reference probability r slows down, and the cost of garbage collection operations increases, causing the average write cost Cavgw to increase again.

Therefore, the memory management apparatus 200 may select a utilization U F that minimizes the average write cost Cavgw, and may define the selected utilization U F as an optimal utilization rate. The memory management apparatus 200 may gradually adjust the number of logical blocks included in the fusion group or the number of valid pages so that the utilization rate of the fusion group becomes the optimal utilization rate U F.

If file system 240 is optimized to translate file access requests from the operating system into sequential references to flash memory 100, the sequential reference ratio for memory management device 200 and FTL may increase.

Since the memory management apparatus 200 sequentially stores data in blocks included in the sequential group 120, as the sequential reference ratio increases, the memory management apparatus 200 may reuse the blocks frequently by switch merge. Since the cost of exchange merging is less than the cost of de-fusion operations or garbage collection operations in fusion group 130, memory management device 200 may further reduce the average write cost when combined with optimized file system 240.

Figure 112010086459838-pat00007

Figure 112010086459838-pat00008

The memory management apparatus 200 may specify the utilization U F of the current fusion group and the utilization U B of the garbage collection target block. In addition, since the reference curve G R is known, U R, which is a point on the reference curve G R when the fusion group utilization is U F , can be known. In this case, the memory management device may calculate a relationship value C necessary for error correction from U F , U B , and U R. Using C, when the unknown fusion group utilization rate is U F ', and the value on the graph G R is U R ', the unknown U B 'may be calculated as shown in Equation 7 below.

Figure 112010086459838-pat00009

Figure 112010086459838-pat00010

The memory management apparatus 200 may specify the utilization U F of the current fusion group and the utilization U B of the garbage collection target block. In addition, since the reference curve G R is known, U R, which is a point on the reference curve G R when the fusion group utilization is U F , can be known. In this case, the memory management device may calculate a relationship value C necessary for error correction from U F , U B , and U R. Using C, when the unknown fusion group utilization rate is U F ', and the value on the graph G R is U R ', the unknown U B 'may be calculated as in Equation 8.

Method performed in the memory management apparatus 200 according to an embodiment of the present invention may be implemented in the form of program instructions that can be executed by various computer means may be recorded in a computer readable medium. The computer readable medium may include program instructions, data files, data structures, etc. alone or in combination. The program instructions recorded on the medium may be those specially designed and constructed for the present invention or may be available to those skilled in the art of computer software. Examples of computer-readable recording media include magnetic media such as hard disks, floppy disks, and magnetic tape, optical media such as CD-ROMs, DVDs, and magnetic disks, such as floppy disks. Magneto-optical media, and hardware devices specifically configured to store and execute program instructions, such as ROM, RAM, flash memory, and the like. Examples of program instructions include not only machine code generated by a compiler, but also high-level language code that can be executed by a computer using an interpreter or the like. The hardware device described above may be configured to operate as one or more software modules to perform the operations of the present invention, and vice versa.

The flash memory device and / or the memory controller according to an embodiment of the present invention may be implemented using various types of packages. For example, a flash memory device and / or a memory controller according to an embodiment of the present invention may be a package on package (PoP), ball grid arrays (BGAs), chip scale packages (CSPs), plastic leaded chip carrier (PLCC), Plastic Dual In-Line Package (PDIP), Die in Waffle Pack, Die in Wafer Form, Chip On Board (COB), Ceramic Dual In-Line Package (CERDIP), Plastic Metric Quad Flat Pack (MQFP), Thin Quad Flatpack ( TQFP), Small Outline (SOIC), Shrink Small Outline Package (SSOP), Thin Small Outline (TSOP), Thin Quad Flatpack (TQFP), System In Package (SIP), Multi Chip Package (MCP), Wafer-level Fabricated Package (WFP), Wafer-Level Processed Stack Package (WSP), and the like.

The flash memory device and the memory controller may constitute a memory card. In this case, the memory controller may be configured to communicate with an external (eg, host) via one of various interface protocols such as USB, MMC, PCI-E, SATA, PATA, SCSI, ESDI, IDE, and the like.

The flash memory device is a nonvolatile memory device that can maintain stored data even when power is cut off. With the increasing use of mobile devices such as cellular phones, PDAs, digital cameras, portable game consoles, and MP3Ps, flash memory devices may become more widely used as code storage as well as data storage. Flash memory devices can also be used for home applications such as HDTV, DVD, routers, and GPS.

A computing system or host according to one embodiment of the invention includes a microprocessor, a user interface, a modem such as a baseband chipset, a memory controller, and a flash memory device electrically connected to a bus. The flash memory device will store, via the memory controller, N-bit data (N is an integer greater than or equal to 1) processed / to be processed by the microprocessor. When the computing system according to an embodiment of the present invention is a mobile device, a battery for supplying an operating voltage of the computing system will be further provided.

Those skilled in the art that the computing system according to an embodiment of the present invention may further be provided with an application chipset, a camera image processor (CIS), a mobile DRAM, and the like. Self-explanatory The memory controller and the flash memory device may, for example, constitute a solid state drive / disk (SSD) that uses nonvolatile memory to store data.

As described above, the present invention has been described by way of limited embodiments and drawings, but the present invention is not limited to the above embodiments, and those skilled in the art to which the present invention pertains various modifications and variations from such descriptions. This is possible.

Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the equivalents of the claims, as well as the claims.

100: memory management unit
110: metablock
120: sequential group
130: fusion group
140: free block

Claims (16)

A block designation unit classifying a plurality of blocks included in a nonvolatile memory into a sequential group or a fusion group based on locality of an access operation for each of the plurality of blocks; And
When a TRIM instruction arrives for data belonging to a block included in the sequential group or the fusion group, the page associated with the TRIM instruction is invalidated and the invalidation is reflected to the sequential group by a block mapping technique. A mapping section that stores data sectors in a group by a page mapping technique.
Memory management device comprising a.
The method of claim 1,
The block designation unit,
The TRIM command invalidates some or all of the pages of the sequential block, and moves at least a portion of the sequential blocks to the fusion group when the utilization rate of the sequential block is less than or equal to a threshold.
Memory Management Unit.
The method of claim 1,
The block designation unit,
Maintain two or more empty blocks in a fusion group or maintain two or more empty blocks in free block space for garbage collection and defusion operations, and pages invalidated by the TRIM instruction are ignored without copying when performing the defusion operation. doing,
Memory Management Unit.
The method of claim 1,
The block designation unit,
Considering the page invalidated by the TRIM command, the utilization rate of the fusion group is determined, and the utilization rate of the fusion group, the garbage collection cost, the average cost of the de-fusion operation, and the access operation for the fusion group and the sequential group are determined. Using the ratio to obtain the average page write cost of the memory management device,
Memory Management Unit.
The method of claim 4, wherein
The block designation unit,
Determine an optimal value of the number of blocks or valid pages in the fusion group based on the calculated average page write cost of the memory management device, and incrementally increase the number of blocks or the effective pages in the fusion group to reach the optimal value; To perform a defusion operation or a fusion operation,
Memory Management Unit.
The method of claim 5,
The block designation unit,
A safety value obtained by adding a margin δ to an optimal value of the number of blocks or pages in the fusion group so as to provide stability against changes in the workload in consideration of sudden changes in the workload and measurement errors for the memory management device. Calculate, and then gradually apply a defusion operation or a fusion operation to reach the safe value,
Memory Management Unit.
The method of claim 6,
The block designation unit,
In deriving the utilization of the garbage collection target block from the utilization of the fusion group, the reference graph derived from the standard workload is used, the difference between the actual measured value and the reference graph is measured, the correction data are obtained, and the correction data is obtained. To derive the utilization rate of the garbage collection target block,
Memory Management Unit.
The method of claim 1,
The block designation unit,
Creating a plurality of empty blocks by performing a de-fusion operation in advance in system idle time of the computing system associated with the memory management apparatus;
Memory Management Unit.
Dividing a plurality of blocks included in a nonvolatile memory into a sequential group or a fusion group based on locality of an access operation for each of the plurality of blocks;
Invalidating a page associated with the TRIM instruction when a TRIM instruction arrives for data belonging to a block included in the sequential group or a fusion group; And
Reflecting the invalidation, storing data sectors in the sequential group by a block mapping technique and in the fusion group by a page mapping technique.
Memory management method comprising a.
10. The method of claim 9,
Invalidating part or all of the pages of the sequential block due to the TRIM command and moving at least a portion of the sequential block to the fusion group when the utilization rate of the sequential block is less than or equal to a threshold;
Further comprising, a memory management method.
10. The method of claim 9,
Considering the page invalidated by the TRIM command, the utilization rate of the fusion group is determined, and the utilization rate of the fusion group, the garbage collection cost, the average cost of the de-fusion operation, and the access operation for the fusion group and the sequential group are determined. Calculating an average page write cost of the memory management device using a ratio
Further comprising, a memory management method.
The method of claim 11,
Determining an optimal value of the number of blocks or valid pages in the fusion group based on the calculated average page write cost of the memory management device; And
Performing a fusion decommissioning operation or a fusion operation so that the number of blocks or the valid pages in the fusion group reaches the optimal value
Further comprising, a memory management method.
The method of claim 12,
The determining of the optimal value may include determining an optimal value of the number of blocks or pages in the fusion group so as to provide stability against changes in the workload in consideration of sudden changes in the workload and measurement errors for the memory management apparatus. Calculate the safety value plus margin δ,
The step of performing a de-fusion operation or a fusion operation gradually includes applying a de-fusion operation or a fusion operation gradually to reach the safe value.
Memory management method.
The method of claim 13,
When deriving the utilization of the garbage collection target block from the utilization of the fusion group, the reference graph derived from the standard workload is used, the difference between the actual measured value and the reference graph is measured, the correction data are obtained, and the correction data are obtained. Deriving the utilization rate of the garbage collection target block by using a memory management method.
10. The method of claim 9,
Creating a plurality of empty blocks by performing a de-fusion operation in advance during system idle time of the computing system using the memory management method.
Further comprising, a memory management method.
A computer-readable recording medium in which a program for executing the method of any one of claims 9 to 15 is recorded.
KR1020100135998A 2010-12-27 2010-12-27 Variable space page mapping method and apparatus for flash memory device with trim command processing KR101157763B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020100135998A KR101157763B1 (en) 2010-12-27 2010-12-27 Variable space page mapping method and apparatus for flash memory device with trim command processing

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020100135998A KR101157763B1 (en) 2010-12-27 2010-12-27 Variable space page mapping method and apparatus for flash memory device with trim command processing

Publications (1)

Publication Number Publication Date
KR101157763B1 true KR101157763B1 (en) 2012-06-25

Family

ID=46689128

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020100135998A KR101157763B1 (en) 2010-12-27 2010-12-27 Variable space page mapping method and apparatus for flash memory device with trim command processing

Country Status (1)

Country Link
KR (1) KR101157763B1 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019226205A1 (en) * 2018-05-22 2019-11-28 Western Digital Technologies, Inc. Multiple sets of trim parameters
US11249897B2 (en) 2019-08-28 2022-02-15 SK Hynix Inc. Data storage device and operating method thereof

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090053901A (en) * 2006-08-04 2009-05-28 쌘디스크 코포레이션 Phased garbage collection
KR20090107098A (en) * 2008-04-08 2009-10-13 재단법인서울대학교산학협력재단 Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems
KR20100037319A (en) * 2008-10-01 2010-04-09 서울시립대학교 산학협력단 Variable space page mapping method and apparatus for flash memory device
KR100977709B1 (en) 2008-08-20 2010-08-24 주식회사 셀픽 A flash memory storage device and a manage method using the same

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20090053901A (en) * 2006-08-04 2009-05-28 쌘디스크 코포레이션 Phased garbage collection
KR20090107098A (en) * 2008-04-08 2009-10-13 재단법인서울대학교산학협력재단 Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems
KR100977709B1 (en) 2008-08-20 2010-08-24 주식회사 셀픽 A flash memory storage device and a manage method using the same
KR20100037319A (en) * 2008-10-01 2010-04-09 서울시립대학교 산학협력단 Variable space page mapping method and apparatus for flash memory device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019226205A1 (en) * 2018-05-22 2019-11-28 Western Digital Technologies, Inc. Multiple sets of trim parameters
US10705758B2 (en) 2018-05-22 2020-07-07 Western Digital Technologies, Inc. Multiple sets of trim parameters
US11416175B2 (en) 2018-05-22 2022-08-16 Western Digital Technologies, Inc. Multiple sets of trim parameters
US11907583B2 (en) 2018-05-22 2024-02-20 Western Digital Technologies, Inc. Multiple sets of trim parameters
US11249897B2 (en) 2019-08-28 2022-02-15 SK Hynix Inc. Data storage device and operating method thereof

Similar Documents

Publication Publication Date Title
KR100965051B1 (en) Variable space page mapping method and apparatus for flash memory device
US10713161B2 (en) Memory system and method for controlling nonvolatile memory
US11474702B2 (en) Storage device that writes data from a host during garbage collection
US10789162B2 (en) Memory system and method for controlling nonvolatile memory
US11893238B2 (en) Method of controlling nonvolatile semiconductor memory
US11355197B2 (en) Memory system with nonvolatile cache and control method thereof
KR101553532B1 (en) Storage device
US20150127889A1 (en) Nonvolatile memory system
JP2020529679A (en) Extending SSD lifespan
KR101017067B1 (en) Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems
WO2017022082A1 (en) Flash memory package and storage system including flash memory package
KR101456370B1 (en) Method and device for management of storage
KR101157763B1 (en) Variable space page mapping method and apparatus for flash memory device with trim command processing
US11972143B2 (en) Techniques for balancing write commands on solid state storage devices (SSDs)
JP6721765B2 (en) Memory system and control method
US12019872B2 (en) Storage device that writes data from a host during garbage collection
JP6666405B2 (en) Memory system and control method
JP6552701B2 (en) Memory system and control method

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20150611

Year of fee payment: 4

FPAY Annual fee payment

Payment date: 20160503

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20180530

Year of fee payment: 7