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 p2ONE0Us009293 for ; Fri, 25 Mar 2011 00:14:00 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhMEAObOi01KfVI0imdsb2JhbACERJQKjHQIFAEBAQoJDQcSBiGpWIoYgluFJ4kLAQEDBYRtdwSMb4NSc4RBOoEc X-IronPort-AV: E=Sophos;i="4.63,239,1299452400"; d="vcf'?scan'208";a="94810626" Received: from mail-ww0-f52.google.com ([74.125.82.52]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 25 Mar 2011 00:13:54 +0100 Received: by wwj40 with SMTP id 40so681951wwj.9 for ; Thu, 24 Mar 2011 16:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:subject:references:in-reply-to:x-enigmail-version :content-type; bh=WViTDypWgtC/c27fAAx1Nxw1TMwVdxQKwZW6MJ39sEY=; b=NXpl14Joi55aIFYhTOMQOMmLBBEjcExfmFzVr0rMQvPQAMQa+gzEy9OVJQrmmTTTP4 NQ7QKdNHOwKk3hf4eyd0hkQjJDaUnt6qPzKgxHR5wH05G/25/06homePDiW2CKFKWt4h HnOApTSrsU0tSjTviBqVrZ9ea5RruU8uc+u0I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:x-enigmail-version:content-type; b=uKagDnNe9yElxxxEFJ9vRNUy808pcJ6xEoKoXHIEC+LMfC+ddKVJzCMUIz3QuUQ6L1 BQSmEqMH9dycl+OF93Bja9fxHUUvo9Tht0QmRPayv+J/9QWbPE9ETwgK7rLB8BD2CJPd LNVOqT9fXvgalbW+sQIcGVaAk3tHX4AJ7uGZU= Received: by 10.216.12.146 with SMTP id 18mr1162111wez.63.1301008432179; Thu, 24 Mar 2011 16:13:52 -0700 (PDT) Received: from [192.168.0.29] (gov91-4-83-152-214-51.fbx.proxad.net [83.152.214.51]) by mx.google.com with ESMTPS id b20sm183244wbb.16.2011.03.24.16.13.50 (version=SSLv3 cipher=OTHER); Thu, 24 Mar 2011 16:13:50 -0700 (PDT) Sender: Fabrice Le Fessant Message-ID: <4D8BD02D.1010505@inria.fr> Date: Fri, 25 Mar 2011 00:13:49 +0100 From: Fabrice Le Fessant User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: caml-list@inria.fr References: <2054357367.219171.1300974318806.JavaMail.root@zmbs4.inria.fr> In-Reply-To: <2054357367.219171.1300974318806.JavaMail.root@zmbs4.inria.fr> X-Enigmail-Version: 1.1.2 Content-Type: multipart/mixed; boundary="------------010005060004040101060205" Subject: Re: [Caml-list] Efficient OCaml multicore -- roadmap? This is a multi-part message in MIME format. --------------010005060004040101060205 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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). Now, there are still two problems: (1) We don't know yet how to implement that in a portable way. TLS (Thread-local storage) is only available on a few architectures. And not using TLS implies non-backward compatible changes to the FFI (Foreign-Functions Interface), i.e. all stub libraries would have to be rewritten. (2) As Gerd pointed it, there are not so many programs that would benefit from that. So it is not currently on the top of our priority list, although I am planning to give it a try in the next months, at least for the TLS version. Cheers, -- Fabrice On 03/24/2011 02:45 PM, Alexy Khrabrov wrote: > Where does the OCaml team stand on the multicore issues? A year or so ago, when there was a prototype parallel GC implementation, IIRC, Xavier said it has to be done right. So what are the official plans and the status of integrating what volunteers had done? > > WIth Scala having a robust actors model and AKKA kernel, and Clojure built around efficient shared memory concurrency with agents and references and STM, and Haskell also really parallel, OCaml is lacking behind. Furthermore, F# builds on strongly parallel .NET, overcoming granddaddy. With multicores common even in laptops and iPads, we need an efficient multicore OCaml! Due to the model different from Haskell or Scala and Clojure, now all on github, OCaml is both more stable and also is slower to advance -- what do folks think about this situation? How do you do shared memory parallelism now? > > Cheers, > Alexy > --------------010005060004040101060205 Content-Type: text/x-vcard; charset=utf-8; name="fabrice_le_fessant.vcf" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="fabrice_le_fessant.vcf" begin:vcard fn:Fabrice LE FESSANT n:LE FESSANT;Fabrice org:INRIA Saclay -- Ile-de-France;Projet OCamlPro adr;quoted-printable:;;Parc Orsay Universit=C3=A9 ;Orsay CEDEX;;91893;France email;internet:fabrice.le_fessant@inria.fr title;quoted-printable:Charg=C3=A9 de Recherche tel;work:+33 1 74 85 42 14 tel;fax:+33 1 74 85 42 49 url:http://fabrice.lefessant.net/ version:2.1 end:vcard --------------010005060004040101060205--