[M3devel] userthreads vs. pthreads performance?

Chris Highjinks at gmx.com
Sun Mar 28 23:01:31 CEST 2010


On Sun, 28 Mar 2010 09:58:04 +0000
Jay K <jay.krell at cornell.edu> wrote:

> 
> I understand that userthreads don't scale across multiple processors.
> 
> But testing out cvsup lately, things are noticably much much faster
> 
> with user threads. At least cvsup. I haven't watched the compiler and such.
> 
>  
> 
>  
> 
>  - Jay

In fact user threads, and better yet, Synchronous Threads, are in fact highly scalable when done right.

This has been one point of contention for me regarding the current crop of "mature" programming languages. Everything is being shoehorned into the Asynchronous model. 

The problem is that the Asynchronous model is staring to break down. With more and more processor cores being added, the need for more and more locks and mutexes and semaphores is growing. Not only does this kill performance, it makes problems like deadlock and race conditions much more difficult to prevent.  		 	   		  

It used to be that user threads, cooperative threads, and Synchronous threads were seen as bottlenecks. That might have been the case back when we were dealing maybe four processors max. But now were looking, in some cases, at machines with four 4 core processors on a MB; and that number is expected to keep growing. Now Cooperative threads and Synchronous threads are outscaling Asynchronous threads, particularly in multimedia applications.

The thing that is really needed now is language support and kernel support for the Synchronous model.

Here are some reference links, for those who are curious...

The Kusp project, which has support for Synchronous threads in the Linux Kernel.
http://www.ittc.ku.edu/kurt/

A Wikipedia link on the Esterel programming language.
http://en.wikipedia.org/wiki/Esterel 

Project COSA, which explores the issue a little more in depth.
http://www.rebelscience.org/Cosas/COSA.htm

The Timber compiler, which is all about Synchronous Programming. For those who care to experiment.
http://timber-lang.org/

I realize the OP is about "user threads", but I think it might be good to open up a discussion about "user threads" and the subtopics therein. Modula might benefit from a formal definition of this stuff. IMHO.

Anyone else share my interest?

-- 
Chris <Highjinks at gmx.com>



More information about the M3devel mailing list