Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
* threads library in Objective Caml
@ 1997-04-14  9:35 Pawel Wojciechowski
  1997-04-14 17:06 ` Francois Rouaix
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Pawel Wojciechowski @ 1997-04-14  9:35 UTC (permalink / raw)
  To: caml-list; +Cc: Pawel.Wojciechowski


The potential advantage of threads is that on a multiprocessor shared memory 
machine, each thread can run on a different processor. However, in the (O)Caml 
documentation is written as follows: "The `threads' library is implemented
by time-sharing on a single processor. It will not take advantage of multi-
-processor machines. Using this library will therefore never make programs 
run faster".

When writing concurrent porgrams, it is essential to handle concurrency 
properly, and that means assigning threads dynamically.  It is vital that
the threads are recognised at kernel level for independent allocation of
processor resource (otherwise it's "block one, block all", which is
intolerable). 

Assuming that the threads library of the (O)Caml is implemented by using 
the POSIX Unix thread library, in the light of the previous paragraph, it 
seems to me that using threads in programs written purely in Caml is less
powerful (in terms of the program behaviour on multi-processor architecures)
that using threads in a program written in C. Could you briefly explain 
this ?

On the other hand, on a single processor architecture, programs written
in Caml or C should take advantage of using threads library in exactly the 
same way. Am I right?

Pawel







^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1997-04-18 19:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-04-14  9:35 threads library in Objective Caml Pawel Wojciechowski
1997-04-14 17:06 ` Francois Rouaix
1997-04-15  3:51 ` Frank Christoph
1997-04-15  8:41 ` pcuoq

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox