Lock Marker Speculative Execution for Multi-Core Contention

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Concurrent execution of code in multi-core processors leads to unnecessary locking of resources, which hinders processing performance as it prevents other instances of code from executing until the lock is released, even when resource access does not modify the state, causing unpredictable behavior and performance loss.

Innovation Solution

A compiler replaces lock instructions with lock markers, allowing speculative execution of other code instances accessing the same resource, monitored for contention, and updates history data to determine when to revert to lock instructions based on past access results, thereby optimizing resource sharing and reducing unnecessary locking.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If lock instructions are used to prevent contention over shared resources, then resource access safety is improved, but processing performance deteriorates due to unnecessary locking blocking concurrent execution

Engineering Contradiction:
Improveresource access safetyVSAvoidprocessing performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The system dynamically transitions between locked and unlocked states based on runtime conditions. The lock instruction is selectively replaced with a lock marker that enables speculative unlocked execution when safety conditions are met, while maintaining traditional locking when needed. This dynamic adaptation resolves the contradiction by making the locking behavior flexible rather than static.

Inventive Principle:
Principle #15Dynamics

Solution Approach 2:

The system uses history data storing past access patterns and contention information to make informed decisions about lock replacement. By analyzing feedback from previous executions, the system determines whether speculative execution is safe, thereby maintaining resource safety while improving performance through reduced unnecessary locking.

Inventive Principle:
Principle #23Feedback

2Productivity

If speculative execution is allowed without locking to improve performance, then processing performance improves, but resource contention and unpredictable behavior increase

Engineering Contradiction:
Improveprocessing performanceVSAvoidresource access safety
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The system performs preliminary analysis during compilation to identify candidate lock instructions for replacement. By pre-analyzing access patterns and determining which locks can be safely removed, the system enables speculative execution only where proven safe, thus improving performance without compromising resource safety.

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

Runtime monitoring and history data provide continuous feedback about actual resource access behavior. If contention is detected during speculative execution, the system can revert to locked mode, ensuring safety is maintained while allowing performance optimization when conditions permit.

Inventive Principle:
Principle #23Feedback

Data Source

PatentUS10120731B2Techniques for controlling use of locks
Publication Date: 2018.11.06 INTEL CORP
  • US10120731B2 patent drawing
  • US10120731B2 patent drawing
  • US10120731B2 patent drawing

AI summary

Various embodiments are generally directed to techniques for controlling the use of locks that regulate access to shared resources by concurrently executed portions of code. An apparatus to control locking of a resource includes a processor component, a history analyzer for execution by the processor component to analyze at least one result of a replacement of a lock instruction of a first instance of code with a lock marker to allow the processor component to speculatively execute a second instance of code, and a locking component for execution by the processor component to replace the lock instruction with the lock marker based on analysis of the at least one result, the first and second instances of code to access a resource and the lock instruction to request a lock of access to the resource to the first instance of code. Other embodiments are described and claimed.