CN103123609B - Blocking management method of storer - Google Patents

Blocking management method of storer Download PDF

Info

Publication number
CN103123609B
CN103123609B CN201310078623.6A CN201310078623A CN103123609B CN 103123609 B CN103123609 B CN 103123609B CN 201310078623 A CN201310078623 A CN 201310078623A CN 103123609 B CN103123609 B CN 103123609B
Authority
CN
China
Prior art keywords
storage block
sub
block
storer
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.)
Active
Application number
CN201310078623.6A
Other languages
Chinese (zh)
Other versions
CN103123609A (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.)
Shanghai Institute of Microsystem and Information Technology of CAS
Original Assignee
Shanghai Institute of Microsystem and Information Technology of CAS
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 Shanghai Institute of Microsystem and Information Technology of CAS filed Critical Shanghai Institute of Microsystem and Information Technology of CAS
Priority to CN201310078623.6A priority Critical patent/CN103123609B/en
Publication of CN103123609A publication Critical patent/CN103123609A/en
Application granted granted Critical
Publication of CN103123609B publication Critical patent/CN103123609B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

The invention provides a blocking management method of a storer. According to the method, first, storage blocks included by the storer are averagely divided into at least two sub-storage blocks, and a recording space is placed in each storage block; second, writing times in the recording space of each sub-storage block are based on to confirm whether the sub-storage blocks are disassembled and / or the storage blocks are merged or not; and then the sub-storage blocks which are confirmed to disassemble are disassembled and / or the storage blocks which are confirmed to merge are merged, and therefore flexible management of the storage blocks is achieved, use ratios of free pages in the storer are improved, storage fragments are reduced, and accordingly service life of the storer is prolonged.

Description

The block management method of storer
Technical field
The present invention relates to semiconductor memory field, particularly relate to a kind of block management method of storer.
Background technology
Memory inside comprises memory bank, various logic parts and control circuit etc.Memory bank is the major part that data store, first inside is divided into a lot of storage unit (storage block) during its work, each storage block comprises again several memory elements (or claiming to store primitive or storage element), and each memory element can deposit a binary code " 0 " or " 1 ".The piecemeal mechanism of memory inside embodies the performance of storer and has a great impact.Adopt different piecemeal mechanism can have greatly improved to the serviceable life of storer and abrasion condition according to the difference of various storer feature.
In current nonvolatile memory market, FLASH occupies dominant position always.FLASH is the operating strategy adopting fixed block, and its specific embodiments is: some pieces that are divided into capacity fixed size consistent FLASH memory bank, and each piece is divided into again several Physical Page; The read and write of FLASH is all carry out in units of page; But block is the least unit of FLASH erase operation, before a Physical Page is rewritten, first must perform erase operation to the block at this page of place.When such mechanism can cause the block when certain available free page to need to be updated, although free page is not updated, it writes number of times also can increase by 1, so just wastes and once writes chance, this free page can not be fully utilized, add the degree of wear of storer.What adopt due to FLASH is the mode that strange land upgrades simultaneously, and namely in erasable process, it does not upgrade in former data block, but separately looks for a new data block to re-write, and cause the data failure in former data block, data block is invalid from effectively becoming.When invalid data block too much causes free space not enough, just need to carry out garbage reclamation, namely some data blocks are selected, effective page is wherein copied to other positions, then erase operation is carried out to these data blocks, to reclaim the space that these data blocks take, therefore the operating strategy of fixed block needs more effective garbage collection algorithms to support.
Although the fixed block strategy of FLASH realizes fairly simple, but, FLASH memory based on charge-storage mechanism encounters serious technical bottleneck with the expansion of technology: because FLASH memory utilizes the electric charge in floating boom to store data, therefore the high energy thermal resistance in read-write process may cause the damage of storer itself, greatly affects the reliability of device; Meanwhile, for avoiding the crosstalk between device, when FLASH memory needs to wipe certain a data, need the data erase of whole data block, this have impact on the speed of storer greatly, and causes being difficult to continue devices scale below 65nm node.DRAM storer is also faced with same problem.These shortcomings greatly limit the application of FLASH and DRAM in nonvolatile memory of future generation.The following condition of storer demand fulfillment of future generation: read or write speed, larger memory capacity and lower power consumption faster.The candidate technologies of nonvolatile memory of future generation is respectively: ferroelectric memory (FRAM), magnetic storage (MRAM) and phase transition storage (PCRAM).
And nonvolatile memory of future generation faces block management problem equally, thus, how a kind of new block management method is proposed, the request for utilization of different non-volatile storer can be adapted to, effectively can improve again the read-write utilization factor of storer, reduce the generation of storage fragmentation, real is this area problem demanding prompt solution simultaneously.
Summary of the invention
The shortcoming of prior art in view of the above, the object of the present invention is to provide a kind of block management method of storer, to realize the abrasion equilibrium of storer, improves the utilization factor of free page in storer, reduces storage fragmentation, and then improve the serviceable life of chip.
For achieving the above object and other relevant objects, the invention provides a kind of block management method of storer, it at least comprises step:
The each storage block comprised by storer is divided at least two sub-storage blocks, and arranges a record space in each sub-storage block;
Determine whether that antithetical phrase storage block carries out splitting and/or merging storage block based on the number of times of writing in the record space of each sub-storage block;
To determine split sub-storage block split and/or to determine merge storage block merge.
Preferably, write number of times lack of uniformity based on first of a storage block comparing of threshold value to determine whether to split this storage block with fractionation; More preferably, first of storage block write the unbalanced each sub-storage block comprised based on this storage block of number of times write the maximum in number of times and reckling is determined.
Preferably, write number of times lack of uniformity based on second of storage block comparing of threshold value to determine whether to merge adjacent memory blocks with merging; More preferably, second of storage block is write number of times lack of uniformity and is write number of times difference to determine based on this storage block and adjacent memory blocks, wherein, storage block write the maximum write in number of times that number of times equals each sub-storage block in this storage block.
Preferably, the memory capacity of each sub-storage block in same storage block is identical.
Preferably, storer comprises non-volatile RAM etc.
As mentioned above, the block management method of storer of the present invention, has following beneficial effect: can merge storage block according to actual conditions, can split again to storage block; Realize the management of flexible piecemeal, free page is fully utilized, prevent the waste of free page, the generation of effective control store fragment, improves the serviceable life of chip simultaneously.
Accompanying drawing explanation
Fig. 1 is shown as a kind of preferred flow charts of the block management method of storer of the present invention.
The storage block that Fig. 2 is shown as the block management method of storer of the present invention splits schematic diagram.
Fig. 3 is shown as the another kind of preferred flow charts of the block management method of storer of the present invention.
Fig. 4 is shown as the storage block data-moving schematic diagram of the block management method of storer of the present invention.
The storage block that Fig. 5 is shown as the block management method of storer of the present invention merges schematic diagram.
Element numbers explanation
A2, A3, A4, A6, A7 storage block
A21, A22, A31, A32 storage block
The sub-storage block of A211, A212, A221, A222
A41, A42, A61, A62 storage block
A71, A72 storage block
S11 ~ S13, S21 step
Embodiment
Below by way of specific instantiation, embodiments of the present invention are described, those skilled in the art the content disclosed by this instructions can understand other advantages of the present invention and effect easily.The present invention can also be implemented or be applied by embodiments different in addition, and the every details in this instructions also can based on different viewpoints and application, carries out various modification or change not deviating under spirit of the present invention.
Refer to Fig. 1 to Fig. 5.It should be noted that, the diagram provided in the present embodiment only illustrates basic conception of the present invention in a schematic way, then only the assembly relevant with the present invention is shown in graphic but not component count, shape and size when implementing according to reality is drawn, it is actual when implementing, and the kenel of each assembly, quantity and ratio can be a kind of change arbitrarily, and its assembly layout kenel also may be more complicated.
As shown in Figure 1, the invention provides a kind of block management method of storer.Wherein, described storer comprises the storer that any one has multiple storage block, preferably, includes but not limited to: non-volatile RAM, such as, and ferroelectric memory (FRAM), magnetic storage (MRAM) and phase transition storage (PCRAM) etc.
In step s 11, before write data in storer, each storage block first comprised by storer is divided at least two sub-storage blocks, and arranges a record space in each sub-storage block.
Wherein, record space writes number of times for what record sub-storage block.
Preferably, each storage block is divided into the identical sub-storage block of 2 capacity.
In step s 12, after writing data in a sub-storage block at every turn, data in the record space of this sub-storage block are added 1, and after writing ED to the storage block belonging to this sub-storage block, number of times of writing in each sub-storage block comprised based on this storage block record space separately determines whether that antithetical phrase storage block splits, if so, then enter step S13, otherwise terminate.
Preferably, write number of times lack of uniformity based on first of this storage block and comparing of threshold value determine whether that antithetical phrase storage block splits with fractionation, if first writes number of times lack of uniformity and be greater than fractionation threshold value, then the sub-storage block of this storage block is split, otherwise terminate.
Wherein, first writes number of times lack of uniformity for a kind of parameter writing number of times difference representing each sub-storage block that storage block comprises, preferably, its each sub-storage block comprised based on this storage block write the maximum in number of times and reckling is determined.
Such as, storage block A1 comprise sub-storage block A11, A12 ... A1n, sub-storage block A11, A12 ... A1n separately write number of times be respectively c1, c2 ... cn, wherein, c1 is the maximum, and cn is reckling, then first of storage block A1 write number of times lack of uniformity and be
In step s 13, sub-storage block is split.
Preferably, the sub-storage block writing least number of times in storage block is split, and the storage block only comprising a sub-storage block newly formed is further divided at least two sub-storage blocks, and a record space is set in each sub-storage block.
Such as, as shown in Figure 2, storage block A2 comprises sub-storage block A21, A22, and wherein, the number of times of writing of the record space A23 record of sub-storage block A21 is 1000, and the number of times of writing of the record space A24 record of sub-storage block A22 is 80, be greater than and split threshold value 0.8, then the sub-storage block A22 writing least number of times in this storage block A2 is divided into sub-storage block A221, A222, the number of times that the record space A24 that the number of times that simultaneously the record space A224 of the number of times that records of the record space A223 of sub-storage block A221 and sub-storage block A222 records is equal to the sub-storage block A22 do not split records, namely 80.
As shown in Figure 3, the block management method of storer of the present invention comprises the following steps:
In the step s 21, based on writing number of times to determine whether and merge storage block in the record space of each sub-storage block.
Preferably, during garbage reclamation, storer is scanned, when scanning a recuperable storage block, first judge that second of this storage block writes number of times lack of uniformity and whether be less than merging threshold value, if, then judge that whether the data in this adjacent memory blocks are effective again, if effectively, then by after the data-moving of this adjacent memory blocks, then this storage block and adjacent memory blocks are merged, if invalid, then direct this storage block and adjacent memory blocks to be merged; Subsequently, the storage block after merging is divided at least two sub-storage blocks, and a record space is set in each sub-storage block; And if second of this storage block writes number of times lack of uniformity and is not less than merging threshold value, then this storage block is carried out garbage reclamation; Then aforementioned identical process is also carried out to the storage block that the next one can reclaim, till last storage block can carrying out reclaiming carries out aforementioned identical process.
Wherein, it is a kind of parameter writing number of times difference representing storage block and adjacent memory blocks that second of storage block writes number of times lack of uniformity, preferably, it writes number of times difference to determine directly based on this storage block and adjacent memory blocks, storage block write that number of times equals each sub-storage block in this storage block write number of times the maximum.
Such as, when carrying out garbage reclamation, determine that the storage block A3 in storer is recuperable storage block, the difference writing number of times c41 writing number of times c31 and adjacent memory blocks A4 based on this storage block A3 is less than merging threshold value, then judge that whether the data in this adjacent memory blocks A4 are effective again, if, then the data in this storage block A4 are moved, as shown in Figure 4, move in the sub-storage block A61 of storage block A6 by the valid data in the sub-storage block A41 of storage block A4, valid data in the sub-storage block A42 of storage block A4 are moved in the sub-storage block A62 of storage block A6, again storage block A3 and storage block A4 is merged subsequently, as shown in Figure 5, storage block A3 and A4 is merged into new storage block A7, and storage block A7 is divided at least two sub-storage blocks, in each sub-storage block, a record space is set, wherein, storage block A7 write the greater write in number of times that number of times is storage block A3, A4, , then the process identical with aforementioned storage block A3 is carried out, till the recuperable storage block of last block is carried out after the process identical with aforementioned storage block A3 in storer to next recuperable storage block in storer then.
In sum, the block management method of storer of the present invention takes full advantage of the read write attribute of non-volatile RAM, realize the flexible management to storage block, the service efficiency of the page is significantly improved, greatly extend the serviceable life of storer, effectively control the generation of storage fragmentation simultaneously.So the present invention effectively overcomes various shortcoming of the prior art and tool high industrial utilization.
Above-described embodiment is illustrative principle of the present invention and effect thereof only, but not for limiting the present invention.Any person skilled in the art scholar all without prejudice under spirit of the present invention and category, can modify above-described embodiment or changes.Therefore, such as have in art usually know the knowledgeable do not depart from complete under disclosed spirit and technological thought all equivalence modify or change, must be contained by claim of the present invention.

Claims (7)

1. a block management method for storer, is characterized in that, the block management method of described storer at least comprises step:
The each storage block comprised by storer is divided at least two sub-storage blocks, and arranges a record space in each sub-storage block;
Based on writing number of times to determine whether and split this sub-storage block and/or merge in the record space of each sub-storage block;
To determine split sub-storage block split and/or to determine merge sub-storage block merge;
Write number of times lack of uniformity based on first of a sub-storage block to determine whether to split this sub-storage block or write number of times lack of uniformity based on second of sub-storage block comparing of threshold value to determine whether to merge adjacent sub-storage block with merging with comparing of fractionation threshold value.
2. the block management method of storer according to claim 1, is characterized in that: first of sub-storage block write the unbalanced each sub-storage block comprised based on this sub-storage block of number of times write the maximum in number of times and reckling is determined.
3. the block management method of storer according to claim 1, it is characterized in that: second of sub-storage block is write number of times lack of uniformity and write number of times difference to determine based on this sub-storage block and adjacent sub-storage block, wherein, sub-storage block write the maximum writing number of times that number of times equals each sub-storage block in this sub-storage block.
4. the block management method of storer according to claim 1, is characterized in that: merge after being moved by the valid data in sub-storage block to be combined again.
5. the block management method of storer according to claim 1, characterized by further comprising: the sub-storage block formed after merging is divided at least two sub-storage blocks again, and arranges a record space in each sub-storage block.
6. the block management method of storer according to claim 1 or 5, is characterized in that: the memory capacity of each sub-storage block in same sub-storage block is identical.
7. the block management method of storer according to claim 1, is characterized in that: storer comprises non-volatile RAM.
CN201310078623.6A 2013-03-13 2013-03-13 Blocking management method of storer Active CN103123609B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310078623.6A CN103123609B (en) 2013-03-13 2013-03-13 Blocking management method of storer

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310078623.6A CN103123609B (en) 2013-03-13 2013-03-13 Blocking management method of storer

Publications (2)

Publication Number Publication Date
CN103123609A CN103123609A (en) 2013-05-29
CN103123609B true CN103123609B (en) 2015-07-15

Family

ID=48454593

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310078623.6A Active CN103123609B (en) 2013-03-13 2013-03-13 Blocking management method of storer

Country Status (1)

Country Link
CN (1) CN103123609B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106383936B (en) * 2016-09-07 2020-01-31 京微齐力(北京)科技有限公司 FPGA memory splitting method
CN109298879A (en) * 2017-07-25 2019-02-01 深圳市中兴微电子技术有限公司 A kind of method of efficient Internet of Things FOTA upgrading

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127004A (en) * 2007-09-24 2008-02-20 中兴通讯股份有限公司 System and method for accessing data on flash memory
CN101226504A (en) * 2008-01-25 2008-07-23 炬力集成电路设计有限公司 Method and apparatus for preventing memory from damage
CN101799784A (en) * 2009-02-10 2010-08-11 三星电子株式会社 Storage arrangement and loss averaging method thereof
CN102033812A (en) * 2009-09-24 2011-04-27 慧荣科技股份有限公司 Method for managing plurality of blocks of flash memory and relevant memory device and controller thereof
WO2012062233A1 (en) * 2010-11-08 2012-05-18 Hyperstone Gmbh Method for deallocating memory areas no longer needed on non-volatile memory media
CN102890653A (en) * 2011-07-18 2013-01-23 群联电子股份有限公司 Instruction executing method, memory controller and memory storage device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7885932B2 (en) * 2006-11-01 2011-02-08 Ab Initio Technology Llc Managing storage of individually accessible data units
JP4444314B2 (en) * 2007-07-13 2010-03-31 株式会社東芝 Semiconductor memory information storage device and write control method thereof

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101127004A (en) * 2007-09-24 2008-02-20 中兴通讯股份有限公司 System and method for accessing data on flash memory
CN101226504A (en) * 2008-01-25 2008-07-23 炬力集成电路设计有限公司 Method and apparatus for preventing memory from damage
CN101799784A (en) * 2009-02-10 2010-08-11 三星电子株式会社 Storage arrangement and loss averaging method thereof
CN102033812A (en) * 2009-09-24 2011-04-27 慧荣科技股份有限公司 Method for managing plurality of blocks of flash memory and relevant memory device and controller thereof
WO2012062233A1 (en) * 2010-11-08 2012-05-18 Hyperstone Gmbh Method for deallocating memory areas no longer needed on non-volatile memory media
CN102890653A (en) * 2011-07-18 2013-01-23 群联电子股份有限公司 Instruction executing method, memory controller and memory storage device

Also Published As

Publication number Publication date
CN103123609A (en) 2013-05-29

Similar Documents

Publication Publication Date Title
KR102143086B1 (en) Memory device including dynamic super block and related method and electronic system
US10838859B2 (en) Recency based victim block selection for garbage collection in a solid state device (SSD)
US10296453B2 (en) Memory controller, non-volatile memory system, and method of operating the same
CN104750619B (en) Data memory device and method for controlling flash memory
US9582208B2 (en) Memory system performing incremental merge operation and data write method
CN104484283B (en) A kind of method for reducing solid state disk write amplification
CN108319433B (en) Storage management method for NOR Flash of small-memory single chip microcomputer
CN110058796A (en) Data memory device
CN101241471A (en) Flash memory system and garbage collection method thereof
EP2665065A2 (en) Electronic device employing flash memory
CN104268095A (en) Memory and data reading/ writing operation method based on memory
US10922011B2 (en) Controllers configured to perform secure deletion, key-value storage devices including said controllers, and methods of operation thereof
TW201525692A (en) Method and system for programming a multi-bit per cell non-volatile memory
TWI498735B (en) Hinting of deleted data from host to storage device
CN106445832A (en) Address mapping method and apparatus for flash storage system
TWI540428B (en) Data writing method, memory controller and memory storage apparatus
US11307979B2 (en) Data storage device and non-volatile memory control method
CN115756312A (en) Data access system, data access method, and storage medium
CN112130749B (en) Data storage device and non-volatile memory control method
US20210026763A1 (en) Storage device for improving journal replay, operating method thereof, and electronic device including the storage device
CN103123609B (en) Blocking management method of storer
CN100456263C (en) Method for treating broken block when using flash memory in tax-controlled cashing machine
CN105468998A (en) Data protection method, data protection apparatus and solid state disk storage system
TW202036300A (en) Data storage device and control method for non-volatile memory
KR101626218B1 (en) Block based page mapping method

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