Browse Prior Art Database

Suspend Locking With a Single Lock to Control Program Execution

IP.com Disclosure Number: IPCOM000084518D
Original Publication Date: 1975-Nov-01
Included in the Prior Art Database: 2005-Mar-02
Document File: 1 page(s) / 12K

Publishing Venue

IBM

Abstract

One of the primary problems in preventing undesirable interference between executing programs, is by implementing a suspend lock (as opposed to a spin lock) technique to control the serialization and synchronization of the programs in order to maintain a suspend queue (sometimes referred to as a waiter list).

This text was extracted from a PDF file.
This is the abbreviated version, containing approximately 73% of the total text.

Page 1 of 1

Suspend Locking With a Single Lock to Control Program Execution

One of the primary problems in preventing undesirable interference between executing programs, is by implementing a suspend lock (as opposed to a spin lock) technique to control the serialization and synchronization of the programs in order to maintain a suspend queue (sometimes referred to as a waiter list).

Currently some system control programs use a Lock Manager program to insert and delete lock entries on the suspend queue. A lock byte is inserted by the Lock Manager on every release operation, to guarantee that a requestor is not queued on the suspend queue while the unlock operation is occurring. This prevents the possibility of a suspend element being left on the suspend queue indefinitely.

The following programming technique provides a way to provide the necessary synchronization without an internal lock, and without unnecessary overhead in the normal path (i.e., when there are no waiter lists).

The Lock Group is an entry comprised of a Lock Word field and a Suspend Queue Header (SQH) field. The following exemplary program routine in IBM S/370 basic assembler language may be used to obtain the Lock in which CPUID is the value used in a lock entry, and ELEMENT is put into a forward pointer. The Lock Group is on a double-word boundary. The exemplary routine is: START SLR R1,R1

L R2,CPUID

CS R1,R2,LOCKWORD

BZ END

Perform the GET and BUILD suspend element function.

LA R4,ELEMENT

L R2,SQH

QEL ST...