Conditional serialization to improve work effort
First Claim
1. A computer-implemented method, comprising:
- requesting, by a first thread on a computer system, exclusive access to a first resource for updating the first resource to perform a first task, wherein the request for the exclusive access is conditional on the first resource not currently being held exclusively;
receiving an indication of availability of the first resource; and
executing, by a computer processor, one of a first action and a second action responsive to the indication, the executing comprising performing the first action if the indication indicates that the first resource is currently being held shared and performing the second action if the indication indicates that the first resource is being held exclusively;
wherein the first action performed if the first resource is currently being held shared comprises waiting, by the first thread, until exclusive access to the first resource is available; and
wherein the second action performed if the first resource is currently being held exclusively comprises;
requesting, by the first thread, shared access to the first resource instead of the exclusive access to the first resource, responsive to the indication indicating that the first resource is being held exclusively;
receiving the shared access to the first resource; and
using the first resource to perform the first task through the shared access in lieu of the exclusive access.
1 Assignment
0 Petitions
Accused Products
Abstract
In some embodiments of this disclosure, a computer-implemented method includes requesting, by a first thread on a computer system, conditional exclusive access to a first resource for updating the first resource to perform a first task. An indication is received that the requested exclusive access to the first resource is currently unavailable. Unconditional shared access to the first resource is requested after receiving the indication that the requested exclusive access is unavailable. The shared access to the first resource is received. The first resource is used, by a computer processor, through the shared access to perform the first task in lieu of the requested exclusive access.
9 Citations
17 Claims
-
1. A computer-implemented method, comprising:
-
requesting, by a first thread on a computer system, exclusive access to a first resource for updating the first resource to perform a first task, wherein the request for the exclusive access is conditional on the first resource not currently being held exclusively; receiving an indication of availability of the first resource; and executing, by a computer processor, one of a first action and a second action responsive to the indication, the executing comprising performing the first action if the indication indicates that the first resource is currently being held shared and performing the second action if the indication indicates that the first resource is being held exclusively; wherein the first action performed if the first resource is currently being held shared comprises waiting, by the first thread, until exclusive access to the first resource is available; and wherein the second action performed if the first resource is currently being held exclusively comprises; requesting, by the first thread, shared access to the first resource instead of the exclusive access to the first resource, responsive to the indication indicating that the first resource is being held exclusively; receiving the shared access to the first resource; and using the first resource to perform the first task through the shared access in lieu of the exclusive access. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A system comprising:
-
a first thread configured to request exclusive access to a first resource for updating the first resource to perform a first task, wherein the request for the exclusive access is conditional on the first resource not currently being held exclusively; and an access manager configured to provide an indication of availability of the first resource; wherein the first thread is further configured to; execute, by a computer processor, one of a first action and a second action responsive to the indication, the executing comprising performing the first action if the indication indicates that the first resource is currently being held shared and performing the second action if the indication indicates that the first resource is being held exclusively; wherein, to perform the first action responsive to the first resource currently being held shared, the first thread is further configured to wait until exclusive access to the first resource is available; and wherein, to perform the second action responsive to the first resource currently being held exclusively, the first thread is further configured to; request shared access to the first resource instead of the exclusive access to the first resource, responsive to the indication indicating that the first resource is being held exclusively; receive the shared access to the first resource; and use the first resource to perform the first task through the shared access in lieu of the exclusive access. - View Dependent Claims (8, 9, 10, 11, 12)
-
-
13. A computer program product comprising a non-transitory computer-readable storage medium having computer-readable program code embodied thereon, the computer readable program code executable by a processor to perform a method comprising:
-
requesting, by a first thread on a computer system, exclusive access to a first resource for updating the first resource to perform a first task, wherein the request for the exclusive access is conditional on the first resource not currently being held exclusively; receiving an indication of availability of the first resource; and executing one of a first action and a second action responsive to the indication, the executing comprising performing the first action if the indication indicates that the first resource is currently being held shared and performing the second action if the indication indicates that the first resource is being held exclusively; wherein the first action performed if the first resource is currently being held shared comprises waiting, by the first thread, until exclusive access to the first resource is available; and wherein the second action performed if the first resource is currently being held exclusively comprises; requesting, by the first thread, shared access to the first resource instead of the exclusive access to the first resource, responsive to the indication indicating that the first resource is being held exclusively; receiving the shared access to the first resource; and using the first resource to perform the first task through the shared access in lieu of the exclusive access. - View Dependent Claims (14, 15, 16, 17)
-
Specification