Flash Memory Page Segmentation for Data Atomicity

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Flash memory management faces challenges in ensuring transaction atomicity due to its page-based erasing granularity, which can lead to data instability and security vulnerabilities, particularly in applications requiring rapid data processing and reliability, such as microcontrollers and contactless transactions.

Innovation Solution

The proposed solution organizes data in logic blocks within frames and pages, using metadata to track the number of written pages and error-control codes, ensuring atomicity by verifying the state of data blocks and transferring valid frames to a dedicated page in case of non-atomicity, and balances erasing by uniformly distributing erase operations across pages.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If data are stored in flash memory with page-based erasing granularity, then storage capacity and flexibility are improved, but data atomicity and reliability deteriorate due to potential intermediate states during write operations

Engineering Contradiction:
Improvestorage flexibilityVSAvoiddata atomicity
Core Design Contradiction:
Adaptability or versatilityVSReliability

Solution Approach 1:

The flash memory page is segmented into multiple frames, with the first frame reserved for metadata (including atomicity counter and status) and subsequent frames for data blocks. This segmentation allows the system to track write operations at the frame level while maintaining page-level erasing capability, thus preserving both storage flexibility and data atomicity.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Before writing data to a page, the system performs preliminary actions by incrementing the atomicity counter in the first frame's metadata and verifying the page state. This preliminary counter update ensures that if a power interruption occurs during writing, the system can detect the incomplete state and rollback to the previous atomic state, preventing intermediate corrupted states.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If multiple pages are written sequentially to store complete transactions, then storage efficiency is improved, but the risk of power interruption causing intermediate states increases

Engineering Contradiction:
Improvestorage efficiencyVSAvoidtransaction atomicity
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system implements feedback mechanisms by continuously monitoring the atomicity counter value in the first frame's metadata during sequential page writes. After each page write operation, the system verifies that the counter value matches the expected sequence number. If a mismatch is detected (indicating a power interruption or incomplete write), the system triggers a rollback procedure to restore atomicity, thus maintaining transaction integrity while allowing efficient sequential storage.

Inventive Principle:
Principle #23Feedback

3Reliability

If the entire page is erased when atomicity is violated, then data reliability is improved, but memory usage efficiency deteriorates due to loss of partially written valid data

Engineering Contradiction:
Improvedata integrityVSAvoidmemory efficiency
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

When atomicity violation is detected in a page, the system extracts and preserves valid data blocks from subsequent frames (frames 2 and beyond) into a separate buffer or temporary storage area. Only the first frame containing the corrupted metadata is marked for erasure. This extraction approach maintains data integrity by removing only the problematic metadata while preserving valid data, thus improving reliability without sacrificing memory efficiency.

Inventive Principle:
Principle #2Taking out (Extraction)

4Speed

If metadata is written before data verification, then write speed is improved, but the complexity of tracking and verifying atomicity increases

Engineering Contradiction:
Improvewrite speedVSAvoidatomicity tracking complexity
Core Design Contradiction:
SpeedVSDevice complexity

Solution Approach 1:

The system merges the atomicity tracking functionality directly into the existing metadata structure of the first frame. The atomicity counter and status bits are combined with other page management metadata (such as LBA, length, and status fields) in a single metadata word. This merging approach allows the system to track atomicity without requiring separate verification structures or increasing overall metadata complexity, thus maintaining write speed while enabling atomicity verification.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS10162540B2Storage in flash memory
Publication Date: 2018.12.25 STMICROELECTRONICS INT NV
  • US10162540B2 patent drawing
  • US10162540B2 patent drawing
  • US10162540B2 patent drawing

AI summary

A flash memory is divided into pages defining an erase granularity of the flash memory. A count value is written into page metadata. Each page is divided into frames. Each frame contains at least one data block and at least two frame metadata words including a first frame metadata word to store a block identifier. A current page is opened by incrementing the count value and writing the incremented count value into the at least one first page metadata word. The current page has its at least one first page metadata word containing a highest count value of the counter of the number of written pages. A logic data block is written into a selected frame and a block identifier of the logic data block is written into the first frame metadata word of the selected frame.