Browse Prior Art Database

Priority Data Locking Method

IP.com Disclosure Number: IPCOM000077943D
Original Publication Date: 1972-Oct-01
Included in the Prior Art Database: 2005-Feb-25
Document File: 4 page(s) / 97K

Publishing Venue

IBM

Related People

Hoadley, DE: AUTHOR

Abstract

In a large, multipartitioned teleprocessing system, with shared data sets or files, a program that is to update elements of data must be given exclusive control of that portion of the data set containing the elements to be updated. Failure to do so can cause loss of updates (transactions) and/or erroneous duplication of records in the data set. On the other hand, the ability to exercise exclusive control introduces the possibility of deadlocks. PLOCK is a technique for providing exclusive control in a flexible and efficient manner while avoiding the conditions which allow deadlocks to occur.

This text was extracted from a PDF file.
At least one non-text object (such as an image or picture) has been suppressed.
This is the abbreviated version, containing approximately 54% of the total text.

Page 1 of 4

Priority Data Locking Method

In a large, multipartitioned teleprocessing system, with shared data sets or files, a program that is to update elements of data must be given exclusive control of that portion of the data set containing the elements to be updated. Failure to do so can cause loss of updates (transactions) and/or erroneous duplication of records in the data set. On the other hand, the ability to exercise exclusive control introduces the possibility of deadlocks. PLOCK is a technique for providing exclusive control in a flexible and efficient manner while avoiding the conditions which allow deadlocks to occur.

As implemented, the PLOCK function is the highest level in a hierarchy of LOCK functions. The basic LOCK instruction, see Fig. 1, is used to place all or part of one or more data sets under the exclusive control of the requesting program. The logic of LOCK is based on the following rules:
1) No program may have more than one LOCK in effect at

any one time.
2) No write operation (update) may be performed unless

the program has a LOCK in effect which covers the

record to be written, see Fig. 2, and was in

effect when the record was read.
3) Issuing a LOCK request cancels any prior LOCK(S) in

effect for the issuing program. The basic form of the LOCK command is similar to the following: (label) LOCK DSNAME=name,[Key=record identifier, DSNAME=,KEY=,...] Absence of the KEY parameter causes the entire data set specified to be reserved, if no part of it is held under exclusive control (LOCK) by another program.

Locking at the data set level is costly in terms of system throughput, and is discouraged except under special circumstances, such as file reorganization. (Note: In practice, a special I/O Macro is provided for initial creation of a record or data set. Execution of the command PUTLOAD does not require a LOCK to be in effect). However, given only the LOCK facility as described above, locking at data set levels is unavoidable when conditions such as the following exist:
1) Records on data sets A and B must be updated concurrently.
2) The program must obtain the record to be updated on data

set A in order to locate the corresponding record on data

set B.
3) The program must update data set A on the basis of data

and/or activity in data set B.

Given only the LOCK facility described above, the program must either:
1) Lock both data sets A and B completely.
2) Lock data set B completely and data set A at the

record key level. Either action may reduce throughput of the system by excluding other partitions from processing updates to one or both data sets. If more than two data sets are involved, the

1

Page 2 of 4

effects become more severe.

To provide an alternative which h...