CN112002369A - Scanning method for improving flash memory data security - Google Patents

Scanning method for improving flash memory data security Download PDF

Info

Publication number
CN112002369A
CN112002369A CN202010671124.8A CN202010671124A CN112002369A CN 112002369 A CN112002369 A CN 112002369A CN 202010671124 A CN202010671124 A CN 202010671124A CN 112002369 A CN112002369 A CN 112002369A
Authority
CN
China
Prior art keywords
scanning
flash memory
data
thread
data security
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
CN202010671124.8A
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.)
Zhuhai Miaocun Technology Co ltd
Original Assignee
Zhuhai Miaocun 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 Zhuhai Miaocun Technology Co ltd filed Critical Zhuhai Miaocun Technology Co ltd
Priority to CN202010671124.8A priority Critical patent/CN112002369A/en
Publication of CN112002369A publication Critical patent/CN112002369A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G11INFORMATION STORAGE
    • G11CSTATIC STORES
    • G11C29/00Checking stores for correct operation ; Subsequent repair; Testing stores during standby or offline operation
    • G11C29/04Detection or location of defective memory elements, e.g. cell constructio details, timing of test signals
    • G11C29/08Functional testing, e.g. testing during refresh, power-on self testing [POST] or distributed testing
    • G11C29/12Built-in arrangements for testing, e.g. built-in self testing [BIST] or interconnection details
    • G11C29/18Address generation devices; Devices for accessing memories, e.g. details of addressing circuits
    • G11C29/30Accessing single arrays
    • G11C29/32Serial access; Scan testing
    • 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/0604Improving or facilitating administration, e.g. storage management
    • 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]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

The invention relates to a technical scheme of a scanning method for improving flash memory data security, which comprises the following steps: establishing a scanning thread, and scanning the flash memory pages with set numbers at intervals through the scanning thread; after each scanning is executed, the scanning thread enters the dormancy of a first set time period until the scanning of the storage block corresponding to the set number is completed; and after the scanning of all the flash memory pages with the set numbers is finished, the scanning thread enters the dormancy of a second set time period. The invention has the beneficial effects that: the method has the advantages that the scanning work in the whole disk range is completed with high accuracy within a short time as much as possible, the storage blocks with unstable data are found efficiently as much as possible, the data are migrated to a safe place as soon as possible, the safety of the data is guaranteed, and the influence of the data retentions and read disturb problems on the data stored in the NAND Flash is solved well.

Description

Scanning method for improving flash memory data security
Technical Field
The invention relates to the field of computer data storage, in particular to a scanning method for improving the data security of a flash memory.
Background
With the lapse of time, the charges stored in the NAND Flash floating gate will slowly lose, when the number of lost electrons reaches a certain degree, the memory cell will have bit flipping, and when the number of bit flipping exceeds the ECC error correction capability, the data will be lost, which is the data retention problem.
When reading a certain flash memory page in the flash memory, a positive voltage is applied to the control electrodes of other unselected flash memory pages to ensure that the unselected MOS tubes are conducted. Frequently, a MOS transistor control electrode is applied with a positive voltage so that electrons are attracted to the floating gate, which causes a slight programming of the unselected flash page, eventually resulting in a bit flip. This is the read disturb phenomenon, and it is particularly noted that the read disturb affects other flash pages in the same memory block rather than the read flash page itself. The Read disturb causes non-permanent damage to the NAND Flash, and the storage block can be normally used after re-erasing.
For the data retention problem, generally, it is considered to scan the storage space when the flash memory device is powered on, and once the error correction condition exceeds a set threshold, the valid data in the storage block is moved to a new storage block.
For the read disturb problem, in addition to the method of scanning the storage space when the flash memory device is powered on and operated, the read times of each storage block can be recorded, and when the read times exceed a set threshold and the error correction condition reaches a certain degree, the valid data in the storage block is moved to a new storage block.
The number of times of reading of each storage block is recorded, a certain memory is consumed, the maximum number of times of reading that each storage block can bear is inconsistent, and the problem of data loss caused by data retentions cannot be handled by recording the number of times of reading, so that the use has certain limitation. Scanning the storage space is an effective method for solving the problems of data retentions and read disturbs, and the existing scheme mainly comprises the following steps: the method has the advantages that all flash memory pages are scanned in a full disk mode according to the sequence of the memory blocks, and the method is high in safety and low in efficiency; scanning a certain flash page of each valid memory block is an efficient but less secure solution.
Disclosure of Invention
The invention aims to solve at least one of the technical problems in the prior art, and provides a scanning method for improving the data security of a Flash memory, which can complete the scanning work in the full disk range with higher accuracy in a shorter time as much as possible, efficiently find a storage block with unstable data as much as possible, migrate the data to a safe place as soon as possible, ensure the data security, and better solve the influence of the data retention and read disturb problems on the data stored in the NAND Flash.
The technical scheme of the invention comprises a scanning method for improving the data security of a flash memory, which is characterized by comprising the following steps: s100, creating a scanning thread, and scanning the flash memory pages with set numbers at intervals through the scanning thread; s200, after each scanning is executed, the scanning thread enters the dormancy of a first set time period until the scanning of the storage block corresponding to the set number is completed; s300, after the scanning of all the flash memory pages with the set numbers is finished, the scanning thread enters the dormancy of a second set time period.
According to the scanning method for improving the data security of the flash memory, the setting number is configured as: uniformly distributing a number of the numbered flash memory pages on each of the memory blocks.
According to the scanning method for improving the data security of the flash memory, the number of flash memory pages of each memory block is 20.
According to the scanning method for improving the data security of the flash memory, S100 further includes: and monitoring IO requests of the upper layer of the flash memory equipment in real time, and when the number of the IO requests exceeds a set value, enabling the scanning thread to enter the dormant state and be started again in the next first set time period.
According to the scanning method for improving the data security of the flash memory, S200 includes: and sequentially scanning the flash memory pages according to the set numbers, taking each flash memory page number as an object of one-round scanning, scanning the corresponding flash memory page number in each effective storage block according to the sequence of the storage blocks in each round of scanning, and finishing the scanning of all the storage blocks in each round of scanning.
According to the scanning method for improving the data security of the flash memory, S300 includes: and after each round of scanning is executed, switching to a flash memory page with a set number to start a new round of scanning, and entering a second set time period by the scanning thread until all flash memory pages with the set numbers are scanned.
According to the scanning method for improving the data security of the flash memory, the second set time period is longer than the first set time period.
The invention has the beneficial effects that: the method has the advantages that the scanning work in the whole disk range is completed with high accuracy within a short time as much as possible, the storage blocks with unstable data are found efficiently as much as possible, the data are migrated to a safe place as soon as possible, the safety of the data is guaranteed, and the influence of the data retentions and read disturb problems on the data stored in the NAND Flash is solved well.
Drawings
The invention is further described below with reference to the accompanying drawings and examples;
FIG. 1 shows a general flow diagram according to an embodiment of the invention.
Fig. 2 is a flowchart illustrating a complete scan according to an embodiment of the present invention.
FIG. 3 illustrates a workflow of a background scan thread according to an embodiment of the present invention.
Fig. 4 is a schematic view of scanning according to an embodiment of the present invention.
Detailed Description
Reference will now be made in detail to the present preferred embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like reference numerals refer to like elements throughout.
In the description of the present invention, the meaning of a plurality of means is one or more, the meaning of a plurality of means is two or more, and larger, smaller, larger, etc. are understood as excluding the number, and larger, smaller, inner, etc. are understood as including the number.
In the description of the present invention, the consecutive reference numbers of the method steps are for convenience of examination and understanding, and the implementation order between the steps is adjusted without affecting the technical effect achieved by the technical solution of the present invention by combining the whole technical solution of the present invention and the logical relationship between the steps.
Interpretation of terms:
data retention (data shelf life) problem: as time passes, data stored in the flash memory disappears because electrons inside the floating gate run out. The speed of the electrons running out is in direct proportion to the erasing times, namely, the more the erasing times of the flash memory are, the faster the electrons run out, namely, the faster the data disappear;
read disturb (data disturb): when the flash memory is read and written, the reading and writing of data are interfered.
FIG. 1 shows a general flow diagram according to an embodiment of the invention. The process comprises the following steps: s100, creating a scanning thread, and scanning the flash memory pages with set numbers at intervals through the scanning thread; s200, after each scanning is executed, the scanning thread enters the dormancy of a first set time period until the scanning of the storage block corresponding to the set number is completed; s300, after the scanning of all the flash memory pages with the set numbers is finished, the scanning thread enters the dormancy of a second set time period.
Fig. 2 is a flowchart illustrating a complete scan according to an embodiment of the present invention. The page is a flash memory page, the page no is a flash memory page number, and the block is a storage block. In a complete scanning process, the flash memory device is not continuously scanned, intermittent scanning needs to be performed on the premise that the upper layer IO request is not affected as much as possible, the time interval for starting scanning twice is Ts, that is, a thread sleeps Ts every time a flash memory page is scanned, wherein Ts is generally within several seconds. After the background thread is started, according to the preset flash memory page numbers, taking each flash memory page number as an object of one-round scanning, scanning the corresponding flash memory pages (the pre-selected flash memory page numbers) in each effective memory block according to the sequence of the memory blocks in each round of scanning until all the memory blocks are scanned, then switching to the next set flash memory page number to start a new round of scanning, and ending a complete scanning process until all the set flash memory page numbers are scanned.
FIG. 3 illustrates a workflow of a background scan thread according to an embodiment of the present invention. The workflow of the background thread is as follows: after the system is started, the background scanning thread is started at a set moment, a complete scanning process is started, and after the complete scanning process is finished, the background thread can enter a long-time sleep according to a preset time, namely, the interval between two complete scans is long, so that the influence of deepening read disturb is avoided, wherein the interval is Tl, and the Tl is preferably 10 days.
Fig. 4 is a schematic view of scanning according to an embodiment of the present invention. The flash memory device comprises memory blocks B1-BN, each memory block is provided with a plurality of corresponding memory pages such as PA 1-PAN, PB 1-PNB, … and PZ 1-PZN, MA 1-MZ 1 in the figure 4 are flash memory pages with set numbers of the flash memory, the flash memory pages are uniformly distributed in the memory blocks, when one round of scanning is performed each time, the MA 1-MZ 1 are scanned one by one, after the scanning is completed, the next round of scanning MA 2-MZ 2 is performed until the scanning of all the memory blocks and the flash memory pages is completed, and the set numbers in the figure can be set in a user-defined mode according to the performance of the flash memory.
The distribution of the flash memory pages which are easy to make mistakes in the memory blocks is obtained through experiments, the scanning accuracy is considered, and the memory space needs to be scanned more comprehensively, so that a plurality of selected scanned flash memory pages (the number is small, and about 20 flash memory pages are selected from each memory block) are dispersed in the range of the whole memory block as far as possible, and the time and the performance consumption of full-disk scanning can be reduced under the condition that the scanning accuracy is ensured as far as possible. Considering that the time for some devices to run on power is short and data detection of all memory blocks needs to be completed in the shortest possible time, each round scans the same flash memory page of all valid memory blocks, and each flash memory page is scanned for one round from front to back according to the preset scanning flash memory pages until all preset flash memory pages are scanned. A scanning thread is started in a background, and scanning is started once at a certain interval, so that the stability of data detection in the whole life cycle is ensured.
The embodiments of the present invention have been described in detail with reference to the accompanying drawings, but the present invention is not limited to the above embodiments, and various changes can be made within the knowledge of those skilled in the art without departing from the gist of the present invention.

Claims (7)

1. A scanning method for improving flash memory data security is characterized in that the method comprises the following steps:
s100, creating a scanning thread, and scanning the flash memory pages with set numbers at intervals through the scanning thread;
s200, after each scanning is executed, the scanning thread enters the dormancy of a first set time period until the scanning of the storage block corresponding to the set number is completed;
s300, after the scanning of all the flash memory pages with the set numbers is finished, the scanning thread enters the dormancy of a second set time period.
2. The scanning method for improving flash data security according to claim 1, wherein the setting number is configured to: uniformly distributing a number of the numbered flash memory pages on each of the memory blocks.
3. The scanning method for improving data security of a flash memory according to claim 2, wherein the number of flash memory pages in each memory block is 20.
4. The scanning method for improving flash data security according to claim 1, wherein the step S100 further comprises: and monitoring IO requests of the upper layer of the flash memory equipment in real time, and when the number of the IO requests exceeds a set value, enabling the scanning thread to enter the dormant state and be started again in the next first set time period.
5. The scanning method for improving flash data security according to claim 1, wherein the step S200 comprises:
and sequentially scanning the flash memory pages according to the set numbers, taking each flash memory page number as an object of one-round scanning, scanning the corresponding flash memory page number in each effective storage block according to the sequence of the storage blocks in each round of scanning, and finishing the scanning of all the storage blocks in each round of scanning.
6. The scanning method for improving flash data security according to claim 5, wherein the step S300 comprises:
and after each round of scanning is executed, switching to a flash memory page with a set number to start a new round of scanning, and entering a second set time period by the scanning thread until all flash memory pages with the set numbers are scanned.
7. The method as claimed in claim 5, wherein the second predetermined period of time is longer than the first predetermined period of time.
CN202010671124.8A 2020-07-13 2020-07-13 Scanning method for improving flash memory data security Pending CN112002369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010671124.8A CN112002369A (en) 2020-07-13 2020-07-13 Scanning method for improving flash memory data security

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010671124.8A CN112002369A (en) 2020-07-13 2020-07-13 Scanning method for improving flash memory data security

Publications (1)

Publication Number Publication Date
CN112002369A true CN112002369A (en) 2020-11-27

Family

ID=73467621

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010671124.8A Pending CN112002369A (en) 2020-07-13 2020-07-13 Scanning method for improving flash memory data security

Country Status (1)

Country Link
CN (1) CN112002369A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055697A1 (en) * 2007-08-22 2009-02-26 William Henry Radke Error scanning in flash memory
CN202473263U (en) * 2012-03-16 2012-10-03 无锡华润矽科微电子有限公司 FLASH memorizer circuit supporting high erasing times
JP2015198377A (en) * 2014-04-02 2015-11-09 コニカミノルタ株式会社 Image forming apparatus and control method of flash memory
US20180181300A1 (en) * 2016-12-22 2018-06-28 Western Digital Technologies, Inc. Method and apparatus for monitoring memory using background media scan
US20190066739A1 (en) * 2017-08-31 2019-02-28 Micron Technology, Inc. Optimized scan interval
US20190129636A1 (en) * 2017-11-01 2019-05-02 Western Digital Technologies, Inc. Storage device and method for adaptive sleep mode transitions
US20190354421A1 (en) * 2018-05-17 2019-11-21 Micron Technology, Inc. Adaptive scan frequency for detecting errors in a memory system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090055697A1 (en) * 2007-08-22 2009-02-26 William Henry Radke Error scanning in flash memory
CN202473263U (en) * 2012-03-16 2012-10-03 无锡华润矽科微电子有限公司 FLASH memorizer circuit supporting high erasing times
JP2015198377A (en) * 2014-04-02 2015-11-09 コニカミノルタ株式会社 Image forming apparatus and control method of flash memory
US20180181300A1 (en) * 2016-12-22 2018-06-28 Western Digital Technologies, Inc. Method and apparatus for monitoring memory using background media scan
US20190066739A1 (en) * 2017-08-31 2019-02-28 Micron Technology, Inc. Optimized scan interval
US20190129636A1 (en) * 2017-11-01 2019-05-02 Western Digital Technologies, Inc. Storage device and method for adaptive sleep mode transitions
US20190354421A1 (en) * 2018-05-17 2019-11-21 Micron Technology, Inc. Adaptive scan frequency for detecting errors in a memory system

Similar Documents

Publication Publication Date Title
JPH065823A (en) Nonvolatile semiconductor memory device and its application method
KR102170975B1 (en) Nonvolatile memory device and defected wordline detection method thereof
US20160357458A1 (en) Dynamic window to improve nand endurance
US20220197504A1 (en) Memory devices and systems for host controlled enablement of automatic background operations in a memory device
WO2022134712A1 (en) Method for managing threshold voltage, and method for reading nand flash data
US7385857B2 (en) Non-volatile, static random access memory with regulated erase saturation and program window
CN110047536A (en) Nonvolatile semiconductor memory device
US11475964B2 (en) Method for programming a memory system
US11822439B1 (en) Method and apparatus for optimizing open block in solid-state drive, device, and readable medium
WO2019205452A1 (en) Management method for improving parallel write performance of a plurality of flash memories
TW201023191A (en) Non-volatile semiconductor memory, and the method thereof
JP2012198966A (en) Nonvolatile semiconductor memory device and data erasing method for the same
CN112002369A (en) Scanning method for improving flash memory data security
US11942159B2 (en) Selective management of erase operations in memory devices that enable suspend commands
CN105677244A (en) Solid state disk write amplification method capable of reducing TLC flash memory
CN113470730B (en) Method and device for improving storage performance of Nor Flash memory
JP3464955B2 (en) Semiconductor storage device and storage method
JPH046698A (en) Non-volatile semiconductor storing device
TW201637016A (en) Memory device and operation method thereof
KR101585134B1 (en) Non-volatile memory device and method for testing the same
JP4001945B2 (en) Method for refreshing semiconductor memory
JP2004014052A (en) Nonvolatile semiconductor memory device
CN104464821B (en) It is a kind of to prevent MLC Nand Flash from the method for UECC problems occur
CN109935266B (en) Memory cell leakage processing method and device and memory
JP2014092832A (en) Flash memory deterioration inspection device, deterioration inspection method, and deterioration inspection program

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20201127

RJ01 Rejection of invention patent application after publication