Optimal Parallel Algorithms in the Binary-Forking Model
Authors:
- Guy E. BlellochGBGuy E. Blelloch
- Jeremy T. FinemanJFJeremy T. Fineman
- Yan GuYGYan Gu
- Yihan SunYSYihan Sun
Preprint
Abstract
In this paper we develop optimal algorithms in the binary-forking model for a variety of fundamental problems, including sorting, semisorting, list ranking, tree contraction, range minima, and set union, intersection and difference. In the binary-forking model, tasks can only fork into two child tasks, but can do so recursively and asynchronously, and join up later. The tasks share memory, and costs are measured in terms of work (total number of instructions), and span (longest dependence chain). Due to the asynchronous nature of the model, and a variety of schedulers that are efficient in both theory and practice, variants of the model are widely used in practice in languages such as Cilk and Java Fork-Join. PRAM algorithms can be simulated in the model but at a loss of a factor of $\Omega(\log n)$ so most PRAM algorithms are not optimal in the model even if optimal on the PRAM. All the algorithms we describe are optimal in work and span (logarithmic in span). Several are randomized. Beyond being the first optimal algorithms for their problems in the model, most are very simple.
Keywords
All Related Versions
This publication has 18 references indexed in Scilit:
- Oblivious algorithms for multicores and networks of processorsJournal of Parallel and Distributed Computing, 2013
- Nearest Common Ancestors: A Survey and a New Algorithm for a Distributed EnvironmentTheory of Computing Systems, 2004
- The Data Locality of Work StealingTheory of Computing Systems, 2002
- Parallel algorithms for red–black treesTheoretical Computer Science, 2001
- Fast Generation of Random Permutations Via Networks SimulationAlgorithmica, 1998
- A parallel algorithm for the generation of a permutation and applicationsTheoretical Computer Science, 1996
- Faster optimal parallel prefix sums and list rankingInformation and Computation, 1989
- Finding the maximum, merging, and sorting in a parallel computation modelJournal of Algorithms, 1981
- On Relating Time and Space to Size and DepthSIAM Journal on Computing, 1977
- Binary Search Trees of Bounded BalanceSIAM Journal on Computing, 1973