On Thu, 5 Nov 1998, Justin Vallon wrote:
On Wed, 4 Nov 1998, Georg Nikodym wrote:
> When a UNIX process wants to create a child, it fork()s and exec()s.
> The fork() duplicates the parent's address space. This was seen as
> silly when 9 times out of 10 the child simply calls exec and thus was
> born vfork(). vfork() has this problem, though that the child briefly
> runs in the parents address space. The implications of this statement
> are serious and have resulted in two things. First, standards authors
> have had no choice but to say that you can't guarantee anything aside
> from exec() or _exit() will work. Second, application developers have
> been bitten by all kinds of nasty bugs and have shied away from vfork.
> The net result is that vfork() could probably be removed from the UNIX
> ABI and nobody would shed a tear.
M-: (douse fire)
So, if your OS (Solaris?) does not overcommit vm pages, then at fork()
time, free swap pages will be earmarked as potentially required if the
process(es) write to all of their shared pages? Since the parent has a
100Mb swap footprint, you'll basically need 100Mb free swap to be able to
do {fork();exec();} due to the high-water-mark, even though no (few)
shared pages will ever be copied-due-to-write.
-Justin
vallon(a)mindspring.com