z/OS DFSMS Using Data Sets
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Preventing Deadlock in Exclusive Control of Shared Resources

z/OS DFSMS Using Data Sets
SC23-6855-00

Contention for VSAM data (the contents of a control interval) can lead to deadlocks, in which a processing program is prevented from continuing because its request for data cannot be satisfied. A and B can engage as contenders in four distinct ways:

  1. A wants exclusive control, but B has exclusive control. VSAM refuses A's request: A must either do without the data or retry the request.
  2. A wants exclusive control, but B is only willing to share. VSAM queues A's request (without notifying A of a wait) and gives A use of the data when B releases it.
  3. A wants to share, but B has exclusive control. VSAM refuses A's request: A must either do without the data or retry the request.
  4. A wants to share, and B is willing to share. VSAM gives A use of the data, along with B.
VSAM's action in a contention for data rests on two assumptions:
  • If a processing program has exclusive control of the data, it can update or delete it.
  • If a processing program is updating or deleting the data, it has exclusive control. (The use of MRKBFR, MARK=OUT provides an exception to this assumption. A processing program can update the contents of a control interval without exclusive control of them.)

In 1 and 3 above, B is responsible for giving up exclusive control of a control interval through an ENDREQ, a MRKBFR with MARK=RLS, or a request for access to a different control interval. (The RPL that defines the ENDREQ, MRKBFR, or request is the one used to acquire exclusive control originally.)

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014