The use of locks is based on the following considerations:
- At any one time, a processor can hold only one lock per hierarchical
level (with the exception of the CPU lock).
- The CPU lock has no hierarchy in respect to the other spin type
locks. However, once obtained, no suspend locks can be obtained. This
lock can be held by any number of units of work. There is only one
CPU lock per processor.
- The cross memory services locks (CMSSMF, CMSEQDQ,
CMS, and CMSLATCH) are equal to each other in the hierarchy. After
obtaining a local lock, the caller can obtain all or any subset of
the cross memory services locks (CMSSMF, CMSEQDQ, CMS, and CMSLACTCH)
in a single lock manager request. If a caller holds any one and requests
another, an abend results. When requesting any other lock, it is not
necessary for a program to own locks that are lower in the hierarchy.
- The CML and LOCAL locks are equal to each other in the hierarchy.
One unit of work can hold one local lock, either a CML or a LOCAL
lock, not both.
- Page faults on non-DREF storage are permitted for programs that
own the LOCAL, CML, and/or CMS locks, but not for programs that own
locks higher in the hierarchy.
- Locks can be requested conditionally or unconditionally. However,
only locks higher than those currently held by the processor can be
requested unconditionally.
- PSACLHS (also referred to as PSAHLHI (PSA X'2F8')) and
PSACLHSE (PSA+X‘4C4’) indicate the current locks held. There is no
hierarchy indicated by the bit positions within the strings. For the
valid hierarchy of locks, see the above list.
For information about the use of locks by SVC routines, see SVC summary.