Distributed lock manager

A distributed lock manager (DLM) runs in every machine in a cluster, with an identical copy of a cluster-wide lock database.

Uses your system voice; voice and rate in settings.

Snapshot

≈ 4 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

A distributed lock manager (DLM) runs in every machine in a cluster, with an identical copy of a cluster-wide lock database. Operating systems use lock managers to organise and serialise the access to resources. In this way a DLM provides software applications which are distributed across a cluster on multiple machines with a means to synchronize their accesses to shared resources.

DLMs have been used as the foundation for several successful clustered file systems, in which the machines in a cluster can use each other's storage via a unified file system, with significant advantages for performance and availability. The main performance benefit comes from solving the problem of disk cache coherency between participating computers.

The DLM is used not only for file locking but also for coordination of all disk access. VMScluster, the first clustering system to come into widespread use, relied on the OpenVMS DLM in just this way.

Linux clustering

Both Red Hat and Oracle have developed clustering software for Linux. OCFS2, the Oracle Cluster File System was added to the official Linux kernel with version 2.6.16, in January 2006. The alpha-quality code warning on OCFS2 was removed in 2.6.19.

Red Hat's cluster software, including their DLM and GFS2 was officially added to the Linux kernel with version 2.6.19, in November 2006. Both systems use a DLM modeled on the venerable VMS DLM. Oracle's DLM has a simpler API.

(the core function, dlmlock() , has eight parameters, whereas the VMS SYS$ENQ service and Red Hat's dlm_lock both have 11.)

Other implementations

Other DLM implementations include the following: Google has developed Chubby, a lock service for loosely coupled distributed systems. It is designed for coarse-grained locking and also provides a limited but reliable distributed file system. Key parts of Google's infrastructure, including Google File System, Bigtable, and MapReduce, use Chubby to synchronize accesses to shared resources.

Though Chubby was designed as a lock service, it is now heavily used inside Google as a name server, supplanting DNS. Apache ZooKeeper, which was created at Yahoo, is open-source software and can be used to perform distributed locks as well. Etcd is open-source software, developed at CoreOS under the Apache License.

It can be used to perform distributed locks as well. Redis is an open source, Redis Source Available License licensed, advanced key-value cache and store. Redis can be used to implement the Redlock Algorithm for distributed lock management.

HashiCorp's Consul, which was created by HashiCorp, is open-source software and can be used to perform distributed locks as well. Taooka distributed lock manager uses the "try lock" methods to avoid deadlocks. It can also specify a TTL for each lock with nanosecond precision.

A DLM is also a key component of more ambitious single system image (SSI) projects such as OpenSSI.

References

HP OpenVMS Systems Services Reference Manual – $ENQ Officer - A simple distributed lock manager written in Ruby FLoM - A free open source distributed lock manager that can be used to synchronize shell commands, scripts and custom developed C, C++, Java, PHP and Python software

Text derived from https://en.wikipedia.org/w/index.php?oldid=1305048094 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

12 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.