Adaptive Thread Scheduling for Transactional Memory Conflict Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The increasing number of cores and logical processors in integrated circuits leads to challenges in synchronizing shared data among software threads, resulting in false contention, serialization, and performance degradation due to lock-based systems and transactional memory aborts.
Innovation Solution
Adaptive thread scheduling techniques are employed to minimize conflicts by delaying the scheduling of threads that frequently conflict with currently running threads, using conflict ratios and thresholds to determine when to reschedule and reduce parallel execution overlap.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If lock-based synchronization is used to guarantee mutual exclusion, then data consistency is ensured, but execution serialization and performance degradation occur
Solution Approach 1:
The patent replaces the mechanical lock-based synchronization system with a transactional memory system that uses hardware-supported atomic operations and software-managed transaction protocols. This substitution eliminates the need for explicit lock acquisition and release mechanisms, allowing multiple threads to execute transactions in parallel while maintaining data consistency through conflict detection and resolution at the transaction commit stage.
2Productivity
If transactional memory is used to improve parallel execution, then concurrency increases, but performance degrades due to excessive transaction aborts
Solution Approach 1:
The patent implements feedback mechanisms where the system monitors transaction conflict patterns and dynamically adjusts scheduling decisions. When conflicts are detected between transactions, the system uses this feedback information to delay or abort conflicting transactions, preventing excessive aborts and improving overall transaction success rates while maintaining high parallel execution capability.
Solution Approach 2:
The patent performs preliminary conflict detection and resolution actions before transactions are fully committed. By checking for potential conflicts early in the transaction execution process and resolving them through delayed scheduling or selective aborts, the system prevents the need for repeated abort-retry cycles, thereby reducing the time loss associated with transaction aborts.
3Productivity
If more threads are scheduled to execute simultaneously, then utilization of multiple cores increases, but conflict between threads increases
Solution Approach 1:
The patent implements dynamic thread scheduling that adjusts the number and selection of concurrently executing threads based on real-time conflict detection. The system can dynamically increase parallelism when conflicts are low and reduce it when conflicts are detected, optimizing core utilization while minimizing thread conflicts through adaptive scheduling decisions.
Data Source
AI summary
An apparatus and method is described herein for adaptive thread scheduling in a transactional memory environment. A number of conflicts in a thread over time are tracked. And if the conflicts exceed a threshold, the thread may be delayed (adaptively scheduled) to avoid conflicts between competing threads. Moreover, a more complex version may track a number of transaction aborts within a first thread that are caused by a second thread over a period, as well as a total number of transactions executed by the first thread over the period. From the tracking, a conflict ratio is determined for the first thread with regard to the second thread. And when the first thread is to be scheduled, it may be delayed if the second thread is running and the conflict ratio is over a conflict ratio threshold.


