From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: ** X-Spam-Status: No, score=2.0 required=5.0 tests=HTML_00_10,HTML_MESSAGE, SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id CB9DDBC69 for ; Sun, 22 Apr 2007 09:42:11 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.239]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l3M7gAbu003776 for ; Sun, 22 Apr 2007 09:42:11 +0200 Received: by wr-out-0506.google.com with SMTP id 69so1215906wra for ; Sun, 22 Apr 2007 00:42:10 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type; b=bYpz4Foi/7coxxqz2mj8QpgNpSe4hQYLPSs/hlrPMWcUhzD4Yfqao6l1f7IoxVVs5cSdnfyocig8XSrYQRIHjYlj1IGErLioUtRfnnNyFpPmK/Zc8mBL2MAr5yOzW/NTASeS8tvT57AhPTYPbLXaMdlTjvEwUJbFSfEDedRWUcg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=sXhIw0z1qNeuo6q6jU+T0RnD1in0Jtm+WOa9jvO/Rxx0H3JYB01T9KoqlQiZvBCS+zZ8Gnl/1AMPqBK76HYkuE/l0U92ijKKKM5rYebtMoqznjHCn2+l8k9eg8Y2kkPcwEJL3ehAxLQKBLTLrHZsHfAcYWb//tpb0X2RnEw1pZA= Received: by 10.114.155.1 with SMTP id c1mr1983244wae.1177227730061; Sun, 22 Apr 2007 00:42:10 -0700 (PDT) Received: by 10.114.158.16 with HTTP; Sun, 22 Apr 2007 00:42:09 -0700 (PDT) Message-ID: Date: Sun, 22 Apr 2007 03:42:09 -0400 From: "Jason Ganetsky" To: caml-list@yquem.inria.fr Subject: Multiprocessor support in OCaml MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_119149_8733035.1177227729888" X-j-chkmail-Score: MSGID : 462B11D2.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 462B11D2.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 ocaml:01 sml:01 threads:01 sml:01 threads:01 unsafe:01 unsafe:01 modules:02 modules:02 module:03 module:03 processors:04 processors:04 problem:05 ------=_Part_119149_8733035.1177227729888 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all, I'm new to this list, and new to OCaml (although, have some experience with SML). Anyway, I have recently written an OCaml thread pool implementation, on top of the Thread and Event modules. I did this for the purpose of exploiting an SMP system I have, and was a disappointed to read today that OCaml doesn't support multiprocessor systems. I played around with it a little, and discovered that by liberally calling Thread.yield, I do cajole my threads into running on multiple processors. Is this behavior normal, or have I discovered a problem with the Thread module? I'm certainly happy that I can get it to use my SMP... but I will stop it at once if you tell me that this is unsafe. -Jason ------=_Part_119149_8733035.1177227729888 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi all,

I'm new to this list, and new to OCaml (although, have some experience with SML).

Anyway, I have recently written an OCaml thread pool implementation, on top of the Thread and Event modules. I did this for the purpose of exploiting an SMP system I have, and was a disappointed to read today that OCaml doesn't support multiprocessor systems.

I played around with it a little, and discovered that by liberally calling Thread.yield, I do cajole my threads into running on multiple processors. Is this behavior normal, or have I discovered a problem with the Thread module? I'm certainly happy that I can get it to use my SMP... but I will stop it at once if you tell me that this is unsafe.

-Jason
------=_Part_119149_8733035.1177227729888--