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

Abstract
Provided are a storage apparatus using a non-volatile memory as a cache and a method of operating the same, in which the non-volatile memory is used as the cache so as to preserve data even when electricity is interrupted. The storage apparatus using a non-volatile memory as a cache includes a main storage medium, the non-volatile memory being used as the cache of the main storage medium and having a stationary region and a non-stationary region divided according to whether data are fixed, and a block management unit managing blocks allocated in the non-volatile memory.
Description

BRIEF DESCRIPTION OF THE DRAWINGS

The above and other aspects of the present invention will be more apparent from the following detailed description of exemplary embodiments taken in conjunction with the accompanying drawings, in which:



FIG. 1 is a block diagram illustrating a related art storage apparatus;



FIG. 2 is a block diagram illustrating a storage apparatus using a non-volatile memory as a cache according to an exemplary embodiment of the present invention;



FIG. 3 is a view showing regions of the non-volatile memory converted in a circular formation according to an exemplary embodiment of the present invention;



FIG. 4 is a view showing a non-stationary region allocated in a rotary block shape according to an exemplary embodiment of the present invention;



FIG. 5A is a view showing the regions of the non-volatile memory according to an exemplary embodiment of the present invention, in which a first A point moves into the non-stationary region when blocks in a stationary region are retrieved;



FIG. 5B is a view showing the regions of the non-volatile memory according to an exemplary embodiment of the present invention, in which activated data are moved from the first A point to a first B point when the blocks in the stationary region are retrieved;



FIG. 5C is a view showing the regions of the non-volatile memory according to an exemplary embodiment of the present invention, in which the activated data are sequentially moved to a point beginning from the first B point to a first B ending point in a block when the blocks in the stationary region are retrieved;



FIG. 5D is a view showing the regions of the non-volatile memory according to an exemplary embodiment of the present invention, in which the first A point moves to the first B point, and a first A ending point to the first B ending point when the blocks in the stationary region are retrieved;



FIG. 6A is a view showing the regions of the non-volatile memory according to an exemplary embodiment of the present invention, in which a second A starting point moves to a first B point in the stationary region when the blocks in the stationary region are retrieved;



FIG. 6B is a view showing the regions of the non-volatile memory according to an exemplary embodiment of the present invention, in which the activated data are sequentially moved from the second B starting point when the blocks in the non-stationary region are retrieved;



FIG. 7 is a view showing the regions of the non-volatile memory according to an exemplary embodiment of the present invention, in which a scanning direction is indicated when power failure is recovered;



FIG. 8 is a flowchart illustrating a method of allocating the blocks of the non-volatile memory according to an exemplary embodiment of the present invention;



FIG. 9 is a flowchart illustrating a method of retrieving the blocks with respect to the stationary region of the non-volatile memory according to an exemplary embodiment of the present invention; and



FIG. 10 is a flowchart illustrating a method of retrieving the blocks with respect to the non-stationary region of the non-volatile memory according to an exemplary embodiment of the present invention.


Claims
  • 1. A storage apparatus comprising: a main storage medium;a non-volatile memory which operates as a cache of the main storage medium, the non-volatile memory comprising a stationary region and a non-stationary region, which are divided according to whether data are fixed; anda block management unit which manages blocks allocated in the non-volatile memory.
  • 2. The storage apparatus of claim 1, wherein the block management unit converts and manages the stationary and non-stationary regions of the non-volatile memory into a circular configuration in which two points are set to distinguish the stationary region and the non-stationary region from each other.
  • 3. The storage apparatus of claim 2, wherein the two points comprises a first point at which allocation of the blocks starts in the stationary and non-stationary regions, and a second point at which the allocation of the blocks ends.
  • 4. The storage apparatus of claim 3, wherein the first point coincides with a point which indicates a block where activated data is firstly located, or a point which indicates the stationary and non-stationary regions start in opposite directions on the circular configuration.
  • 5. The storage apparatus of claim 3, wherein the block management unit comprises: a block allocation unit which allocates the blocks to the stationary region and the non-stationary region;a block retrieving unit which retrieves the allocated blocks;a control unit which controls a wear level of the blocks in the non-volatile memory; anda memory recovery unit which recovers the non-volatile memory when a supply of electricity is interrupted.
  • 6. The storage apparatus of claim 5, wherein the block allocation unit sequentially allocates the blocks to the stationary and non-stationary regions in opposite directions of the circular configuration based on the first point.
  • 7. The storage apparatus of claim 6, wherein the block allocation unit allocates the blocks to the non-stationary region so that the blocks circulate around the two points in the non-stationary region.
  • 8. The storage apparatus of claim 6, wherein the block allocation unit sets the second point so that the second point indicates a position of a block lastly allocated when the blocks are allocated.
  • 9. The storage apparatus of claim 5, wherein the block retrieving unit moves the first point at which the allocation of the blocks starts in the stationary region to the non-stationary region by a number of blocks and sequentially moves the data when the blocks are retrieved from the stationary region.
  • 10. The storage apparatus of claim 9, wherein the block retrieving unit moves the second point so that the second point indicates a position of a block lastly allocated into a position to which the block finally moves when the blocks are retrieved.
  • 11. The storage apparatus of claim 10, wherein the block retrieving unit moves the first point at which the allocation of the blocks starts in the stationary region only if activated data exists in a block located at the first point at which the allocation of the blocks starts in the stationary region.
  • 12. The storage apparatus of claim 5, wherein the block retrieving unit moves the first point at which the allocation of the blocks starts in the non-stationary region to the stationary region by a number of blocks and sequentially moves the data when the blocks are retrieved from the non-stationary region.
  • 13. The storage apparatus of claim 12, wherein the block retrieving unit moves the second point so that the second point indicates a position of a block lastly allocated into a position to which the block finally moves when the blocks are retrieved.
  • 14. The storage apparatus of claim 13, wherein the block retrieving unit moves the first point at which the allocation of the blocks starts in the non-stationary region only if activated data exists in a block located at the first point at which the allocation of the blocks starts in the non-stationary region.
  • 15. The storage apparatus of claim 5, wherein the memory recovery unit records a recovery mark next to the second point to which a block is lastly allocated in the stationary and non-stationary regions.
  • 16. The storage apparatus of claim 15, wherein the memory recovery unit sequentially scans the stationary and non-stationary regions from the first point until the recovery mark is found.
  • 17. The storage apparatus of claim 16, wherein the memory recovery unit generates a desired block through scanning so as to create an address-conversion table through a logic block address (LBA) corresponding to the block.
  • 18. The storage apparatus of claim 17, wherein if blocks having an identical LBA exist, the memory recovery unit determines that data in a lastly used block among the blocks having the identical LBA is an activated data.
  • 19. A method of operating a storage apparatus, the method comprising: dividing a non-volatile memory used as a cache in the storage apparatus into a stationary region and a non-stationary region according to whether data are fixed; andmanaging blocks allocated to the stationary and non-stationary regions.
  • 20. The method of claim 19, wherein the managing of the blocks comprises: converting the stationary and non-stationary regions of the non-volatile memory into a circular configuration; andsetting two points in the circular configuration in order to distinguish the stationary and non-stationary regions from each other.
  • 21. The method of claim 20, wherein the two points comprises a first point at which allocation of the blocks starts in the stationary and non-stationary regions, and a second point at which the allocation of the blocks ends.
  • 22. The method of claim 21, wherein the first point coincides with a point which indicates a block where activated data is firstly located, or a point which indicates the stationary and non-stationary regions start in opposite directions on the circular configuration.
  • 23. The method of claim 19, wherein the managing of the blocks comprises: allocating the blocks to the stationary region and the non-stationary region;retrieving the allocated blocks;controlling a wear level of the blocks in the non-volatile memory; andrecovering the non-volatile memory when a supply of electricity is interrupted.
  • 24. The method of claim 23, wherein the allocating of the blocks comprises sequentially allocating the blocks to the stationary and non-stationary regions in opposite directions on the circular configuration based on the first point.
  • 25. The method of claim 24, wherein the allocating of the blocks comprises allocating the blocks to the non-stationary region so that the blocks circulate around the two points in the non-stationary region.
  • 26. The method of claim 25, wherein the allocating of the blocks comprises setting the second point so that the second point indicates a position of a block lastly allocated when the block are allocated.
  • 27. The method of claim 23, wherein the retrieving of the allocated blocks comprises moving the first point at which the allocation of the blocks starts in the stationary region to the non-stationary region by a number of blocks and sequentially moving the data when the block is retrieved from the stationary region.
  • 28. The method of claim 27, wherein the retrieving of the allocated blocks comprises moving the second point so that the second point indicates a position of a block lastly allocated into a position to which the block finally moves when the blocks are retrieved.
  • 29. The method of claim 28, wherein the moving of the first point occurs only if activated data exists in a block located at the first point at which the allocation of the blocks starts in the stationary region.
  • 30. The method of claim 28, wherein the retrieving of the allocated blocks comprises moving the first point at which the allocation of the blocks starts in the non-stationary region to the stationary region by a number of blocks and sequentially moving the data when the blocks are retrieved from the non-stationary region.
  • 31. The method of claim 30, wherein the retrieving of the allocated blocks comprises moving the second point so that the second point indicates a position of a block lastly allocated to a position to which the block finally moves when the blocks are retrieved.
  • 32. The method of claim 31, wherein the moving of the first point occurs only if activated data exists in a block located at the first point at which the allocation of the blocks starts in the non-stationary region.
  • 33. The method of claim 23, wherein the recovering of the non-volatile memory comprises recording a recovery mark next to the second point to which a block is lastly allocated in the stationary and non-stationary regions.
  • 34. The method of claim 33, wherein the recovering of the non-volatile memory comprises sequentially scanning the stationary and non-stationary regions from the first point until the recovery mark is found.
  • 35. The method of claim 34, wherein the recovering of the non-volatile memory comprises generating a desired block through scanning so as to create an address conversion table through a logic block address (LBA) corresponding to the block.
  • 36. The method of claim 35, wherein if blocks having an identical LBA exist, the recovering of the non-volatile memory comprises determining that data in a lastly used block among the block having the identical LBA is an activated data.
Priority Claims (1)
Number Date Country Kind
10-2005-0130822 Dec 2005 KR national