[M3devel] [M3commit] CVS Update: cm3

Mika Nystrom mika at async.caltech.edu
Mon Dec 29 10:23:17 CET 2008


Jay writes:
>
...
> 
>I'm still not much of a believer in user threads.
>Essentially I have always had kernel threads, with a processor-portable
>interface, and one machine-wide scheduler..seems good..
> 
...

Except that on some machines, some operating systems, Modula-3's
user threads are much more efficient (and if not, far more easily
modifiable) than the provided kernel threads when you perform certain
types of operations in certain situations.  I often write programs
with many (hundreds, thousands) of active threads and run into these 
sorts of problems frequently.

You could argue that it should not be so... that every OS should
provide kernel threads that are better than Modula-3's own user
threads under all conceivable workloads, but what good does that
do?  Seems better to have a way of avoiding that can of worms by
being able to control one's own implementation.

Another reason that occurred to me when reading some very old
M3 documentation is that there do occasionally exist systems
that don't have a real operating system.  There may also be
other deficient systems that don't have pthreads.  With an existing
user-level threading library you can easily support such systems.
(M3 has supported such systems in the past...)

     Mika



More information about the M3devel mailing list