CN101777026A - Memory management method, hard disk and memory system - Google Patents

Memory management method, hard disk and memory system Download PDF

Info

Publication number
CN101777026A
CN101777026A CN200910003060A CN200910003060A CN101777026A CN 101777026 A CN101777026 A CN 101777026A CN 200910003060 A CN200910003060 A CN 200910003060A CN 200910003060 A CN200910003060 A CN 200910003060A CN 101777026 A CN101777026 A CN 101777026A
Authority
CN
China
Prior art keywords
blank block
group
data
erasable number
obtains
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN200910003060A
Other languages
Chinese (zh)
Other versions
CN101777026B (en
Inventor
柯乔
张宗全
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Huawei Symantec Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huawei Symantec Technologies Co Ltd filed Critical Huawei Symantec Technologies Co Ltd
Priority to CN2009100030608A priority Critical patent/CN101777026B/en
Publication of CN101777026A publication Critical patent/CN101777026A/en
Application granted granted Critical
Publication of CN101777026B publication Critical patent/CN101777026B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The embodiment of the invention discloses a memory management method, comprising the following steps: during idle time, checking a grouping information sheet and an erasable count table, judging whether to trigger a consumption balance strategy and if the consumption balance strategy is needed to be triggered, inserting a recycled blank block in an unordered queue; and during data write operation time, obtaining the blank block from the unordered queue and writing data in the obtained blank block. The invention also discloses a hard disk and a memory system. The embodiment of the invention can be used for recycling the blank block with large time-consuming amount in idle time of the system, thereby being favor of saving data write cost.

Description

A kind of memory management method, hard disk and storage system
Technical field
The present invention relates to technical field of memory, particularly relate to a kind of memory management method, hard disk and storage system.
Background technology
SSD (solid state disk, solid state hard disc) comprises control module and storage unit, storage unit can adopt non-volatile Flash (flash memory) chip to constitute, also can adopt SDRAM (synchronousdynamic random access memory, the synchronous dynamic random-access memory body), SSD has that readwrite performance is good, shock resistance is strong and the advantage of conserver power source, has purposes widely.
The flash memory solid state hard disc can be divided into two kinds of SLC (Single level cell, single-layer type storage) and MLC (Multilevel cell, multiple field is stored).The erasable number of times of SLC is about 100,000 times, and the erasable number of times of MLC is about 10,000 times.By making the erasable number of times of each erasable data block even, can prolong the serviceable life of SSD.The wear leveling technology is used the method for mapping, the map addresses that will write data to writing on the indegree minimal data piece, thereby can make that the erasable number of times of data block everywhere is approaching as much as possible, its implementation mainly comprises static equilibrium and dynamic equalization.
The data that are stored on the disc are divided two kinds, and a kind of is often to revise, and such as document, is called dynamic data.A kind of the modification for a long time, the data such as operating system are called static data.
The static equilibrium mode is gone on erasable number of times data block still less by forcing to move the static data of having stored, thereby can prolong the serviceable life of SSD, but can influence the writing speed of other data in the data-moving process, increases extra write operation.
The dynamic equalization mode is that the data with the data of frequent shift position and deletion conversion are transferred in the untapped data block.Dynamic equalization is to avoid the often erasable repeatedly same position of data of modification, so the memory location of moving dynamic data that need not stop makes all positions erasable evenly.
A kind of wear leveling technology of using is to safeguard the erasable number of times of each data block now, according to its erasable number of times each data block is sorted, during each write operation, erasable number of times minimal data piece is distributed to data to be written as blank block, the advantage of this method is that implementation is simple, but because during each write operation, all erasable number of times minimal data piece to be distributed to data to be written as blank block, and the number of each balanced recovery piece is less, long-term this mode meeting accumulation system expense that adopts finally causes system overhead very big.
The inventor finds that there are the following problems at least in the prior art in realizing process of the present invention:
In the prior art,, adopt this mode meeting accumulation system expense excessive for a long time because the number of each balanced recovery piece is less.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of memory management method, hard disk and storage system, to realize improving in the process in solid state hard disc life-span, reduces system overhead.
For addressing the above problem, the embodiment of the invention provides a kind of memory management method, comprising:
At one's leisure the phase, check grouping information table and erasable count table, judge whether to need to trigger the wear leveling strategy;
Trigger the wear leveling strategy if desired, then the blank block that reclaims is inserted unordered formation;
In data write operation period, from described unordered formation, obtain blank block, write data to the described blank block that obtains.A kind of hard disk also is provided, has comprised:
Inspection unit is used for the phase at one's leisure, checks grouping information table and erasable count table, judges whether to need to trigger the wear leveling strategy;
Insert the unit, be used for when described inspection unit judges that needs trigger the wear leveling strategy, the blank block that reclaims being inserted unordered formation;
Writing unit is used for obtaining blank block in data write operation period from described unordered formation, writes data to the described blank block that obtains.
A kind of storage system also is provided, has comprised input-output device and hard disk, wherein:
Described input-output device is used for to described hard disk input data;
Described hard disk is used for the phase at one's leisure, checks grouping information table and erasable count table, judges whether to need to trigger the wear leveling strategy; When needs trigger the wear leveling strategy, the blank block that reclaims is inserted unordered formation; In data write operation period, from described unordered formation, obtain blank block, write data to the described blank block that obtains.
Compared with prior art, the embodiment of the invention has the following advantages at least:
Utilize the embodiment of the invention, by check grouping information table of phase at one's leisure and erasable count table, judging whether needs to trigger the wear leveling strategy, has overcome the excessive technical matters of system overhead that data write operation is tested and caused period; When judgement needs to trigger the wear leveling strategy, just the blank block that reclaims is inserted unordered formation, use described blank block to write data during for data write operation, thereby carry out the big blank block recovery operation of amount consuming time idle period, help to reduce data and write fashionable employed expense in system.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the interface synoptic diagram of memory device and other equipment in the embodiment of the invention;
Fig. 2 is that storage medium tissue of the present invention is divided synoptic diagram;
Fig. 3 is the process flow diagram of the embodiment of the invention one;
Fig. 4 is the process flow diagram of the embodiment of the invention two;
Fig. 5 is the outer balance policy synoptic diagram of the group of the embodiment of the invention;
Fig. 6 is a balance policy synoptic diagram between the group of the embodiment of the invention;
Fig. 7 is the interior balance policy synoptic diagram of the group of the embodiment of the invention;
Fig. 8 is the state exchange synoptic diagram of the embodiment of the invention;
Fig. 9 is that the hard disk of the embodiment of the invention three is formed synoptic diagram;
Figure 10 is that the hard disk of the embodiment of the invention four is formed synoptic diagram;
Figure 11 is that the storage system of the embodiment of the invention five is formed synoptic diagram.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
As shown in Figure 1, it is the interface synoptic diagram of memory device and other equipment in the embodiment of the invention, I/O101 (IO interface), RAM102 (Random Access Memory, random access memory), system controller 103 are connected by bus 105 with memory device 104.Memory device is by interface chip 1041, and control chip 1042 and storage medium 1043 are formed, and storage medium 1043 can be the Flash chipset, perhaps SDRAM etc.For the those skilled in the art, for other hard disks that comprise the Flash memory device, can use the know-why of the embodiment of the invention equally, use the corresponding techniques scheme, reach identical technique effect.Protection scope of the present invention is not limited to the Flash memory device.
As shown in Figure 2, be storage medium (being specifically as follows the Flash flash chip) the tissue division synoptic diagram of the embodiment of the invention.In each embodiment of the present invention, storage medium can be divided into redundant area and data field two parts, and redundant area is used to deposit mapping table, the erasable count table of piece, bad piece record sheet and grouping information etc., and the data field is used for storaging user data.Mapping table is used to preserve the logical address of data and the corresponding relation of physical address, the erasable count table of piece is used to write down the erasable number of times of each data block place physical address, bad piece record sheet is used to write down bad piece, can use the mode of the physical address at each data block place being made bad piece mark, grouping information is used to write down the physical address etc. of the group at each data block place.During system initialization, above-mentioned each record sheet is read into RAM, and carries out Dynamic Maintenance in RAM, more above-mentioned record sheet is write back the redundant area storage before the power down.The Flash storage medium is made up of the plurality of data piece, and the data block of some is divided into some parts, and every part is exactly one group.The method of the embodiment of the invention can be to carry out on the basis of the These characteristics of Flash storage medium.
The wear leveling strategy of each embodiment of the present invention can be stored in the form of software in the redundant area, reads in RAM after system powers on, and memory device is managed, and each record sheet after will managing before the power down writes back redundant area, to preserve result.
In embodiments of the present invention, the processing procedure of management method can be divided into idle period and data write operation period.As shown in Figure 3, be the embodiment of the invention one, comprise step:
301, phase at one's leisure, by check grouping information table and erasable count table, judging whether needs to trigger the wear leveling strategy, if judged result is for being that then execution in step 302; If judged result is that then execution in step 304;
Wherein, before described inspection grouping information table and the erasable count table, can also comprise:
Reclaim blank block.
Wherein, when reclaiming blank block, the blank block that described recovery is obtained carries out bad block check record.
302, trigger the wear leveling strategy if desired, then the blank block that reclaims is inserted unordered formation;
303, in data write operation period, from described unordered formation, obtain blank block, write data to the described blank block that obtains;
304, behind the termination process, re-execute step 301, trigger the wear leveling strategy next time and judge.
Embodiment of the invention method can be adjusted each sequence of steps according to actual needs.
Utilize the embodiment of the invention, by check grouping information table of phase at one's leisure and erasable count table, judging whether needs to trigger the wear leveling strategy, has overcome the excessive technical matters of system overhead that data write operation is tested and caused period; When judgement needs to trigger the wear leveling strategy, just the blank block that reclaims is inserted unordered formation, use described blank block to write data during for data write operation, thereby carry out the big blank block recovery operation of amount consuming time idle period, help to reduce data and write fashionable employed expense in system.
Wherein, before the described blank block that obtains writes data, check whether the described blank block that obtains is bad piece,, then behind the bad piece of mark, from described unordered formation, obtain next piece blank block if assay is a bad piece;
If assay is not a bad piece, then write data to the described blank block that obtains.
Wherein, can be after the described blank block that obtains write data, the modified address mapping table.
Wherein, can be after the mapping table of modified address, by described address mapping table, reading of data.
The executive agent of embodiment of the invention method can be a memory device, specifically can be hard disk, more specifically can be solid state hard disc.Described solid state hard disc can be single flash chip, a plurality of flash chip, flash array or ROM (read-only memory) etc.
Pass through the embodiment of the invention, can obtain identical or the corresponding techniques effect: by the phase is checked grouping information table and erasable count table at one's leisure with aforementioned each embodiment, judge whether need to trigger the wear leveling strategy, overcome the excessive technical matters of system overhead that data write operation is tested and caused period; When judgement needs to trigger the wear leveling strategy, just the blank block that reclaims is inserted unordered formation, use described blank block to write data during for data write operation, thereby carry out the big blank block recovery operation of amount consuming time idle period, help to reduce data and write fashionable employed expense in system.
As shown in Figure 4, be embodiments of the invention two, can comprise step:
401, when system's free time or blank block quantity are less than predetermined number, reclaim blank block, when reclaiming blank block, can also carry out the bad block check line correlation record of going forward side by side;
402, phase at one's leisure by check grouping information table and erasable count table, obtains the erasable number of times of every group of information and data block, and judging whether needs to trigger the wear leveling strategy, if judged result is for being that then execution in step 403; If judged result is that then execution in step 401, continues to prepare to trigger the wear leveling strategy next time and judge;
403, trigger the wear leveling strategy, then the blank block that reclaims is inserted unordered formation, for upcoming data write operation is prepared.
404, during data write operation, select blank block from unordered formation, allocation space writes data;
In practice, can also before writing data, carry out bad block check to blank block, occur if any bad piece, then behind the bad piece of mark, from unordered formation, distribute next blank block in turn, be used for data write operation.
405, after data write operation is finished, the physical address of the data in the mapping table of modified address and the mapping relations of logical address.
In practice,, then can directly pass through the logical address reading of data of data if carry out data reading operation.
Embodiment of the invention method can be adjusted each sequence of steps according to actual needs.
The executive agent of embodiment of the invention method can be a memory device, specifically can be hard disk, more specifically can be solid state hard disc.Described solid state hard disc can be single flash chip, a plurality of flash chip, flash array or ROM (read-only memory) etc.
With reference to shown in Figure 5, the described wear leveling strategy of the embodiment of the invention can comprise that group is outer balanced, is example with the flash chip:
According to physical address the storage medium stores zone is divided into the N group: 1,2 ..., N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, be less than preset value T1 if be used for the quantity of the blank block that the unordered formation of blank block storage stores, obtain the blank block of respectively organizing erasable number of times minimum in the described N group, the described blank block of respectively organizing erasable number of times minimum that obtains is inserted described unordered formation.
In Fig. 5, the value of T1 can be made as 5%, in practice, can also be set to other values.Outer balanced by organizing, the blank block of erasable number of times minimum in each group can be distributed to data write operation.
With reference to shown in Figure 6, the described wear leveling strategy of the embodiment of the invention can comprise between group balanced:
According to physical address the storage medium stores zone is divided into the N group: 1,2 ..., N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, if a group does not comprise blank block, with the described group that does not comprise blank block as first group, then will comprise blank block any one group as second group;
Determine the average erasable number of times of described first group and second group;
Determine the ratio of described first group of average erasable number of times and second group of average erasable number of times, if described ratio more than or equal to preset value T2, then carries out exchanges data between described first group and second group.The group in exchanges data to as if all valid data.
By equilibrium between organizing, make that the quantity of the blank block between each group is approaching relatively, the erasable number of times difference of data is excessive between being unlikely to respectively to organize, and has kept between group balanced.The value of T2 can be made as 130%, in practice, can also be set to other values.
With reference to shown in Figure 7, the described wear leveling strategy of the embodiment of the invention can comprise in the group balanced:
According to physical address the storage medium stores zone is divided into the N group: 1,2 ..., N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, obtain every group in the maximum erasable number of times and the minimum erasable number of times of all pieces;
If the difference of erasable number of times of described maximum and minimum erasable number of times more than or equal to preset value T3, is then carried out exchanges data between the data block with erasable number of times of described maximum and minimum erasable number of times.
By organizing interior equilibrium, allow the few data block of erasable number of times receive new data write operation, make that the erasable number of times between interior each data block of group is approaching, the serviceable life of having improved chip.The value of T3 can specifically be provided with in practice.
Balanced and the outer equilibrium of group can separately exist between balanced in above-mentioned group, group, can select one realize or this three between combination in any, can both obtain and organize between interior equilibrium, group balanced corresponding techniques effect outside the balanced and group.If occur two or more balance policies simultaneously, then its technique effect also can correspondingly superpose.Outer balanced by organizing, the blank block of erasable number of times minimum in each group can be distributed to data write operation.By equilibrium between organizing, make that the quantity of the blank block between each group is approaching relatively, the erasable number of times difference of data is excessive between being unlikely to respectively to organize, and has kept between group balanced.By organizing interior equilibrium, allow the few data block of erasable number of times receive new data write operation, make that the erasable number of times between interior each data block of group is approaching, the serviceable life of having improved chip.
As shown in Figure 8, be the state exchange synoptic diagram of the embodiment of the invention, direction shown in the arrow is from a previous state state exchange backward.
As shown in Figure 9, be embodiments of the invention three, present embodiment provides a kind of hard disk, comprising:
Inspection unit 901 is used for the phase at one's leisure, checks grouping information table and erasable count table, judges whether to need to trigger the wear leveling strategy;
Insert unit 902, be used for triggering if desired the wear leveling strategy, then the blank block that reclaims is inserted unordered formation;
Writing unit 903 is used for obtaining blank block in data write operation period from described unordered formation, writes data to the described blank block that obtains.
The hard disk of the embodiment of the invention can be solid state hard disc etc.Described solid state hard disc can be single flash chip, a plurality of flash chip, flash array or ROM (read-only memory) etc.
Each unit of the embodiment of the invention can be integrated in one, and also can separate deployment.Said units can be merged into a unit, also can further split into a plurality of subelements.
Utilize the embodiment of the invention, by check grouping information table of phase at one's leisure and erasable count table, judging whether needs to trigger the wear leveling strategy, has overcome the excessive technical matters of system overhead that data write operation is tested and caused period; When judgement needs to trigger the wear leveling strategy, just the blank block that reclaims is inserted unordered formation, use described blank block to write data during for data write operation, thereby carry out the big blank block recovery operation of amount consuming time idle period, help to reduce data and write fashionable employed expense in system.
Wherein, with reference to shown in Figure 10, be the embodiment of the invention four, on the basis of embodiment three, the hard disk of the embodiment of the invention can also comprise:
Reclaim unit 1001, be used for before checking grouping information table and erasable count table, reclaiming blank block.
Wherein, can also comprise:
The first bad piece inspection unit 1002 is used for when reclaiming blank block, and the blank block that described recovery is obtained carries out bad block check record.
Wherein, can also comprise:
The second bad piece inspection unit 1003 is used for before the described blank block that obtains writes data, checks whether the described blank block that obtains is bad piece;
Acquiring unit 1004 is a bad piece if be used for assay, then behind the bad piece of mark, obtains next piece blank block from described unordered formation;
Second writing unit 1005 is not a bad piece if be used for assay, then writes data to the described blank block that obtains.
Wherein, can also comprise:
Revise unit 1006, be used for after the described blank block that obtains writes data the modified address mapping table.
Wherein, be example with the flash chip, described wear leveling strategy can comprise:
According to physical address the storage medium stores zone is divided into the N group: 1,2 ..., N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, be less than preset value T1 if be used for the quantity of the blank block that the unordered formation of blank block storage stores, obtain the blank block of respectively organizing erasable number of times minimum in the described N group, the described blank block of respectively organizing erasable number of times minimum that obtains is inserted described unordered formation.
Perhaps, wherein, described wear leveling strategy can comprise:
According to physical address the storage medium stores zone is divided into the N group: 1,2 ..., N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, if a group does not comprise blank block, with the described group that does not comprise blank block as first group, then will comprise blank block any one group as second group;
Calculate the average erasable number of times of described first group and second group;
Calculate the ratio of described first group of average erasable number of times and second group of average erasable number of times, if described ratio more than or equal to preset value T2, then carries out exchanges data between described first group and second group.
Perhaps, wherein, described wear leveling strategy can comprise:
According to physical address storage medium stores area dividing (can be even division) is the N group: 1,2......, N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, obtain every group in the maximum erasable number of times and the minimum erasable number of times of all pieces;
If the difference of erasable number of times of described maximum and minimum erasable number of times more than or equal to preset value T3, is then carried out exchanges data between the data block with erasable number of times of described maximum and minimum erasable number of times.
Balanced and the outer equilibrium of group can separately exist between balanced in above-mentioned group, group, can select one realize or this three between combination in any, can both obtain and organize between interior equilibrium, group balanced corresponding techniques effect outside the balanced and group.If occur two or more balance policies simultaneously, then its technique effect also can correspondingly superpose.
Outer balanced by organizing, the blank block of erasable number of times minimum in each group can be distributed to data write operation.By equilibrium between organizing, make that the quantity of the blank block between each group is approaching relatively, the erasable number of times difference of data is excessive between being unlikely to respectively to organize, and has kept between group balanced.By organizing interior equilibrium, allow the few data block of erasable number of times receive new data write operation, make that the erasable number of times between interior each data block of group is approaching, the serviceable life of having improved chip.
Each module of embodiment of the invention equipment can be integrated in one, and also can separate deployment.Above-mentioned module can be merged into a module, also can further split into a plurality of submodules.
Wherein, described solid state hard disc can be single flash chip, a plurality of flash chip, flash array or ROM (read-only memory) etc.
Technical scheme by the utilization embodiment of the invention in the middle of single flash chip, a plurality of flash chip, flash array or ROM (read-only memory) etc., can obtain identical or the corresponding techniques effect: by the phase is checked grouping information table and erasable count table at one's leisure with aforementioned each embodiment, judge whether need to trigger the wear leveling strategy, overcome the excessive technical matters of system overhead that data write operation is tested and caused period; When judgement needs to trigger the wear leveling strategy, just the blank block that reclaims is inserted unordered formation, use described blank block to write data during for data write operation, thereby carry out the big blank block recovery operation of amount consuming time idle period, help to reduce data and write fashionable employed expense in system.
As shown in figure 11, be the system that the embodiment of the invention five is provided, comprise input-output device 1101 and hard disk 1102, wherein:
Described input-output device 1101 is used for to hard disk input data, from the hard disk output data;
Described hard disk 1102 is used for the phase at one's leisure, checks grouping information table and erasable count table, judges whether to need to trigger the wear leveling strategy; Trigger the wear leveling strategy if desired, then the blank block that reclaims is inserted unordered formation;
In data write operation period, from described unordered formation, obtain blank block, write data to the described blank block that obtains.
The hard disk of the embodiment of the invention can be solid state hard disc etc.Described solid state hard disc can be single flash chip, a plurality of flash chip, flash array or ROM (read-only memory) etc.
Each unit of embodiment of the invention system can be integrated in a device, also can be distributed in multiple arrangement.Said units can be merged into a unit, also can further split into a plurality of subelements.
Utilize the embodiment of the invention, by check grouping information table of phase at one's leisure and erasable count table, judging whether needs to trigger the wear leveling strategy, has overcome the excessive technical matters of hard-disk system expense that data write operation is tested and caused period; When judgement needs to trigger the wear leveling strategy, just the blank block that reclaims is inserted unordered formation, use described blank block to write data during for data write operation, thereby carry out the big blank block recovery operation of amount consuming time idle period in hard-disk system, help to reduce data and write fashionable employed expense.Because the expense of hard-disk system descends, can correspondingly promote the work efficiency of the entire system at hard disk place.
Wherein, described hard disk can be single flash chip, a plurality of flash chip, flash array or ROM (read-only memory) etc.
Wherein, be example with the flash chip, described wear leveling strategy can comprise:
According to physical address the storage medium stores zone is divided into the N group: 1,2 ..., N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, be less than preset value T1 if be used for the quantity of the blank block that the unordered formation of blank block storage stores, obtain the blank block of respectively organizing erasable number of times minimum in the described N group, the described blank block of respectively organizing erasable number of times minimum that obtains is inserted described unordered formation.
Perhaps, wherein, described wear leveling strategy can comprise:
According to physical address the storage medium stores zone is divided into the N group: 1,2......N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, if a group does not comprise blank block, with the described group that does not comprise blank block as first group, then will comprise blank block any one group as second group;
Calculate the average erasable number of times of described first group and second group;
Calculate the ratio of described first group of average erasable number of times and second group of average erasable number of times, if described ratio more than or equal to preset value T2, then carries out exchanges data between described first group and second group.
Perhaps, wherein, described wear leveling strategy can comprise:
According to physical address the storage medium stores zone is divided into the N group: 1,2......N, every group of A blocks of data piece, N is more than or equal to 2, and A is more than or equal to 2;
Phase at one's leisure, obtain every group in the maximum erasable number of times and the minimum erasable number of times of all pieces;
If the difference of erasable number of times of described maximum and minimum erasable number of times more than or equal to preset value T3, is then carried out exchanges data between the data block with erasable number of times of described maximum and minimum erasable number of times.
Balanced and the outer equilibrium of group can separately exist between balanced in above-mentioned group, group, can select one realize or this three between combination in any, can both obtain and organize between interior equilibrium, group balanced corresponding techniques effect outside the balanced and group.If occur two or more balance policies simultaneously, then its technique effect also can correspondingly superpose.
Outer balanced by organizing, the blank block of erasable number of times minimum in each group can be distributed to data write operation.By equilibrium between organizing, make that the quantity of the blank block between each group is approaching relatively, the erasable number of times difference of data is excessive between being unlikely to respectively to organize, and has kept between group balanced.By organizing interior equilibrium, allow the few data block of erasable number of times receive new data write operation, make that the erasable number of times between interior each data block of group is approaching, the serviceable life of having improved chip.
Through the above description of the embodiments, the those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential general hardware platform, can certainly pass through hardware, but the former is better embodiment under a lot of situation.Technical scheme of the present invention can embody with the form of software product, this computer software product can be stored in the storage medium, comprise that some instructions are with so that computer equipment (can be a personal computer, server, the perhaps network equipment etc.) carry out the described method of each embodiment of the present invention.
Above-described embodiment of the present invention does not constitute the qualification to protection domain of the present invention.Any modification of being done within the spirit and principles in the present invention, be equal to and replace and improvement etc., all should be included within protection scope of the present invention.

Claims (20)

1. a memory management method is characterized in that, comprising:
At one's leisure the phase, check grouping information table and erasable count table, judge whether to need to trigger the wear leveling strategy;
Trigger the wear leveling strategy if desired, then the blank block that reclaims is inserted unordered formation;
In data write operation period, from described unordered formation, obtain blank block, write data to the described blank block that obtains.
2. the method for claim 1 is characterized in that, before described inspection grouping information table and erasable count table, also comprises:
Reclaim blank block.
3. method as claimed in claim 2 is characterized in that, also comprises:
The blank block that described recovery is obtained carries out bad block check record.
4. the method for claim 1 is characterized in that, before the described blank block that obtains writes data, check whether the described blank block that obtains is bad piece, if assay is a bad piece, then the described blank block that obtains is labeled as bad piece, from described unordered formation, obtain next piece blank block;
If assay is not a bad piece, then write data to the described blank block that obtains.
5. the method for claim 1 is characterized in that, also comprises after the described blank block that obtains writes data:
The modified address mapping table.
6. method as claimed in claim 5 is characterized in that, also comprises after the mapping table of described modified address:
By described address mapping table, reading of data.
7. the method for claim 1 is characterized in that, described wear leveling strategy comprises:
According to physical address the storage medium stores zone is divided at least two groups, every group of at least two data blocks;
Phase at one's leisure is less than preset value T1 if be used for the quantity of the blank block that the unordered formation of blank block storage stores, and obtains the described blank block of respectively organizing erasable number of times minimum, and the described blank block of respectively organizing erasable number of times minimum that obtains is inserted described unordered formation.
8. the method for claim 1 is characterized in that, described wear leveling strategy comprises:
According to physical address the storage medium stores zone is divided at least two groups, every group of at least two data blocks;
Phase at one's leisure, if a group does not comprise blank block, with the described group that does not comprise blank block as first group, then will comprise blank block any one group as second group;
Determine the average erasable number of times of described first group and second group;
Determine the ratio of described first group of average erasable number of times and second group of average erasable number of times, if described ratio more than or equal to preset value T2, then carries out exchanges data between described first group and second group.
9. the method for claim 1 is characterized in that, described wear leveling strategy comprises:
According to physical address the storage medium stores zone is divided at least two groups, every group of at least two data blocks;
Phase at one's leisure, obtain every group in the maximum erasable number of times and the minimum erasable number of times of all pieces;
If the difference of erasable number of times of described maximum and minimum erasable number of times more than or equal to preset value T3, is then carried out exchanges data between the data block with erasable number of times of described maximum and minimum erasable number of times.
10. a hard disk is characterized in that, comprising:
Inspection unit is used for the phase at one's leisure, checks grouping information table and erasable count table, judges whether to need to trigger the wear leveling strategy;
Insert the unit, be used for when described inspection unit judges that needs trigger the wear leveling strategy, the blank block that reclaims being inserted unordered formation;
Writing unit is used for obtaining blank block in data write operation period from described unordered formation, writes data to the described blank block that obtains.
11. hard disk as claimed in claim 10 is characterized in that, also comprises:
Reclaim the unit, be used for before checking grouping information table and erasable count table, reclaiming blank block.
12. hard disk as claimed in claim 11 is characterized in that, also comprises:
The first bad piece inspection unit is used for when reclaiming blank block, and the blank block that described recovery is obtained carries out bad block check record.
13. hard disk as claimed in claim 10 is characterized in that, also comprises:
The second bad piece inspection unit is used for before the described blank block that obtains writes data, checks whether the described blank block that obtains is bad piece;
Acquiring unit is used for behind the bad piece of mark, obtaining next piece blank block from described unordered formation when assay that the described second bad piece inspection unit obtains is bad piece;
Second writing unit is used for writing data to the described blank block that obtains when assay that the described second bad piece inspection unit obtains is not bad piece.
14. hard disk as claimed in claim 10 is characterized in that, also comprises:
Revise the unit, be used for after the described blank block that obtains writes data the modified address mapping table.
15. hard disk as claimed in claim 10 is characterized in that, described wear leveling strategy comprises:
According to physical address the storage medium stores zone is divided at least two groups, every group of at least two data blocks;
Phase at one's leisure is less than preset value T1 if be used for the quantity of the blank block that the unordered formation of blank block storage stores, and obtains the described blank block of respectively organizing erasable number of times minimum, and the described blank block of respectively organizing erasable number of times minimum that obtains is inserted described unordered formation.
16. hard disk as claimed in claim 10 is characterized in that, described wear leveling strategy comprises:
According to physical address the storage medium stores zone is divided at least two groups, every group of at least two data blocks;
Phase at one's leisure, if a group does not comprise blank block, with the described group that does not comprise blank block as first group, then will comprise blank block any one group as second group;
Determine the average erasable number of times of described first group and second group;
Determine the ratio of described first group of average erasable number of times and second group of average erasable number of times, if described ratio more than or equal to preset value T2, then carries out exchanges data between described first group and second group.
17. hard disk as claimed in claim 10 is characterized in that, described wear leveling strategy comprises:
According to physical address the storage medium stores zone is divided at least two groups, every group at least two blocks of data piece;
Phase at one's leisure, obtain every group in the maximum erasable number of times and the minimum erasable number of times of all pieces;
If the difference of erasable number of times of described maximum and minimum erasable number of times more than or equal to preset value T3, is then carried out exchanges data between the data block with erasable number of times of described maximum and minimum erasable number of times.
18. hard disk as claimed in claim 10 is characterized in that, described hard disk is a solid state hard disc, and the type of solid state hard disc comprises: single flash chip, a plurality of flash chip, flash array or ROM (read-only memory).
19. a storage system is characterized in that, comprises input-output device and hard disk, wherein:
Described input-output device is used for to described hard disk input data, from described hard disk output data;
Described hard disk is used for the phase at one's leisure, checks grouping information table and erasable count table, judges whether to need to trigger the wear leveling strategy; When needs trigger the wear leveling strategy, the blank block that reclaims is inserted unordered formation; In data write operation period, from described unordered formation, obtain blank block, write data to the described blank block that obtains.
20. system as claimed in claim 19 is characterized in that, described hard disk is a solid state hard disc, and the type of solid state hard disc comprises: flash chip, flash array or ROM (read-only memory).
CN2009100030608A 2009-01-09 2009-01-09 Memory management method, hard disk and memory system Active CN101777026B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2009100030608A CN101777026B (en) 2009-01-09 2009-01-09 Memory management method, hard disk and memory system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2009100030608A CN101777026B (en) 2009-01-09 2009-01-09 Memory management method, hard disk and memory system

Publications (2)

Publication Number Publication Date
CN101777026A true CN101777026A (en) 2010-07-14
CN101777026B CN101777026B (en) 2011-12-28

Family

ID=42513494

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2009100030608A Active CN101777026B (en) 2009-01-09 2009-01-09 Memory management method, hard disk and memory system

Country Status (1)

Country Link
CN (1) CN101777026B (en)

Cited By (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147767A (en) * 2011-04-26 2011-08-10 记忆科技(深圳)有限公司 Method and system for dynamically adjusting solid state disk garbage collection parameters
CN102169462A (en) * 2011-04-27 2011-08-31 中国科学院光电技术研究所 Data recording method and recording controller based on NAND Flash
CN102981970A (en) * 2012-11-23 2013-03-20 深圳市江波龙电子有限公司 Flash memory management method and system
CN103176912A (en) * 2011-12-26 2013-06-26 中国移动通信集团公司 Method of random write and converter
CN103914392A (en) * 2014-04-03 2014-07-09 深圳市硅格半导体有限公司 Blank block recycling method and device for flash memory
CN103942151A (en) * 2014-04-10 2014-07-23 深圳市硅格半导体有限公司 Data storage method and device for flash memory
CN106503427A (en) * 2016-10-12 2017-03-15 创业软件股份有限公司 A kind of solid magnetic disc storage method towards the process of medical big data
CN106844227A (en) * 2017-01-14 2017-06-13 郑州云海信息技术有限公司 Solid state hard disc abrasion equilibrium method and device based on grouping mechanism
CN107506148A (en) * 2017-08-29 2017-12-22 郑州云海信息技术有限公司 The method and apparatus that a kind of solid state hard disc dummy block is abandoned
CN108255425A (en) * 2017-12-29 2018-07-06 北京联想核芯科技有限公司 A kind of data processing method and device of SSD hard disks
CN108614663A (en) * 2016-12-09 2018-10-02 北京京存技术有限公司 Data processing method and device based on NAND flash
CN109144422A (en) * 2018-08-31 2019-01-04 浪潮电子信息产业股份有限公司 Data writing method, device and equipment for solid state disk and storage medium
CN110109625A (en) * 2019-05-16 2019-08-09 深圳市时创意电子有限公司 A kind of management method improving Free Queue
CN111124305A (en) * 2019-12-20 2020-05-08 浪潮电子信息产业股份有限公司 Solid state disk wear leveling method and device and computer readable storage medium
CN111309642A (en) * 2020-02-12 2020-06-19 合肥康芯威存储技术有限公司 Memory, control method thereof and memory system
CN111324288A (en) * 2018-12-14 2020-06-23 北京兆易创新科技股份有限公司 Memory device
CN111324285A (en) * 2018-12-14 2020-06-23 北京兆易创新科技股份有限公司 Memory device
CN111949561A (en) * 2019-05-17 2020-11-17 北京兆易创新科技股份有限公司 Storage device and control method and control device thereof
CN112162934A (en) * 2020-09-29 2021-01-01 深圳市时创意电子有限公司 Storage block abnormal wear processing method and device, electronic equipment and storage medium
CN113986140A (en) * 2021-11-03 2022-01-28 深圳市源微创新实业有限公司 High-transmission-rate and high-capacity cloud storage solid state disk

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20060161724A1 (en) * 2005-01-20 2006-07-20 Bennett Alan D Scheduling of housekeeping operations in flash memory systems
CN100504814C (en) * 2007-01-17 2009-06-24 忆正存储技术(深圳)有限公司 Flash-memory zone block management method

Cited By (30)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102147767A (en) * 2011-04-26 2011-08-10 记忆科技(深圳)有限公司 Method and system for dynamically adjusting solid state disk garbage collection parameters
CN102147767B (en) * 2011-04-26 2014-04-02 记忆科技(深圳)有限公司 Method and system for dynamically adjusting solid state disk garbage collection parameters
CN102169462A (en) * 2011-04-27 2011-08-31 中国科学院光电技术研究所 Data recording method and recording controller based on NAND Flash
CN102169462B (en) * 2011-04-27 2014-03-05 中国科学院光电技术研究所 Data recording method and recording controller based on NAND Flash
CN103176912A (en) * 2011-12-26 2013-06-26 中国移动通信集团公司 Method of random write and converter
CN103176912B (en) * 2011-12-26 2016-01-27 中国移动通信集团公司 The method of random write and converter
CN102981970A (en) * 2012-11-23 2013-03-20 深圳市江波龙电子有限公司 Flash memory management method and system
CN103914392A (en) * 2014-04-03 2014-07-09 深圳市硅格半导体有限公司 Blank block recycling method and device for flash memory
CN103914392B (en) * 2014-04-03 2017-05-03 深圳市硅格半导体有限公司 Blank block recycling method and device for flash memory
CN103942151A (en) * 2014-04-10 2014-07-23 深圳市硅格半导体有限公司 Data storage method and device for flash memory
CN106503427A (en) * 2016-10-12 2017-03-15 创业软件股份有限公司 A kind of solid magnetic disc storage method towards the process of medical big data
CN106503427B (en) * 2016-10-12 2019-01-29 创业软件股份有限公司 A kind of solid magnetic disc storage method towards the processing of medical big data
CN108614663A (en) * 2016-12-09 2018-10-02 北京京存技术有限公司 Data processing method and device based on NAND flash
CN106844227A (en) * 2017-01-14 2017-06-13 郑州云海信息技术有限公司 Solid state hard disc abrasion equilibrium method and device based on grouping mechanism
CN107506148A (en) * 2017-08-29 2017-12-22 郑州云海信息技术有限公司 The method and apparatus that a kind of solid state hard disc dummy block is abandoned
CN107506148B (en) * 2017-08-29 2020-03-24 郑州云海信息技术有限公司 Method and device for discarding virtual blocks of solid state disk
CN108255425A (en) * 2017-12-29 2018-07-06 北京联想核芯科技有限公司 A kind of data processing method and device of SSD hard disks
CN109144422A (en) * 2018-08-31 2019-01-04 浪潮电子信息产业股份有限公司 Data writing method, device and equipment for solid state disk and storage medium
CN111324288A (en) * 2018-12-14 2020-06-23 北京兆易创新科技股份有限公司 Memory device
CN111324288B (en) * 2018-12-14 2024-02-23 兆易创新科技集团股份有限公司 Memory device
CN111324285A (en) * 2018-12-14 2020-06-23 北京兆易创新科技股份有限公司 Memory device
CN110109625A (en) * 2019-05-16 2019-08-09 深圳市时创意电子有限公司 A kind of management method improving Free Queue
CN111949561A (en) * 2019-05-17 2020-11-17 北京兆易创新科技股份有限公司 Storage device and control method and control device thereof
CN111949561B (en) * 2019-05-17 2024-03-29 兆易创新科技集团股份有限公司 Storage device, control method and control device thereof
CN111124305A (en) * 2019-12-20 2020-05-08 浪潮电子信息产业股份有限公司 Solid state disk wear leveling method and device and computer readable storage medium
CN111309642A (en) * 2020-02-12 2020-06-19 合肥康芯威存储技术有限公司 Memory, control method thereof and memory system
CN111309642B (en) * 2020-02-12 2023-08-08 合肥康芯威存储技术有限公司 Memory, control method thereof and memory system
CN112162934A (en) * 2020-09-29 2021-01-01 深圳市时创意电子有限公司 Storage block abnormal wear processing method and device, electronic equipment and storage medium
CN113986140A (en) * 2021-11-03 2022-01-28 深圳市源微创新实业有限公司 High-transmission-rate and high-capacity cloud storage solid state disk
CN113986140B (en) * 2021-11-03 2023-10-27 深圳市源微创新实业有限公司 High-transmission-rate high-capacity cloud storage solid state disk

Also Published As

Publication number Publication date
CN101777026B (en) 2011-12-28

Similar Documents

Publication Publication Date Title
CN101777026B (en) Memory management method, hard disk and memory system
CN109196459B (en) Decentralized distributed heterogeneous storage system data distribution method
CN103092766B (en) A kind of loss equalizing implementation method for NAND FLASH
RU2666241C2 (en) Memory segment remapping to address fragmentation
CN100492322C (en) Spoilage balance in non-volatile storage systems
US9880742B2 (en) Valid data merging method, memory controller and memory storage apparatus
US8296504B2 (en) Data management method and flash memory storage system and controller using the same
CN101419573A (en) Storage management method, system and storage apparatus
CN101169760B (en) Electronic hard disk storage room management method
CN101369451A (en) Solid state memory (ssm), computer system including an ssm, and method of operating an ssm
CN101556555B (en) Block managing method for flash memory as well as controller and storage system thereof
US20130238835A1 (en) Burning system and method
CN101923448A (en) Method for reading and writing conversion layer of NAND flash memory
CN106873912A (en) The dynamic partition storage method and device, system of TLC chip solid state hard discs
CN105468542A (en) Address distribution method and device
US9639441B2 (en) Solid-state storage system, apparatus and method of writing data
CN104346291A (en) Storage method and storage system for memory
CN107817945A (en) Data reading method and system of hybrid memory structure
CN111651371A (en) Asymmetric plane management method, data storage device and controller thereof
CN103198020A (en) Method for prolonging service life of flash memory
CN103793332A (en) Data storage method and device based on memory, processor and electronic equipment
CN116364148A (en) Wear balancing method and system for distributed full flash memory system
CN101324899A (en) Method for rapidly writing NAND type FLASH
CN105718328B (en) The data back up method and system of memory bad block
US10552086B2 (en) Global pool of garbage collection units (GCUs) in a shared non-volatile memory device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C56 Change in the name or address of the patentee

Owner name: HUAWEI DIGITAL TECHNOLOGY (CHENGDU) CO., LTD.

Free format text: FORMER NAME: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES CO., LTD.

CP01 Change in the name or title of a patent holder

Address after: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee after: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

Address before: 611731 Chengdu high tech Zone, Sichuan, West Park, Qingshui River

Patentee before: CHENGDU HUAWEI SYMANTEC TECHNOLOGIES Co.,Ltd.

TR01 Transfer of patent right

Effective date of registration: 20220905

Address after: No. 1899 Xiyuan Avenue, high tech Zone (West District), Chengdu, Sichuan 610041

Patentee after: Chengdu Huawei Technologies Co.,Ltd.

Address before: 611731 Qingshui River District, Chengdu hi tech Zone, Sichuan, China

Patentee before: HUAWEI DIGITAL TECHNOLOGIES (CHENG DU) Co.,Ltd.

TR01 Transfer of patent right