Storage apparatus using non-volatile memory as cache and method of managing the same

Information

  • Patent Application
  • 20070150654
  • Publication Number
    20070150654
  • Date Filed
    November 20, 2006
    18 years ago
  • Date Published
    June 28, 2007
    17 years ago
Abstract
A storage apparatus using a non-volatile memory, which retains data even after power interruption, as its cache and a method of managing the same are provided. The storage apparatus includes a main storage medium, a non-volatile memory used as a cache of the main storage medium, a region of the non-volatile memory being divided into a fixed region and a non-fixed region according to whether or not data is fixed, and a block management unit managing physical blocks by means of virtual addresses, the physical blocks being allocated to the non-volatile memory.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The above aspects of the present invention, and others, will become more apparent from the following detailed description with reference to the accompanying drawings, in which:



FIG. 1 shows a conventional storage apparatus;



FIG. 2 shows a storage apparatus using a non-volatile memory as its cache according to an exemplary embodiment of the present invention;



FIG. 3 shows a virtual block address space according to an exemplary embodiment of the present invention;



FIG. 4 shows an allocated block list and a free block list according to an exemplary embodiment of the present invention;



FIG. 5 shows a block mapping table according to an exemplary embodiment of the present invention;



FIG. 6 shows an allocated block list, a free block list, and a block mapping table, before blocks are collected, according to an exemplary embodiment of the present invention;



FIG. 7 shows an allocated block list, a free block list, and a block mapping table, after blocks are collected, according to an exemplary embodiment of the present invention;



FIG. 8 shows an allocated block list, a free block list, and a block mapping table, before a bad block is processed, according to an exemplary embodiment of the present invention;



FIG. 9 shows an allocated block list, a free block list, and a block mapping table, after a bad block is processed, according to an exemplary embodiment of the present invention;



FIG. 10 shows a method of allocating blocks according to an exemplary embodiment of the present invention;



FIG. 11 shows a method of collecting blocks according to an exemplary embodiment of the present invention;



FIG. 12 shows a method of processing a bad block according to an exemplary embodiment of the present invention; and



FIG. 13 shows a method of recovering from power interruption according to an exemplary embodiment of the present invention.


Claims
  • 1. A storage apparatus comprising: a main storage medium;a non-volatile memory, which is used as a cache of the main storage medium, wherein a region of the non-volatile memory is divided into a fixed region and a non-fixed region according to whether or not data is fixed; anda block management unit which manages physical blocks using virtual addresses, wherein the physical blocks are allocated to the non-volatile memory.
  • 2. The storage apparatus of claim 1, wherein the block management unit comprises: a block allocation unit, which allocates physical blocks to the non-volatile memory;a block collection unit, which collects the physical blocks allocated to the non-volatile memory;a bad block management unit, which manages a bad block;a power interruption recovery unit, which restores the storage apparatus in case of power interruption;a block mapping table management unit, which manages a block mapping table indicating a mapping relationship between physical block numbers and virtual block numbers that are allocated to the physical block numbers; anda list storage unit, which stores an allocated block list enumerating allocated physical blocks and a free block list enumerating vacant physical blocks.
  • 3. The storage apparatus of claim 2, wherein the block allocation unit is adapted to allocate a foremost physical block on the free block list to the fixed region or to the non-fixed region.
  • 4. The storage apparatus of claim 3, wherein the free block list enumerates vacant physical blocks in order of increasing wear level.
  • 5. The storage apparatus of claim 3, wherein the block allocation unit is adapted to position the physical block at an end of the allocated block list.
  • 6. The storage apparatus of claim 5, wherein the block mapping table management unit is adapted to store a block mapping table having virtual block numbers, which are allocated to physical block numbers that are enumerated in the allocated block list and to physical block numbers that are enumerated in the free block list, and wherein the block mapping table management unit allocates a virtual block number to a last physical block number on the allocated block list so that the block mapping table is updated.
  • 7. The storage apparatus of claim 2, wherein the block collection unit is adapted to count effective pages of respective physical blocks on the allocated block list, and wherein the block collection unit performs block collection beginning with a physical block having a smallest number of effective pages.
  • 8. The storage apparatus of claim 7, wherein the block collection unit is adapted to position a physical block at an end of the allocated block list, and wherein the block collection unit moves effective pages in a physical block due for block collection to the physical block at the end of the allocated block list.
  • 9. The storage apparatus of claim 8, wherein the block collection unit is adapted to add a physical block to the free block list according to a wear level when the physical block due for block collection is vacant after effective pages are moved out.
  • 10. The storage apparatus of claim 2, wherein the bad block management unit is adapted to move data out of a physical block on the allocated block list when the physical block comprises a bad block, to a physical block which is newly allocated from the free block list, and wherein the physical block comprising the bad block is exempted from allocation.
  • 11. The storage apparatus of claim 10, wherein the bad block management unit is adapted to insert the physical block which is newly allocated from the free block list into a previous position of the physical block comprising the bad block, and wherein the block mapping table management unit is adapted to allocate a virtual block number to a physical block number of the physical block which is inserted,wherein the allocated virtual block number was previously allocated to the physical block comprising the bad block.
  • 12. The storage apparatus of claim 2, wherein the power interruption recovery unit is adapted to extract the allocated block list and to restore the block mapping table in case of power interruption.
  • 13. A method of managing a storage apparatus, the method comprising: dividing a region of a non-volatile memory, which is used as a cache of a main storage medium, into a fixed region and a non-fixed region according to whether data is fixed or non-fixed; andmanaging physical blocks allocated to the fixed region and allocated to the non-fixed region using virtual addresses which are allocated to the physical blocks, respectively.
  • 14. The method of claim 13, wherein the managing the physical blocks comprises: allocating physical blocks to the non-volatile memory;collecting the physical blocks allocated to the non-volatile memory;managing a bad block;recovering from power interruption;managing a block mapping table which indicates a mapping relationship between physical block numbers and virtual block numbers allocated to the physical block numbers;storing an allocated block list which enumerates allocated physical blocks; andstoring a free block list which enumerates vacant physical blocks.
  • 15. The method of claim 14, wherein the allocating physical blocks comprises allocating a foremost physical block on the free block list to the fixed region or to the non-fixed region.
  • 16. The method of claim 15, wherein the free block list enumerates vacant physical blocks in order of increasing wear level.
  • 17. The method of claim 15, wherein the allocating physical blocks comprises positioning the physical block at an end of the allocated block list.
  • 18. The method of claim 17, wherein the managing a block mapping table comprises: storing a block mapping table having virtual block numbers, which are allocated to physical block numbers that are enumerated in the allocated block list and to physical block numbers that are enumerated in the free block list; andallocating a virtual block number to a last physical block number on the allocated block list so that the block mapping table is updated.
  • 19. The method of claim 14, wherein the collecting the physical blocks comprises: counting effective pages of respective physical blocks on the allocated block list; andperforming block collection beginning with a physical block having a smallest number of effective pages.
  • 20. The method of claim 19, wherein the collecting the physical blocks comprises: positioning a physical block at an end of the allocated block list, and moving effective pages in a physical block due for block collection to the physical block at the end of the allocated block list.
  • 21. The method of claim 20, wherein the collecting the physical blocks comprises adding a physical block to the free block list according to a wear level when the physical block due for block collection is vacant after effective pages are moved out.
  • 22. The method of claim 14, wherein the managing a bad block comprises: moving data out of a physical block on the allocated block list when the physical block comprises a bad block, to a physical block which is newly allocated from the free block list; andexempting the physical block comprising the bad block being from allocation.
  • 23. The method of claim 22, wherein the managing a bad block comprises: inserting the physical block which is newly allocated from the free block list into a position of the physical block comprising the bad block; andallocating a virtual block number to a physical block number of the physical block which is inserted,wherein the allocated virtual block number was previously allocated to the physical block comprising the bad block.
  • 24. The method of claim 14, wherein the recovering from power interruption comprises: extracting the allocated block list; andrestoring the block mapping table in case of power interruption.
Priority Claims (1)
Number Date Country Kind
10-2005-0130795 Dec 2005 KR national