Optimistic Lock Removal for Scalable Concurrent Data Structures

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The use of locks in concurrent data structures leads to bottlenecks and inefficiencies in scalable systems, making it time-consuming and error-prone to implement scalable concurrent data structures, while optimistic concurrency control incurs overhead from speculative or deferred updates.

Innovation Solution

Automated code transformation removes lock and unlock instructions from source code, replacing them with optimistic synchronization during read-only phases and maintaining pessimistic synchronization for updates, using version tracking and validation to ensure data integrity and reduce contention.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If locks are used to ensure integrity of concurrent data structures, then data integrity is maintained, but system scalability and efficiency deteriorate due to bottlenecks

Engineering Contradiction:
Improvedata integrityVSAvoidsystem scalability
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent segments the synchronization mechanism into two distinct phases: an optimistic read phase without locks and a pessimistic update phase with locks. This segmentation allows concurrent reads to proceed without contention while maintaining data integrity during updates, thereby resolving the contradiction between scalability and reliability.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent dynamically switches between optimistic and pessimistic synchronization strategies based on the operation phase. During read operations, the system uses optimistic concurrency control for high scalability, while during update operations, it transitions to lock-based pessimistic control for data integrity, making the synchronization approach adaptive rather than static.

Inventive Principle:
Principle #15Dynamics

2Productivity

If optimistic concurrency control is used to increase scalability, then system efficiency improves, but overhead from speculative or deferred updates increases

Engineering Contradiction:
Improvesystem efficiencyVSAvoidsynchronization overhead
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent applies optimistic concurrency control partially - only during the read phase of operations. By limiting optimistic execution to read operations and using traditional locking for updates, the system gains scalability benefits without incurring the full overhead of speculative execution for all operations, thus reducing synchronization complexity.

Inventive Principle:
Principle #16Partial or excessive action

3Reliability

If lock-based synchronization is used, then data integrity is ensured, but concurrency and scalability are reduced due to bottlenecks

Engineering Contradiction:
Improvedata integrityVSAvoidconcurrency capability
Core Design Contradiction:
ReliabilityVSAdaptability or versatility

Solution Approach 1:

The patent applies different synchronization qualities to different parts of the code: optimistic concurrency control is applied to read sections where high concurrency is needed, while lock-based pessimistic control is applied to update sections where data integrity is critical. This local differentiation allows the system to maximize concurrency capability while maintaining data integrity where required.

Inventive Principle:
Principle #3Local quality

Data Source

PatentUS10963447B2Automatic lock removal method for scalable synchronization in dynamic data structures
Publication Date: 2021.03.30 VERIZON PATENT & LICENSING INC
  • US10963447B2 patent drawing
  • US10963447B2 patent drawing
  • US10963447B2 patent drawing

AI summary

In one embodiment, a set of lock and unlock instructions in a read phase of a computer-readable program is replaced with a first set of tracking instructions, wherein the first set of tracking instructions track a set of locked objects identifying objects that would have been locked by executing the set of lock and unlock instructions. A second set of tracking instructions is inserted into the read phase of the computer-readable program, wherein the second set of tracking instructions track a set of read objects indicating versions of objects that are read. Validation instructions are inserted into the computer-readable program, wherein the validation instructions validate that the versions of objects in the set of read objects have not changed since they were last read and lock the set of locked objects that would have been locked upon completing execution of the set of lock and unlock instructions. Update instructions are added to an update phase of the computer-readable program, where the update instructions increment a current version of an object each time a value of the object is updated or a lock of the object is released.