Concurrent thread execution using user-level asynchronous signaling
First Claim
Patent Images
1. A system for detecting a conflict, comprising:
- a first thread unit and a second thread unit, the first and second thread unit to execute two concurrent threads of a software application;
a memory coupled to the first and second thread units;
said memory to store software instructions to implement an atomic multiple-compare and single-swap (“
kcss”
) operation, wherein the kcss operation includes a call to an mcall instruction and is to monitor access to k addresses organized as an array, wherein the kcss operation is to detect, by the first thread unit, a conflict between the two concurrent threads based on detecting a write by the second thread unit to one of the k addresses in the array and is to utilize a hardware mechanism of the first thread unit to trigger a user code handler responsive to said conflict;
the hardware mechanism of the first thread unit to perform an asynchronous control transfer to the user code handler responsive to the write, by the second thread unit, to the one of the k addresses in the array;
wherein said user code handler includes one or more instructions to determine whether the conflict occurred before an atomic compare-and-swap of a kth address specified in the kcss operation.
1 Assignment
0 Petitions
Accused Products
Abstract
Various usage models are provided to utilize a Monitor and Call (“mcall”) instruction that incorporates user-level asynchronous signaling. The various usage models utilize the mcall instruction in a multithreading system in order to enhance concurrent thread execution. Other embodiments are also described and claimed.
-
Citations
20 Claims
-
1. A system for detecting a conflict, comprising:
-
a first thread unit and a second thread unit, the first and second thread unit to execute two concurrent threads of a software application; a memory coupled to the first and second thread units; said memory to store software instructions to implement an atomic multiple-compare and single-swap (“
kcss”
) operation, wherein the kcss operation includes a call to an mcall instruction and is to monitor access to k addresses organized as an array, wherein the kcss operation is to detect, by the first thread unit, a conflict between the two concurrent threads based on detecting a write by the second thread unit to one of the k addresses in the array and is to utilize a hardware mechanism of the first thread unit to trigger a user code handler responsive to said conflict;the hardware mechanism of the first thread unit to perform an asynchronous control transfer to the user code handler responsive to the write, by the second thread unit, to the one of the k addresses in the array; wherein said user code handler includes one or more instructions to determine whether the conflict occurred before an atomic compare-and-swap of a kth address specified in the kcss operation. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A method, comprising:
-
enabling monitoring of one or more memory locations responsive to execution of an atomic multiple-compare and single-swap (“
kcss”
) operation by a first thread unit, the one or more memory locations corresponding to a software transaction descriptor record for a transaction;
wherein the kcss operation includes a call to an mcall instruction and is to monitor access to the one or more memory locations organized as an array;beginning to execute a set of one or more instructions associated with the transaction on a first thread unit; responsive to a write operation to the at least one of the one or more memory locations by a second thread unit, disrupting the execution of the set of instructions on the first thread unit, due to the execution of the kcss instruction, and transferring control to user-level handler code to be executed by the first thread unit; wherein said disrupting is performed by asynchronous user-level signaling hardware; and wherein the user-level handler code is to abort the transaction and cause a false value to be returned for the transaction. - View Dependent Claims (9, 10, 11, 12, 13)
-
-
14. An article comprising:
-
a non-transitory computer storage medium having a plurality of machine accessible instructions; wherein, when the instructions are executed by a first thread unit, the instructions provide for; enabling monitoring of one or more memory locations associated with an atomic multiple-compare and single-swap (“
kcss”
) operation, wherein the kcss operation includes a call to an mcall instruction and is to monitor access to the one or more memory locations organized as an array;beginning to perform a set of one or more instructions associated with the kcss operation on the first thread unit; responsive to a write operation to at least one of the one or more the memory locations by a second thread unit, disrupting the execution of the set of instructions on the first thread unit, due to execution of the kcss instruction, and transferring control to user-level handler code to be executed by the first thread unit; wherein said disrupting is performed by asynchronous user-level signaling hardware; and wherein said user-level handler code is to perform one or more actions associated with abort of the kcss operation. - View Dependent Claims (15, 16, 17, 18, 19, 20)
-
Specification