Locking

A locking mechanism serializes access to resources. This locking technique is only effective, however, if all programs that depend on a resource use the same locking mechanism. Each type of serially reusable resource is assigned a lock. The system controls a hierarchical locking structure with multiple types of locks to synchronize the use of serially reusable resources. The system also handles all functions related to the locks. These functions include obtaining or releasing locks and checking the status of a particular lock on a processor. Use of these functions is restricted to programs running in supervisor state with a PSW key of 0. This prevents unauthorized problem programs from interfering with the system serialization process.