Who is responsible for a retry

John F. Haugh II jfh at rpp386.cactus.org
Wed Aug 1 14:39:38 AEST 1990


In article <1809 at necisa.ho.necisa.oz> boyd at necisa.ho.necisa.oz (Boyd Roberts) writes:
>When fork() fails with EAGAIN it fails for a good reason.
>
>How many lines of user-mode code does it take to code up retries?
>
>About 20.
>
>It would seem that there is some consensus to change the semantics of
>fork() to retry.  This would break a critical interface.  System calls
>do one thing, and one thing well.

fork() never failed before for lack of kernel memory - the change in
behavior was recently introduced - this is what people are complaining
about.

[ Gross simplification follows ... ]

The previous behavior was allocate memory for the child, and if the
allocation failed, swap the entire image.  But the process image was
left in memory, which had the effect of creating two copies of the
process - one in memory and one on the swapper.

So, even when there was a shortage of kernel memory, the process would
be created, even though it was swapped out.  This isn't some new
function people want - it's the old, pre-V.4 function people want -
you know, the same stuff that's been around since, say, 6th Edition?
-- 
John F. Haugh II                             UUCP: ...!cs.utexas.edu!rpp386!jfh
Ma Bell: (512) 832-8832                           Domain: jfh at rpp386.cactus.org



More information about the Comp.unix.wizards mailing list