I'm trying to write a database application (a small one) which
uses ndbm(3). I'd like to find out how I could write my application
so that a minimum portion of the database is locked at any one
time. Naturally, the ndbm man page skirts the whole issue of record
locking (What is a concurrent update anyway? :-)
The most common operations on the database will be (in this order):
search every record for some trait or another.
update a single record.
add a single record.
I'd rather not lock the whole database when I do a 'search' since
that might hold up the updates&adds for an inordinate amount of time.
While I can readily see how to accomplish a whole-database locking
scheme, I think my performance would be substantially better with
- Steve Benz