Browse Prior Art Database

Modified Multiple Locking Facility

IP.com Disclosure Number: IPCOM000121322D
Original Publication Date: 1991-Aug-01
Included in the Prior Art Database: 2005-Apr-03
Document File: 4 page(s) / 191K

Publishing Venue

IBM

Related People

Parikh, SC: AUTHOR

Abstract

The multiple locking facility is a mechanism in centralized or distributed environment which allows many concurrent processes or concurrent transactions to communicate among themselves to get access to a shared resource without requiring any control mechanism or local/global lock manager. The mechanism at a single resource level (e.g., a file or a record) allows multiple updates by many concurrent processes or transactions. The mechanism ensures mutual consistency and deadlock freedom. This mechanism works more efficiently when there are many processes or transactions which need access to only a small portion of a shared resource for a small interval of time. Implementation

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

Modified Multiple Locking Facility

      The multiple locking facility is a mechanism in
centralized or distributed environment which allows many concurrent
processes or concurrent transactions to communicate among themselves
to get access to a shared resource without requiring any control
mechanism or local/global lock manager.  The mechanism at a single
resource level (e.g., a file or a record) allows multiple updates by
many concurrent processes or transactions.  The mechanism ensures
mutual consistency and deadlock freedom.  This mechanism works more
efficiently when there are many processes or transactions which need
access to only a small portion of a shared resource for a small
interval of time.
Implementation

      The shared resource or a buffer can be logically divided into
smaller pieces like subpage (2K Byte) or pieces of 256 bytes, 128
bytes, etc., up to 16 bytes.  This article describes a complete
facility based on dividing an area into pieces of 2K bytes.

      Let us consider three processes (in reality there may be many
more processes) running concurrently in a given configuration.  A
4-bit global area can be reserved in a storage.  The purpose of this
area is to assign a key or control token to enter process or a
transaction.  Let us call this as Multiple Locking Area (MLA).  Note:
The number of bits in MLA area here are assumed 4.  It can be any
number.

      Let us consider a buffer area of size 32K bytes to be shared by
these concurrent processes.  This buffer can be logically divided
into 16 pieces each of size 2K bytes, i.e., half page.  Corresponding
to each half page, there will be an n bit area in storage where n
is equal to the number of bits in MLA area (in present case N=4).
Thus, in this example, there will be a total 64 bits or a double word
of area reserved in the storage.  Let us call this as Multiple
Reference Area (MRA) for convenience.  Each piece of 4 bits in MRA
area is called an MRA key (please do not confuse the term key used
here with the storage key used in System/390 architecture).  There is
a one-to-one correspondence between each MRA key and each half page.
Initialization

      Initially the lock bits in MLA are '0000' and all the bits in
MRA must be '0'; otherwise, specification exception will be
recognized.
Rules for Assignment of Tokens

      Process requiring an access to the shared resource will follow
the following rules:
      1.   Assume the current value of MLA as key or token.
      2.   Change the first available '0' bit to '1'.  The searching
of an available '0' bit will be done from left to right.
      3.   If no '0' bit is found, then perform 1's complement of the
MLA area; the result of 1's complement will clear MLA area to '0000'.
Note:  As MLA is a shared global area, a locking mechanism may be
required to update MLA area to ensure mutual exclusive access to MLA.
Instead of bit patterns, repetitive decimal numbers...