[Haskell-cafe] System calls and Haskell threads
dmbarbour at gmail.com
Thu Nov 3 18:22:20 CET 2011
On Thu, Nov 3, 2011 at 8:35 AM, Andreas Voellmy
<andreas.voellmy at gmail.com>wrote:
> I just read Kazu Yamamoto's article on a high performance web server in
> the latest Monad.Reader, and I came across a statement that doesn't sound
> correct to me. He says:
> "When a user thread issues a system call, a context switch occurs. This
> means that all Haskell user threads stop, and instead the kernel is given
> the CPU time. "
> Is this right?
It is correct in context. Mighttpd does not use the -Nx argument to create
multiple OS threads, instead uses a `prefork` model that creates separate
processes to balance user invocations. Using multiple processes instead of
multiple Haskell threads avoids issues with garbage collection.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe