A technique for controlling access to resources that may be accessed by
one or more entities in a system. According to the technique, an entity
accesses a shared resource by issuing a request containing an identifier
that identifies the resource and an operation that specifies an operation
to be performed on the resource. The operation is compared with one or
more outstanding operations associated with the shared resource to
determine if the operation conflicts with one or more of the outstanding
operations. If a conflict is detected, a guard value is applied to
determine if a race condition could occur. If a race condition is
detected, the operation is blocked; otherwise, the operation is allowed.