CN117032599A - Method and device for improving organization efficiency of flash memory blocks in flash memory block management - Google Patents

Method and device for improving organization efficiency of flash memory blocks in flash memory block management Download PDF

Info

Publication number
CN117032599A
CN117032599A CN202311302490.6A CN202311302490A CN117032599A CN 117032599 A CN117032599 A CN 117032599A CN 202311302490 A CN202311302490 A CN 202311302490A CN 117032599 A CN117032599 A CN 117032599A
Authority
CN
China
Prior art keywords
node
flash memory
tree
nodes
minimum
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.)
Pending
Application number
CN202311302490.6A
Other languages
Chinese (zh)
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.)
Hubei Changjiang Wanrun Semiconductor Technology Co ltd
Original Assignee
Hubei Changjiang Wanrun Semiconductor 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 Hubei Changjiang Wanrun Semiconductor Technology Co ltd filed Critical Hubei Changjiang Wanrun Semiconductor Technology Co ltd
Priority to CN202311302490.6A priority Critical patent/CN117032599A/en
Publication of CN117032599A publication Critical patent/CN117032599A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9027Trees
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0638Organizing or formatting or addressing of data
    • G06F3/064Management of blocks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a method and a device for improving the organization efficiency of flash blocks in flash block management, wherein the method comprises the following steps: 1) Dividing a flash memory physical storage area into a plurality of nodes taking Super Block flash memory blocks as units, and giving continuous address information to the nodes in sequence; 2) According to the address information of the flash memory block node, constructing a logic organization structure of the flash memory block, and mapping with a flash memory physical storage area; 3) Performing node adding operation on the logic organization structure; 4) And performing node fetching operation on the logic organization structure. The invention adopts a tree structure mode to meet the organization requirement of the flash memory blocks, and under the organization management mode, the time complexity of each adding operation is smaller, the time consumption is obviously reduced, and the FTL efficiency is improved to a certain extent.

Description

Method and device for improving organization efficiency of flash memory blocks in flash memory block management
Technical Field
The present invention relates to memory technologies, and in particular, to a method and apparatus for improving the organization efficiency of flash blocks in flash block management.
Background
Because the erasing life of Flash is limited, once the erasing times of part of Flash blocks exceeds the erasing limit, the data on the Flash blocks are lost and marked with bad blocks, so that the physical space of the SSD is reduced, the service life of the SSD is reduced, and in order to avoid unbalanced distribution of the erasing times of the Flash blocks in the use process of the SSD, a wear balancing algorithm is adopted to balance the loads of all Flash blocks, and the erasing times are maintained within an average range, so that the problems can be avoided.
Super Block Management is a carrier for the implementation of the wear leveling algorithm. Super Block is a large logical Block Unit composed of multiple DIEs, block, and is the basic unit of Block management operations in the FTL. For all Super blocks, FTLs classify and organize them according to the data types written on them (number of valid data, degree of cold and hot of data, etc.), their own physical states (number of erasures, number of reads, GLevel voltage, etc.).
The current main stream is to organize by using an ordered chain table, and order the Super blocks according to a specified condition every time, and take out the desired maximum value or minimum value from the head or tail of the chain table, specifically according to the actual situation. The prior art is based on the data structure of a linked list to manage the flash memory blocks, and the invention hopes to start from the organization structure to improve the organization efficiency.
Disclosure of Invention
The invention aims to solve the technical problem of providing a method and a device for improving the organization efficiency of flash blocks in flash block management aiming at the defects in the prior art.
The technical scheme adopted for solving the technical problems is as follows: a method for improving the organization efficiency of flash memory blocks in flash memory block management comprises the following steps:
1) Dividing a flash memory physical storage area into a plurality of nodes taking Super Block flash memory blocks as units, and giving continuous address information to the nodes in sequence;
2) According to the address information of the flash memory block node, constructing a logic organization structure of the flash memory block, and mapping with a flash memory physical storage area; the method comprises the following steps:
2.1 Evaluating the average wear level of the current flash block;
2.2 If the average wear degree of the current flash memory block is smaller than the set threshold value, building a logic organization structure by adopting a minimum heap structure tree;
2.3 If the average wear degree of the current flash memory block is larger than the set threshold value, building a logic organization structure by adopting a maximum heap structure tree;
3) Performing node adding operation on the logic organization structure;
adding the new node to the last leaf node in the tree structure of the logic organization structure, and adjusting the node to maintain the original logic organization structure;
4) Performing node extraction operation on the logic organization structure;
determining the node to be taken out according to the requirement, and adjusting the node to maintain the original logic organization structure;
when the logical organization structure is a minimum heap structure tree,
if the node with the minimum abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the minimum heap structure;
if the node with the larger or maximum abrasion degree value needs to be taken out, selecting a leaf node to take out according to the requirement, and maintaining the minimum heap;
when the logical organization structure is a maximum heap structure tree,
if the node with the largest abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the maximum heap structure;
if the node with smaller or minimum abrasion degree value needs to be taken out, selecting the leaf node to take out according to the requirement, and maintaining the maximum heap.
According to the scheme, in the step 2), a minimum heap or maximum heap structure tree is adopted to build a logic organization structure as follows:
using a complete binary tree structure, and enabling each node on the binary tree to correspond to each node in the physical structure one by taking address information of flash memory block nodes as an order;
and according to the properties of the small root piles or the large root piles, the positions of the tree structure nodes are adjusted according to the abrasion degree values of the nodes, so that the tree structure nodes accord with the minimum pile or the maximum pile characteristics, and the minimum pile or the maximum pile structure tree is obtained.
According to the scheme, a complete binary tree structure is used in the logic organization structure in the step 2), and each node on the binary tree corresponds to each node in the physical structure one by one according to the address information of the flash memory block nodes as a sequence basis; the method comprises the following steps:
for any node group, the nodeiAs root node, nodejIs a left leaf nodekIs the right leaf node;
then the first time period of the first time period,
wherein,ijkthe sequence number of the corresponding node in the address information of the node;
height of the entire complete binary treehIn order to achieve this, the first and second,
wherein,nrepresenting the total number of nodes of the binary tree,ceilrepresenting rounding up the content in brackets;
sequence number of leftmost leaf node of last layer of complete binary treeThe following are provided:
wherein,subscript +.>Representing last left, representing the leftmost leaf node of the last layer.
According to the scheme, in the step 4), if the node with the larger abrasion degree value needs to be taken out, the last leaf node is selected to be taken out.
According to the above scheme, in step 4), if the node with the largest wear degree value needs to be taken out, all the leaf nodes are traversed to obtain the node with the largest wear degree value, if the node with the largest wear degree value is not the last leaf node, the last leaf node is exchanged to the node with the largest wear degree value, and node adjustment is performed to maintain the minimum heap structure.
The invention also provides a device for improving the organization efficiency of the flash memory blocks in the flash memory block management, which comprises:
the node dividing module is used for dividing the flash memory physical storage area into a plurality of nodes taking Super Block flash memory blocks as units and giving continuous address information to the nodes in sequence;
the logic mapping module is used for constructing a logic organization structure of the flash memory block according to the address information of the flash memory block node and mapping the logic organization structure with a flash memory physical storage area; the method comprises the following steps:
1) Evaluating the average wear degree of the current flash memory block;
2) If the average wear degree of the current flash memory block is smaller than the set threshold value, a logic organization structure is built by adopting a minimum heap structure tree;
3) If the average wear degree of the current flash memory block is larger than the set threshold value, building a logic organization structure by adopting a maximum heap structure tree;
the node adding module is used for adding node operation to the logic organization structure;
adding the new node to the last leaf node in the tree structure of the logic organization structure, and adjusting the node to maintain the original logic organization structure;
the node extraction module is used for extracting the node operation from the logic organization structure;
determining the node to be taken out according to the requirement, and adjusting the node to maintain the original logic organization structure;
when the logical organization structure is a minimum heap structure tree,
if the node with the minimum abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the minimum heap structure;
if the node with the larger or maximum abrasion degree value needs to be taken out, selecting a leaf node to take out according to the requirement, and maintaining the minimum heap;
when the logical organization structure is a maximum heap structure tree,
if the node with the largest abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the maximum heap structure;
if the node with smaller or minimum abrasion degree value needs to be taken out, selecting the leaf node to take out according to the requirement, and maintaining the maximum heap.
According to the scheme, the logic mapping module adopts a minimum heap or maximum heap structure tree to establish a logic organization structure as follows:
using a complete binary tree structure, and enabling each node on the binary tree to correspond to each node in the physical structure one by taking address information of flash memory block nodes as an order;
and according to the properties of the small root piles or the large root piles, the positions of the tree structure nodes are adjusted according to the abrasion degree values of the nodes, so that the tree structure nodes accord with the minimum pile or the maximum pile characteristics, and the minimum pile or the maximum pile structure tree is obtained.
According to the scheme, a complete binary tree structure is used in the logic mapping module, and each node on the binary tree corresponds to each node in the physical structure one by one according to the address information of the flash memory block nodes as a sequence basis; the method comprises the following steps:
for any node group, the nodeiAs root node, nodejIs a left leaf nodekIs the right leaf node;
then the first time period of the first time period,
wherein,ijkthe sequence number of the corresponding node in the address information of the node;
height of the entire complete binary treehIn order to achieve this, the first and second,
wherein,nrepresenting the total number of nodes of the binary tree,ceilrepresenting rounding up the content in brackets;
sequence number of leftmost leaf node of last layer of complete binary treeThe following are provided:
wherein,subscript +.>Representing last left, representing the leftmost leaf node of the last layer.
According to the scheme, in the node extraction module, if the node with the larger abrasion degree value needs to be extracted, the last leaf node is selected to be extracted.
According to the scheme, in the node extraction module, if the node with the largest wear degree value needs to be extracted, all the leaf nodes are traversed to obtain the node with the largest wear degree value for extraction, if the node with the largest wear degree value is not the last leaf node, the last leaf node is exchanged to the node with the largest wear degree value, and node adjustment is carried out to maintain the minimum heap structure.
The invention has the beneficial effects that:
compared with the existing linked list structure, the invention adopts a tree structure mode to cope with the organization requirement of the flash memory block. Under the organization management mode, the time complexity of each adding operation is O (log (n)), so that the time consumption is obviously reduced, and the FTL efficiency is improved to a certain extent.
Drawings
The invention will be further described with reference to the accompanying drawings and examples, in which:
FIG. 1 is a flow chart of a method of an embodiment of the present invention;
FIG. 2 is a schematic diagram of a node partition address of a physical storage area of a flash memory according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a binary tree structure of a logical organization of an embodiment of the present invention;
FIG. 4 is a flow chart of the add node operation of an embodiment of the present invention;
FIG. 5 is a schematic diagram of a switching process of nodes according to an embodiment of the present invention;
fig. 6 is a device configuration diagram of an embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the following examples in order to make the objects, technical solutions and advantages of the present invention more apparent. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
As shown in fig. 1, a method for improving the organization efficiency of flash blocks in flash block management includes the following steps:
1) Dividing a flash memory physical storage area into a plurality of nodes taking Super Block flash memory blocks as units, and giving continuous address information to the nodes in sequence;
as shown in FIG. 2, the starting address and the capacity are customized for a continuous segment of memory addresses.
Address=start address+node number of node i;
2) According to the address information of the flash memory block node, constructing a logic organization structure of the flash memory block, and mapping with a flash memory physical storage area; the method comprises the following steps:
2.1 Evaluating the average wear level of the current flash block;
2.2 If the average wear degree of the current flash memory block is smaller than the set threshold value, building a logic organization structure by adopting a minimum heap structure tree;
2.3 If the average wear degree of the current flash memory block is larger than the set threshold value, building a logic organization structure by adopting a maximum heap structure tree;
the method adopts a minimum heap or maximum heap structure tree to build a logic organization structure as follows:
using a complete binary tree structure, and enabling each node on the binary tree to correspond to each node in the physical structure one by one according to the address information of the flash memory block nodes as a sequence basis;
as in FIG. 3, for any node group, the nodesiAs root node, nodejIs a left leaf nodekIs the right leaf node;
then the first time period of the first time period,
wherein,ijkthe sequence number of the corresponding node in the address information of the node;
height of the entire complete binary treehIn order to achieve this, the first and second,
wherein,nrepresenting the total number of nodes of the binary tree,ceilrepresenting rounding up the content in brackets;
sequence number of leftmost leaf node of last layer of complete binary treeThe following are provided:
wherein,subscript +.>Representing last left, representing the leftmost leaf node of the last layer.
And according to the properties of the small root piles or the large root piles, the positions of the tree structure nodes are adjusted according to the abrasion degree values of the nodes, so that the tree structure nodes accord with the minimum pile or the maximum pile characteristics, and the minimum pile or the maximum pile structure tree is obtained.
3) Performing node adding operation on the logic organization structure;
when SSD firmware runs, the state of the flash blocks changes continuously with traffic. When a flash block is erased from the full state, it will change to Free state again, and this block will be added to the minimum heap/maximum heap structure, so that other modules of the firmware can take blocks from this structure for use.
When the new node is added, the new node is added to the last leaf node in the tree structure of the logic organization structure, and node adjustment is carried out to maintain the original logic organization structure;
the flow of the add node operation is shown in FIG. 4; in the process of node adjustment to maintain the original logical organization structure, an example of the exchange process of the nodes is shown in fig. 5, and it can be seen that the time complexity of the process is O (log (n));
4) Performing node extraction operation on the logic organization structure;
as described in the step 3) node adding operation, when the SSD firmware is running, other modules of the firmware, such as a data path module, take out the node from the structure as required when the data path module needs to open up a new writing point;
when the operation is executed, the node to be taken out is determined according to the need, and the node is adjusted to maintain the original logic organization structure;
when the logical organization structure is a minimum heap structure tree,
if the node with the minimum abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the minimum heap structure;
if the node with the larger or maximum abrasion degree value needs to be taken out, selecting a leaf node to take out according to the requirement, and maintaining the minimum heap;
and if the node with the larger abrasion degree value needs to be taken out, selecting the last leaf node to be taken out.
If the node with the largest abrasion degree value needs to be taken out, traversing all the leaf nodes to obtain the node with the largest abrasion degree value, taking out the node with the largest abrasion degree value, if the node with the largest abrasion degree value is not the last leaf node, exchanging the last leaf node to the node with the largest abrasion degree value, and adjusting the node to maintain the minimum heap structure.
In the process, whether the current Flash abrasion balance degree needs to be strictly controlled or not can be described by comparing the difference value between the maximum value and the minimum value of the abrasion degree value attribute with a specified threshold value.
When the logical organization structure is a maximum heap structure tree,
if the node with the largest abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the maximum heap structure;
if the node with smaller or minimum abrasion degree value needs to be taken out, selecting the leaf node to take out according to the requirement, and maintaining the maximum heap.
According to the above method, the present invention further provides an apparatus for improving the organization efficiency of flash blocks in flash block management, as shown in fig. 6, including:
the node dividing module is used for dividing the flash memory physical storage area into a plurality of nodes taking Super Block flash memory blocks as units and giving continuous address information to the nodes in sequence;
the logic mapping module is used for constructing a logic organization structure of the flash memory block according to the address information of the flash memory block node and mapping the logic organization structure with a flash memory physical storage area; the method comprises the following steps:
1) Evaluating the average wear degree of the current flash memory block;
2) If the average wear degree of the current flash memory block is smaller than the set threshold value, a logic organization structure is built by adopting a minimum heap structure tree;
3) If the average wear degree of the current flash memory block is larger than the set threshold value, building a logic organization structure by adopting a maximum heap structure tree;
the logic mapping module adopts a minimum heap or maximum heap structure tree to build a logic organization structure as follows:
using a complete binary tree structure, and enabling each node on the binary tree to correspond to each node in the physical structure one by one according to the address information of the flash memory block nodes as a sequence basis;
the method comprises the following steps:
for any node group, the nodeiAs root node, nodejIs a left leaf nodekIs the right leaf node;
then the first time period of the first time period,
wherein,ijkthe sequence number of the corresponding node in the address information of the node;
height of the entire complete binary treehIn order to achieve this, the first and second,
wherein the method comprises the steps ofnRepresenting the total number of nodes of the binary tree,ceilrepresenting rounding up the content in brackets;
sequence number of leftmost leaf node of last layer of complete binary treeThe following are provided:
wherein,subscript +.>Representing last left, representing the leftmost leaf node of the last layer.
According to the properties of the small root piles or the large root piles, the positions of the tree structure nodes are adjusted according to the abrasion degree values of the nodes, so that the positions of the tree structure nodes accord with the minimum pile or the maximum pile characteristics, and a minimum pile or maximum pile structure tree is obtained;
the node adding module is used for adding node operation to the logic organization structure;
adding the new node to the last leaf node in the tree structure of the logic organization structure, and adjusting the node to maintain the original logic organization structure;
the node extraction module is used for extracting the node operation from the logic organization structure;
determining the node to be taken out according to the requirement, and adjusting the node to maintain the original logic organization structure;
when the logical organization structure is a minimum heap structure tree,
if the node with the minimum abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the minimum heap structure;
if the node with the larger or maximum abrasion degree value needs to be taken out, selecting a leaf node to take out according to the requirement, and maintaining the minimum heap;
when the logical organization structure is a maximum heap structure tree,
if the node with the largest abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the maximum heap structure;
if the node with smaller or minimum abrasion degree value needs to be taken out, selecting the leaf node to take out according to the requirement, and maintaining the maximum heap.
It will be understood that modifications and variations will be apparent to those skilled in the art from the foregoing description, and it is intended that all such modifications and variations be included within the scope of the following claims.

Claims (13)

1. A method for improving the organization efficiency of flash memory blocks in flash memory block management, comprising the steps of:
1) Dividing a flash memory physical storage area into a plurality of nodes taking Super Block flash memory blocks as units, and giving continuous address information to the nodes in sequence;
2) According to the address information of the flash memory block node, constructing a logic organization structure of the flash memory block, and mapping with a flash memory physical storage area; the method comprises the following steps:
2.1 Evaluating the average wear level of the current flash block;
2.2 If the average wear degree of the current flash memory block is smaller than the set threshold value, building a logic organization structure by adopting a minimum heap structure tree;
2.3 If the average wear degree of the current flash memory block is larger than the set threshold value, building a logic organization structure by adopting a maximum heap structure tree;
3) Performing node adding operation on the logic organization structure;
adding the new node to the last leaf node in the tree structure of the logic organization structure, and adjusting the node to maintain the original logic organization structure;
4) Performing node extraction operation on the logic organization structure;
and determining the node to be fetched according to the requirement, and performing node adjustment to maintain the original logic organization structure.
2. The method for improving the organization efficiency of flash memory blocks in flash memory block management according to claim 1, wherein the establishing a logical organization structure using a minimum heap or a maximum heap structure tree in step 2) is:
using a complete binary tree structure, and enabling each node on the binary tree to correspond to each node in the physical structure one by taking address information of flash memory block nodes as an order;
and according to the properties of the small root piles or the large root piles, the positions of the tree structure nodes are adjusted according to the abrasion degree values of the nodes, so that the tree structure nodes accord with the minimum pile or the maximum pile characteristics, and the minimum pile or the maximum pile structure tree is obtained.
3. The method for improving the organization efficiency of flash memory blocks in flash memory block management according to claim 2, wherein in step 2), a complete binary tree structure is used in the logical organization structure, and each node in the binary tree corresponds to each node in the physical structure one by one according to the address information of the flash memory block nodes as a sequence basis; the method comprises the following steps:
for any node group, the nodeiAs root node, nodejIs a left leaf nodekIs the right leaf node;
then the first time period of the first time period,
wherein,ijkthe sequence number of the corresponding node in the address information of the node;
height of the entire complete binary treehIn order to achieve this, the first and second,
wherein,nrepresenting the total number of nodes of the binary tree,ceilrepresenting rounding up the content in brackets;
sequence number of leftmost leaf node of last layer of complete binary treeThe following are provided:
wherein,subscript +.>Representing last left, representing the leftmost leaf node of the last layer.
4. The method for improving the organization efficiency of flash memory blocks in flash memory block management according to claim 1, wherein in step 4), the node fetching operation is performed on the logical organization structure;
when the logical organization structure is a minimum heap structure tree,
if the node with the minimum abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the minimum heap structure;
if the node with the larger or maximum abrasion degree value needs to be taken out, selecting a leaf node to take out according to the requirement, and maintaining the minimum heap;
when the logical organization structure is a maximum heap structure tree,
if the node with the largest abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the maximum heap structure;
if the node with smaller or minimum abrasion degree value needs to be taken out, selecting the leaf node to take out according to the requirement, and maintaining the maximum heap.
5. The method according to claim 4, wherein in step 4), if a node with a larger wear level is required to be fetched, a last leaf node is selected to be fetched.
6. The method according to claim 4, wherein in step 4), if the node with the largest wear level is required to be fetched, all the leaf nodes are traversed to obtain the node with the largest wear level, if the node with the largest wear level is not the last leaf node, the last leaf node is swapped to the node with the largest wear level, and node adjustment is performed to maintain the minimum heap structure.
7. An apparatus for improving the organization efficiency of flash blocks in flash block management, comprising:
the node dividing module is used for dividing the flash memory physical storage area into a plurality of nodes taking Super Block flash memory blocks as units and giving continuous address information to the nodes in sequence;
the logic mapping module is used for constructing a logic organization structure of the flash memory block according to the address information of the flash memory block node and mapping the logic organization structure with a flash memory physical storage area; the method comprises the following steps:
1) Evaluating the average wear degree of the current flash memory block;
2) If the average wear degree of the current flash memory block is smaller than the set threshold value, a logic organization structure is built by adopting a minimum heap structure tree;
3) If the average wear degree of the current flash memory block is larger than the set threshold value, building a logic organization structure by adopting a maximum heap structure tree;
the node adding module is used for adding node operation to the logic organization structure;
adding the new node to the last leaf node in the tree structure of the logic organization structure, and adjusting the node to maintain the original logic organization structure;
the node extraction module is used for extracting the node operation from the logic organization structure;
and determining the node to be fetched according to the requirement, and performing node adjustment to maintain the original logic organization structure.
8. The apparatus for improving organization efficiency of flash memory blocks in flash memory block management according to claim 7, wherein the logic mapping module establishes a logic organization structure by using a minimum heap or a maximum heap structure tree as follows:
using a complete binary tree structure, and enabling each node on the binary tree to correspond to each node in the physical structure one by one according to the address information of the flash memory block nodes as a sequence basis;
and according to the properties of the small root piles or the large root piles, the positions of the tree structure nodes are adjusted according to the abrasion degree values of the nodes, so that the tree structure nodes accord with the minimum pile or the maximum pile characteristics, and the minimum pile or the maximum pile structure tree is obtained.
9. The apparatus for improving organization efficiency of flash memory blocks in flash memory block management according to claim 7, wherein in the node fetching module, when the node fetching operation is performed on the logical organization structure;
when the logical organization structure is a minimum heap structure tree,
if the node with the minimum abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the minimum heap structure;
if the node with the larger or maximum abrasion degree value needs to be taken out, selecting a leaf node to take out according to the requirement, and maintaining the minimum heap;
when the logical organization structure is a maximum heap structure tree,
if the node with the largest abrasion degree value needs to be taken out, taking out the root node, taking the last leaf node as a new root node, and carrying out node adjustment to maintain the maximum heap structure;
if the node with smaller or minimum abrasion degree value needs to be taken out, selecting the leaf node to take out according to the requirement, and maintaining the maximum heap.
10. The apparatus according to claim 9, wherein in the node fetching module, if a node with a larger wear level value needs to be fetched, a last leaf node is selected to be fetched.
11. The apparatus according to claim 9, wherein in the node extraction module, if the node with the largest wear level value needs to be extracted, all the leaf nodes are traversed to obtain the node with the largest wear level value for extraction, if the node with the largest wear level value is not the last leaf node, the last leaf node is exchanged to the node with the largest wear level value, and node adjustment is performed to maintain the minimum heap structure.
12. A flash memory storage system, comprising: a flash memory, a controller connected to the flash memory, and a computer program stored in and executable in the controller, which when executed implements the method according to any of claims 1-6.
13. A computer readable storage medium storing computer instructions for causing a processor to perform the method of any one of claims 1-6.
CN202311302490.6A 2023-10-10 2023-10-10 Method and device for improving organization efficiency of flash memory blocks in flash memory block management Pending CN117032599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311302490.6A CN117032599A (en) 2023-10-10 2023-10-10 Method and device for improving organization efficiency of flash memory blocks in flash memory block management

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311302490.6A CN117032599A (en) 2023-10-10 2023-10-10 Method and device for improving organization efficiency of flash memory blocks in flash memory block management

Publications (1)

Publication Number Publication Date
CN117032599A true CN117032599A (en) 2023-11-10

Family

ID=88626744

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311302490.6A Pending CN117032599A (en) 2023-10-10 2023-10-10 Method and device for improving organization efficiency of flash memory blocks in flash memory block management

Country Status (1)

Country Link
CN (1) CN117032599A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140173176A1 (en) * 2012-12-14 2014-06-19 Virtium Technology, Inc. Heap-based mechanism for efficient garbage collection block selection
CN112597068A (en) * 2019-10-02 2021-04-02 三星电子株式会社 Host system, operating method thereof, and data processing system including the host system
CN116126743A (en) * 2023-02-17 2023-05-16 贵州大学 Wear perception space allocation method based on persistent memory file system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140173176A1 (en) * 2012-12-14 2014-06-19 Virtium Technology, Inc. Heap-based mechanism for efficient garbage collection block selection
CN112597068A (en) * 2019-10-02 2021-04-02 三星电子株式会社 Host system, operating method thereof, and data processing system including the host system
CN116126743A (en) * 2023-02-17 2023-05-16 贵州大学 Wear perception space allocation method based on persistent memory file system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周云静: "《数据结构 C语言版》", 北京冶金工业出版社, pages: 189 - 191 *

Similar Documents

Publication Publication Date Title
CN105242871B (en) A kind of method for writing data and device
CN103092766B (en) A kind of loss equalizing implementation method for NAND FLASH
CN111090398A (en) Garbage recycling method, device and equipment for solid state disk and readable storage medium
CN103678150B (en) Solid state hard disc application method and device
CN102508785B (en) A kind of abrasion equilibrium method and device
US7925822B2 (en) Erase count recovery
CN105589811A (en) Data storage device and operating method
CN104503703B (en) The treating method and apparatus of caching
CN113196259A (en) Key value storage using logging in selective data storage formats
CN110851079B (en) Adaptive storage device loss balancing method and system
CN104881366B (en) Repair the method and system of homogenizing
CN103617124B (en) Flash memory management method and device
CN105022758B (en) A kind of text texture management method and apparatus
CN102354301A (en) Cache partitioning method
CN117032599A (en) Method and device for improving organization efficiency of flash memory blocks in flash memory block management
CN112416813B (en) Wear leveling method and device for solid state disk, computer equipment and storage medium
CN112039767B (en) Multi-data center energy-saving routing method and system based on reinforcement learning
CN112416814A (en) Management method for garbage collection in solid state disk, storage medium and electronic device
US8996786B2 (en) Nonvolatile memory system and block management method
CN103678141B (en) The management method and management system of flash memory
CN102298592A (en) Method and device for managing list
CN104216666A (en) Method and device for managing writing of disk data
CN102253894B (en) Method for file storage in continuous space of flash memory in equal probability manner
CN103051975A (en) P2P (peer to peer) cache data elimination method
WO2017092193A1 (en) Computer memory management method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination