threads library in Objective Caml

From: Pawel Wojciechowski (
Date: Wed Apr 16 1997 - 16:55:07 MET DST

Date: Wed, 16 Apr 1997 15:55:07 +0100
From: Pawel Wojciechowski <>
Message-Id: <>

> You make it sound like the only point of threads is to take advantage of
> parallelism when the program is running on a multiprocessor machine.
> A lot of people use threads for reasons that have nothing to do with
> (objective notions of) performance, for example in GUI programming.

> --
> Frank Christoph Next Solution Co. Tel: 0424-98-1811
> Fax: 0424-98-1500

Threads are very useful indeed! Even if they don't take advantage of
multiprocessor shared memory architectures. I never questioned that.
I'm sorry you misunderstood me. I just wanted to know why, e.g. the
architecure of Caml byte-code interpreter couldn't be multi-threaded.
I'd like to thank Francois Rouaix (and others) who made it clear. We
should wait for a truly concurrent memory management (garbage collector)
to (o)Caml. As I understood the implementation is under way. I think
having such an implementation ready to play with it would be fine.

In some applications, however, the "potential advantage" of threads
(i.e. each thread executing on a separate processor), understood as
*one* of many other advantages of threads, can be vital. A system
which I'm implementing now is inherently concurrent. Ideally any
scheduling decisions, as well as actions within the system, should
be programmed in such a way that in a shared-memory multi-processor,
parts of my system can run in true real-time parallel. A significant
part of the project is implemented in (o)caml and just wondering
whether I have to implement anything in C in order to improve QoS or
stay with Caml for good.

> By your logic, there would seem to be no point in emulating concurrency
> on a sequential machine at all.

This is not my logic at all :) I know many examples where emulating
concurrency on a sequenial machine proved to be very succesful. Perhaps
one of the more spectacular examples would be an experimental language
PICT implementing Robin Milner's concurrent Pi-calculus on a uniprocessor


   | Pawel~ T Wojciechowski cambridge university |
   | hpage is computer lab |
   | phome +44.1223 (3)34602 |

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:10 MET