SunWorld article on fork() failure

Marnix Coppens (maco@telindus.be)
Thu, 03 Sep 1998 15:16:04 +0200


SunWorld, http://www.sunworld.com , is a monthly publication
(not by Sun) for discussion and promotion of Sun related items.
Last month, they ran a decent spotlight on Linux.

What's interesting about this magazine is their series of articles on
the implementation of Solaris: memory management, process management,
and so on. The articles are *not* your (below) average marketing
leaflet rubbish, but actually discuss the implementation, complete
with diagrams of the structures being used and so on. Check their
archive.

This month's contribution deals with process creation. One of the
interesting points they mention is a "fork throttle" to deal with
repeated fork() failures. To quote from the article:

"[...] In this circumstance, the kernel implements a delay mechanism, which
forces the process that issued the fork call to sleep for an extra
clock tick (10 milliseconds). The throttle ensures that there will be no
more than one fork failure per CPU per clock tick. The throttle will also
scale up, such that an increased rate of fork failures results in an
increased delay before the code returns the failure and the issuing
process can try it again."

Since Linux seems to be(come) a better implementation of Solaris,
my question is what mechanism does Linux use to deal with fork-bombs?
If there is no such mechanism currently, how would the Solaris one fit in?

Cheers,

Marnix Coppens

---
Reality is that which                   | Artificial Intelligence
when you stop believing                 | stands no chance against
in it doesn't go away. (Philip K. Dick) | Natural Stupidity.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html