Gang Release Mechanism for Transactional Memory Contention
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
In multithreaded computer systems, the 'lemming effect' occurs when high contention for locks causes threads to revert to mutual exclusion, leading to performance degradation and denial of benefits from transactional lock-elision (TLE) due to positive feedback loops, resulting in serial execution and reduced parallelism.
Innovation Solution
Implementing a 'gang release' technique where a subset of threads waiting on a lock are allowed to reattempt transactional mode execution, with gang formation based on factors like the number of threads, historical abort relationships, and program instruction mixes, enabling concurrent transactional execution and mitigating the lemming effect.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If threads revert to mutual exclusion due to high contention, then lock correctness is maintained, but system performance degrades and parallelism is lost
Solution Approach 1:
The patent segments the monolithic lock acquisition process into multiple phases: initial lock attempt, gang formation phase, and transactional execution phase. By dividing the contention resolution into these segments, threads can transition from serial lock acquisition to parallel transactional execution, maintaining correctness while improving performance
Solution Approach 2:
The system dynamically adjusts execution mode based on contention levels. When contention is detected, threads transition from traditional locking to transactional mode. The gang size and transactional execution parameters are dynamically adjusted based on system state, allowing the system to adapt between serial and parallel execution as conditions change
2Productivity
If threads execute transactionally without acquiring locks, then parallelism and performance are improved, but the lemming effect causes threads to revert to mutual exclusion under high contention
Solution Approach 1:
The patent implements feedback mechanisms where threads monitor contention levels and abort rates. When abort rates exceed thresholds, the system feedback signals threads to revert to mutual exclusion. This feedback loop prevents the lemming effect by providing controlled transitions between transactional and locking modes based on system state
Solution Approach 2:
The system performs preliminary actions by forming gangs of threads before they attempt transactional execution. Threads are pre-coordinated into gangs that will execute transactions together, preventing the chaotic reversion to mutual exclusion that causes the lemming effect. This preliminary organization stabilizes transactional execution under contention
3Reliability
If all threads wait for a single lock, then mutual exclusion is maintained, but serialization occurs and throughput decreases
Solution Approach 1:
The patent merges multiple threads into gangs that execute transactions together. Instead of threads sequentially acquiring a single lock, gangs of threads are combined and execute their critical sections in parallel using transactional memory. This merging maintains mutual exclusion semantics while achieving parallel execution and improved throughput
Data Source
AI summary
Transactional Lock Elision (TLE) may allow multiple threads to concurrently execute critical sections as speculative transactions. Transactions may abort due to various reasons. To avoid starvation, transactions may revert to execution using mutual exclusion when transactional execution fails. Because threads may revert to mutual exclusion in response to the mutual exclusion of other threads, a positive feedback loop may form in times of high congestion, causing a “lemming effect”. To regain the benefits of concurrent transactional execution, the system may allow one or more threads awaiting a given lock to be released from the wait queue and instead attempt transactional execution. A gang release may allow a subset of waiting threads to be released simultaneously. The subset may be chosen dependent on the number of waiting threads, historical abort relationships between threads, analysis of transactions of each thread, sensitivity of each thread to abort, and/or other thread-local or global criteria.


