Composite Abortable Locks for Multithreaded Systems

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing lock implementations in multithreaded systems, such as backoff locks and queue locks, face challenges in scalability and memory efficiency, particularly in high-scale multiprocessor systems, leading to thread starvation and increased memory overhead.

Innovation Solution

A composite lock implementation that uses a fixed-size collection of nodes with preallocated resources, allowing threads to select and insert nodes into a wait-queue, supporting non-blocking aborts and efficient ordering, while maintaining a constant space requirement independent of the number of threads.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If typical abortable queue locks are implemented to support thread abortion, then thread management flexibility is improved, but memory overhead increases to O(L*T) space

Engineering Contradiction:
Improvethread management flexibilityVSAvoidmemory overhead
Core Design Contradiction:
Adaptability or versatilityVSQuantity of substance

Solution Approach 1:

The patent segments the wait-queue into a fixed-size collection of preallocated nodes rather than allowing dynamic growth. Each lock maintains a predetermined number of nodes that are reused across multiple thread acquisition attempts, preventing unbounded memory allocation while still supporting multiple threads.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent performs preliminary allocation of a fixed number of nodes for each lock before threads arrive. These preallocated nodes are ready for immediate use and are reused across different thread acquisition attempts, eliminating the need for dynamic memory allocation during runtime and bounding memory usage.

Inventive Principle:
Principle #10Preliminary action

2Loss of energy

If backoff locks are implemented to reduce memory traffic, then memory contention is reduced, but thread handover time increases significantly

Engineering Contradiction:
Improvememory trafficVSAvoidthread handover time
Core Design Contradiction:
Loss of energyVSLoss of time

Solution Approach 1:

The patent implements periodic probing of the wait-queue nodes rather than continuous spinning or long backoff delays. Threads periodically check the status of preallocated nodes in a round-robin fashion, allowing for brief intervals of activity followed by waiting, which reduces memory traffic while maintaining relatively quick lock handover when nodes become available.

Inventive Principle:
Principle #19Periodic action

3Device complexity

If typical backoff locks are implemented to simplify lock management, then implementation complexity is reduced, but thread starvation occurs due to inability to impose ordering

Engineering Contradiction:
Improvelock management complexityVSAvoidthread starvation
Core Design Contradiction:
Device complexityVSReliability

Solution Approach 1:

The patent preliminarily establishes an ordering mechanism through the fixed-size node array structure. Nodes are arranged in a predetermined sequence, and threads acquire nodes in a systematic order (e.g., round-robin or sequential), which imposes a natural ordering on thread access without requiring complex arbitration logic, thereby preventing starvation while maintaining simplicity.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7984444B1Composite abortable locks
Publication Date: 2011.07.19 ORACLE AMERICAN INC
  • US7984444B1 patent drawing
  • US7984444B1 patent drawing
  • US7984444B1 patent drawing

AI summary

A lock implementation has properties of both backoff locks and queue locks. Such a “composite” lock is abortable and is provided with a constant number of preallocated nodes. A thread requesting the lock selects one of the nodes, attempts to acquire the selected node, and, if successful, inserts the selected node in a wait-queue for the lock. Because there is only a constant number of nodes for the wait-queue, all requesting threads may not be queued. Requesting threads unable to successfully acquire a selected node may backoff and retry selecting and acquiring a node. A node at the front of the wait-queue holds the lock.