SUMMARY: Strange dependence of executable on disk image

From: Brett Lymn (blymn@awadi.com.AU)
Date: Mon Jul 20 1992 - 12:24:04 CDT


Last week I posted the following:

> Hello Sun Managers,
> This is not really a problem but a puzzling
> observation. I have noticed that in some circumstances when I remove
> a file that is running (e.g. I have tvtwm running as my window manager
> and then do rm /usr/local/bin/tvtwm) the application quits, this does
> not just happen with tvtwm but with other applications as well. I
> thought that when an application is started the image was loaded into
> "core" and the disk file was no longer referenced, if this is so why
> the strange dependency on the disk image after the application is
> loaded?

And have had a whole flood of replies. All the people that replied
were of the same opinion, namely that when unix loads in the
executable it does not necessarily load it all and also it recognises
the fact that the code is read only and hence instead of taking up
swap space will dump the memory pages and re-read them from the disk
image if the code pages need to be swapped out. The extra wrinkle I
was experiencing comes from the fact that I was using an NFS mounted
partition, normally unix knows that a file is opened and will not
delete the open file when it is being referenced, NFS due to the
stateless protocol used does not know when a file is in use on a
client so you can easily cut and executable out from under an NFS
mounted client - which is exactly what happened to me, in which case
the application folded up due to lack of code when the kernel tried to
swap in some pages.
  A number of people warned of the dangers of updating NFS mounted
executables because if the disk image is updated when the code is
running on a NFS client then there is a chance of the wrong pages
being read in on a swap and making the code go troppo.

Thanks to the following for their answers:

birger@vest.sdata.no (Birger A. Wathne)
Chris Keane <chris@rufus.state.COM.AU>
geertj@ica.philips.nl (Geert Jan de Groot)
bernards@ECN.NL (Marcel Bernards)
"Casper H.S. Dik" <casper@fwi.uva.nl>
Postmaster <Piete.Brooks@cl.cam.ac.uk>
Matt Crawford <matt@oddjob.uchicago.edu>
Mr T Crummey (DIJ) <tom@sees.bangor.ac.uk>
stern@sunne.East.Sun.COM (Hal Stern - NE Area Systems Engineer)
Mike Raffety <miker@sbcoc.com>
bb@math.ufl.edu
phil@pex.eecs.nwu.edu (William LeFebvre)
Perry_Hutchison.Portland@xerox.com
"Hilarie Orman" <ho@cs.arizona.edu>
trdlnk!mike@uunet.uu.net (Michael Sullivan)
danny@ews7.dseg.ti.com
rmsun!rmorse@uunet.uu.net (Robert Morse)
matthew@cs.adelaide.edu.au (Matthew Donaldson)
oneel@arupa.gsfc.nasa.gov (Bruce Oneel )
Colin Macleod <cmacleod@mcs.dundee.ac.uk>
kalli!kevin@fourx.Aus.Sun.COM (Kevin Sheehan {Consulting Poster Child})
jaa101@barton.anu.edu.au (James Ashton)
mce@sdcc10.UCSD.EDU (Mark Edwards)
sysadmin@toshiba.tic.oz.au (System Administrator)

--
Brett Lymn
Computer Systems Administrator
AWA Defence Industries



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:06:45 CDT