Technical data

Programming Features
5.12 RMS Locking Enhancements
Caches the read-mode lock as a system lock, which is retained over accesses
and only lowered to null when the lock is blocking an exclusive write request.
This functionality significantly reduces both local and remote lock request
traffic (the number of $ENQ and $DEQ system service calls) as well as
associated IPL-8 spinlock activity and System Communications Services
(SCS) messages for a cluster.
Does not increase lock resource names or the number of active system or
process locks on the system.
Is functionally compatible in mixed version clusters that include both Alpha
and VAX computers.
This new functionality applies to read operations (using the $GET and $FIND
services) for all three file organizations: sequential, relative, and indexed. It also
applies to a write operation (using the $PUT service) for the read accesses used
for index buckets the first time through an index tree for the write.
You do not need to make changes to existing applications to implement the read-
only global bucket locks. However, global buffers must be set on a data file to
take advantage of the enhancement. Use the following DCL command, where n is
the number of buffers:
$ SET FILE/GLOBAL_BUFFER=n <filename>
For information about specifying the number of buffers, refer to the OpenVMS
DCL Dictionary. For general information about using global buffers, refer to the
section entitled Using Global Buffers for Shared Files in the Guide to OpenVMS
File Applications.
In a mixed cluster environment where there may be high contention for specific
buckets, the Alpha nodes that are using read-mode global bucket locking may
dominate accesses to write-shared files, thereby preventing timely access by other
nodes.
With the new /CONTENTION_POLICY=keyword qualifier to the SET RMS_
DEFAULT command, you can specify the level of locking fairness at the process
or system level for environments that experience high contention conditions.
For more information about using the /CONTENTION_POLICY=keyword
qualifier, refer to the SET RMS_DEFAULT section of the OpenVMS DCL
Dictionary.
5.12.1.2 No Query Record Locking Option
This release introduces new functionality that can minimize record locking for
read accesses to shared files, thereby avoiding the processing associated with
record locking calls to the Lock Manager.
In previous releases, if a file is opened allowing write sharing, an exclusive record
lock is taken out for all record operations (both read and write). Applications may
obtain record locking modes other than the exclusive lock (default) by specifying
certain options to the RAB$L_ROP field. However, all the options involve some
level of record locking. That is, the options require $ENQ or $DEQ system service
calls to the Lock Manager.
The user record locking options include the RAB$V_NLK (no lock) query locking
option, which requests that RMS take out a lock to probe for status and not hold
the lock for synchronization. If the lock is not granted (exclusive lock held) and
the read-regardless (RAB$V_RRL) option is not set, the record access fails with
Programming Features 5–13