A distributed lock manager (DLM) is a common component of many clustering filesystems and databases.
DLMs provide cluster-wide locking services which are fault-tolerant and scaleable.
In a typical DLM, mastery (ownership) of locks is distributed to different nodes in the cluster, so that the locking resource burden is distributed across all the nodes in the cluster.
One node is assigned the job of keeping track of which nodes master which locks, so that if a node does not know where a lock is being mastered, it can find that out. To minimize this extra overhead, each node keeps a cache of lock location information it has obtained from the lock location service.
One of the key issues in DLM implementation is recovery. When a node dies, all locks it was holding are released, and the state of all locks it was mastering have to be recovered.
As a result, each node in the cluster has to keep track of all the locks it is holding so that it can provide this information to the new lock master when recovering the state of locks mastered by the nodes(s) which left the cluster.
Some DLM implementations will migrate lock mastery (management) to a new node if that new node is performing the majority of the lock operations on a particular lock.