Adaptive queued locking for control of speculative execution
First Claim
Patent Images
1. An apparatus, comprising:
- a queue controller to control removal of threads from a queue, the queue to contain threads that are waiting to be permitted to speculatively execute in a critical section of a multi-threaded program;
a first thread associated with a head node of the queue, the queue controller to control the removal of threads from the queue in response to operations performed by the first thread, and when a number of threads executing in the critical section reaches a quota, the first thread to retry speculatively executing in the critical section and to remain associated with the head node of the queue to prevent a second thread corresponding to a second node of the queue from retrying speculatively executing in the critical section; and
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, the adjuster is implemented via a logic circuit.
1 Assignment
0 Petitions
Accused Products
Abstract
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.
-
Citations
16 Claims
-
1. An apparatus, comprising:
-
a queue controller to control removal of threads from a queue, the queue to contain threads that are waiting to be permitted to speculatively execute in a critical section of a multi-threaded program; a first thread associated with a head node of the queue, the queue controller to control the removal of threads from the queue in response to operations performed by the first thread, and when a number of threads executing in the critical section reaches a quota, the first thread to retry speculatively executing in the critical section and to remain associated with the head node of the queue to prevent a second thread corresponding to a second node of the queue from retrying speculatively executing in the critical section; and 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, the adjuster is implemented via a logic circuit. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method, comprising:
-
comparing, by executing an instruction with at least one processor, a current quota to a thread count, the thread count corresponding to a first number of threads currently speculatively executing in a critical section of a multi-threaded program, the current quota corresponding to a second number of threads permitted to speculatively execute in the critical section after being in a queue, the queue identifying threads that are waiting to be permitted to speculatively execute in the critical section; based on the comparison of the current quota to the thread count, controlling, by executing an instruction with the at least one processor, removal of threads from the queue, the threads removed from the queue to retry speculative execution in the critical section; increasing, by executing an instruction with the at least one processor, the current quota as a rate at which threads are successfully executing in the critical section increases; and decreasing, by executing an instruction with the at least one processor, the current quota as the rate at which threads are successfully executing in the critical section decreases. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. At least one tangible computer readable storage medium comprising instructions that, when executed, cause at least one machine to at least:
-
populate a queue with a list of threads that experienced a memory access conflict while executing in a critical section of a multi-threaded program; associate respective threads in the queue with respective ones of a set of nodes, the first thread in the queue being associated with a head node of the set of nodes; compare a current quota to a thread count, the thread count corresponding to a first number of threads currently speculatively executing in a critical section of a multi-threaded program, the current quota corresponding to a second number of threads permitted to speculatively execute in the critical section after being in the queue; when the current quota is greater than the thread count, disassociate the first thread from the queue and permit the first thread to retry speculative execution in the critical section; and when the current quota is equal to the thread count, permit the first thread to retry speculative execution in the critical section while maintaining the association between the first thread and the head node to prevent other threads in the queue from retrying speculative execution in the critical section. - View Dependent Claims (15, 16)
-
Specification