System and method for reducing serialization in transactional memory using gang release of blocked threads
First Claim
1. A computer-implemented method, comprising:
- detecting that execution of a plurality of threads is blocked due to the plurality of threads waiting to acquire a given lock in a multi-threaded, transactional memory system, wherein each of the plurality of threads includes a respective section that is dependent on the given lock;
in response to said detecting;
determining a subset of the plurality of threads for which to attempt execution of their respective sections as speculative transactions, wherein the subset comprises two or more of the plurality of threads; and
releasing the subset of threads from a waiting pool associated with the given lock; and
subsequent to said releasing, attempting to execute the respective section of at least one of the threads in the subset transactionally without acquiring the given lock.
1 Assignment
0 Petitions
Accused Products
Abstract
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.
25 Citations
20 Claims
-
1. A computer-implemented method, comprising:
-
detecting that execution of a plurality of threads is blocked due to the plurality of threads waiting to acquire a given lock in a multi-threaded, transactional memory system, wherein each of the plurality of threads includes a respective section that is dependent on the given lock; in response to said detecting; determining a subset of the plurality of threads for which to attempt execution of their respective sections as speculative transactions, wherein the subset comprises two or more of the plurality of threads; and releasing the subset of threads from a waiting pool associated with the given lock; and subsequent to said releasing, attempting to execute the respective section of at least one of the threads in the subset transactionally without acquiring the given lock. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system comprising:
-
one or more processors; and a memory coupled to the one or more processors and storing program instructions executable by one or more processors to implement; detecting that execution of a plurality of threads is blocked due to the plurality of threads waiting to acquire a given lock in a multi-threaded, transactional memory system, wherein each of the plurality of threads includes a respective section that is dependent on the given lock; in response to said detecting; determining a subset of the plurality of threads for which to attempt execution of their respective sections as speculative transactions, wherein the subset comprises two or more of the plurality of threads; and releasing the subset of threads from a waiting pool associated with the given lock; and subsequent to said releasing, attempting to execute the respective section of at least one of the threads in the subset transactionally without acquiring the given lock. - View Dependent Claims (9, 10, 11, 12, 13, 14)
-
-
15. A computer readable storage medium storing program instructions computer-executable to implement:
-
detecting that execution of a plurality of threads is blocked due to the plurality of threads waiting to acquire a given lock in a multi-threaded, transactional memory system, wherein each of the plurality of threads includes a respective section that is dependent on the given lock; in response to said detecting; determining a subset of the plurality of threads for which to attempt execution of their respective sections as speculative transactions, wherein the subset comprises two or more of the plurality of threads; and releasing the subset of threads from a waiting pool associated with the given lock; and subsequent to said releasing, attempting to execute the respective section of at least one of the threads in the subset transactionally without acquiring the given lock. - View Dependent Claims (16, 17, 18, 19, 20)
-
Specification