Erlang using Linux native threads - a waste of space

David Hopwood david.nospam.hopwood@REDACTED
Sun Sep 3 16:35:16 CEST 2006


Ryan Rawson wrote:
> What about the cost of actually executing the context switch and the
> flushing of pipelines?  A kernel call on i386 is executed via the
> software interrupt which is the equivalent of a long jump, thus your
> pipeline is invalidated.

Invalidation of the pipeline is a minor effect compared to other costs,
especially cache performance.

See <http://www.hpl.hp.com/techreports/Compaq-DEC/WRL-TN-16.pdf>.
This paper is a little old, but the main conclusion still holds: the
cost of a context switch including cache effects is still
"thousands of cycles".

-- 
David Hopwood <david.nospam.hopwood@REDACTED>





More information about the erlang-questions mailing list