Persistent Memory Copy-On-Write Transaction Management
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Ensuring the ACID properties (atomicity, consistency, isolation, and durability) in persistent memory systems to prevent data corruption and errors due to application crashes or power losses, particularly in systems that directly manipulate memory via load and store instructions.
Innovation Solution
Employing logging and copy-on-write techniques to create a copy of data in persistent memory, updating addresses, and maintaining a transaction log to ensure data integrity and revert to a valid state in case of failures, which reduces overhead compared to other complex data structure or checksum-based methods.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If copy-on-write techniques are employed to maintain ACID properties in persistent memory, then data integrity and reliability are improved, but memory overhead and system complexity increase due to maintaining multiple copies and transaction logs
Solution Approach 1:
The patent implements copy-on-write by creating a copy of the data page in persistent memory when a store instruction is received. The original read-only page is preserved while a new read-write copy is created, ensuring data integrity through atomicity. This copying mechanism allows the system to revert to the original page if needed while maintaining the ability to write to the new page.
Solution Approach 2:
The system performs preliminary actions by pre-allocating and pre-mapping data pages in persistent memory before actual write operations. Pages are initially marked as read-only and mapped to valid data, with the understanding that copies will be created on-demand. This preliminary setup enables faster recovery operations and maintains ACID properties without requiring complex post-failure analysis.
2Reliability
If transaction logging is implemented to ensure atomicity and durability, then consistency and reliability are improved, but processing speed and productivity decrease due to additional logging overhead
Solution Approach 1:
The patent extracts the transaction logging function from the main data manipulation path by using a separate transaction log structure. When a store instruction is received, the system logs the transaction details (original page address, new page address, transaction ID) in a dedicated log area, separate from the actual data pages. This separation allows data operations to proceed independently while maintaining an audit trail for consistency verification.
Solution Approach 2:
The transaction log acts as an intermediary between the store instructions and the persistent memory state. Rather than directly modifying data pages and requiring immediate consistency verification, the system records intent in the transaction log first. This intermediary layer enables asynchronous processing and recovery operations, improving throughput while maintaining consistency guarantees.
3Speed
If read-only memory pages are mapped to application virtual address space, then access speed is improved, but the ability to modify data in place is restricted, requiring additional copy operations
Solution Approach 1:
The patent implements dynamic page state management where data pages can transition between read-only and read-write states based on transaction requirements. Initially, pages are mapped as read-only in the application's virtual address space for fast access. When modification is needed, the system dynamically creates a copy and updates the mapping to point to the new read-write page, allowing the same memory structure to serve both performance and modification needs.
Solution Approach 2:
The memory system is segmented into multiple data pages that can be independently managed with different access permissions. Rather than treating the entire memory space as uniformly readable or writable, the system divides it into discrete pages that can be marked as read-only or read-write based on their current state and transaction requirements. This segmentation enables fine-grained control over access patterns and modification capabilities.
Data Source
AI summary
Examples associated with persistent memory updating are described. One example includes receiving a first store instruction associated with a first page of memory in a persistent memory from an application. The first page is copied to a new page of the persistent memory. A virtual address space of the application is updated to a location of the new page in a read-write mode. The first store instruction is executed on the new page. A file mapping in the persistent memory is updated from a location of the first page to the location of the new page, and the virtual address space for the location of the new page is updated to a read-only mode.


