Browse Prior Art Database

Shared Locking Without a Lock

IP.com Disclosure Number: IPCOM000084302D
Original Publication Date: 1975-Oct-01
Included in the Prior Art Database: 2005-Mar-02
Document File: 2 page(s) / 31K

Publishing Venue

IBM

Related People

Taradalsky, M: AUTHOR

Abstract

A shared/exclusive protocol in a multiprocessor allows many programs to share a computer storage resource for a read operation, but locks out all programs but the one given exclusive access to the resource for a write operation. This protocol has an advantage over a locking scheme that has no protocol. If the sharing programs operate much more frequent than the exclusive program, the overhead of obtaining and releasing the lock is unnecessary if the following method is used:

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 87% of the total text.

Page 1 of 2

Shared Locking Without a Lock

A shared/exclusive protocol in a multiprocessor allows many programs to share a computer storage resource for a read operation, but locks out all programs but the one given exclusive access to the resource for a write operation. This protocol has an advantage over a locking scheme that has no protocol. If the sharing programs operate much more frequent than the exclusive program, the overhead of obtaining and releasing the lock is unnecessary if the following method is used:

The method is primarily adaptable for a dispatching technique to avoid locking overhead in a programming system, but it could be used by any function with a nonpreemptable attribute (i.e., disabled, SRB, etc.). The method uses the vector shown in the drawing which is in a memory area accessible to all CPU's 1 to n in the multiprocessing system. The sharing method is defined as follows: START: C(i) = ON*; where i = CPU running on IF LNI=ON

THEN

DO;

C(i)=OFF;

GO TO

DECIDE;

END;

ELSE

DO;

PERFORM SHARING FUNCTION

C(i)=OFF;

END;

END START;

The exclusive method is defined as follows: START: GET LOCK; lock to stop other exclusive functions LNI=ON;

DO I=1 to N; where N is number of CPU's in system

LOOP: IF VECTOR(I)=ON THEN GO TO LOOP;

END;

PERFORM EXCLUSIVE FUNCTION

LNI=OFF:

RELEASE LOCK;

END START;

Aside from these methods being usable for high-performance dispatching, they can be applied to shared/exclusive locking in general including: A. Sharing of queues implementa...