caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Roberto Di Cosmo <roberto@dicosmo.org>
To: Peter Zotov <whitequark@whitequark.org>
Cc: Stephen Dolan <stephen.dolan@cl.cam.ac.uk>,
	Jiten Pathy <jpathy@fssrv.net>,
	caml-list@inria.fr
Subject: Re: [Caml-list] Multicore runtime
Date: Mon, 8 Sep 2014 12:45:30 +0200	[thread overview]
Message-ID: <CAJBwKuUgsWbs5UpCxAKD_cJGo4GbPWuyjiC8jjzvzhcPy3dE+w@mail.gmail.com> (raw)
In-Reply-To: <c6e4a941e45662223ee8c751d25c43e0@whitequark.org>

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 <whitequark@whitequark.org>:
> On 2014-09-08 14:05, Stephen Dolan wrote:
>>
>> On Sun, Sep 7, 2014 at 10:47 PM, Jiten Pathy <jpathy@fssrv.net> 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

  reply	other threads:[~2014-09-08 10:45 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-07 21:47 Jiten Pathy
2014-09-08 10:05 ` Stephen Dolan
2014-09-08 10:27   ` Peter Zotov
2014-09-08 10:45     ` Roberto Di Cosmo [this message]
2014-09-08 10:45   ` Leonardo Laguna Ruiz
2014-09-08 11:06     ` Adrien Nader
2014-09-08 14:49   ` Jesper Louis Andersen
2014-09-08 15:08     ` [Caml-list] format of .annot files Francois Berenger
2014-09-08 15:56     ` [Caml-list] Multicore runtime Anil Madhavapeddy
2014-09-08 17:32       ` Jesper Louis Andersen
2014-09-09  2:24         ` Yotam Barnoy
2014-09-09 15:06           ` Stephen Dolan
2014-09-09 15:26             ` Yotam Barnoy
2014-09-10 22:01               ` Stephen Dolan
2014-09-10 22:42                 ` Yotam Barnoy
2014-09-11  8:39                   ` Stephen Dolan
2014-09-11  8:53                     ` Malcolm Matalka
2014-09-11 13:42                       ` Yotam Barnoy
2014-09-12 10:42                       ` Stephen Dolan
  -- strict thread matches above, loose matches on Subject: below --
2014-05-29 23:04 Jiten Pathy
2014-06-05 17:01 ` Stephen Dolan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAJBwKuUgsWbs5UpCxAKD_cJGo4GbPWuyjiC8jjzvzhcPy3dE+w@mail.gmail.com \
    --to=roberto@dicosmo.org \
    --cc=caml-list@inria.fr \
    --cc=jpathy@fssrv.net \
    --cc=stephen.dolan@cl.cam.ac.uk \
    --cc=whitequark@whitequark.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).