Re: Copied from another newsgroup
On Thu, 25 May 2006 21:26:29 -0600, GreyCloud <firstname.lastname@example.org>
>Any comments on this?
> > fork() is supposed to make a copy of the process that executes
> > it, including all data. Actually doing this would burn gargantuan
> > amounts of memory and is Not Done.
> > Instead, fork() makes a sort of 'virtual copy'; the new process
> > shares the memory of the old, but the VM is configured so that
> > whenever any memory is changed by either process, it mades
> > a private copy of *that* page, on demand.
> > Making a private copy means allocating a page of storage
> > for it, and when swap is exhausted, this allocation should
> > fail.
> > But it cannot fail. It is now too late; fork() has returned success
> > *already*, to both processes, and it cannot now return failure.[/color][/color]
That is wrong for most modern UNIX because on fork the space for the
child process is reserved on swap. If there is really not enough swap
space available the fork fails with ENOMEM.
> > You'd need a time machine.
No, he needs a better understanding how UNIX works.
> Written by an MSCE. (or whatever they're called)[/color]
He should not write about something he doesn't understand.