Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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.

Regards,
Markus Mottl

-- 
Markus Mottl                                             markus@oefai.at
Austrian Research Institute
for Artificial Intelligence                  http://www.oefai.at/~markus
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners