*BSD News Article 67001


Return to BSD News archive

Newsgroups: comp.unix.bsd.freebsd.misc
Path: euryale.cc.adfa.oz.au!newshost.anu.edu.au!harbinger.cc.monash.edu.au!news.mel.connect.com.au!munnari.OZ.AU!news.ecn.uoknor.edu!news.cis.okstate.edu!newsfeed.ksu.ksu.edu!news.physics.uiowa.edu!math.ohio-state.edu!howland.reston.ans.net!newsfeed.internetmci.com!ncar!uchinews!news
From: csdayton+usenet@midway.uchicago.edu (Soren Dayton)
Subject: Re: Looking for some freebsd-based implementation suggestions.
In-Reply-To: zeno@serv.net's message of 27 Apr 1996 04:10:28 -0700
X-Nntp-Posting-Host: woodlawn.uchicago.edu
Message-ID: <xcd91fhnwgy.fsf@woodlawn.uchicago.edu>
To: zeno@serv.net (Sean T. Lamont)
Lines: 26
Sender: csdayton@woodlawn.uchicago.edu
Organization: uchi.comp.unix viper cabal
X-Newsreader: Gnus v5.1
References: <4lsvb4$enq@itchy.serv.net>
Date: Sat, 27 Apr 1996 22:17:01 GMT

Our friend, zeno@serv.net (Sean T. Lamont), wrote:

> I want to build a relatively small lookup table in FreeBSD  which has the
> following properties:
> 
> Obviously, this sounds a lot like DBM. problem is, I don't think that
> dbm supports record locking to the point where I'd need it. This isn't 
> such a big deal (a couple of lost writes isn't a huge deal.....) but the
> "2 file system accesses per lookup" -IS- a big deal ; this is far too much
> use of the disk.
> 
> I guess what I'm sort of looking for is a memory-resident DBM which will
> dump its contents to disk when the system restarts (and at periodic times
> in between, maybe every minute or so.) with some sort of semaphore locking
> or something.
> 
> Do I have to actually code this directly into the FreeBSD kernel (I'm 
> probably willing to do this) or is there a clean, elegant solution I'm
> missing? 

Could you do something with  System V IPC or something like that.  That
sounds like what you want with a little extra coding.  ok porting
berkeley db to use shared memory rather than files might be sort of a
trip, but it could be fun :)

Soren