1. Field of the Invention
The present invention relates to a storage device; in particular, to a hybrid density memory system and control method thereof.
2. Description of Related Art
Non-volatile memory is applied on various data storage applications; taking Flash memory for example, it is commonly used as a storage device such as memory card, USB interface, thumb disc, solid state drive etc.
Refer initially to
Since the range of the said logical address and physical address may be extremely wide, it could be thus time-consuming to convert the logical address into the specific physical address; as a result, currently available memory system 13 employs the concept of segmentation to divide the storage module 131 into a plurality of physical segments, and the storage space provided inside the host 11 is also partitioned into a plurality of one-to-one corresponding logical segments, with each physical segment further consisting of multiple blocks, each physical block yet further including multiple addresses, such that it is possible to use the block as a unit to map between the logical and physical addresses, further providing convenient management of storage space in the memory.
Refer now to
In the memory system 13 there stores a Logical/Physical Mapping Table (L2P Mapping Table) in the free block, which records the conversion correspondence between the physical block and the logical block in each physical segment; in practice, the logical segment LS0 records logical addresses 0˜63999, which is divided into 250 logical blocks (LBA=0˜249), the L2P Mapping Table records the correspondence between the 250 logical blocks and the physical blocks PBA=0˜255. Hence, through the L2P Mapping Table, it may quickly map the logical address to the correct physical address.
From the aforementioned descriptions, it can be seen that, although the number of memory unit conversions is reduced thanks to the concept of segmentation, avoiding the requirement for providing large amount of storage space to store the L2P Mapping Table, however, an effective method of data allocation for current hybrid memory system architecture consisting of high density memory and low density memory is unfortunately not provided. Since the high density memory and the low density memory respectively has different numbers of erasure endurance, if data is simply arbitrarily allocated in these two types of memories, it tends to cause uneven number of erasure endurances in these two types of memories. As a result, it is inevitable to encounter a situation that the memory of one density may reach first the limit for its number of endurance, while the other one is still usable, thus causing undesirable early ending of lifespan in the storage device.
Accordingly, the present invention provides a control method for hybrid density memory system which allocates data at the memory of different density based on data properties, and also provides an effective management method for data storage in the hybrid density memory, so as to achieve the objective of wear-leveling, improving lifespan of the memory system.
Therefore, the objective of the present invention is to provide a hybrid density memory system and control method thereof, allowing to achieve the objective of wear-leveling in allocating user data to the memory, so as to further increase memory system lifespan and prevent unnecessary waste of storage resources.
Another objective of the present invention is to provide a hybrid density memory system and control method thereof, enabling effective management of the memory data in allocating user data to the memory, further enhancing the data storage performance of the memory system.
The present invention also discloses a hybrid density memory system which is applicable to allow a host to access user data. The said hybrid density memory system comprises a storage module and control module. The addressing interval in the control module regarding to the host accessing the user data consists of a plurality of logical units. The storage module consists of a high density memory unit formed by high density memories and a low density memory unit formed by low density memories, wherein the high density memory unit is divided into a plurality of physical units as the storage space to facilitate one-to-one correspondence with such logical units, with each physical unit including a plurality of physical blocks. The control module is coupled between the host and the storage module, used to transfer the user data to the high density memory unit or the low density memory unit based on the properties of the user data.
In one embodiment of the present invention, the said logical unit is a logical segment, while the physical unit is a physical segment. Meanwhile, each physical unit has a Segment Table indicating the allocation information about the included physical blocks therein. The Segment Table particularly has an update field indicating the address in the low density memory unit for accessing the user data.
In one embodiment of the present invention, the said low density memory unit has a Low Density Memory table (LDM table) indicating the allocation information about the storage space in the low density memory unit; and the address of the LDM table is recorded in the Segment Table.
The present invention also discloses a control method for the hybrid density memory system applicable for user data access between a host and the hybrid density memory system, wherein the host has a plurality of logical units as the storage space for user data accesses, and the hybrid density memory system has a high density memory unit and a low density memory unit, which high density memory unit providing a plurality of physical units as the storage space to one-to-one correspond to the logical units, each physical unit including a plurality of physical blocks. The steps for the said control method comprise, initially, providing a Low Density Memory table (LDM table) in the hybrid density memory system to record the allocation information about the storage space of the low density memory unit; secondly, transferring the user data to the high density memory unit or the low density memory unit based on the properties of the user data and the contents of the LDM table.
Through the aforementioned technical solutions, the present invention is able to allocate the data to suitable memory space according to the properties of data, recycling the use of the storage space mechanism, further providing the effect of wear-leveling
The summary illustrated hereinbefore as well as the following detailed descriptions and appended drawings are all for further setting forth the measures, means and effects taken by the present invention to achieve the prescribed objectives. Other purposes and advantages related to the present invention will be thoroughly explained in the subsequent descriptions and appended drawings as well.
The present invention provides a hybrid density memory system and control method thereof, which, under the architecture of segmented memory management, is allowed to allocate the user data to low density memory or the high density memory based on the properties of the user data, and also provides a method for processing the data allocated to these two types of memories as well as a mechanism for wear-leveling, so as to improve the effectiveness of use and lifespan in the hybrid density memory system.
The essential technical characteristics of the present invention lie in the control method for wear-leveling operations in the hybrid density memory system and the memory system architecture employing the disclosed method; while the following texts provide the necessary internal system architecture and operation flows thereof, those skilled ones in the art can, however, appreciate that, except the said elements illustrated hereinafter, the memory system may certainly comprise other required components as desired. Therefore, it is not intended to be limited by the disclosed embodiments of the present invention.
Initially, refer to
The memory system 33 comprises a storage module 331 and a control module 333. The storage module 331 consists of a high density memory unit 3311 formed by high density memories and a low density memory unit 3313 formed by low density memories for storing the user data; the control module 333 is coupled between the host 31 and the storage module 331 to receive the command issued by the host 31. Herein the operation modes of the host 31 include a read mode and a write mode, respectively issuing a read command and a write command to the memory system 33, in which the write command writes the user data corresponding to a logical address to the storage module 331, and the read command reads out the user data corresponding to a logical address from the storage module 331.
In one embodiment according to the present invention, the said storage module 331 is composed of non-volatile memories, herein the low density memory unit 3313 may be Single-Level Cell (SLC) memory, Phase-Changed Memory (PCM), free Ferro-electronic Random Access Memory (FeRAM) or Magnetic Random Access Memory (MRAM); the high density memory unit 3311 may be Multi-Level Cell (MLC) memory.
To further understand the correspondence of the logical/physical address conversion, reference can be made to
The storage module 331 further retains at least two physical blocks to individually store a boot file 431 and a master table 433. The boot file 431 records required information for startup of the memory system 33, such as firm image, vendor information and so on; meanwhile the master table 433 records the mapping relationship of the logical segment LSi and the physical segment PSi. Referring conjunctively to
As illustrated in
The start block field 53 and the length field 54 respectively indicates the start block address and the segment length of each physical segment PSi, in which the start block address and the segment length may be flexibly modified based on the status (e.g. number of bad blocks) of each physical block in the physical storage space 43, such that each physical segment PSi has a certain number of free blocks.
Each physical segment PSi has a Segment Table 6 indicating the correspondence between the physical block PBAi included in each physical segment PSi and the logical block as well as allocation information; the contents recorded in the segment table offset field 55 indicate the physical block address storing each Segment Table.
The wear-off rate field 56 records the extent of wear-off of the physical segment PSi, and the control module 333 adjusts the correspondence between the physical segment PSi and the logical segment LSj in accordance with the extent of wear-off in the physical segment PSi, and then records the adjusted information in the field of the relational segment 57.
In one embodiment of the present invention, the storage module 331 retains two physical blocks PBA1, PBA2 to store the master table 433, and the physical block PBA1 is further divided into 64 physical pages Page0˜Page63. The master table 433 is initially stored in the Page0 in the physical block PBA1 and written in unit of the physical page Pagei. When the contents of the master table 433 are updated, the updated master table 433 is sequentially stored in the Page1 and so on, until the physical page Page63 is reached, then the physical page Page0 in the physical block PBA2 is sequentially used to store the updated master table 433 therein and the physical block PBA1 is erased as well; then, upon writing to the physical page Page63, it turns back to use the physical block PBA1 to store the updated master table 433. Thus, by repeating the aforementioned operations, the contents of the master table 433 can be maintained with such a cyclic storage mechanism.
Next, refer now to
The allocated flag field 62 is used to indicate whether the physical block has been allocated to access the user data; the alternate segment flag field 64 is used to indicate whether to adjust the physical address of the user data or not, and in case that the data in the alternate segment flag field 64 is set to be 1, it means it is required to access the user data stored in another physical segment; otherwise, indicating to access the user data in the current physical segment. The PBA offset field 66 is used to indicate the physical block address for accessing the user data; the update field 68 is used to indicate the address of the user data in the low density memory unit 3313.
The first head pointer register 63 and the first tail pointer register 65 are used to instruct the allocation condition of physical blocks in any physical segment, in which data will be sequentially written in the physical block to which the first head pointer register 63 points, and also sequentially erased from the physical block to which the first tail pointer register 65 points, thereby recording data in a fashion of storage space cyclic allocation.
In a hybrid density memory system, frequently accessed and updated data (also referred as hot data) will be allocated at the low density memory to enable fast access; contrarily, less frequently used non-hot data (also referred as cold data) allocated to the high density memory. Since length of the data frequently occurring is generally shorter, in one embodiment of the present invention, the length of the user data is compared with a threshold to determine the properties of the user data; suppose the threshold is set to be 4 KB, then the user data of less than 4 KB should be allocated to the low density memory unit 3313; otherwise, it is to be allocated to the high density memory unit 3311.
Refer now to
As shown in
In practice, suppose there is data in a physical block (128 KB in size for example), 4 KB of the said data is frequently updated, thus the frequently updated data will be allocated in at least one physical page Pagei within the low density memory unit 3313 in unit of the physical page, while the rest 124 KB of less frequently updated data is still allocated in the high density memory unit 3311. Herein the allocated state field 72 storing the user data is set to be 1, and the corresponding allocated address field 74 is the physical page address storing the user data. In case that it is to read the data, it first locates the corresponding physical segment PSi of the data from the master table 433, reading out the 124 KB data contents stored in the high density memory unit 3311, and then querying, from the Segment Table 6 in the physical segment PSi, whether the update field 68 of the data points to any update information field Ui in the LDM table 7, further finding the address allocated with the user data to read out the remaining 4 KB user data. Conversely, if the value in the update field 68 is greater than the number of update information fields Ui (128 update information fields Ui in the present example), it indicates that the data is entirely allocated to the high density memory unit 3311, and none is allocated to the low density memory unit 3313.
The second head pointer register 73 and the second tail pointer register 75 are used to indicate the allocation condition of the hot physical block in the low density memory unit 331, in which the data will be written sequentially in the hot physical block to which the second head pointer register 73 points and also erased sequentially from the hot physical block to which the tail pointer register 75 points, thereby recording data in a fashion of storage space cyclic allocation.
In order to further understand the way of processing the data access in the low density memory unit 3313, refer now conjunctively to
As shown in
Subsequently, as shown in
As shown in
It is particularly noted that, in one embodiment of the present invention, the LDM table 7 is stored in one hot physical block HPBAi and written in the hot physical block HPBAi sequentially in unit of physical page, which is similar to the update mode of the master table 433; when the hot physical block HPBAi is entirely filled, it will look for another available hot physical block HPBAj (i≠j) to continue to write, and erase the originally stored hot physical block HPBAi. As shown in
Through the aforementioned concept, data and the Segment Table 6 may be also allocated sequentially and in a cyclic fashion in the high density memory unit 3311 by means of adjusting the first head pointer register 63 and the first tail pointer register 65.
The above-said threshold and recycling threshold can be user-defined settings, or determined by the memory system 33 based on the data processing conditions.
Refer now to
initially, it provides a Low Density Memory table (LDM table) 7 in the hybrid density memory system 33 (STEP S101); upon reception of an access command to perform an access operation on a user data (STEP S103), the control module 333 first determines whether the access command is a write command (STEP S105); if no, then it indicates the access command is a read command, and converts the logical address of the user data into a logical segment (STEP S107); next, the control module 333 locates a corresponding physical segment of the acquired logical segment from the master table 433 and finds the physical block address where the Segment Table 6 of the physical segment is stored from the Segment Table offset field 55 (STEP S109);
subsequently, it determines whether the user data intended to be read is partially stored in the low density memory unit 3313 (STEP S111), which is determined through the value in the update field 68; if the value in the update field 68 is greater than 127 (not restrictive), indicating the user data is wholly stored in the high density memory unit 3311, thus the user data is read from the high density memory unit 3311 (STEP S113) and then transferred to the host 31 (STEP S121);
suppose the determination in STEP S111 is yes, then control module 333 points to any one of update information fields Ui in the LDM table 7 based on the update field 68, then reads the user data from the hot physical block in the low density memory unit 3313 to which the update information fields Ui points (STEP S115); and, after the rest of the user data being reading out from the high density memory unit 3311 (STEP S117), such acquired user data stored in these two densities of memories are combined (STEP S119) and finally transferred to the host 31 (STEP S121);
however, if the received access command is determined to be a write command in (STEP S105), then it determines whether the data length of the user data is smaller than a threshold (STEP S123); if not, it indicates that the user data is not hot data, which should be allocated in the high density memory unit 3311, thus first converting the logical address of the user data into the logical segment (STEP S125), and locating the corresponding physical segment of the acquired logical segment from the master table 433 (STEP S127), subsequently placing the user data in the appropriate physical block in the physical segment (STEP S129); finally, the Segment Table 6 and the master table 433 are updated based on the information adjusted during the process of the user data allocation;
if the determination in STEP S123 is yes, which indicates the user data is hot data, then the data is to be allocated in the low density memory unit 3313, thus it first causes the second head pointer register 73 to point to the next hot physical block from the current one (STEP S133), then writes the user data in the hot physical block to which the second head pointer register 73 points (STEP S135), and updates the contents of the LDM table 7 and the Segment Table 6 (STEP S137) based on the parameters modified by the aforementioned operations (e.g. the value in the second head pointer register 73); finally, it determines whether the range of the valid blocks in the low density memory unit 3313 exceeds a recycling threshold (STEP S139), if not, then continue to execute the STEPS 103 to access the next user data; otherwise, execute a block recycling process (STEPS 141).
Finally, refer to
after execution of the operation flow shown in
if the determination in STEP S201 is yes, then the control module 333 locates the logical address of the valid data (STEP S207), and finds the corresponding physical block of the logical address in the high density memory unit 3311 (STEP S209), in order to acquire the address of the rest of the valid data stored in the high density memory unit 3311; subsequently, the valid data stored in the high density memory unit 3311 and in the low density memory unit 3313 is combined (STEP S211), and the combined valid data is entirely stored in another available physical block (STEP S213); next, it erases the physical block originally storing the valid data (STEP S215), and updates the Segment Table 6 and the master table 433 based on the parameters modified by the aforementioned operations (STEP S217);
finally, it erases the hot physical block to which the second tail pointer register 75 points and causes the second tail pointer register 75 to point to the next hot physical block from the current one, then updates the LDM table 7 based on the parameters modified by the aforementioned operations (STEP S223), thereby completing the method.
In this way, the frequently access portion of the data can be allocated in the low density memory unit 3313, while the rest portion thereof is alternatively stored in the high density memory unit 3311, thereby enabling data access among these two densities of memories through a series of indirect addressing operations.
With the details descriptions for the embodiments illustrated hereinbefore, it can be appreciated that the hybrid density memory system and control method thereof according to the present invention can, under the adjustable segmented memory structure, provide the data process method through the LDM table to manage the allocation of low density memory unit, so as to control the accesses of user data among different densities of memories. The present invention has the following advantages:
1. it manages the allocation position based on the properties of the user data, thereby fully exploiting the features of the two types of memories for data process, effectively improving the performance of the hybrid density memory system;
2. the user data is allocated sequentially and cyclically in the low density memory; the physical block in the high density memory adjusts the correspondence with the logical segment also based on the extent of wear-off, and data is allocated sequentially and cyclically in each physical segment as well, thereby achieving the objective of wear-leveling, effectively enhancing the lifespan of the hybrid density memory system;
3. data having not been updated for a long time in the low density memory will be re-written in the high density memory through the block recycling process, such that what stored in the low density memory is surely the most recent and most commonly employed user data, thereby, without application of algorithms like Least Recently Used (LRU) or Least Frequently Used (LFU), it can still provide efficient data processes.
The aforementioned disclosure simply sets forth the detailed descriptions and appended drawings of the embodiments according to the present invention, rather than being used to limit the present invention; the scope of the present invention should be based on the following claims, and all changes or modifications that those skilled ones in the art can conveniently consider in the field of the present invention should be deemed as being encompassed within the scope of the present invention delineated by the following claims.
Number | Date | Country | Kind |
---|---|---|---|
97137700 | Oct 2008 | TW | national |