The acquisition of a lock among nodes of a divided cluster is disclosed. A
method is performable by each of at least one node of the cluster. A node
waits for a delay corresponding to its identifier. The node asserts
intent to acquire the lock by writing its identifier to X and Y variables
where another node has failed to acquire the lock. The node waits for
another node to acquire the lock where the other node has written to X,
and proceeds where Y remains equal to its own identifier. The node waits
for another node to acquire the lock where the other node has written to
a Z variable, and writes its own identifier to Z and proceeds where the
other node has failed. The node writes a value to Y indicating that it is
acquiring the lock, and maintains acquisition by periodically writing to
Z.