Distributed Lock Manager
NAS Recovery - Distributed Lock Manager
A distributed lock manager (DLM) is a mechanism that allows distributed applications to synchronize their accesses to shared resources. DLM is implemented in several clustered file systems. DLM enables machines in a cluster to use each other’s storage via a unified file system, resulting in improved performance and availability.
DLM is useful because it solves the problem of disk cache coherency between participating computers. Apart from its file locking functionality, DLM is also used for coordination of all disk access. VMScluster is an example of a clustering system that relies on the OpenVMS DLM for coordinating disk access.
Resource
‘Resource’ in a DLM refers to an entity to which shared access must be controlled. This can relate to a file, a record or an area of a shared memory. In some cases, the application designer defines a hierarchy of these resources so that a number of levels of locking can be implemented.
For example, a hierarchy of a database can be defined as Database- Table- Record- Field. A ‘process’ then acquires ‘locks’ on the database as a whole and then on its specific parts. This lock must be obtained on a parent resource before a subordinate source can be locked.
A process running within a VMSCluster can have six lock modes. They are: Null Lock (NL), Concurrent Read (CR), Concurrent Write (CW), Protected Read (PR), Protected Write (PW) and Exclusive (EX). Each of these modes varies in the level of access to the resource. Once a lock has been assigned with a mode, it can be changed to higher or lower level. After all processes have unlocked a resource, the system’s information about the resource is destroyed.


