[pups] Forks under V6

John Holden johnh at psych.usyd.edu.au
Tue Feb 27 09:12:07 AEST 2001


> It is indeed the case that V6 needs swap to fork. Forking in V6 is done
> essentially by swapping the task out to disk and (oops!) forgetting to
> delete the in-core copy. At least, that's how it looked to me.

No. Fork calls the internal version 'newproc'. It tries to allocate memory from
the core map for the new process, and only when it fails that it creates the new
process as a swap image. Effectively, it copies out the parent as a swap
image, but attaches it to the child process (the parent isn't really swapped).

In 'miniunix', the V6 strip down for pdp-11's without memory management
(pdp11/20, 05, 10 and 40's without the proper options), only a single process
would fit in core, so every context switch or fork required swapping.

I cannot speak for pre V6


Received: (from major at localhost)
	by minnie.cs.adfa.edu.au (8.9.3/8.9.3) id KAA55548
	for pups-liszt; Tue, 27 Feb 2001 10:50:56 +1100 (EST)
	(envelope-from owner-pups at minnie.cs.adfa.edu.au)


More information about the TUHS mailing list