Contention for DEDB control interval (CI) resources

Queuing takes place on the DEDB CI resource to maintain serialized access on DEDB data. When two independent application programs concurrently request access to a particular CI, one requestor is required to wait.

When such a wait would cause a deadlock, one of the application programs is selected to have its resources released and its processing returned to the previous sync point. (It should be noted that the overflow buffer interlock can also be involved in a deadlock). The rules for selection of the program to be interrupted because of a deadlock are:
  • If the deadlock involves one or more message-driven programs, one of the programs is abnormally terminated, reinstated to its previous sync point, and rescheduled.
  • If a BMP deadlocks with another BMP, the BMP that went through sync point last is abnormally terminated, has its resources released, is sent back to its previous sync point, and is given a return code.
  • If a deadlock involves a DEDB utility, the other program is terminated and rescheduled. Two utilities cannot be involved in a deadlock, because two utilities cannot concurrently access the same DEDB area.
The number of contention and deadlock situations can be decreased by taking the following steps:
  • Ensure that CIs contain no more segments than necessary. (CI size is specified in the DBD.)
  • Enable the Fast Path 64-bit buffer manager. The Fast Path 64-bit buffer manager dynamically defines, allocates, and manages Fast Path buffer pools based on buffer usage and CI size requirements and, because of multi-threading, allows multiple dependent regions to access overflow buffers at the same time. The Fast Path 64-bit buffer manager is enabled by specifying FPBP64=Y in the DFSDFxxx PROCLIB member.
  • If you are not using the Fast Path 64-bit buffer manager, limit the use of the overflow buffer interlock by increasing the NBA value, which, in conjunction with CI usage can be involved in a deadlock.
  • Limit the value of NBA to the value necessary to cope with the majority of cases and use OBA to deal with the exceptional conditions. When the full buffer allocation (NBA or NBA and OBA) for a program has been exceeded, the buffer manager can begin stealing unmodified buffers from this program. When all buffers associated with a CI have been stolen, the CI can be released, providing it is not currently in use by a PCB. The buffer stealing and associated CI releasing is triggered by exceeding the full buffer allocation. Minimizing NBA and OBA will assist the timely release of CIs, thereby reducing CI contention.
  • Ensure that BMPs accessing DEDBs issue SYNC calls at frequent intervals. (BMPs could be designed to issue many calls between sync points and so gain exclusive control over a significant number of CIs.)
  • BMPs that do physical-sequential processing through a DEDB should issue a SYNC call when crossing a CI boundary (provided it is possible to calculate this point). This ensures that the application program never holds more than a single CI.

Reports produced by the Fast Path Log Analysis utility give statistics about CI contention.