From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id CABEE7F75C for ; Thu, 11 Sep 2014 15:43:38 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of yotambarnoy@gmail.com) identity=pra; client-ip=209.85.192.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of yotambarnoy@gmail.com designates 209.85.192.53 as permitted sender) identity=mailfrom; client-ip=209.85.192.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="yotambarnoy@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-qg0-f53.google.com) identity=helo; client-ip=209.85.192.53; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="yotambarnoy@gmail.com"; x-sender="postmaster@mail-qg0-f53.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AlQBALOmEVTRVcA1m2dsb2JhbABYBxaDSlcEgnixHJJFgWmHTQGBCAgWEAEBAQEBBgsLCRQqhAMBAQEDARIRHQEbEgsBAwELBgULAwoNHQICIQEBEQEFAQoSBhMSEIgLAQMJCA2dCGuLMIFygxCJFAoZJwMKZoVqAREBBQ6NEoFlRAQHgnmBUwWFCwWQaYRzghCBX40dhEsYKYUuIS8BAYEEI4EmAQEB X-IPAS-Result: AlQBALOmEVTRVcA1m2dsb2JhbABYBxaDSlcEgnixHJJFgWmHTQGBCAgWEAEBAQEBBgsLCRQqhAMBAQEDARIRHQEbEgsBAwELBgULAwoNHQICIQEBEQEFAQoSBhMSEIgLAQMJCA2dCGuLMIFygxCJFAoZJwMKZoVqAREBBQ6NEoFlRAQHgnmBUwWFCwWQaYRzghCBX40dhEsYKYUuIS8BAYEEI4EmAQEB X-IronPort-AV: E=Sophos;i="5.04,505,1406584800"; d="scan'208";a="94162488" Received: from mail-qg0-f53.google.com ([209.85.192.53]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 11 Sep 2014 15:43:20 +0200 Received: by mail-qg0-f53.google.com with SMTP id q108so3567044qgd.26 for ; Thu, 11 Sep 2014 06:43:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=FQ79tvjhUyOjojdvfXsV0D3xPcsNvOWq64DWa6BVQm8=; b=kqX9eAiBmBu1jgUlqtEGhj7WZT7eVAxDYwJiNvOttiocN6kEeDv6JTphejTgCMVc5n vDDHyad53ppW73nJON1ZCiD4PRKToV2nGYKBXn/Nf6yyFCGg6/YL1VS0fcJff9jU/VqC vTU2sOhcOOIDoilI22JMqpe2sB7KsdUcL9uk1GIh+C7MoiZWPvYOk9LZI1knvDU+YVAJ aTafgoJLi8beOIx7ID3HEVvM/0yqzroFsGWvptVFhgL8hNHTN+lCrJZkTcyA2BJFYwDT SG5UuVIgwyQp1cCN3WeTqHUV1xdgKk06BFypSZCR+zJCIeXPpwdbV+P+woy9yL62mIZv DmCw== X-Received: by 10.224.173.7 with SMTP id n7mr1565321qaz.15.1410442998540; Thu, 11 Sep 2014 06:43:18 -0700 (PDT) MIME-Version: 1.0 Received: by 10.224.174.68 with HTTP; Thu, 11 Sep 2014 06:42:58 -0700 (PDT) In-Reply-To: References: From: Yotam Barnoy Date: Thu, 11 Sep 2014 09:42:58 -0400 Message-ID: To: Malcolm Matalka Cc: Stephen Dolan , caml-list Content-Type: multipart/alternative; boundary=047d7b5da6c7e76fac0502ca59f7 Subject: Re: [Caml-list] Multicore runtime --047d7b5da6c7e76fac0502ca59f7 Content-Type: text/plain; charset=UTF-8 Ah OK. I didn't realize that the original Leroy & Doligez paper dealt only with a copying GC, and that this was the intent here as well. In that case, work stealing does indeed makes sense. Thinking about it some more, I understand why it's not possible to just fork off a suspended thread for synchronous IO as haskell does -- that thread would then modify the local heap, breaking the invariant. So that IS a limitation of the current model, right? Malcolm: the description is here ( http://www.cl.cam.ac.uk/~sd601/multicore.md). As far as I understand, two domains modifying the same reference on the shared heap is the same as in any other language -- it's a write-write conflict, and it needs to be guarded by the user using some primitive. If the reference is in a local heap of another domain, that reference must first have something done to it using a message sent from one domain to another. Unless they go with the model where all mutables sit on the shared heap, meaning that there is no such case. On Thu, Sep 11, 2014 at 4:53 AM, Malcolm Matalka wrote: > Is there a detailed description of the memory model somewhere? For > example what does it mean for two domains to modify the same reference? > Apologies if I missed it in the thread. > Den 11 sep 2014 10:40 skrev "Stephen Dolan" : > >> On Wed, Sep 10, 2014 at 11:42 PM, Yotam Barnoy >> wrote: >> > Maybe I misunderstood something. Does each domain only have a minor >> private >> > heap (ie. copying gc) or do they each also have a major private >> heap/older >> > generation (mark and sweep)? If they have an older generation, then a >> thread >> > could potentially have a lot of data there, no? >> >> Only a private minor heap. The major heap is the shared heap. >> >> -- >> Caml-list mailing list. Subscription management and archives: >> https://sympa.inria.fr/sympa/arc/caml-list >> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners >> Bug reports: http://caml.inria.fr/bin/caml-bugs >> > --047d7b5da6c7e76fac0502ca59f7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Ah OK. I didn't realize that the original Leroy & = Doligez paper dealt only with a copying GC, and that this was the intent he= re as well. In that case, work stealing does indeed makes sense.

Thinking about it some more, I understand why it's not possibl= e to just fork off a suspended thread for synchronous IO as haskell does --= that thread would then modify the local heap, breaking the invariant. So t= hat IS a limitation of the current model, right?

M= alcolm: the description is here (http://www.cl.cam.ac.uk/~sd601/multicore.md). As far as I= understand, two domains modifying the same reference on the shared heap is= the same as in any other language -- it's a write-write conflict, and = it needs to be guarded by the user using some primitive. If the reference i= s in a local heap of another domain, that reference must first have somethi= ng done to it using a message sent from one domain to another. Unless they = go with the model where all mutables sit on the shared heap, meaning that t= here is no such case.

On Thu, Sep 11, 2014 at 4:53 AM, Malcolm Matalka <mmatal= ka@gmail.com> wrote:

Is there a detailed description of the memory model somewhere?=C2= =A0 For example what does it mean for two domains to modify the same refere= nce?=C2=A0 Apologies if I missed it in the thread.

Den 11 sep 2014 10:40 skrev "Stephen Dolan&= quot; <s= tephen.dolan@cl.cam.ac.uk>:
On Wed, Sep 10, 2014 at 11:42 PM, Yot= am Barnoy <yo= tambarnoy@gmail.com> wrote:
> Maybe I misunderstood something. Does each domain only have a minor pr= ivate
> heap (ie. copying gc) or do they each also have a major private heap/o= lder
> generation (mark and sweep)? If they have an older generation, then a = thread
> could potentially have a lot of data there, no?

Only a private minor heap. The major heap is the shared heap.

--
Caml-list mailing list.=C2=A0 Subscription management and archives:
ht= tps://sympa.inria.fr/sympa/arc/caml-list
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs

--047d7b5da6c7e76fac0502ca59f7--