Comments on: OCaml 2014 https://www.syslog.cl.cam.ac.uk/2014/09/05/ocaml-2014/ The Cambridge Systems Research Blog Tue, 04 Oct 2016 13:16:40 +0000 hourly 1 https://wordpress.org/?v=6.2.2 By: Jon Harrop https://www.syslog.cl.cam.ac.uk/2014/09/05/ocaml-2014/comment-page-1/#comment-297 Sat, 06 Sep 2014 01:02:00 +0000 http://www.syslog.cl.cam.ac.uk/?p=1831#comment-297 Sounds great except the following bit:

“Unifying the two? — concurrent programs are easily parallelized: should we use the same primitives?Java, C# and others do but it’s a bad idea. At scale, death by context-switching.

Fibers for concurrency (cheap! — have millions) and Domains for parallelism (expensive! — have ~#core ones)”

C# uses fibers called “Tasks” for both concurrency and parallelism. There is no death by context switching. Tasks are cheap: you can have millions of tasks. Tasks are balanced (Cilk-style work stealing task deques). Tasks are executed by a thread pool with ~#core threads.

]]>