*BSD News Article 27730


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!bruce.cs.monash.edu.au!harbinger.cc.monash.edu.au!yeshua.marcam.com!zip.eecs.umich.edu!newsxfer.itd.umich.edu!gatech!howland.reston.ans.net!agate!library.ucla.edu!csulb.edu!csus.edu!netcom.com!wiml
From: wiml@netcom.com (William Lewis)
Subject: Re: Notes on the *new* FreeBSD V1.1 VM system
Message-ID: <wimlCLrCxo.Fvx@netcom.com>
Organization: NETCOM On-line Communication Services (408 241-9760 guest)
References: <2ke3ss$l0d@u.cc.utah.edu> <Ja4p+zR.dysonj@delphi.com> <2khcvv$han@u.cc.utah.edu> <CLqK5I.IzH@ns1.nodak.edu>
Date: Fri, 25 Feb 1994 02:15:07 GMT
Lines: 34

tinguely@plains.NoDak.edu (Mark Tinguely) writes:
>In article <2khcvv$han@u.cc.utah.edu> terry@cs.weber.edu (Terry Lambert) writes:
>>The main problem I would like to overcome is ETXTBSY; ETXTBSY is simply
>>broken.
>	[text deleted]
>>I have been thinking on this a long time, and I get a little religious...
>>8-) 8-).
> it took awhile, but I was finally converted to Terry's ETXTBSY religion.

I haven't read the kernel source, so I may be way out in left field
here; forgive me if the following doesn't make sense or if things already 
work this way and I missed it. That said, here's my idea:

Why can't demand-paged executables act like any other open file? It might
be a good idea to keep processes from writing to a file that is
being used as someone's text segment, but is there anything wrong with
letting them *delete* it? The actual file on disk would not be
deallocated until the process exited, but it would have no directory
entries referencing it, and users would be able to create new files
with that name. (Thus I could replace init by doing something like
"rm init; mv init.new init". Init would continue to execute from its
old binary, but subsequent exec calls would map the new binary into
memory. This would be exactly analogous to the way a regular open file
can be unlinked from the directory it's in, but still used by the process
that has it open, until that process closes it, at which point it
finally gets deallocated/erased.) 

Of course, there's still the problem with NFS, but this at least makes
demand-paged executables on local file systems much less annoying.


-- 
 ... William Lewis. ----- wiml@netcom.com ------ Seattle, WA, USA
"The mind is not a vessel to be filled, but a fire to be kindled."