A technique efficiently accesses locks associated with resources in a
computer system. A processor accesses (e.g., acquires or releases) a lock
by specifying and issuing a request to a resource controller, the request
containing attribute and resource location information associated with
the lock. In response, the resource controller applies the information
contained in the request to an outstanding lock data structure to
determine if the request should be blocked, blocked as a pending writer,
allowed or an error condition. If the request is blocked, it remains
blocked until the outstanding lock blocking the request is released. If
the request is allowed, operations associated with the request are
performed.