Concurrent access of shared resources
First Claim
1. A method of accessing a shared resource in a computer, the method comprising, in a first process among a plurality of processes capable of asynchronously issuing requests that use the shared resource:
- atomically assigning a unique identifier to a current request that uses the shared resource, wherein the unique identifier is assigned to the current request based upon the order in which the current request is received relative to other requests issued by the plurality of processes;
completing processing of the current request using the unique identifier;
atomically incrementing a count of completed requests after processing of the current request is complete;
atomically determining if processing of every other request issued prior to a most recently completed request has been completed after processing of the current request is complete; and
in response to determining that processing of every other request issued prior to the most recently completed request has been completed, dispatching each non-dispatched request for which processing has completed.
2 Assignments
0 Petitions
Accused Products
Abstract
An apparatus, program product and method to manage access to a shared resource by a plurality of processes in a multithreaded computer via a collection of atomic operations that track both the order in which requests that use a shared resource are received, and the order in which processing of such requests are completed after they are received. Dispatching of requests is effectively deferred until processing of all non-dispatched requests that were received earlier than a most recently completed request has been completed. In many instances, completion of processing of requests can be performed non-atomically, thus reducing contention issues with respect to the shared resource. Furthermore, dispatching of requests may be batched to reduce the overhead associated with individual dispatch operations.
-
Citations
26 Claims
-
1. A method of accessing a shared resource in a computer, the method comprising, in a first process among a plurality of processes capable of asynchronously issuing requests that use the shared resource:
-
atomically assigning a unique identifier to a current request that uses the shared resource, wherein the unique identifier is assigned to the current request based upon the order in which the current request is received relative to other requests issued by the plurality of processes;
completing processing of the current request using the unique identifier;
atomically incrementing a count of completed requests after processing of the current request is complete;
atomically determining if processing of every other request issued prior to a most recently completed request has been completed after processing of the current request is complete; and
in response to determining that processing of every other request issued prior to the most recently completed request has been completed, dispatching each non-dispatched request for which processing has completed. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12)
-
-
13. An apparatus, comprising:
-
a shared resource;
at least one processor configured to execute a plurality of processes capable of asynchronously issuing requests that use the shared resource; and
program code configured to be executed on the at least one processor in a first process to atomically assign a unique identifier to a current request that uses the shared resource;
complete processing of the current request using the unique identifier;
atomically increment a count of completed requests after processing of the current request is complete;
atomically determine if processing of every other request issued prior to a most recently completed request has been completed after processing of the current request is complete; and
in response to determining that processing of every other request issued prior to the most recently completed request has been completed, dispatch each non-dispatched request for which processing has completed, wherein the unique identifier is assigned to the current request based upon the order in which the current request is received relative to other requests issued by the plurality of processes. - View Dependent Claims (14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24)
-
-
25. A program product, comprising:
-
program code configured to be executed in a first process among a plurality of processes in a computer that are capable of asynchronously issuing requests that use a shared resource to atomically assign a unique identifier to a current request that uses the shared resource;
complete processing of the current request using the unique identifier;
atomically increment a count of completed requests after processing of the current request is complete;
atomically determine if processing of every other request issued prior to a most recently completed request has been completed after processing of the current request is complete; and
in response to determining that processing of every other request issued prior to the most recently completed request has been completed, dispatch each non-dispatched request for which processing has completed, wherein the unique identifier is assigned to the current request based upon the order in which the current request is received relative to other requests issued by the plurality of processes; and
a signal bearing medium bearing the program code. - View Dependent Claims (26)
-
Specification