Xref: utzoo comp.unix.questions:7294 comp.databases:1045 Path: utzoo!attcan!uunet!lll-winken!lll-tis!ames!umd5!uvaarpa!mcnc!ece-csc!ncrcae!hubcap!mrspock From: mrspock@hubcap.UUCP (Steve Benz) Newsgroups: comp.unix.questions,comp.databases Subject: partial file locking with ndbm(3) files Keywords: ndbm flock file locking concurrent update Message-ID: <1768@hubcap.UUCP> Date: 27 May 88 21:28:55 GMT Organization: Clemson University, Clemson, SC Lines: 21 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 single-record locking. - Steve Benz ...!hubcap!mrspock mrspock@hubcap.clemson.edu