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
Re: [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: 2003-02-21 (10:43)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] native threads not parallel?
On Thu, 20 Feb 2003, shivkumar chandrasekaran wrote:
> If I am recalling correctly, Xavier has mentioned before that in
> *native-code* (see subject) ocaml will allow C code to run in parallel.
> Markus' email was precisely on that point as was mine. I have C code
> that I would like to execute on a processor different from the ocaml
> thread one. Apparently, as I gather from the cited email of Markus
> Mottl, this did occur (at least on some dual processor Linux machines)
> when the corresponding C code was bracketed with "enter/leaving_blocking
> section ()" calls, and, *I assume*, calling the C-code from a separate
> ocaml thread using Thread.create.

Looking back at the old discussion, I remember that this was really
a Solaris-only problem. Executing C-code from OCaml in parallel
(requires native threads, of course) by using enter_blocking_section
and leave_blocking_section appropriately should work without problems
on other platforms, well, at least Linux. As Jacques correctly pointed
out, of course, messing with the OCaml-heap within such sections, e.g.
by calling callbacks, is a guarantee for sudden death.

Markus Mottl

Markus Mottl                                   
Austrian Research Institute
for Artificial Intelligence        
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: