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 0DB287F75C for ; Mon, 8 Sep 2014 12:45:32 +0200 (CEST) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of rdicosmo@gmail.com) identity=pra; client-ip=209.85.216.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rdicosmo@gmail.com"; x-sender="rdicosmo@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of rdicosmo@gmail.com designates 209.85.216.174 as permitted sender) identity=mailfrom; client-ip=209.85.216.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rdicosmo@gmail.com"; x-sender="rdicosmo@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-qc0-f174.google.com) identity=helo; client-ip=209.85.216.174; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="rdicosmo@gmail.com"; x-sender="postmaster@mail-qc0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8BAIiHDVTRVdiulGdsb2JhbABZg2BTBASCeLBSliaIWggWEAEBAQEHCwsJEiyEBAEBBBIRHQEUGQsBAwwBBQULAwoCAgkdAgIiEgEFAQoSBhMJCRCIDAMRCAWZdmuLMIUCiQUnAwqGWgERAQUOgR6RIYFTBYUKBYELj1aHAoFfjReERBgpgWyDKDsvAYJOAQEB X-IPAS-Result: Ap8BAIiHDVTRVdiulGdsb2JhbABZg2BTBASCeLBSliaIWggWEAEBAQEHCwsJEiyEBAEBBBIRHQEUGQsBAwwBBQULAwoCAgkdAgIiEgEFAQoSBhMJCRCIDAMRCAWZdmuLMIUCiQUnAwqGWgERAQUOgR6RIYFTBYUKBYELj1aHAoFfjReERBgpgWyDKDsvAYJOAQEB X-IronPort-AV: E=Sophos;i="5.04,486,1406584800"; d="scan'208";a="93502346" Received: from mail-qc0-f174.google.com ([209.85.216.174]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 08 Sep 2014 12:45:31 +0200 Received: by mail-qc0-f174.google.com with SMTP id i17so15121463qcy.19 for ; Mon, 08 Sep 2014 03:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=gb3HPqfPmFfWT1Il0b0YxcgadzM9+DGsn0rYwfBKcMg=; b=DekK25brLiBHNiIDgT7r7KMMuZ+Lj3xBlVXqEX1CiRtuMl6IdaR0jGrsmTQ2bCUDiD 4K3avRCvCggb1WgoTPmHkq5jNsv7wwvCsV33lgyLF8T4EvWCuZTXGZO4rzUDIOPFKkUE AHoP5c48/FWom/2v4Kwthfvrja7XmMjhmOKwvLuXTL6ou546RkKDPCA0Hww1db79Jl4B vRSWcfLhEirZ9pAhP4abCnwnfVebtK3kzQTPT7qqAvnvUsxnpE335agh7Avrp4kgJrzg 4XzfM/jp6Qdt384gaGFTgeAgLFagfa/JIIe3URAbK6n51Zgzlnx2azxo74yNPrp+oCcs uQpA== MIME-Version: 1.0 X-Received: by 10.229.211.132 with SMTP id go4mr12045017qcb.0.1410173130222; Mon, 08 Sep 2014 03:45:30 -0700 (PDT) Sender: rdicosmo@gmail.com Received: by 10.140.222.137 with HTTP; Mon, 8 Sep 2014 03:45:30 -0700 (PDT) In-Reply-To: References: Date: Mon, 8 Sep 2014 12:45:30 +0200 X-Google-Sender-Auth: RhC5V7oBYisUog2GHppd8r6ULEg Message-ID: From: Roberto Di Cosmo To: Peter Zotov Cc: Stephen Dolan , Jiten Pathy , caml-list@inria.fr Content-Type: text/plain; charset=UTF-8 Subject: Re: [Caml-list] Multicore runtime I believe a lot of code written using lightweight threads takes advantage of the fact that only one "thread" at a time has access to the state, as this provides us with the huge plus of writing code that does not need locks to prevent data races. In other words, while there is the illusion of having concurrent code running, we only have a big sequential piece of code under execution, and we rely on this fact. To take advantage of multicore, it would be IMHO very dangerous to change the behaviour of lwt/async to allow real concurrent execution, so the need of a separate mechanisms is real, and the proposed approach using domains and fibers seems quite sensible to me, even if others are possible (and various has been tried already). I am more worried about the unexpected behaviours that will arise once one starts to write code mixing these new abstractions with code using lightweight threads: time will tell :-) 2014-09-08 12:27 GMT+02:00 Peter Zotov : > On 2014-09-08 14:05, Stephen Dolan wrote: >> >> On Sun, Sep 7, 2014 at 10:47 PM, Jiten Pathy wrote: >>> >>> Hello, >>> Nice work by stephen et al. on multicore runtime. Just had some >>> questions:- > > > I have some questions as well. > > Most importantly, why are there fibers at all? We already have Async/Lwt > fragmentation. Would fibers add a third option? > > Would it not be enough to teach the GC how to interact with multiple > threads/domains? > > -- > Peter Zotov > > > -- > 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 -- Roberto Di Cosmo ------------------------------------------------------------------ Professeur En delegation a l'INRIA PPS E-mail: roberto@dicosmo.org Universite Paris Diderot WWW : http://www.dicosmo.org Case 7014 Tel : ++33-(0)1-57 27 92 20 5, Rue Thomas Mann F-75205 Paris Cedex 13 Identica: http://identi.ca/rdicosmo FRANCE. Twitter: http://twitter.com/rdicosmo ------------------------------------------------------------------ Attachments: MIME accepted, Word deprecated http://www.gnu.org/philosophy/no-word-attachments.html ------------------------------------------------------------------ Office location: Bureau 320 (3rd floor) Batiment Sophie Germain Avenue de France Metro Bibliotheque Francois Mitterrand, ligne 14/RER C ----------------------------------------------------------------- GPG fingerprint 2931 20CE 3A5A 5390 98EC 8BFC FCCA C3BE 39CB 12D3