From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA00090; Fri, 21 Feb 2003 11:43:45 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA00020 for ; Fri, 21 Feb 2003 11:43:43 +0100 (MET) Received: from fichte.ai.univie.ac.at (fichte.ai.univie.ac.at [131.130.174.156]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h1LAhgH16374 for ; Fri, 21 Feb 2003 11:43:43 +0100 (MET) Received: from fichte.ai.univie.ac.at (markus@localhost [127.0.0.1]) by fichte.ai.univie.ac.at (8.12.3/8.12.3/Debian -4) with ESMTP id h1LAhSFx011447; Fri, 21 Feb 2003 11:43:28 +0100 Received: (from markus@localhost) by fichte.ai.univie.ac.at (8.12.3/8.12.3/Debian -4) id h1LAhQXO011446; Fri, 21 Feb 2003 11:43:26 +0100 Date: Fri, 21 Feb 2003 11:43:26 +0100 From: Markus Mottl To: shivkumar chandrasekaran Cc: caml-list@inria.fr Subject: Re: [Caml-list] native threads not parallel? Message-ID: <20030221104326.GA11140@fichte.ai.univie.ac.at> Mail-Followup-To: shivkumar chandrasekaran , caml-list@inria.fr References: <847A10BA-4528-11D7-8C93-000393942C76@ece.ucsb.edu> <20030221091524C.garrigue@kurims.kyoto-u.ac.jp> <1045801453.1601.8.camel@cbshost-12-107-11-69.sbcox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1045801453.1601.8.camel@cbshost-12-107-11-69.sbcox.net> User-Agent: Mutt/1.4i Organization: Austrian Research Institute for Artificial Intelligence Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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