[M3devel] dynamic chose between user/kernel threads?

Olaf Wagner wagner at elegosoft.com
Tue Jan 13 16:06:21 CET 2009


If I remember correctly, until Antony Hosking provided the PThreads
implementation, M3 only used its own user-level threads on all
POSIX platforms (but not on Windows). The ability to use system
pthread libraries has been added rather late.

(M3's) user level threads are extremely fast and use little resources
(configurable stack sizes). External system threads have a little
more overhead due to the extra user/kernel mode switches for all
scheduling related activies. They have got the advantage that they
can be used for scaling across multiple processors (which wasn't
possible with M3 on Unix until recently).

I agree that these days kernel threads should be the default, as they
are available on almost every system and usually reasonably stable
and fast (which was not so when M3 was created). Nonetheless M3's
user level threads can have advantages for certain uses and should
not be discarded, as they have proven to be mature and useful.

Olaf
-- 
Olaf Wagner -- elego Software Solutions GmbH
                Gustav-Meyer-Allee 25 / Gebäude 12, 13355 Berlin, Germany
phone: +49 30 23 45 86 96  mobile: +49 177 2345 869  fax: +49 30 23 45 86 95
    http://www.elegosoft.com | Geschäftsführer: Olaf Wagner | Sitz: Berlin
Handelregister: Amtsgericht Charlottenburg HRB 77719 | USt-IdNr: DE163214194




More information about the M3devel mailing list