Dismiss
InnovationQ will be updated on Sunday, Oct. 22, from 10am ET - noon. You may experience brief service interruptions during that time.
Browse Prior Art Database

General Two-Level Locking Protocol for Multiple Computer Systems

IP.com Disclosure Number: IPCOM000101670D
Original Publication Date: 1990-Aug-01
Included in the Prior Art Database: 2005-Mar-16
Document File: 4 page(s) / 200K

Publishing Venue

IBM

Related People

Dias, DM: AUTHOR [+3]

Abstract

A technique is described whereby a general two-level locking protocol provides a means of locking and unlocking requests for data among computer systems. The two-level protocol provides a means of reducing the average lock response time, as compared to a single-level locking protocol. It also provides controls should a level fail or become full.

This text was extracted from an ASCII text file.
This is the abbreviated version, containing approximately 30% of the total text.

General Two-Level Locking Protocol for Multiple Computer Systems

       A technique is described whereby a general two-level
locking protocol provides a means of locking and unlocking requests
for data among computer systems.  The two-level protocol provides a
means of reducing the average lock response time, as compared to a
single-level locking protocol.  It also provides controls should a
level fail or become full.

      As processing power of computer systems increases, the need
also increases to couple multiple systems together, requiring a
global locking protocol to serialize the access of data among
interconnected systems.  Lock requests are used to control the access
and can have different modes, such as shared (SHR) and exclusive
(EXC).  A single- level locking approach may be implemented on a lock
engine that checks for compatibility, grants lock requests and
processes unlock requests.  The time required to respond to a lock
request is determined by the number of instructions required to
perform a table search and compatibility check.  In most situations
entities will not be in a locked state; therefore, two-level locking
can be efficiently implemented.

      The two-level protocol described herein provides a means of
improving the response time, as compared to the single-level
approach.  The top level, level 1, of the two-level protocol, tracks
all entities that are currently locked and indicates whether or not a
lock on that entity exists, thereby implementing exclusive locking
with no queueing.  Compatibility checking and queueing is performed
by the lower level, level 2.  For example, a transaction may acquire
a level 1 and take a finite time before acquiring it at the level 2.
A second transaction, having failed to acquire a lock on the entity
at level 1, the second transaction arrives at level 2 to find the
entity unlocked. The protocol concept will now enable the second
transaction request to be put in a HOLD state at level 2.  When the
first transaction's lock request arrives at level 2, it is processed
and only then is the second transaction's lock request removed from
the HOLD state and processed.  The concept protocol also has the
ability to handle race conditions among transactions.

      When a transaction requires a lock, a request is sent to level
1 along with the name of the entity to be locked. If the entity name
cannot be found in level 1, the name and the requestor's
identification is entered into level 1 and an acknowledgement (ACK)
is returned synchronously.  The transaction's processing continues,
as if it has got the lock and then it asynchronously sends a lock
request to the lock manager at level 2 for the same entity.  It also
informs level 2 that it received an ACK from level 1 and the mode at
which the lock is required.

      If the entity name was already in level 1, a
non-acknowledgement (NAK) is returned.  The system realizes that the
transaction has a potential c...