From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2PIjuZo031373 for ; Fri, 25 Mar 2011 19:45:56 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlYCAEbijE3RVdi2kGdsb2JhbAClWwgUAQEBAQkJDQcUBCGofYpUgiGFJS+IXAEBAwWFZASMdYkJOg X-IronPort-AV: E=Sophos;i="4.63,244,1299452400"; d="scan'208";a="94896395" Received: from mail-qy0-f182.google.com ([209.85.216.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Mar 2011 19:45:52 +0100 Received: by qyk27 with SMTP id 27so1071866qyk.6 for ; Fri, 25 Mar 2011 11:45:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=sX/gcUaRDw194mOZ1fWum/f9qbo0aEDSZzUkWe/v7/o=; b=ZWmVeu+lUIEnGTO0+2gwIGhDxVWcd0NE8kGCMHEY+dkWsymo2g+iNYyrHJsVfxR+JY JyfiEt3+DtwgwjSKAX7B9DikC5r69RM2bKPHP2MQ5Tgi9aH0a1OmpLjVILgmdWhy0KYj oxsLWiF4bujRvPVI0UeOzn5T+mp6Nz1568Yt8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=JSW3ykc3KL0tZ4daE54xyP8EGI6HBIbmJxuunrprWZ8wa/CU5+vM/cImmaQ0y2MeZA In18FyfN3E4Xe0RIyrIBPBpZjMRSRIy4AftbN7mGB2PU+FHOWijTC92TkLElIuV5bwOn Y6PHU3Ih0yP5HxdKxQnVrSaBirk/XqrBGc+o8= MIME-Version: 1.0 Received: by 10.229.99.10 with SMTP id s10mr954817qcn.123.1301078751129; Fri, 25 Mar 2011 11:45:51 -0700 (PDT) Received: by 10.229.212.14 with HTTP; Fri, 25 Mar 2011 11:45:50 -0700 (PDT) In-Reply-To: <4D8BD02D.1010505@inria.fr> References: <2054357367.219171.1300974318806.JavaMail.root@zmbs4.inria.fr> <4D8BD02D.1010505@inria.fr> Date: Fri, 25 Mar 2011 15:45:50 -0300 Message-ID: From: Andrei Formiga To: Fabrice Le Fessant Cc: caml-list@inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id p2PIjuZo031373 Subject: Re: [Caml-list] Efficient OCaml multicore -- roadmap? On Thu, Mar 24, 2011 at 8:13 PM, Fabrice Le Fessant wrote: > Hi, > >  Actually, I had a discussion two weeks ago with Xavier and Damien > about this issue. There is some kind of agreement that the ocaml way of > supporting multicore would be to have several runtimes running in the > same process, in different threads. That way, the GC would still be > mono-threaded, so almost no speed loss for mono-threaded programs (i.e. > currently all OCaml programs ;-) ). There would be some kind of "fork" > function, that would create a new thread running a function in a new > heap, probably generated by a copy-on-need algorithm. The different > threads would not share heap memory, but would be allowed to share > structures outside of their heaps, probably for simple types like > strings and int/float arrays (or using the Ancient library). > This looks very interesting. I know there is a lot of hype around multicore, and many programs wouldn't benefit from this, but in the situations where you'd want to use the multiple cores you have, the solutions available now in OCaml aren't easy to use or very practical. Besides, although I don't think this is extremely important (it does have some importance for the language's ecosystem) there is still the "marketing" side. Saying that the OCaml solution to have programs taking advantage of multicores is "create multiple processes and manage them and their communication by yourself" isn't a good answer, in my mind. -- []s, Andrei Formiga