qfork()

Masataka Ohta mohta at necom830.cc.titech.ac.jp
Mon Jan 7 15:21:51 AEST 1991


Submitted-by: mohta at necom830.cc.titech.ac.jp (Masataka Ohta)

>By now we
>know that in a ``from to ground up'' virtual memory implementation of
>UNI*X with a half-way useful memory management hardware copy on write and
>similar finessing can make the general-case fork() call as efficient as
>any special-case variant, and, unlike the variants, is free from any
>threat that sixteen ton weights will be dropped on any programmer who
>steps out of line.

You should also know that copy-on-write fork(), unlike vfork(), is inherently
buggy and can not be a general-purpose useful memory management mechanism.

If you have 50MB swap space and want to fork() 30MB process to exec less
than 1MB shell, you can't. With COW fork(), there is workaround. But the
workaround is so incomplete that the system sometimes deadlocks.

Thus, fork(), even COW fork(), is not a proper mechanism to fork-exec
other processes.

If you insist on using fork(), someday, thirtytwo ton weights will drop on
your head.

						Masataka Ohta

PS

I can't understand why the name vfork() is changed to qfork(). On crippled
systems which can not support true vfork(), the implementors can make vfork()
just fork(). It is actually done on NeXT. What's wrong with that?

Volume-Number: Volume 22, Number 64



More information about the Comp.std.unix mailing list