Version française
Home     About     Download     Resources     Contact us    
Browse thread
More cores
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] More cores
Hi,

> Is it time to start rethinking concurrency in OCaml?
> (...)

That's a recurrent topic in this list.  I'll summarise the arguments
and save us all some time:

i) Someone raises the issue that it's time for Ocaml to go multicore.

ii) A few voices go "yeah!" and state that with a concurrent GC,
    Ocaml can take over the world.  Their argument is as follows:

    1) Ocaml gets a concurrent GC;
    2) ...
    3) Profit!

iii) A voice of reason notes that the devil is in step 2) above.
     If your programming paradigm for concurrency is Threads+Mutexes,
     then you are exposing yourself to a world of pain in race
     conditions.  At this point someone usually links to Xavier's
     standard speech on concurrency (which is a few years old, but
     as poignant now as it was then).

iv) The voices from step ii) retort that they're über-programmers
    and that they can make perfectly scalable and race condition-free
    programmes with Threads+Mutexes if only they had a concurrent GC.

v) The voice of reason remarks that one of the main reasons we all chose
   Ocaml is because the language ensures safe, resilient programmes.
   In a way it's the humble recognition that we are human, and that
   we make mistakes.  Choosing the Threads+Mutexes path would be
   hubris and an abandonment of fundamental reasons why we chose
   Ocaml in the first place.


While I tend to agree with viewpoints iii) and v), I do think a healthy
discussion on the subject of multicore is in order.  Though I suggest
we focus the discussion on concurrency models that will allow us to
take advantage of those multicores in a safe, sane manner:

a) Could Jocaml be the future of Ocaml?

b) How do we handle the global mutability issue?


Best regards,
Dario Teixeira