[go: up one dir, main page]

CN101655819A - Method, system and equipment for carrying out empty block reclamation for semiconductor storage medium - Google Patents

Method, system and equipment for carrying out empty block reclamation for semiconductor storage medium Download PDF

Info

Publication number
CN101655819A
CN101655819A CN 200810145886 CN200810145886A CN101655819A CN 101655819 A CN101655819 A CN 101655819A CN 200810145886 CN200810145886 CN 200810145886 CN 200810145886 A CN200810145886 A CN 200810145886A CN 101655819 A CN101655819 A CN 101655819A
Authority
CN
China
Prior art keywords
physical block
piece
subregion
storage medium
semiconductor storage
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
CN 200810145886
Other languages
Chinese (zh)
Other versions
CN101655819B (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.)
Netac Technology Co Ltd
Original Assignee
Netac Technology 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 Netac Technology Co Ltd filed Critical Netac Technology Co Ltd
Priority to CN2008101458863A priority Critical patent/CN101655819B/en
Publication of CN101655819A publication Critical patent/CN101655819A/en
Priority to HK10108091.9A priority patent/HK1141604B/en
Application granted granted Critical
Publication of CN101655819B publication Critical patent/CN101655819B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Memory System (AREA)

Abstract

The invention relates to the field of semiconductor storage, and provides a method, a system and equipment for carrying out empty block reclamation for a semiconductor storage medium. The method comprises the following steps: A, traversing sub areas in need of reclaiming empty blocks in the semiconductor storage medium, and inquiring logic blocks occupying additional physical blocks from the sub areas; B, moving effective pages in the additional physical blocks to an appointed immigration physical block; and C, wiping the additional physical blocks and putting the additional physical blocks into an empty block pool. The method converges the effective pages in all the additional physical blocks in the logic blocks to the appointed immigration physical block, and then wipes the additional physical blocks and puts the additional physical blocks into the empty block pool, thereby improving the data access speed of semiconductor storage equipment by improving the reclamation efficiency.

Description

Semiconductor storage medium is carried out method, system and the equipment that the sky piece reclaims
Technical field
The present invention relates to the semiconductor storage field, more particularly, relate to a kind of method, system and equipment that semiconductor storage medium is carried out the recovery of sky piece.
Background technology
Along with the continuous development and progress of society, the information that people touch is more and more, and it is also more and more important to store and manage these information, and accelerates along with the rhythm of live and work, and people are also more and more higher to the requirement of memory device.
For semiconductor memory apparatus, for example flash memory device generally comprises a plurality of flash medias.Flash media comprises several storage blocks, and each storage block is made of a plurality of pages or leaves.The address of distributing to storage block in flash media in order is called physical address, and the imaginary address of the divided block that is in use had is called logical address.Carry out corresponding and conversion by the method for mapping between logical address and the physical address, forms address mapping table, and be called the block address mapping table by the address mapping table by mapping relations foundation between LBA (Logical Block Addressing) and the physical block address by map information.
In order more effectively flash media to be managed, can be with the storage space of a flash media from being divided into several subregions in logic, each subregion comprises several logical blocks.Physical address by the logical block corresponding stored piece in each subregion of scanning flash media generates the partition address mapping table.For a flash media that contains 8192 physical blocks,, then can be divided into 32 subregions if each subregion comprises 256 pieces.But because the characteristic of flash media piece, some piece is a bad piece, and this can lose a part of space.Therefore when dividing subregion, only when expiring piece, current subregion distribution just distributes to down subregion once with remaining, such as, if have only 8100 active blocks to be used for logical partition in 8192 pieces, then still can be divided into 32 subregions, just 31 subregions in front comprise 256 logical blocks respectively, and the 32nd subregion only comprises 164 logical blocks.Above-mentioned partition address mapping table is deposited in each subregion of flash media in the corresponding stand-by block.Read out in the RAM (Random Access Memory, random access memory) by partition address mapping table, carry out the conversion between logical address and the physical address, thereby realize the data read-write operation in the flash media stand-by block.Realize the flash media date storage method by partitioned mode, has the advantage that improves data access speed, for example, when flash media at being recorded in data in the storage block when carrying out write operation, need to generate new partition address mapping table, only need new partition address mapping table deposited in and be used for new and old partition address mapping table in the stand-by block of this subregion and get final product.Equally, in next data manipulation and need switch to the partition address mapping table of this subregion the time, need not to scan at each piece in this subregion, physical address according to each piece dynamically generates corresponding partition address mapping table again, only the partition address mapping table after upgrading need be read to get final product from corresponding stand-by block.
Because flash media all effective physical blocks before using all are sky piece (physical blocks that does not promptly comprise data), therefore when effective physical block is carried out the mapping of logical address and physical address, the empty piece that keeps some is not set up mapping relations, and constitute a set thus, be referred to as sky piece pond.This sky piece pond is used to write down the operating position of flash media hollow block, comprising the quantity of empty piece pond hollow block and with empty piece physical address corresponding, in fact, empty piece pond can be made a buffer memory at this and treat.Flash media is when initialization, and logical address in the partition address mapping table and physical address are man-to-man mapping relations.But flash media is in the process of data storage, in order to accelerate storage speed, the empty piece that needs to consume in the empty piece pond is used to store data, this moment, the partial logic piece may occupy two or more physical blocks simultaneously, these physical blocks that take promptly are called extra physical block more, the summation of the outer physical block of all logical block occupying volumes is exactly the extra physical block that this subregion occupies in the subregion, and wherein the extra physical block of logical block correspondence is obtained from empty piece pond.The extra physical block of logical block correspondence is many more, and the empty number of blocks in the empty piece pond is few more.Owing to there is the situation of the outer physical block of a large amount of logical block occupying volumes in the current flash memory device, the number of blocks of having leisure is reduced, and in flash memory device, carry out the inefficiency of space reclamation, seriously limited the access speed of flash memory device, and for all semiconductor memory apparatus that comprise flash memory, all have the problems referred to above.
Therefore need a kind ofly carry out the method that the sky piece reclaims, thereby can improve the access speed of semiconductor memory apparatus semiconductor storage medium.
Summary of the invention
One of purpose of the present invention is to provide a kind of semiconductor storage medium is carried out method, system and the equipment that the sky piece reclaims, and is intended to solve prior art owing to space organic efficiency in the semiconductor memory apparatus is low, causes the lower problem of access speed.
In order to realize goal of the invention, the described system that semiconductor storage medium is carried out the recovery of sky piece, comprise main frame and coupled semiconductor memory apparatus, described semiconductor memory apparatus comprises controller and coupled semiconductor storage medium, and described controller comprises:
Reclaim query unit, travel through the subregion that needs to reclaim empty piece in the described semiconductor storage medium, and from described subregion, inquire about the logical block of physical block outside the occupying volume;
Empty piece reclaims the unit, and the link to each other line data of going forward side by side of query unit is mutual with reclaiming, and the active page in the described extra physical block is moved in the physical block of moving into of appointment, and is inserted sky piece pond after extra physical block wiped.
In order to realize goal of the invention better, the described semiconductor memory apparatus that carries out the recovery of sky piece comprises controller and coupled semiconductor storage medium, and described controller comprises:
Reclaim query unit, travel through the subregion that needs to reclaim empty piece in the described semiconductor storage medium, and from described subregion, inquire about the logical block of physical block outside the occupying volume;
Empty piece reclaims the unit, and the link to each other line data of going forward side by side of query unit is mutual with reclaiming, and the active page in the described extra physical block is moved in the physical block of moving into of appointment, and is inserted sky piece pond after extra physical block wiped.
In order to realize goal of the invention better, also provide a kind of semiconductor storage medium has been carried out the method that the sky piece reclaims, described semiconductor memory apparatus comprises semiconductor storage medium, said method comprising the steps of:
A. travel through the subregion that needs to reclaim empty piece in the semiconductor storage medium, and from described subregion, inquire about the logical block of physical block outside the occupying volume;
B. the active page in the described extra physical block is moved in the physical block of moving into of appointment;
C. described extra physical block is wiped, and put into sky piece pond.
As from the foregoing, difference with the prior art of the present invention is, active page in all extra physical blocks in the logical block is pooled in the physical block of moving into of appointment, then sky piece pond is wiped and put into to these extra physical blocks, thereby obtain more effectively storage space rapidly, therefore improved the data access speed of semiconductor memory apparatus.
Description of drawings
Fig. 1 carries out the system construction drawing that the sky piece reclaims to semiconductor storage medium among one of them embodiment of the present invention;
Fig. 2 is the structural drawing of the controller in the semiconductor memory apparatus among one of them embodiment of the present invention;
Fig. 3 is the structural drawing that reclaims query unit in one of them embodiment middle controller of the present invention;
Fig. 4 is the structural drawing of space reclamation unit in one of them embodiment middle controller of the present invention;
Fig. 5 carries out the method flow diagram that the sky piece reclaims to semiconductor storage medium among one of them embodiment of the present invention;
Fig. 6 carries out the method flow diagram that the sky piece reclaims to semiconductor storage medium among one of them embodiment of the present invention;
Fig. 7 carries out the method flow diagram that the sky piece reclaims to semiconductor storage medium among one of them embodiment of the present invention;
Fig. 8 carries out the method flow diagram that the sky piece reclaims to semiconductor storage medium among one of them embodiment of the present invention;
Fig. 9 carries out the method flow diagram that the sky piece reclaims to semiconductor storage medium among one of them embodiment of the present invention;
Figure 10 is based on embodiment shown in Figure 9 semiconductor storage medium is carried out the method flow diagram that the sky piece reclaims;
Figure 11 carries out the method flow diagram that the sky piece reclaims to semiconductor storage medium among one of them embodiment of the present invention;
Figure 12 is based on embodiment shown in Figure 11 semiconductor storage medium is carried out the method flow diagram that the sky piece reclaims.
In order to make purpose of the present invention, technical scheme and advantage clearer,, the present invention is further elaborated below in conjunction with drawings and Examples.Should be appreciated that specific embodiment described herein only in order to explanation the present invention, and be not used in qualification the present invention.
Embodiment
In the present invention, the controller in the semiconductor memory apparatus comprises that recovery query unit and empty piece reclaim the unit.At first travel through the subregion that needs to reclaim empty piece in the semiconductor storage medium, and from described subregion, inquire about the logical block of physical block outside the occupying volume; Then the active page in the described extra physical block is moved in the physical block of moving into of appointment; At last described extra physical block is wiped, and put into sky piece pond.The present invention can obtain more effectively storage space rapidly in semiconductor memory apparatus, therefore improved the data access speed of semiconductor memory apparatus.
Fig. 1 shows among one of them embodiment of the present invention semiconductor storage medium is carried out the system architecture that the sky piece reclaims, and this system comprises main frame 1, semiconductor memory apparatus 2.Semiconductor memory apparatus 2 comprises controller 21, internal memory 22 and a plurality of semiconductor storage medium 23.Should be noted that the annexation between each equipment is the needs of explaining its information interaction and control procedure for clear in all diagrams of the present invention, therefore should be considered as annexation in logic, and should not only limit to physical connection.Need to prove that in addition the communication mode between each functional module can be taked multiple, protection scope of the present invention should not be defined as the communication mode of certain particular type.
Fig. 2 shows the structure of the controller 21 in the semiconductor memory apparatus 2 among one of them embodiment of the present invention, and this controller 21 comprises that recovery query unit 211, empty piece reclaim unit 212.Wherein:
(1) reclaims query unit 211, need to reclaim the subregion of empty piece in the traversal semiconductor storage medium 23, and from this subregion, inquire about the logical block of physical block outside the occupying volume.
(2) empty piece reclaims unit 212, and the link to each other line data of going forward side by side of query unit 211 is mutual with reclaiming, and the active page in the extra physical block is moved in the physical block of moving into of appointment, and is inserted sky piece pond after extra physical block wiped.
Fig. 3 shows the structure that reclaims query unit 211 in one of them embodiment middle controller 21 of the present invention, and this recovery query unit 211 comprises subregion enquiry module 2111 and logical block enquiry module 2112, wherein:
(1) the subregion enquiry module 2111, and according to the physical block quantity that each subregion in the semiconductor storage medium 23 takies, inquiry needs to reclaim the subregion of empty piece.If empty piece pond hollow block deficiency will reclaim the extra physical block in the logical block.So-called empty piece deficiency is a relative notion, and in the process of carrying out write operation, empty piece may constantly be taken away, and is fewer and feweri, then is considered as sky piece deficiency under the predefined empty piece in limited time when being less than.Such as empty piece Chi always has 100 empty pieces, sets 5 empty piece lower limits for reserving, and just is judged as sky piece deficiency when the empty piece in empty piece pond is less than 5, needs to reclaim empty piece.
(2) the logical block enquiry module 2112, and the line data of going forward side by side of linking to each other with subregion enquiry module 2111 is mutual, the logical block of physical block outside the inquiry occupying volume from the described subregion that needs to reclaim empty piece.In the present invention, the logical block of the outer physical block of occupying volume can comprise: the outer logical block that physical block is maximum and active page is minimum of occupying volume, but and the logical block that reclaims in outer physical block of occupying volume and the execution block.It is different that empty piece reclaims the 212 pairs of different situation processing modes in unit, will elaborate in the content of back.
Fig. 4 shows the structure of space reclamation unit 212 in one of them embodiment middle controller 21 of the present invention, and this sky piece reclaims unit 212 and comprises the designated module 2121 of moving into, data migtation module 2122 and data erase module 2123, wherein:
(1) designated module 2121 of moving into, the logical block that is used for physical block outside described occupying volume is specified the physical block of moving into.Among the present invention, the physical block of moving into can have polytype, for example, has specified piece as moving into physical block, perhaps specifies the physical block with excess room as moving into physical block.
In one embodiment, when logical block enquiry module 2112 inquiry and what determine is the logical block that physical block is maximum and active page is minimum occupying volume outside, 2121 of the designated module of moving into have been inserted the piece conduct physical block of moving into.
In another embodiment, but when logical block enquiry module 2112 inquiry and what determine is the logical block that reclaims in physical block and the execution block occupying volume outside, 2121 of the designated module of moving into are specified the physical block conduct that has excess room in this logical block physical block of moving into.
(2) the data migtation module 2122, and the line data of going forward side by side of linking to each other with the designated module 2121 of moving into is mutual, the active page in the extra physical block is moved in the physical block of moving into of appointment.
(3) the data erase module 2123, and the line data of going forward side by side of linking to each other with data migtation module 2122 is mutual, and sky piece pond is wiped and put into to described extra physical block.
Fig. 5 shows among one of them embodiment of the present invention semiconductor memory apparatus 2 is carried out the method flow that the sky piece reclaims, and the structure of this semiconductor memory apparatus 2 comprises controller 21, internal memory 22 and a plurality of semiconductor storage medium 23 as shown in Figure 2.This method flow may further comprise the steps:
In step S501, need to reclaim the subregion of empty piece in the controller 21 traversal semiconductor storage mediums 23, and from described subregion, inquire about the logical block of physical block outside the occupying volume.
In step S502, the active page in the extra physical block is moved in the physical block of moving into of appointment.
In step S503, extra physical block is wiped, and put into sky piece pond.
Fig. 6 shows among one of them embodiment of the present invention semiconductor storage medium 23 is carried out the method flow that the sky piece reclaims.
In step S601, the physical block quantity that controller 21 takies according to each subregion in the semiconductor storage medium 23 is judged the subregion that needs to reclaim empty piece.
In step S602, need to reclaim the subregion of empty piece in the controller 21 traversal semiconductor storage mediums 23, and from described subregion, inquire about the logical block of physical block outside the occupying volume.The specific implementation process of this step S602 is consistent with step S501, describes in detail in the content in the back and sets forth.
In step S603, the active page in the described extra physical block is moved in the physical block of moving into of appointment.The specific implementation process of this step S603 is consistent with step S502, describes in detail in the content in the back and sets forth.
In step S604, described extra physical block is wiped, and put into sky piece pond.The specific implementation process of this step S604 is consistent with step S503, describes in detail in the content in the back and sets forth.
The present invention can carry out empty piece and reclaim under multiple condition, when comprising idle condition, perhaps in the process of write operation.The embodiment of following Fig. 7, Fig. 8 is the empty piece removal process of semiconductor memory apparatus 2 when being in the write operation state, and wherein Fig. 7 reclaims afterwards earlier to write, and Fig. 8 writes afterwards earlier to reclaim.
Fig. 7 shows among one of them embodiment of the present invention semiconductor memory apparatus 2 is carried out the method flow that the sky piece reclaims.This embodiment has showed application scenarios therein, carries out the situation that the sky piece reclaims when promptly semiconductor memory apparatus 2 is received the write order of main frame 1 transmission, and detailed process is as follows:
In step S701, semiconductor memory apparatus 2 receives the write order that main frame 1 sends.
In step S702, semiconductor memory apparatus 2 utilizes its controller 21 to judge whether sky piece deficiency, need to reclaim empty piece: if, execution in step S703 then; If not, execution in step S707 then.
If empty piece pond hollow block deficiency will reclaim the extra physical block in the logical block.So-called empty piece deficiency is a relative notion, and in the process of carrying out write operation, empty piece may constantly be taken away, and is fewer and feweri, then is considered as sky piece deficiency under the predefined empty piece in limited time when being less than.Such as empty piece Chi always has 100 empty pieces, sets 5 empty piece lower limits for reserving, and just is judged as sky piece deficiency when the empty piece in empty piece pond is less than 5, needs to reclaim empty piece.
In step S703, controller 21 utilizes it to reclaim the subregion that query unit 211 judgements need to reclaim empty piece.
In step S704, controller 21 further utilizes the logical block that reclaims in the query unit 211 traversal subregions, and the logical block of the outer physical block of inquiry occupying volume.
In step S705, controller 21 utilizes its sky piece to reclaim unit 212 active page in the extra physical block is moved in the physical block of moving into of appointment.
In step S706, empty piece reclaims unit 212 extra physical block is wiped and inserted in the sky piece pond.
In step S707, controller 21 is carried out write operation.
After write operation is finished, invalid block the physical block of valid data may appear not comprising, i.e. in the current logical block.Therefore can further comprise the step that invalid block is reclaimed, as follows:
In step S708, after write operation was finished, controller 21 utilized it to reclaim query unit 211 once more and checks whether invalid block is arranged in the current logical block: if having, and execution in step S709 then; If do not have, then finish.
In step S709, empty piece reclaims unit 212 this invalid block is wiped, and puts into sky piece pond.
In this embodiment, reclaim earlier and afterwards carry out write operation, increase the step that reclaims invalid block, advantage is, need not move data, as long as erase operation, speed is very fast, therefore can improve the efficient of recovery greatly.
Fig. 8 shows among one of them embodiment of the present invention semiconductor memory apparatus 2 is carried out the method flow that the sky piece reclaims.This embodiment carries out write operation earlier to reclaim again, and detailed process is as follows:
In step S801, semiconductor memory apparatus 2 receives the write order that main frame 1 sends.
In step S802, semiconductor memory apparatus 2 utilizes its controller 21 to judge whether sky piece deficiency, need to reclaim empty piece: if, execution in step S803 then; If not, execution in step S807 then.In the present invention, current physical block remaining space fails to lay down the data of current write operation, just need get the sky piece and operate.
In step S803, controller 21 takes out empty piece from empty piece pond, is put into current will carrying out in the logical block of write operation, prepares to carry out write operation.
In step S804, judge whether physical block has taken current logical block.The user can set a logical block can take several physical blocks at most, such as 5, when that had comprised 5 physical blocks when this logical block, the expression physical block had taken current logical block.
In step S805, controller 21 is put the seizure condition sign for current logical block, this logical block is reclaimed after waiting write operation to finish again.
In step S806, carry out write operation.
In step S807, judge whether reclaimer operation after needs carry out write operation according to the result of step S805: if then carry out reclaiming behind the write operation.In one embodiment, can with in the logical block except that current physical block to be written, the valid data in other physical block are all moved in the current physical block to be written, put into sky piece pond after then other physical block being wiped, and upgrade mapping table.The detailed process of this step S807 is consistent with step S705, S706 in the earlier figures 7, repeats no more herein.
In step S807, controller 21 judges whether write operation is finished: if then finish write operation; If not, then continue execution in step S801.
In this embodiment, first write operation reclaims again, has significantly reduced the data that need resettlement.
Recovering state when the embodiment of above-mentioned Fig. 7, Fig. 8 shows write operation should be noted that the present invention is not limited to start empty piece and reclaims when write operation, also can carry out when semiconductor memory apparatus 2 is in idle condition.Detailed process is as follows: (1) is constantly detected semiconductor memory apparatus 2 and whether is in idle condition in program run.Semiconductor memory apparatus 2 is in idle condition and is meant that it does not all receive the read write command under main frame 1 transmission in the time of setting, need not carry out read-write operation.Judge whether semiconductor memory apparatus 2 is in idle condition and can passes through counter, the user sets a value earlier, semiconductor memory apparatus 2 does not carry out the read-write operation hour counter can be counted, and when reaching the value of setting, is in idle condition with regard to decidable semiconductor memory apparatus 2.(2), judge whether that then needing to carry out empty piece reclaims if be in idle condition.The user can set a lower limit, reclaims when the empty number of blocks in the empty piece pond just need carry out the free time during less than this value.Subsequent step is then consistent with step S703-S706, repeats no more herein.
Fig. 9 shows among one of them embodiment of the present invention semiconductor storage medium 23 is carried out the method flow that the sky piece reclaims.
In step S901, need to reclaim the subregion of empty piece in the controller 21 traversal semiconductor storage mediums 23, and the logical block that physical block is maximum and active page is minimum outside the inquiry occupying volume from subregion.
In step S902, in described logical block, inserted piece as the physical block of moving into, and the active page in the extra physical block has all been moved in this physical block of moving into.
In step S903, extra physical block is wiped and inserted in the sky piece pond.
Present embodiment is by having specified the mode of piece as the physical block of moving into, and maximum and logical block that active page is minimum reclaims to the outer physical block of occupying volume.Recovery takies the logical block that physical block is maximum and active page is minimum, can reclaim maximum physical blocks in the shortest time.
Figure 10 is based on the method flow that semiconductor storage medium 23 is carried out the recovery of sky piece embodiment illustrated in fig. 9.
In step S1001, earlier with the logical block number (LBN) initialization in the subregion, be first logical block number (LBN) assignment 0 promptly, begin to travel through this subregion from first logical block.
In step S1002, judge according to mapping table information whether this logical block takies two above physical blocks: if this logical block just can reclaim, execution in step S1003 then; If not, execution in step S1005 then.
In step S1003, put recyclable sign, illustrate and found recuperable logical block.
In step S1004, relatively the record before is write down and is taken the logical block that piece is maximum and active page is minimum.What is called takies the logical block that piece is maximum and active page is minimum, and need will take number of blocks and active page quantity calculates with certain weight.
In step S1005, logical block number (LBN) is added 1.
In step S1006, judge whether to have traveled through all logical blocks in this subregion, whether promptly current logical block number (LBN) is greater than logical block number in the subregion: if, execution in step S1007 then; If not, then return execution in step S1002, continue circulation.
In step S1007, judge whether to have found recuperable logical block according to the result of step S1003: if, execution in step S1008 then; If not, then return the result who is not recovered to the sky piece, and finish.
In step S1008, from empty piece pond, take out an empty piece, put into the logical block that physical block is maximum and active page is minimum that takies of step S1004 record.
In step S1009, the empty piece that utilize to insert reclaims the extra physical block in this logical block, the active page in these extra physics is all moved in this sky piece, and put into sky piece pond after these extra physics are all wiped, and upgrades mapping table information.
Figure 11 shows among one of them embodiment of the present invention semiconductor storage medium 23 is carried out the method flow that the sky piece reclaims.This embodiment is the recovery of carrying out in the logical block, specifically comprises:
In step S1101, need to reclaim the subregion of empty piece in the controller 21 traversal semiconductor storage mediums 23, but and the logical block that from described subregion, reclaims in physical block and the execution block outside the inquiry occupying volume;
In step S1102, specify physical block current to be written to be the physical block of moving into, and the active page in the extra physical block is all moved in this physical block of moving into excess room;
In step S1103, extra physical block is wiped and inserted in the sky piece pond.
Reclaim in the logical block that present embodiment carries out, the resettlement data volume is little, and recovery speed is fast.
Figure 12 is based on and semiconductor storage medium 23 is carried out the method flow that the sky piece reclaims in embodiment illustrated in fig. 11.
In step S1201, earlier with the logical block number (LBN) initialization in the subregion, be first logical block number (LBN) assignment 0 promptly, begin to travel through this subregion from first logical block.
In step S1202, judge according to mapping table information whether this logical block takies two above physical blocks: if this logical block just can reclaim, execution in step S1203 then; If not, execution in step S1206 then.
In step S1203, judge that whether this logical block can reclaim in the logical blocks: if, execution in step S1204 then; If not, execution in step S1206 then.In the present embodiment, the remaining physical space of current physical block to be written in this logical block during certain physical block comprises in other physical block of this logical block of can setting aside concerns valid data, is judged as and can reclaims in the logical blocks.
In step S1204, put sign, illustrate and found recuperable logical block.
In step S1205, write down logical block and corresponding effective number of pages of active page minimum to be recycled.
In step S1206, logical block number (LBN) is added 1,
In step S1207, judge whether to have traveled through all logical blocks in this subregion, also be current logical block number (LBN) whether greater than the logical block number in the subregion: if then execution in step S1208 if not, then gets back to step S1202.
In step S1208, judge whether to have found recuperable logical block according to the result of step S1204: if find, then the empty piece that carries out in the logical block of execution in step S1209 reclaims; If do not find, then finish.
In step S1209, the active page in the extra physical block is all moved in the physical block to be written that has excess room in this logical block.In one embodiment, the valid data that preferentially will comprise in the physical block of minimum valid data are moved in the current physical block to be written.
In step S1210, put into sky piece pond after extra physical block wiped, and upgrade mapping table.
After above-mentioned institute is finished in steps, but return results has been recovered to empty piece.
The above only is preferred embodiment of the present invention, not in order to restriction the present invention, all any modifications of being done within the spirit and principles in the present invention, is equal to and replaces and improvement etc., all should be included within protection scope of the present invention.

Claims (14)

1, a kind of system that semiconductor storage medium is carried out the recovery of sky piece comprises main frame and coupled semiconductor memory apparatus, and described semiconductor memory apparatus comprises controller and coupled semiconductor storage medium, it is characterized in that, described controller comprises:
Reclaim query unit, travel through the subregion that needs to reclaim empty piece in the described semiconductor storage medium, and from described subregion, inquire about the logical block of physical block outside the occupying volume;
Empty piece reclaims the unit, and the link to each other line data of going forward side by side of query unit is mutual with reclaiming, and the active page in the described extra physical block is moved in the physical block of moving into of appointment, and is inserted sky piece pond after extra physical block wiped.
2, the system that semiconductor storage medium is carried out the recovery of sky piece according to claim 1 is characterized in that described recovery query unit comprises:
The subregion enquiry module, according to the physical block quantity that each subregion in the described semiconductor storage medium takies, inquiry needs to reclaim the subregion of empty piece;
The logical block enquiry module, the line data of going forward side by side of linking to each other with the subregion enquiry module is mutual, the logical block of physical block outside the inquiry occupying volume from the described subregion that needs to reclaim empty piece.
3, the system that semiconductor storage medium is carried out the recovery of sky piece according to claim 1 is characterized in that, described empty piece reclaims the unit and comprises:
The designated module of moving into, the logical block that is used for physical block outside described occupying volume is specified the physical block of moving into;
The data migtation module, the line data of going forward side by side of linking to each other with the designated module of moving into is mutual, and the active page in the described extra physical block is moved in the described physical block of moving into;
The data erase module, the line data of going forward side by side of linking to each other with the data migtation module is mutual, and sky piece pond is wiped and put into to described extra physical block.
4, a kind of semiconductor memory apparatus that carries out the recovery of sky piece comprises controller and coupled semiconductor storage medium, it is characterized in that described controller comprises:
Reclaim query unit, travel through the subregion that needs to reclaim empty piece in the described semiconductor storage medium, and from described subregion, inquire about the logical block of physical block outside the occupying volume;
Empty piece reclaims the unit, and the link to each other line data of going forward side by side of query unit is mutual with reclaiming, and the active page in the described extra physical block is moved in the physical block of moving into of appointment, and is inserted sky piece pond after extra physical block wiped.
5, the semiconductor memory apparatus that carries out the recovery of sky piece according to claim 4 is characterized in that described recovery query unit comprises:
The subregion enquiry module, according to the physical block quantity that each subregion in the described semiconductor storage medium takies, inquiry needs to reclaim the subregion of empty piece;
The logical block enquiry module, the line data of going forward side by side of linking to each other with the subregion enquiry module is mutual, the logical block of physical block outside the inquiry occupying volume from the described subregion that needs to reclaim empty piece.
6, the semiconductor memory apparatus that carries out the recovery of sky piece according to claim 4 is characterized in that, described empty piece reclaims the unit and comprises:
The designated module of moving into, the logical block that is used for physical block outside described occupying volume is specified the physical block of moving into;
The data migtation module, the line data of going forward side by side of linking to each other with the designated module of moving into is mutual, and the active page in the described extra physical block is moved in the described physical block of moving into;
The data erase module, the line data of going forward side by side of linking to each other with the data migtation module is mutual, and sky piece pond is wiped and put into to described extra physical block.
7, a kind of method that semiconductor storage medium is carried out the recovery of sky piece, described semiconductor memory apparatus comprises semiconductor storage medium, it is characterized in that, said method comprising the steps of:
A. travel through the subregion that needs to reclaim empty piece in the semiconductor storage medium, and from described subregion, inquire about the logical block of physical block outside the occupying volume;
B. the active page in the described extra physical block is moved in the physical block of moving into of appointment;
C. described extra physical block is wiped, and put into sky piece pond.
8, the method that semiconductor storage medium is carried out the recovery of sky piece according to claim 7 is characterized in that, also comprises before the described steps A:
A0. the physical block quantity that takies according to each subregion of described semiconductor storage medium is judged the subregion that needs to reclaim empty piece.
9, according to claim 8 semiconductor storage medium is carried out the method that the sky piece reclaims, it is characterized in that, the startup of step that described judgement need be reclaimed the subregion of empty piece comprises constantly:
When described semiconductor memory apparatus is in idle condition, when perhaps in write operation, needing to reclaim empty piece.
10, the method that semiconductor storage medium is carried out the recovery of sky piece according to claim 7 is characterized in that the physical block of moving among the described step B comprises:
Empty piece, or physical block current to be written with excess room.
11, the method that semiconductor storage medium is carried out the recovery of sky piece according to claim 10 is characterized in that, said method comprising the steps of:
A '. need to reclaim the subregion of empty piece in the traversal semiconductor storage medium, and the logical block that physical block is maximum and active page is minimum outside the inquiry occupying volume from described subregion;
B '. in described logical block, inserted piece as the physical block of moving into, and the active page in the extra physical block has all been moved in this physical block of moving into;
C '. extra physical block is wiped and inserted in the sky piece pond.
12, the method that semiconductor storage medium is carried out the recovery of sky piece according to claim 10 is characterized in that, said method comprising the steps of:
A ". need to reclaim the subregion of empty piece in the traversal semiconductor storage medium, but and the logical block that from described subregion, reclaims in physical block and the execution block outside the inquiry occupying volume;
B ". specify physical block current to be written to be the physical block of moving into, and the active page in the extra physical block is all moved in this physical block of moving into excess room;
C ". extra physical block is wiped and inserted in the sky piece pond.
13, the method that semiconductor storage medium is carried out the recovery of sky piece according to claim 9 is characterized in that, reclaims empty piece and comprise following situation in described write operation:
Reclaim empty piece earlier, write operation is carried out in the back; And
Carry out write operation earlier, empty piece is reclaimed in the back.
14, the method that semiconductor storage medium is carried out the recovery of sky piece according to claim 13 is characterized in that, comprises after carrying out write operation:
Inquire about the invalid block in the current logical block, and insert in the sky piece pond after the invalid block that inquires wiped.
CN2008101458863A 2008-08-18 2008-08-18 Method, system and equipment for carrying out empty block reclamation for semiconductor storage medium Active CN101655819B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN2008101458863A CN101655819B (en) 2008-08-18 2008-08-18 Method, system and equipment for carrying out empty block reclamation for semiconductor storage medium
HK10108091.9A HK1141604B (en) 2010-08-24 Method, system and apparatus for carrying out empty block reclamation for semiconductor storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2008101458863A CN101655819B (en) 2008-08-18 2008-08-18 Method, system and equipment for carrying out empty block reclamation for semiconductor storage medium

Publications (2)

Publication Number Publication Date
CN101655819A true CN101655819A (en) 2010-02-24
CN101655819B CN101655819B (en) 2012-11-28

Family

ID=41710113

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2008101458863A Active CN101655819B (en) 2008-08-18 2008-08-18 Method, system and equipment for carrying out empty block reclamation for semiconductor storage medium

Country Status (1)

Country Link
CN (1) CN101655819B (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102622307A (en) * 2012-02-27 2012-08-01 记忆科技(深圳)有限公司 Operating method for hard disk data and hard disk controller
CN102841849A (en) * 2011-05-19 2012-12-26 国际商业机器公司 Method and system for operating computerized memory
CN105278876A (en) * 2015-09-23 2016-01-27 华为技术有限公司 Data wiping method and device of solid state device
CN113625973A (en) * 2021-08-30 2021-11-09 深圳市得一微电子有限责任公司 Data writing method and device, electronic equipment and computer readable storage medium

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7039788B1 (en) * 2002-10-28 2006-05-02 Sandisk Corporation Method and apparatus for splitting a logical block

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102841849A (en) * 2011-05-19 2012-12-26 国际商业机器公司 Method and system for operating computerized memory
CN102841849B (en) * 2011-05-19 2015-10-28 国际商业机器公司 For operating the method and system of computerize storer
US9218277B2 (en) 2011-05-19 2015-12-22 International Business Machines Corporation Wear leveling
US9274944B2 (en) 2011-05-19 2016-03-01 International Business Machines Corporation Wear leveling
CN102622307A (en) * 2012-02-27 2012-08-01 记忆科技(深圳)有限公司 Operating method for hard disk data and hard disk controller
CN102622307B (en) * 2012-02-27 2016-03-30 记忆科技(深圳)有限公司 The method of operating of hard disc data and hard disk controller
CN105278876A (en) * 2015-09-23 2016-01-27 华为技术有限公司 Data wiping method and device of solid state device
WO2017050028A1 (en) * 2015-09-23 2017-03-30 华为技术有限公司 Solid state drive data erasing method and device
CN105278876B (en) * 2015-09-23 2018-12-14 华为技术有限公司 A kind of the data method for deleting and device of solid state hard disk
CN113625973A (en) * 2021-08-30 2021-11-09 深圳市得一微电子有限责任公司 Data writing method and device, electronic equipment and computer readable storage medium
CN113625973B (en) * 2021-08-30 2024-01-16 得一微电子股份有限公司 Data writing method, device, electronic equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN101655819B (en) 2012-11-28
HK1141604A1 (en) 2010-11-12

Similar Documents

Publication Publication Date Title
CN101458613B (en) Method for implementing mixed hierarchical array, the hierarchical array and storage system
KR100975825B1 (en) Memory, memory system and memory method
KR101663667B1 (en) Method and apparatus for data management in flash memory by address mapping
CN101980177B (en) Method and device for operating Flash
CN114546296B (en) ZNS solid state disk-based full flash memory system and address mapping method
CN113254365B (en) Storage space management method, device, equipment, medium and program product
KR102349999B1 (en) Semiconductor device and operating method thereof
KR100954039B1 (en) Flash memory control method and control device
CN101122885A (en) Data cache processing method, system and data cache device
US10120588B2 (en) Sliding-window multi-class striping
CN107256196A (en) The caching system and method for support zero-copy based on flash array
CN106548789A (en) Method and apparatus for operating stacked tile type magnetic recording equipment
CN111309262B (en) Distributed storage cache reading and writing method
CN109671458A (en) The method of management flash memory module and relevant flash controller
CN102508788A (en) SSD (solid state drive) and SSD garbage collection method and device
JPWO2017149592A1 (en) Storage device
CN101655819B (en) Method, system and equipment for carrying out empty block reclamation for semiconductor storage medium
CN101727403A (en) Data storage system, equipment and method
KR101587995B1 (en) Adaptive logging device and method
CN101539887B (en) Flash memory management method and computer system
CN112000426A (en) Data processing method and device
CN103150256B (en) Improve method and the device of USB flash memory write performance
CN102004697B (en) Flash recovery method and device
CN120929645A (en) Vector index updating method and device, computer equipment and storage medium
CN108804571B (en) Data storage method, device and equipment

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 1141604

Country of ref document: HK

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
REG Reference to a national code

Ref country code: HK

Ref legal event code: GR

Ref document number: 1141604

Country of ref document: HK