[net.unix] Process creation & "swap"

khj@ecsvax.UUCP (Kenneth H. Jacker) (04/13/85)

   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
   Dept of Math Sciences
   Appalachian State Univ     ...!{decvax,akgua}!mcnc!ecsvax!khj

throopw@rtp47.UUCP (Wayne Throop) (04/14/85)

>    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
>    Dept of Math Sciences
>    Appalachian State Univ     ...!{decvax,akgua}!mcnc!ecsvax!khj

Good greif! How did this base canard get circulated?  It does make
an interesting theory as to why AOS and AOS/VS process creation is
slower than process creation on Unix(tm) on the same hardware, but it is
TOTALLY UNTRUE.  In particular, AOS/VS, like most sane virtual memory
systems, creates a mostly empty logical address space for newly
created processes, and then faults pages in from the executable on demand,
for both "text" and "data".  I'm not so sure about the innards of
Berkeley or other VM systems, but I rather think they do likewise.

And please, all you folks out there, if you are going to run down
AOS or AOS/VS, please have the courtesy to run it down for
something it is guilty of. :-)
-- 
Wayne Throop at Data General, RTP, NC
<the-known-world>!mcnc!rti-sel!rtp47!throopw

keith@reed.UUCP (Keith Packard) (04/17/85)

In article <1028@ecsvax.UUCP> khj@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