Flash Memory Page Segmentation for Data Atomicity
Find Innovative SolutionsGenerate 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
Engineering 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
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.
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.
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
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.
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
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.
4Speed
If metadata is written before data verification, then write speed is improved, but the complexity of tracking and verifying atomicity increases
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.
Data Source
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.


