Adaptive Queued Locking for Speculative Execution Conflict Control

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Transactional memory systems face bottlenecks due to high conflict rates between threads attempting to access shared memory, leading to frequent aborts and reduced throughput, as existing locking techniques either allow all threads to execute speculatively or restrict to a single thread, curbing system performance.

Innovation Solution

An adaptive queued locking (AQL) manager dynamically controls the number of threads allowed to execute in a critical section based on a success rate, adjusting a quota to balance concurrent execution and conflict prevention, enabling fine-grained control and throttling of speculative execution.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If all threads are allowed to execute speculatively in parallel, then throughput is improved, but conflict rates increase leading to frequent aborts

Engineering Contradiction:
ImprovethroughputVSAvoidtransaction success rate
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system dynamically adjusts the degree of parallelism by transitioning between transactional mode (higher parallelism) and exclusive mode (lower parallelism) based on real-time conflict detection. When conflicts are detected, the system reduces parallelism to prevent further conflicts, and when no conflicts occur, it increases parallelism to improve throughput.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system changes the execution mode parameter from speculative/parallel to exclusive/serialized based on conflict conditions. This parameter change allows the system to adapt the number of concurrently executing threads, resolving the contradiction between throughput and transaction success rate.

Inventive Principle:
Principle #35Parameter changes

2Reliability

If a single thread is restricted to execute in the critical section, then conflict rates are reduced, but throughput deteriorates

Engineering Contradiction:
Improvetransaction success rateVSAvoidthroughput
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

Instead of permanently restricting to a single thread, the system dynamically adjusts the number of allowed concurrent threads based on conflict conditions. In exclusive mode, only one thread executes at a time, but in transactional mode, multiple threads can execute in parallel, thus resolving the contradiction between reducing conflicts and maintaining throughput.

Inventive Principle:
Principle #15Dynamics

3Reliability

If locks are used to control access to critical sections, then conflict prevention is improved, but system complexity increases

Engineering Contradiction:
Improveconflict preventionVSAvoidlocking mechanism complexity
Core Design Contradiction:
ReliabilityVSDevice complexity

Solution Approach 1:

The patent extracts the locking mechanism from the critical section code, implementing it as a separate manager component (AQL manager). This separation reduces the complexity within the critical section itself while maintaining conflict prevention capabilities through the dedicated locking manager that handles queue management and thread coordination.

Inventive Principle:
Principle #2Taking out (Extraction)

Solution Approach 2:

The AQL manager acts as an intermediary between threads and the critical section, managing the queue of waiting threads and coordinating access. This intermediary approach simplifies the locking mechanism by centralizing control logic outside the critical section, reducing the complexity burden on individual threads.

Inventive Principle:
Principle #24Intermediary (Mediator)

4Productivity

If speculative execution is enabled for multiple threads, then system performance is improved, but abort frequency increases

Engineering Contradiction:
Improvesystem performanceVSAvoidabort frequency
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The system implements feedback through conflict detection mechanisms that monitor speculative execution outcomes. When conflicts are detected during speculative execution, the system aborts the transactions and transitions to exclusive mode, preventing further wasted speculation. This feedback loop resolves the contradiction by adapting the level of speculative execution based on actual conflict occurrence.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10191784B2Adaptive queued locking for control of speculative execution
Publication Date: 2019.01.29 INTEL CORP
  • US10191784B2 patent drawing
  • US10191784B2 patent drawing
  • US10191784B2 patent drawing

AI summary

Adaptive queued locking for control of speculative execution is disclosed. An example apparatus includes a queue controller to control removal of threads from a queue that contains threads waiting to be permitted to speculatively execute in a critical section of a multi-threaded program. The apparatus also includes a first thread associated with a head node of the queue. The queue controller controls the removal of threads from the queue in response to operations performed by the first thread. In addition, an adjuster to change a number of threads permitted to speculatively execute based on a rate of threads currently speculatively executing transactions in the critical section is included.