Lock-Free Cache Chain Updates Using Atomic CAS Operations

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing database systems face performance penalties due to processes waiting to acquire locks on shared cache chains when multiple operations are performed concurrently, leading to inefficiencies in manipulating database objects.

Innovation Solution

Implementing atomic operations to manipulate database object chains without locking, using techniques such as compare-and-swap (CAS) instructions to ensure consistency and integrity, allowing multiple processes to insert or evict objects in parallel.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If locking mechanisms are used to ensure data consistency during concurrent operations on shared cache chains, then data integrity is maintained, but process waiting time increases and system performance deteriorates

Engineering Contradiction:
Improvedata consistencyVSAvoidprocess waiting time
Core Design Contradiction:
ReliabilityVSLoss of time

Solution Approach 1:

The patent replaces the mechanical locking system with an atomic compare-and-swap (CAS) based operational system. Instead of using physical or logical locks that require process waiting, the system uses atomic CAS instructions to detect and resolve conflicts, allowing processes to proceed without blocking while maintaining data consistency through version tracking and conflict detection mechanisms.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent changes the state parameters of the chain nodes by incorporating version numbers or timestamps that are updated atomically during CAS operations. This parameter change approach allows the system to detect concurrent modifications and resolve them without requiring processes to wait for locks, thereby maintaining consistency while reducing waiting time.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If exclusive locking is implemented on shared cache chains, then concurrent access conflicts are prevented, but system throughput and productivity decrease

Engineering Contradiction:
Improveaccess conflict preventionVSAvoidsystem throughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent substitutes the exclusive locking mechanism with a non-blocking atomic CAS-based conflict resolution system. Multiple processes can simultaneously attempt CAS operations on different nodes of the chain without acquiring exclusive locks, allowing the system to maintain conflict prevention while enabling parallel execution and improving overall throughput.

Inventive Principle:
Principle #28Mechanics substitution (Replace mechanical system)

Solution Approach 2:

The patent allows multiple processes to perform partial operations concurrently on different portions of the chain structure. Instead of requiring one process to hold an exclusive lock on the entire chain, processes can perform CAS operations on specific nodes simultaneously, with the system resolving conflicts through version checking and retry logic, thereby increasing system productivity.

Inventive Principle:
Principle #16Partial or excessive action

3Productivity

If atomic operations without locking are used to manipulate database object chains, then process waiting time is reduced and performance improves, but operation complexity increases

Engineering Contradiction:
Improveoperation efficiencyVSAvoidoperation complexity
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent introduces intermediary version numbers or metadata fields stored in each chain node that facilitate atomic CAS operations. These intermediaries act as mediators that automatically track state changes and enable conflict detection without requiring complex locking protocols, thus improving productivity while managing operation complexity through structured data elements.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

The patent implements self-service mechanisms where the chain nodes themselves maintain version information and participate in conflict resolution through the CAS operations. Each node automatically tracks its state and enables atomic updates without requiring external locking management, reducing operation complexity while maintaining high productivity through automated conflict handling.

Inventive Principle:
Principle #25Self-service

Data Source

PatentUS12493612B2Mechanisms for maintaining chains without locks
Publication Date: 2025.12.09 SALESFORCE INC
  • US12493612B2 patent drawing
  • US12493612B2 patent drawing
  • US12493612B2 patent drawing

AI summary

Techniques are disclosed that relate to manipulating a chain of database objects without locking the chain. A computer system may maintain a chain that orders a set of database objects stored in a cache of the computer system. The computer system may receive a set of requests to perform database transactions. Based on those received set of requests, the computer system may determine to perform a plurality of chain operations that involve modifying the chain. The computer system may perform two or more of the plurality of chain operations at least partially in parallel using a set of atomic operations without acquiring a lock on the chain.