[plt-scheme] Threading vs. System Threads
>>>>> "Brent" == Brent Fulgham <bfulgham at debian.org> writes:
Brent> The conjecture is that the use of OS-level threads for concurrency leads
Brent> to lower performance than Erlang's internal concurrency. I like to imagine
Brent> that MzScheme may share some of these positive features (Matthew,
Brent> please feel free to correct me! :-)
This argument assumes that the only way to "have native threads" would
be to map language-level threads one-to-one onto OS threads. For this
situation (which, I believe, reflects those older versions of MzScheme
which did "do native threads"), of course your incur the (often
substantial) overhead and limitations of OS threads in your
language-level threads.
This is mainly because you're using a mechanism for a purpose it
wasn't really designed for: OS-level threads are usually for
exploiting machine-level parallelism, language-level threads are most
useful for enabling certain program paradigms. Both have wildly
different requirements. Therefore, it can make perfect sense to run
language-level threads on multiple OS threads, but (at least in the
case of Scheme), to reap the benefits, you really want to run many
language-level threads on a small or even fixed number of OS threads.
Thus, the absence of using OS-level threads to (help) implemement
language-level threads by itself doesn't mean anything, positive or
negative. Having said that, I'm pretty sure MzScheme threads have
substantially lower overheads than your typical OS threads
implementation.
--
Cheers =8-} Mike
Friede, Völkerverständigung und überhaupt blabla