Systems and methods of sharing processing resources in a multi-threading environment
First Claim
Patent Images
1. A method of sharing processing resources in a multi-threading environment, comprising:
- executing a first thread that requires access to a shared resource;
if the shared resource is unavailable to the first thread;
allocating a memory address with a lock value for the shared resource, wherein the memory address is associated with the first thread and the lock value indicates a state of the shared resource;
arming the first thread for a switching event on the allocated memory address;
yielding by the first thread at least a portion of the processing resources for a second thread that does not require access to the shared resource;
while the second thread uses the at least a portion of the processing resources, performing the steps of;
checking the lock value at the memory address by the logical processor in response to an occurrence of the switching event, wherein the switching event comprises updating, by a logical processor releasing the shared resource, the lock value for the shared resource;
if the lock value indicates the shared resource is available;
returning, by the second thread, the at least a portion of the processing resources to the first thread; and
acquiring by the logical processor the shared resource for the first thread.
2 Assignments
0 Petitions
Accused Products
Abstract
Systems and methods of sharing processing resources in a multi-threading environment are disclosed. An exemplary method may include allocating a lock value for a resource lock, the lock value corresponding to a state of the resource lock. A first thread may yield at least a portion of the processing resources for another thread. The resource lock may be acquired for the first thread if the lock value indicates the resource lock is available.
-
Citations
14 Claims
-
1. A method of sharing processing resources in a multi-threading environment, comprising:
-
executing a first thread that requires access to a shared resource; if the shared resource is unavailable to the first thread; allocating a memory address with a lock value for the shared resource, wherein the memory address is associated with the first thread and the lock value indicates a state of the shared resource; arming the first thread for a switching event on the allocated memory address; yielding by the first thread at least a portion of the processing resources for a second thread that does not require access to the shared resource; while the second thread uses the at least a portion of the processing resources, performing the steps of; checking the lock value at the memory address by the logical processor in response to an occurrence of the switching event, wherein the switching event comprises updating, by a logical processor releasing the shared resource, the lock value for the shared resource; if the lock value indicates the shared resource is available; returning, by the second thread, the at least a portion of the processing resources to the first thread; and acquiring by the logical processor the shared resource for the first thread. - View Dependent Claims (2, 3, 4, 5, 6, 7)
-
-
8. A system comprising:
-
a multi-threading processing unit; a first logical processor executing a thread on the multi-threading processing unit, wherein the thread requires access to a shared resource; if the shared resource is unavailable to the first thread, the first logical processor performing the steps of; allocating a memory address with a state indicator for the shared resource, wherein the memory address is associated with the thread; arming the thread for a switching event on the allocated memory address; yielding the at least a portion of the processing resources for executing a second thread that does not require access to the shared resource; checking the state indicator at the memory address in response to an occurrence of the switching event, wherein the switching event comprises updating, by a logical processor releasing the shared resource, the state indicator for the shared resource; and if the state indicator indicates the shared resource is available; a second logical processor returning the at least a portion of the processing resources from the second thread to the first logical processor; and acquiring by the first logical processor the shared resource for the thread. - View Dependent Claims (9, 10, 11, 12)
-
-
13. A system for sharing processing resources in a multi-threading environment, comprising:
-
means for executing a first thread that requires access to a shared resource; means for allocating a memory address with an indicator means for the shared resource if the shared resource is unavailable to the first thread, wherein the memory address is associated with the first thread; means for arming the first thread for a switching event on the allocated memory address; means for causing the first thread to yield at least a portion of the processing resources for a second thread that does not require access to the shared resource; means for invalidating the indicator means if the shared resource is released; means for checking the indicator means at the memory address in response to an occurrence of the switching event, means for returning the at least a portion of the processing resources to the first thread if the lock value indicates the shared resource is available; and means for acquiring the shared resource for the first thread. - View Dependent Claims (14)
-
Specification