Persistent Multi-Word Compare-and-Swap for Memory Persistence

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Traditional computer architectures face performance bottlenecks in maintaining persistent state in complex multiprocessing applications due to the non-persistence of memory caches and the need for block-addressable storage, which complicates the correct ordering of update persistence in multi-word operations.

Innovation Solution

The implementation of atomic, persistent multi-word compare-and-swap (PMCAS) operations using hardware transactional memory (HTM) and atomic compare-and-swap instructions ensures durable linearizability, allowing for atomic updates and recovery from failures by managing persistent memory locations and their values, ensuring correct ordering and persistence.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If traditional block-addressable storage is used for persistent data, then data persistence is achieved, but access latency increases significantly

Engineering Contradiction:
Improvedata persistenceVSAvoidaccess latency
Core Design Contradiction:
ReliabilityVSSpeed

Solution Approach 1:

The patent segments persistent memory into word-addressable units that can be accessed individually rather than in fixed blocks. This allows the system to access only the specific words needed for persistent data structures, reducing access latency while maintaining persistence through selective flushing of modified words to non-volatile storage.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent introduces word-addressable persistent memory as an intermediary layer between volatile memory and traditional block storage. This intermediary provides both the fast access characteristics of volatile memory and the persistence characteristics of non-volatile storage, eliminating the need to choose between speed and reliability.

Inventive Principle:
Principle #24Intermediary (Mediator)

2Speed

If memory caches are used to speed up access, then access speed improves, but persistence is lost due to non-persistent cache nature

Engineering Contradiction:
Improveaccess speedVSAvoidpersistence
Core Design Contradiction:
SpeedVSReliability

Solution Approach 1:

The patent performs preliminary actions by maintaining write buffers and tracking dirty words in the cache before failures occur. When a failure is detected, the system uses this pre-prepared information to recover persistent state without needing to re-execute operations, thus maintaining both speed and persistence.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

The patent implements feedback mechanisms through persistent write barriers and cache coherence protocols that monitor and track memory modifications. This feedback allows the system to know which cached writes need to be persisted, enabling automatic recovery and maintaining persistence guarantees while using caches for speed.

Inventive Principle:
Principle #23Feedback

3Reliability

If multi-word operations are implemented atomically, then correctness is improved, but complexity of implementation increases

Engineering Contradiction:
Improveoperation correctnessVSAvoidimplementation complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent merges multiple single-word atomic operations into a single multi-word atomic operation by using transactional memory or hardware-supported atomic multi-word compare-and-swap instructions. This combining approach ensures that either all words are updated together or none are, maintaining correctness while the hardware abstraction hides the implementation complexity.

Inventive Principle:
Principle #5Merging (Combining)

Solution Approach 2:

The patent introduces an intermediary atomic compare-and-swap mechanism that handles the complexity of multi-word atomic operations. This intermediary primitive provides a simple interface to applications while managing the underlying complexity of ensuring atomicity across multiple words through hardware or software transaction management.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Reliability

If frequent checks for failure recovery are implemented, then system resilience improves, but performance overhead increases

Engineering Contradiction:
Improvesystem resilienceVSAvoidperformance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent implements periodic recovery checks at natural operation boundaries such as after complete persistent operations or at predefined intervals rather than continuously. This periodic approach maintains system resilience by detecting failures at critical points while minimizing performance overhead by avoiding constant checking during normal operation.

Inventive Principle:
Principle #19Periodic action

Solution Approach 2:

The patent enables self-service recovery where the system automatically detects failures and recovers persistent state without external intervention or complex monitoring infrastructure. The persistent memory hardware and atomic operation primitives provide built-in failure detection and recovery capabilities, improving resilience while keeping performance overhead minimal through automated rather than manually-managed recovery processes.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS11941429B2Persistent multi-word compare-and-swap
Publication Date: 2024.03.26 ORACLE INT CORP
  • US11941429B2 patent drawing
  • US11941429B2 patent drawing
  • US11941429B2 patent drawing

AI summary

A computer system including one or more processors and persistent, word-addressable memory implements a persistent atomic multi-word compare-and-swap operation. On entry, a list of persistent memory locations of words to be updated, respective expected current values contained the persistent memory locations and respective new values to write to the persistent memory locations are provided. The operation atomically performs the process of comparing the existing contents of the persistent memory locations to the respective current values and, should they match, updating the persistent memory locations with the new values and returning a successful status. Should any of the contents of the persistent memory locations not match a respective current value, the operation returns a failed status. The operation is performed such that the system can recover from any failure or interruption by restoring the list of persistent memory locations.