WO2020082454A1 - Method for effectively accessing flash block state management table in flash storage device - Google Patents

Method for effectively accessing flash block state management table in flash storage device Download PDF

Info

Publication number
WO2020082454A1
WO2020082454A1 PCT/CN2018/115515 CN2018115515W WO2020082454A1 WO 2020082454 A1 WO2020082454 A1 WO 2020082454A1 CN 2018115515 W CN2018115515 W CN 2018115515W WO 2020082454 A1 WO2020082454 A1 WO 2020082454A1
Authority
WO
WIPO (PCT)
Prior art keywords
memory
flash
flash memory
segment
management table
Prior art date
Application number
PCT/CN2018/115515
Other languages
French (fr)
Chinese (zh)
Inventor
黄中柱
李庭育
魏智汎
张盛豪
Original Assignee
江苏华存电子科技有限公司
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 江苏华存电子科技有限公司 filed Critical 江苏华存电子科技有限公司
Publication of WO2020082454A1 publication Critical patent/WO2020082454A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F12/00Accessing, addressing or allocating within memory systems or architectures
    • G06F12/02Addressing or allocation; Relocation
    • G06F12/0223User address space allocation, e.g. contiguous or non contiguous base addressing
    • G06F12/023Free address space management
    • G06F12/0238Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
    • G06F12/0246Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2212/00Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
    • G06F2212/72Details relating to flash memory management
    • G06F2212/7211Wear leveling

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method for effectively accessing a flash block state management table in a flash storage device, comprising the following steps: step one: first determining a segmentation of the currently used block; step two: increasing one for the hit rate of the segmentation; step three: determining whether the segmentation is comprised in the memory, if yes, directly ending; if not, entering the next step; step four: determining whether to write the memory segmentation back to the flash, if yes, entering the next step; if not, skipping to step six; step five: determining, according to the hit rate, the segmentation written back to the flash; and step six: reading the segmentation related to the currently used block from the flash, and placing same into the memory. The method can effectively manage the block state management table, decrease the times of reading of the flash, avoid accelerating the loss of the flash, and significantly improve the execution efficiency.

Description

一种闪存存储设备中闪存块状态管理表有效存取的方法Method for effectively accessing state management table of flash memory block in flash memory storage device 技术领域Technical field
本发明涉及存储装置技术领域,具体为一种闪存存储设备中闪存块状态管理表有效存取的方法。The invention relates to the technical field of storage devices, in particular to a method for effectively accessing a flash memory block state management table in a flash memory storage device.
背景技术Background technique
闪存是一种长寿命的非易失性的存储器,数据删除不是以单个的字节为单位而是以固定的区块为单位,区块大小一般为256KB到20MB,闪存是电子可擦除只读存储器(EEPROM)的变种,闪存与EEPROM不同的是,EEPROM能在字节水平上进行删除和重写而不是整个芯片擦写,而闪存的大部分芯片需要块擦除。Flash memory is a long-life non-volatile memory. Data deletion is not in a single byte but in fixed blocks. The block size is generally 256KB to 20MB. Flash memory is electronically erasable only. A variant of read memory (EEPROM). Flash memory is different from EEPROM in that EEPROM can be deleted and rewritten at the byte level instead of the entire chip erase and write, and most chips of flash memory require block erase.
闪存中有n个块,每个块会根据需求有不一样的状态,包含为未使用或是已使用,已使用的块又根据不同的任务有各种不同的状态。因此需要用一张块状态管理表来记录信息,当存储装置断电后,可以透过这个块状态管理表来重建整个存储装置中的块的使用状况。There are n blocks in the flash memory, and each block will have a different state according to needs, including unused or used, and the used blocks have various states according to different tasks. Therefore, a block status management table is needed to record information. When the storage device is powered off, the block status management table can be used to reconstruct the usage status of the blocks in the entire storage device.
闪存块状态管理表会记录在内存中,当内存空间无法满足闪存块状态管理表的大小,将会把闪存块状态管理表切成好几个分段,每个分段记录相对应的块状态。The flash block state management table will be recorded in memory. When the memory space cannot meet the size of the flash block state management table, the flash block state management table will be cut into several segments, and each segment records the corresponding block state.
内存是计算机中重要的部件之一,它是与CPU进行沟通的桥梁。计算机中所有程序的运行都是在内存中进行的,因此内存的性能对计算机的影响非常大。内存也被称为内存储器,其作用是用于暂时存放CPU中的运算数据,以及与硬盘等外部存储器交换的数 据。只要计算机在运行中,CPU就会把需要运算的数据调到内存中进行运算,当运算完成后CPU再将结果传送出来,内存的运行也决定了计算机的稳定运行,内存是由内存芯片、电路板、金手指等部分组成的。Memory is one of the important components in a computer, and it is a bridge to communicate with the CPU. All programs in the computer are run in memory, so the performance of the memory has a great impact on the computer. The internal memory is also called internal memory. Its function is to temporarily store the calculation data in the CPU and the data exchanged with external storage such as hard disk. As long as the computer is running, the CPU will transfer the data that needs to be calculated to the memory for operation. When the operation is completed, the CPU will transfer the results. The operation of the memory also determines the stable operation of the computer. The memory is composed of memory chips and circuits. Board, gold finger and other parts.
内存又称主存,是CPU能直接寻址的存储空间,由半导体器件制成。内存的特点是存取速率快。内存是电脑中的主要部件,它是相对于外存而言的。我们平常使用的程序,如Windows操作系统、打字软件、游戏软件等,一般都是安装在硬盘等外存上的,但仅此是不能使用其功能的,必须把它们调入内存中运行,才能真正使用其功能,我们平时输入一段文字,或玩一个游戏,其实都是在内存中进行的,内存就是暂时存储程序以及数据的地方,比如当我们在使用WPS处理文稿时,当你在键盘上敲入字符时,它就被存入内存中,当你选择存盘时,内存中的数据才会被存入硬盘。Memory, also known as main memory, is a storage space that the CPU can directly address and is made of semiconductor devices. The characteristic of memory is fast access rate. Memory is the main component of a computer, and it is relative to external storage. The programs we usually use, such as the Windows operating system, typing software, game software, etc., are generally installed on external storage such as hard disks, but this is not the function, they must be transferred to the memory to run To really use its functions, we usually enter a piece of text or play a game, which is actually done in memory. Memory is where the programs and data are temporarily stored. For example, when we are using WPS to process documents, when you are on the keyboard When you type in a character, it will be stored in the memory. When you choose to save, the data in the memory will be saved in the hard disk.
内存中只会保存目前存取的块的那个分段,其他分段存放在闪存,当内存中分段已经和现在使用的块不相关,需要把分段更新的内容存入闪存,并把相关的分段从闪存中取出放到内存,这种方法增加闪存读取写入的次数,容易造成闪存的损耗并增加读写的时间,因此,亟待一种改进的技术来解决现有技术中所存在的这一问题。Only the segment of the currently accessed block is saved in the memory, and the other segments are stored in the flash memory. When the segment in the memory is not related to the currently used block, the updated content of the segment needs to be stored in the flash memory and related The segment is taken from the flash memory and put into the memory. This method increases the number of flash memory reads and writes, which is easy to cause the loss of the flash memory and increase the read and write time. This problem exists.
发明内容Summary of the invention
本发明的目的在于提供一种闪存存储设备中闪存块状态管理表有效存取的方法,可有效管理块状态管理表,减少闪存的读取次数, 避免加速闪存的损耗,大幅提升执行效率,以解决上述背景技术中提出的问题。The object of the present invention is to provide an effective access method for a flash block state management table in a flash storage device, which can effectively manage the block state management table, reduce the number of reads of the flash memory, avoid accelerating the loss of the flash memory, and greatly improve the execution efficiency, Solve the problems raised in the background art mentioned above.
为实现上述目的,本发明提供如下技术方案:一种闪存存储设备中闪存块状态管理表有效存取的方法,包括以下步骤:In order to achieve the above object, the present invention provides the following technical solution: A method for effectively accessing a flash memory block state management table in a flash memory storage device, including the following steps:
步骤一:首先确认目前使用块的分段;Step 1: First confirm the segmentation of the currently used block;
步骤二:此分段的命中率+1;Step 2: The hit rate of this segment is +1;
步骤三:确认内存中是否存在此分段,如果是,直接结束,如果否,进入下一步;Step 3: Confirm whether this segment exists in the memory, if yes, directly end, if not, go to the next step;
步骤四:确认是否要把内存分段写回到闪存,如果是,进入下一步,如果否,跳至步骤六;Step 4: Confirm whether to write the memory segment back to the flash memory, if yes, go to the next step, if no, skip to step 6;
步骤五:根据命中率决定写回闪存的分段;Step 5: Determine the segment to write back to the flash memory according to the hit rate;
步骤六:从闪存中读取与目前使用块相关的分段并放到内存。Step 6: Read the segment related to the currently used block from the flash memory and put it in the memory.
优选的,步骤三中内存中存放若干个分段并根据分段相关命中率高低来决定哪一个分段要被写回到闪存中。Preferably, in step three, several segments are stored in the memory and it is determined which segment is to be written back to the flash memory according to the segment hit rate.
优选的,步骤四中内存中有若干个块。Preferably, there are several blocks in the memory in step four.
优选的,步骤一中块根据需求有不一样的状态,块包含为未使用或是已使用,已使用的块又根据不同的任务有各种不同的状态。Preferably, in step one, the blocks have different states according to requirements. The blocks include unused or used, and the used blocks have various states according to different tasks.
与现有技术相比,本发明的有益效果是:Compared with the prior art, the beneficial effects of the present invention are:
可有效管理块状态管理表,减少闪存的读取次数,避免加速闪存的损耗,大幅提升执行效率。Can effectively manage the block state management table, reduce the number of flash memory reads, avoid accelerating the loss of flash memory, and greatly improve the execution efficiency.
附图说明BRIEF DESCRIPTION
图1为本发明流程示意图。Figure 1 is a schematic diagram of the process of the present invention.
图2为内存中存放两个分段来替换分段的演示示意图。FIG. 2 is a schematic diagram of replacing two segments by storing two segments in memory.
图3为传统方式替换分段的演示示意图。Fig. 3 is a schematic diagram showing the replacement of segments in a conventional manner.
具体实施方式detailed description
下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without making creative efforts fall within the protection scope of the present invention.
请参阅图1,本发明提供一种技术方案:一种闪存存储设备中闪存块状态管理表有效存取的方法,包括以下步骤:Referring to FIG. 1, the present invention provides a technical solution: a method for effectively accessing a flash memory block state management table in a flash memory storage device, including the following steps:
步骤一:首先确认目前使用块的分段;Step 1: First confirm the segmentation of the currently used block;
步骤二:此分段的命中率+1;Step 2: The hit rate of this segment is +1;
步骤三:确认内存中是否存在此分段,如果是,直接结束,如果否,进入下一步;Step 3: Confirm whether this segment exists in the memory, if yes, directly end, if not, go to the next step;
步骤四:确认是否要把内存分段写回到闪存,如果是,进入下一步,如果否,跳至步骤六;Step 4: Confirm whether to write the memory segment back to the flash memory, if yes, go to the next step, if no, skip to step 6;
步骤五:根据命中率决定写回闪存的分段;Step 5: Determine the segment to write back to the flash memory according to the hit rate;
步骤六:从闪存中读取与目前使用块相关的分段并放到内存。Step 6: Read the segment related to the currently used block from the flash memory and put it in the memory.
内存中存放若干个分段并根据分段相关命中率高低来决定哪一个分段要被写回到闪存中,内存中有若干个块,根据需求有不一样的状态,块包含为未使用或是已使用,已使用的块又根据不同的任务有各种不同的状态。Store several segments in the memory and decide which segment to be written back to the flash memory according to the hit rate of the segment. There are several blocks in the memory, and there are different states according to the requirements. The blocks are included as unused or It is used, and the used block has various states according to different tasks.
实施例一,如图2所示,现将内存中存放两个分段,根据分段相关命中率高低来决定哪一个分段要被写回到闪存中,假如是分段a->分段c->分段a->分段d一直反复循环这种状况,内存中先存放分段a,接着存放分段c,因为分段a在内存不需要从闪存中取出,接着是根据命中率把分段c写回到闪存中,然后把分段d读出放在内存,大幅提升执行效率。In the first embodiment, as shown in FIG. 2, two segments are now stored in the memory, and which segment is to be written back to the flash memory is determined according to the segment hit rate. If segment a-> segment c-> Segment a-> Segment d has been repeatedly looping this situation, the segment a is stored in the memory first, and then the segment c is stored, because the segment a does not need to be taken from the flash memory in the memory, and then according to the hit rate Write the segment c back to the flash memory, and then put the segment d read out in the memory, greatly improving the execution efficiency.
实施例二,如图3所示,传统方式:假如块相关的块状态管理表分段使用顺序分别是:分段a->分段c->分段a->分段d一直反复循环,这样操作的流程就会变成分段a写入到闪存,从闪存中读取分段c,接着把分段c写入到闪存,把分段a从闪存中读取,再把分段a写入到闪存,接着把分段d读取到内存,一直反复进行,这样增加闪存读取写入的次数,闪存的损耗较实施例一高,读写的时间较实施例一长。The second embodiment, as shown in FIG. 3, the traditional way: if the block-related block state management table segment usage order is: segment a-> segment c-> segment a-> segment d has been repeatedly looped, The flow of this operation will become segment a write to flash memory, read segment c from flash memory, then write segment c to flash memory, read segment a from flash memory, and then segment a Writing to the flash memory, and then reading the segment d into the memory, has been repeated, which increases the number of flash memory reads and writes, the loss of the flash memory is higher than that of the first embodiment, and the reading and writing time is longer than the first embodiment.
尽管已经示出和描述了本发明的实施例,对于本领域的普通技术人员而言,可以理解在不脱离本发明的原理和精神的情况下可以对这些实施例进行多种变化、修改、替换和变型,本发明的范围由所附权利要求及其等同物限定。Although the embodiments of the present invention have been shown and described, those of ordinary skill in the art can understand that various changes, modifications, and substitutions can be made to these embodiments without departing from the principle and spirit of the present invention And variations, the scope of the invention is defined by the appended claims and their equivalents.

Claims (4)

  1. 一种闪存存储设备中闪存块状态管理表有效存取的方法,其特征在于:包括以下步骤:A method for effectively accessing a flash memory block state management table in a flash memory storage device is characterized by comprising the following steps:
    步骤一:首先确认目前使用块的分段;Step 1: First confirm the segmentation of the currently used block;
    步骤二:此分段的命中率+1;Step 2: The hit rate of this segment is +1;
    步骤三:确认内存中是否存在此分段,如果是,直接结束,如果否,进入下一步;Step 3: Confirm whether this segment exists in the memory, if yes, directly end, if not, go to the next step;
    步骤四:确认是否要把内存分段写回到闪存,如果是,进入下一步,如果否,跳至步骤六;Step 4: Confirm whether to write the memory segment back to the flash memory, if yes, go to the next step, if no, skip to step 6;
    步骤五:根据命中率决定写回闪存的分段;Step 5: Determine the segment to write back to the flash memory according to the hit rate;
    步骤六:从闪存中读取与目前使用块相关的分段并放到内存。Step 6: Read the segment related to the currently used block from the flash memory and put it in the memory.
  2. 根据权利要求1所述的一种闪存存储设备中闪存块状态管理表有效存取的方法,其特征在于:所述步骤三中内存中存放若干个分段并根据分段相关命中率高低来决定哪一个分段要被写回到闪存中。The method for effectively accessing a flash block state management table in a flash storage device according to claim 1, characterized in that: in step three, a number of segments are stored in the memory and determined according to the relative hit rate of the segments Which segment is to be written back to flash memory.
  3. 根据权利要求1所述的一种闪存存储设备中闪存块状态管理表有效存取的方法,其特征在于:所述步骤四中内存中有若干个块。The method for effectively accessing a flash memory block status management table in a flash memory storage device according to claim 1, wherein there are several blocks in the memory in step four.
  4. 根据权利要求1所述的一种闪存存储设备中闪存块状态管理表有效存取的方法,其特征在于:所述步骤一中块根据需求有不一样的状态,所述块包含为未使用或是已使用,已使用的块又根据不同的任务有各种不同的状态。The method for effectively accessing a flash memory block status management table in a flash memory storage device according to claim 1, wherein: in step 1, the blocks have different states according to requirements, and the blocks are included as unused or It is used, and the used block has various states according to different tasks.
PCT/CN2018/115515 2018-10-24 2018-11-14 Method for effectively accessing flash block state management table in flash storage device WO2020082454A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201811245068.0A CN109408408A (en) 2018-10-24 2018-10-24 A kind of method of flash block condition management table valid memory access in flash memory device
CN201811245068.0 2018-10-24

Publications (1)

Publication Number Publication Date
WO2020082454A1 true WO2020082454A1 (en) 2020-04-30

Family

ID=65469034

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/115515 WO2020082454A1 (en) 2018-10-24 2018-11-14 Method for effectively accessing flash block state management table in flash storage device

Country Status (2)

Country Link
CN (1) CN109408408A (en)
WO (1) WO2020082454A1 (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207909A (en) * 2011-05-31 2011-10-05 孟小峰 Cost-based buffer area replacement method of flash memory database
CN104461393A (en) * 2014-12-09 2015-03-25 华中科技大学 Mixed mapping method of flash memory
CN106445839A (en) * 2016-10-09 2017-02-22 国云科技股份有限公司 High performance document storage system and method thereof
CN107168888A (en) * 2017-05-19 2017-09-15 惠州佰维存储科技有限公司 The mapping table management method and its system of Nand flash memories
CN107832013A (en) * 2017-11-03 2018-03-23 中国科学技术大学 A kind of method for managing solid-state hard disc mapping table

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102207909A (en) * 2011-05-31 2011-10-05 孟小峰 Cost-based buffer area replacement method of flash memory database
CN104461393A (en) * 2014-12-09 2015-03-25 华中科技大学 Mixed mapping method of flash memory
CN106445839A (en) * 2016-10-09 2017-02-22 国云科技股份有限公司 High performance document storage system and method thereof
CN107168888A (en) * 2017-05-19 2017-09-15 惠州佰维存储科技有限公司 The mapping table management method and its system of Nand flash memories
CN107832013A (en) * 2017-11-03 2018-03-23 中国科学技术大学 A kind of method for managing solid-state hard disc mapping table

Also Published As

Publication number Publication date
CN109408408A (en) 2019-03-01

Similar Documents

Publication Publication Date Title
TWI425357B (en) Method for performing block management, and associated memory device and controller thereof
CN104934066B (en) Reading interference processing in nand flash memory
US7610445B1 (en) System and method for improving data integrity and memory performance using non-volatile media
US9123443B2 (en) Memory device, memory management device, and memory management method
TWI459198B (en) Memory storage device, memory controller thereof, and method for identifying valid data
US7913029B2 (en) Information recording apparatus and control method thereof
US9875030B2 (en) Media write operation
CN115686385B (en) Data storage method and device, computer equipment and storage medium
JP2006065533A (en) Semiconductor memory device, its access method, and memory control system
TWI523030B (en) Method for managing buffer memory, memory controllor, and memory storage device
JP2007193865A (en) Information recording device and its control method
KR20120054502A (en) Semiconductor memory device
US20090027796A1 (en) Information recording device and control method therefor
CN110275678B (en) STT-MRAM-based solid state memory device random access performance improvement method
WO2020082454A1 (en) Method for effectively accessing flash block state management table in flash storage device
WO2019136978A1 (en) Method for improving availability of flash memory
JP2012521032A (en) SSD controller and operation method of SSD controller
JP5594647B2 (en) Storage apparatus and control method thereof
US20070250661A1 (en) Data recording apparatus and method of controlling the same
CN105653468B (en) A kind of storage device using MRAM
CN107765989B (en) Storage device control chip, storage device and storage device management method
US20100191899A1 (en) Information Processing Apparatus and Data Storage Apparatus
US10503651B2 (en) Media cache band cleaning
WO2021035797A1 (en) Method for increasing emmc write efficiency and accuracy
WO2020082449A1 (en) Method for mapping table corresponding to logical position of management host in flash memory storage

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18937679

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 18937679

Country of ref document: EP

Kind code of ref document: A1