From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 99DF7BC57 for ; Mon, 29 Nov 2010 17:12:13 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah0DANpf80zAbSoIYGdsb2JhbACDUJEsjS9YCx8lBB6yNpBNgSGDM3ME X-IronPort-AV: E=Sophos;i="4.59,276,1288566000"; d="scan'208";a="80485725" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail4-smtp-sop.national.inria.fr with ESMTP; 29 Nov 2010 17:12:12 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from localhost (okapi.in-berlin.de [192.109.42.117]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id oATGCC9b032764 for ; Mon, 29 Nov 2010 17:12:12 +0100 Received: from e178028169.adsl.alicedsl.de (e178028169.adsl.alicedsl.de [85.178.28.169]) by webmail.in-berlin.de (Horde Framework) with HTTP; Mon, 29 Nov 2010 17:12:12 +0100 Message-ID: <20101129171212.8439157ahjexnnq4@webmail.in-berlin.de> Date: Mon, 29 Nov 2010 17:12:12 +0100 From: "Oliver Bandel" To: caml-list@yquem.inria.fr Subject: Threading and SharedMem (Re: [Caml-list] Re: Is OCaml fast?) References: <20101123232742.GC28768@siouxsie> <1534555381.33107.1290723160355.JavaMail.root@zmbs4.inria.fr> <4CEEE852.5070101@inria.fr> <20101128181433.GA1689@siouxsie> <1291040394.16005.529.camel@thinkpad> In-Reply-To: <1291040394.16005.529.camel@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) 4.3.3 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Spam: no; 0.00; bandel:01 in-berlin:01 threading:01 ocaml:01 gerd:01 stolpmann:01 in-berlin:01 0100,:01 ocaml:01 compiler:01 low-level:01 libs:01 shm:98 threads:01 wrote:01 Zitat von "Gerd Stolpmann" : > Am Sonntag, den 28.11.2010, 19:14 +0100 schrieb > oliver@first.in-berlin.de: >> On Thu, Nov 25, 2010 at 11:50:58PM +0100, Fabrice Le Fessant wrote: >> [...] >> > The main problem was that other languages have bigger standard >> > libraries, whereas OCaml has a very small one (just what is needed >> > to compile the compiler, actually). In many problems, you could >> > benefit from using a very simple shared-memory library (in >> > mandelbrot, the ocaml multicore solution has to copy the image in a >> > socket between processes, whereas it could just be in a shared >> > memory segment), >> >> >> ...so you work on a shared-mem module?! > > Don't know what Fabrice is referring to, but at least I work on a > multicore-enabling library: > > https://godirepo.camlcity.org/svn/lib-ocamlnet2/trunk/code/src/netmulticor= e/ > > This is work in progress and highly experimental. What's currently > available: > > - managing processes and resources like files, shared memory objects > etc. > - support for message passing via Netcamlbox (another library) > - low-level only so far: shared memory, including copying Ocaml values > to and from shm [...] You use shared mem(?), but you link only to *.ml files, and I see no *.c there. How can this be done? At least not via the libs that are shipped with OCaml?! I would have expected some *.c for the shared mem part and the creation of Caml-values.... Ciao, Oliver P.S.: OCaml also provides a Thread-Lib, which seems to use pthread-lib. Normally this should help in making things possible to run on multipl= e cores. What are the restrictions that this does not run that way? Somehow... when all values are handled via one GC, then those threads are somehow bound together, but on the other side, it works threaded, and consumer-worker pipes and such stuff can be used. So... somehow the GC seems to be the point, where the show will be stopped? (Anyone who has looked inside OCaml here more detailed?)