out of swap space??

Wes Peters wes at harem.clydeunix.com
Tue May 7 00:25:23 AEST 1991


In article <296 at dumbcat.sf.ca.us>, marc at dumbcat.sf.ca.us (Marco S Hyman) writes:
> Hmmm.  I seem to remember that Berkeley UNIX allocates swap space at exec time
> to ensure a process can be swapped out later. (I can't verify this right
> now... it may be a false statement.)  If true, you'll have to allocate that
> disk space even if it's never used.  I just looked thru Bach's "The Design of
> the UNIX Operating System" and don't see a similar requirement for System V.
> I wonder about System V Release 4, though.  Does anybody know?

It was there in Bach, just not under the heading "swap."  If you look under
the description of exec, the algorithm mentions that space is allocated for
each region in the executable file, and points you to the algorithm
'allocreg.'  This is essentially where 'swap' space, actually 'page' space
in paging systems, is allocated.

> When a process is swapped only the active pages are written to the swap
> device.  The swapped out process is placed in a state "ready to run but
> swapped."  These processes are not swapped back into memory in their entirety
> -- they are allowed to page fault back in off of the swap device.

I think System V.3 does this at fork/exec calls, too.  I remember hearing
somewhere about 'direct page-in,' i.e. when you fork or exec, the system
merely pages in the first executable page (or block of pages) and starts it;
the rest of the process is paged in as needed.  Supposed to make programs
start faster or something like that.

	Wes Peters
-- 
#include <std/disclaimer.h>                               The worst day sailing
My opinions, your screen.                                   is much better than
Raxco had nothing to do with this!                        the best day at work.
     Wes Peters:  wes at harem.clydeunix.com   ...!sun!unislc!harem!wes



More information about the Comp.unix.sysv386 mailing list