[Haskell-cafe] System calls and Haskell threads

Andreas Voellmy andreas.voellmy at gmail.com
Thu Nov 3 16:35:28 CET 2011


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? I thought that when a system call is made by a Haskell
thread being run by a particular worker thread on a CPU, other runnable
Haskell threads in the run queues of the HECs for other CPUs can continue
running concurrently (provided we've run our Haskell program with multiple
CPUs using the -Nx RTS argument). That's what I understood from the
discussion of foreign calls in "Runtime Support for Multicore Haskell".

Andreas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111103/d5b504b7/attachment.htm>


More information about the Haskell-Cafe mailing list