Process creation & "swap"

Keith Packard keith at reed.UUCP
Wed Apr 17 09:21:40 AEST 1985


In article <1028 at ecsvax.UUCP> khj at ecsvax.UUCP (Kenneth H. Jacker) writes:
>
>   I have been told that Data General's AOS creates new
>processes *first* in the "swap space" on disk and *then*
>transfers a copy to memory.
>
>   My question:  what does (2.9) UN*X do?  Does it create the
>process (text, data, ...) in memory , transferring it to
>"swap" only if necessary?  Or does it use the AOS approach?
>
>   Kenneth H. Jacker

Well, there are 2 cases in 2.9 unix.  If the machine is idle
(sitting on the wait instruction) then the fork is done in memory.

If the machine is loaded, however, the fork is done by writing it
out to disk; creating another entry in the proc table and changing
the in-core copy.  This in-core copy becomes the *new* process; the
old process is the one on the disk (it makes some sense and is
the only way this works neatly - the copy on the disk doesn't
need to be changed at all while the process in memory needs to
have it's u-struct mucked about with.)

2.9 only does the in-memory option if the kernel is made with
UCB_FRCSWAP set - this name is rather non-mnemonic; if defined
it allows in-core forks and expands, else it always swaps.

keith packard
...!tektronix!reed!motel6!keith	(a 2.9 machine!)
...!tektronix!reed!keith
...!tektronix!azure!keithp



More information about the Comp.unix mailing list