*BSD News Article 14204


Return to BSD News archive

Newsgroups: comp.os.386bsd.development
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!csn!hellgate.utah.edu!fcom.cc.utah.edu!cs.weber.edu!terry
From: terry@cs.weber.edu (A Wizard of Earth C)
Subject: Re: File Truncation Philosophy
Message-ID: <1993Apr8.045324.7416@fcom.cc.utah.edu>
Sender: news@fcom.cc.utah.edu
Organization: Weber State University  (Ogden, UT)
References: <C4tJ6C.C17@ns1.nodak.edu> <1pfteb$ch5@umd5.umd.edu> <BLYMN.93Apr3214631@siren.awadi.com.au>
Date: Thu, 8 Apr 93 04:53:24 GMT
Lines: 46

In article <BLYMN.93Apr3214631@siren.awadi.com.au> blymn@awadi.com.au (Brett Lymn) writes:
>The system of copying the text to swap was how the original un*x
>systems worked.  The real problem with it is that you have to have as
>much swap as real memory (otherwise you cannot use the real memory
>that is not covered by swap) AND that swap will be filled with program
>text that may not be being used.  IMHO the current VM system is much
>better.

The first should be true anyway: "you have as much usable swap as swap minus
real memory".  This would prevent crashes when running out of swap, since
you would always have enough swap to swap all executing images.  This is
broken in AIX as well, with disasterous results (or at least damned peculiar).

The second, that "swap will be filled with program text that may not be
being used" is not necessary (as shown by the current VM system), and is
*independant* of whether there is backing for main memory or not.  Note
that for a full system sump, you *must* have enough space on the swap
partition to hold all of usable swap *plus* all of main memory if it is
to be used as a system dump device after a panic.

Whether or not the program is started up by paging from the file for
initial load vs. copying the full image to swap and paging from there
is semi-independant of the VM strategies employed; it's not necessary
to manage the VM like MACH to have this feature; again, it's *independant*.

There is a potential argument for *not* having a large swap on small disks
(with the result that you can't save off dump images on the swap device,
probably the only safe place to dump all dirty pages to get a system
dump image, considering the panic could have been in the FS)... basically
that there isn't enough space for it on teeny hard disks.

This doesn't mean that we "have to live" with user's being able to kill
processes by writing files.


					Terry Lambert
					terry@icarus.weber.edu
					terry_lambert@novell.com
---
Any opinions in this posting are my own and not those of my present
or previous employers.
-- 
-------------------------------------------------------------------------------
                                        "I have an 8 user poetic license" - me
 Get the 386bsd FAQ from agate.berkeley.edu:/pub/386BSD/386bsd-0.1/unofficial
-------------------------------------------------------------------------------