Managing access to a shared resource includes receiving a request
indicating that an operation requires access to the shared resource,
associating the operation with a lock in a lock queue that is associated
with the shared resource, and determining whether the shared resource is
accessible to the operation.