Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] native threads not parallel?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-06-15 (18:42)
From: Markus Mottl <mottl@m...>
Subject: Re: [Caml-list] native threads not parallel?
On Fri, 15 Jun 2001, Xavier Leroy wrote:
> The default thread library under Solaris is odd in the sense that, by
> default, it doesn't take advantage of more than one processor.  (More
> specifically, it creates only one "ligthweight process", i.e. kernel
> thread, unless more are required for I/O purposes.)

Very odd, indeed...

> Try to put the
> following incantation somewhere in your code:
> If that doesn't help, you might still want to look at how many LWPs
> (not user threads) are active in your program, using whatever tools
> Solaris provides for this purpose.  

Thanks for the code, but it unfortunately doesn't change anything (at
least not visibly to me).

The "ps"-command shows me that there are really four LWPs with different
LWP-ids running under the same PID. Or better: only one seems to
be actually executing code, the others do not consume LTIME. The
"mpstat"-tool tells me that user code consumes both CPUs at 100%, but
this means nothing, because the tool counts itself as already consuming
the capacity of one processor...

Maybe it's a configuration problem of the machine, I don't know, I am
not the administrator.

In any case, it doesn't seem to depend on my code. If anybody ever tries
my Lacaml-library on a machine with multiple processors, I'd like to
hear whether it works fine when executed in parallel.

Markus Mottl

Markus Mottl,,
Bug reports:  FAQ:
To unsubscribe, mail  Archives: