Optimal multithread model

Dan White dwhite at olp.net
Tue Mar 16 23:32:42 CET 2010

On 16/03/10 02:23 +0100, Marc Lehmann wrote:
>On Mon, Mar 15, 2010 at 11:07:53PM +0000, James Mansion <james at mansionfamily.plus.com> wrote:
>>> Yes, threads were not meant for these kinds of workloads, and their
>>> overheads are enourmous even on systems that are very fast (such as
>>> GNU/Linux).
>> That is not necessarily so: a spinlock-protected FIFO is hardly an
>> enormous overhead, and in lightly loaded systems the added latency
>> of passing control is neither here nor there in most cases, while an
>userspace thread switching is 10-100 times faster than kernel thread
>switching on my GNU/Linux box - and processes don't need to communicate
>with themselves via slow main memory (they can use cache).


Can you provide more information on userspace thread switching?

Do you have any good links that explain this model?

Dan White

More information about the libev mailing list