time for a truly threaded Erlang?

Leonid Timochouk L.A.Timochouk@REDACTED
Fri Dec 13 22:33:01 CET 2002

But is there any need for a truly threaded Erlang? The native Linux
threads (in the current version) are pretty heavy-weight, and not much
different from full-fledged processes (indeed, the "fork" syscall in Linux
is just a specialisation of "clone" which is used to create kernel
threads). The cited posting mentions some improvements in "clone", but
the relatively high cost of thread creation (compared to Erlang processes)
would probably still be an issue.

Multiple kernel threads can be useful only on multi-processor machines, so
they can be scheduled to different CPUs. But even in that case you don't
need 100,000 threads -- the reasonable number of them is bounded by the
number of CPUs available. Erlang processes are so light-weight and
efficient that it makes much more sense to use them, rather than kernel
threads, as units of concurrency...

Leonid Timochouk
Computing Laboratory
University of Kent at Canterbury

More information about the erlang-questions mailing list