Re:Composable multi-threaded parallelism in Julia
by DNF2 on Wednesday July 24, 2019 @03:22AM
(#20512994)
My understanding is that it's not just about the parallelism, but about the type of threading model that is used, which makes it extremely composable.
[ Parent
| on HN ]
Re:Composable multi-threaded parallelism in Julia
by tomp on Wednesday July 24, 2019 @07:14AM
(#20513991)
It's literally just futures. (Still very hard to implement, of course, and in particular IMO this kind of implementation (M-to-N threading) is much better than the async/await implementations) but CS is pretty settled on futures being the "best" model, even C++ has them!)
Re:Composable multi-threaded parallelism in Julia
by DNF2 on Wednesday July 24, 2019 @09:05AM
(#20514806)
My understanding was that the depth-first scheduling was basically 'new'.
Re:Composable multi-threaded parallelism in Julia
by chrisseaton on Wednesday July 24, 2019 @09:24AM
(#20514994)
In my experience most work-stealing schedulers for task parallelism like this are going to be depth-first. I’ve written several myself. Primarily for temporal locality - if you just created a task it’ll be resident in cache.
Re:Composable multi-threaded parallelism in Julia
by gpderetta on Wednesday July 24, 2019 @09:54AM
(#20515270)
I'm still trying to access the relevant papers, but from bits of discussions here it seems to me that the difference between the Julia scheduler and cilk is that the former will try to distribute sibling leaf tasks among executors enforcing as close as a global depth first view as possible, while cilk does depth first on each executor but different executors will be exploring distinct the problem space branching off as close to the root as possible (due to the steal the oldest ancestor behaviour). It is a compromise between better cross executor cache locality and increased contention I guess.
Re:Composable multi-threaded parallelism in Julia
by gpderetta on Wednesday July 24, 2019 @10:08AM
(#20515406)
Futures in c++ are really meant for concurrency especially for IO. They currently are way too heavy weight for fine grained parallelism (although there is work ongoing on that). Also futures are about packaging tasks, all the stuff being discussed here is about optimal scheduling which is completely orthogonal.