Re: Linus on Linux, Apache and Threads

Olaf Titz (
Sat, 24 Apr 1999 23:14:39 +0200

> This is essentially equivalent to what accept() does in the kernel.
> So why not use that directly (together with some sample statistics code
> that starts new worker threads as needed)?

Really? I thought this simplest approach - have a number of threads or
even independent processes which all do accept() themselves - is not
done because of the thundering herds problem.

I think the reason is this: you can't bind more than one socket to an
address to listen on, so all processes share the same listening FD
(dup() wouldn't help because it just creates a new reference to the
same socket.) When this FD becomes ready, all processes waiting on it
get woken up.


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at