Write locks in Acedb

Richard Durbin rd at uk.ac.cam.mrc-lmb
Thu Sep 23 13:20:03 EST 1993


It is clear that semaphores are inappropriate for ACEDB, since they
are machine specific, and these days people almost always run in a NFS
network environment.  In fact I always disable them by setting SEM = 0!

There is in fact a lock file operating (database/lock.wrm), but that
has problems if a program dies ungracefully without removing the
lockfile.  For that reason ACEDB puts up a warning explanation if the
lock file is set, but allows you to override it.

I understood that there is an advisory record locking mechanism that
works across NFS, breaks the lock when the locking process dies, and
even handles remote disk server downs well.  This seems to me a good
candidate to replace semaphores.  Is the problem that it requires
lockd, which Henry says is not always available?  Even if so, we could
use this, with the overidable lock file as a backup.

The history of the code that manages all this (session.c) is that it
is old and has had a number of solutions layered on each other.  I
apologise for the mess.  Cleanups guaranteed to compile and work on
all machines would be appreciated.

Richard




More information about the Acedb mailing list