[concurrency-interest] Context-switching VS Continuation
hans.boehm at hp.com
Thu Jun 9 17:03:42 EDT 2005
> -----Original Message-----
> From: Dawid Kurzyniec
> Linux prior to 2.6 had poor thread switching performance,
> AFAIK mostly
> because there was no dedicated abstraction of a thread at the
> low level
> (threads were essentially processes). MS Windows and Solaris were
> actually much better in that respect, since they supported threads
> natively. But Linux kernel 2.6 has changed the game - all the
> stuff has been reimplemented, and it is much faster now. I can't give
> exact numbers, but I would suggest you first run some benchmarks to
> measure the overheads that you are trying to beat.
My impression is that the changes relevant to thread switch performance
in Linux around this time were:
- Futexes, which presumably eliminated the use of signals to
wake up blocked processes.
- A different scheduler.
I don't think this had much to do with better kernel understanding of
though that helps for Posix-compliance. Unlike older versions of
Linux thread switches have always been done in the kernel.
More information about the Concurrency-interest