Skip to main content
QUICK REVIEW

[Paper Review] Optimal (Randomized) Parallel Algorithms in the Binary-Forking Model

Blelloch, Guy E., Fineman, Jeremy T.|arXiv (Cornell University)|Mar 11, 2019
Parallel Computing and Optimization TechniquesComputer Science35 citations
TL;DR

This paper presents the first optimal work and span algorithms in the binary-forking model for fundamental parallel problems such as sorting, list and tree contraction, range minimum queries, and ordered-set operations. By leveraging randomized techniques and efficient divide-and-conquer strategies with test-and-set primitives, the authors achieve O(log n) span and optimal work, overcoming the Ω(log n) span overhead seen in naive PRAM simulations.

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 ordered 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. The tasks share memory, supporting reads, writes and test-and-sets. Costs are measured in terms of work (total number of instructions), and span (longest dependence chain). The binary-forking model is meant to capture both algorithm performance and algorithm-design considerations on many existing multithreaded languages, which are also asynchronous and rely on binary forks either explicitly or under the covers. In contrast to the widely studied PRAM model, it does not assume arbitrary-way forks nor synchronous operations, both of which are hard to implement in modern hardware. While optimal PRAM algorithms are known for the problems studied herein, it turns out that arbitrary-way forking and strict synchronization are powerful, if unrealistic, capabilities. Natural simulations of these PRAM algorithms in the binary-forking model (i.e., implementations in existing parallel languages) incur an $\Omega(\log n)$ overhead in span. This paper explores techniques for designing optimal algorithms when limited to binary forking and assuming asynchrony. All algorithms described in this paper are the first algorithms with optimal work and span in the binary-forking model. Most of the algorithms are simple. Many are randomized.

Motivation & Objective

  • To close the gap between optimal PRAM algorithms and their practical implementations in modern multithreaded languages by designing algorithms that are optimal in both work and span in the binary-forking model.
  • To address the inherent performance loss when simulating PRAM algorithms in the binary-forking model, which incurs an Ω(log n) span overhead due to arbitrary-way fork and synchronization assumptions.
  • To develop simple, practical, and efficient parallel algorithms that exploit asynchrony and binary forking—common in modern shared-memory systems like Cilk, TBB, and Java Fork-Join.
  • To explore whether optimal performance can be achieved without test-and-set, and whether deterministic variants exist for problems currently solved via randomization.

Proposed method

  • Designing algorithms using a randomized nϵ-way divide-and-conquer approach to achieve O(log n) span by recursively splitting problems into subproblems and solving them in parallel.
  • Leveraging test-and-set (TS) operations to enable efficient synchronization and coordination in asynchronous settings, which is essential for implementing join semantics in practical systems.
  • Adapting dependence DAGs from sequential iterative algorithms into binary-forking algorithms while preserving the span of the longest chain in the DAG.
  • Using hierarchical sparse table variants with precomputed prefix and suffix minima at logarithmic levels to support O(1) range minimum queries after O(n) preprocessing.
  • Applying Euler-tour-based tree representations and list ranking to enable efficient tree contraction via leaf-priority labeling and asynchronous rake operations.
  • Designing an asynchronous, flag-based activation mechanism for postponed nodes in tree and list contraction, ensuring O(log n) span with high probability.

Experimental results

Research questions

  • RQ1Can optimal work and span O(log n) be achieved in the binary-forking model for fundamental problems like sorting and range minimum queries, despite the absence of arbitrary-way forks and strict synchronization?
  • RQ2What algorithmic techniques can be used to eliminate the Ω(log n) span overhead that arises when naively simulating PRAM algorithms in the binary-forking model?
  • RQ3How can randomized techniques and test-and-set operations be combined to achieve optimal span while maintaining simplicity and practicality?
  • RQ4Can the dependence structure of iterative sequential algorithms be effectively transformed into efficient binary-forking algorithms without increasing span?
  • RQ5Is it possible to design deterministic algorithms with optimal work and span in the binary-forking model, or is randomization necessary for achieving optimal span in this model?

Key findings

  • The paper presents the first algorithms with optimal work and O(log n) span for sorting, semisorting, list and tree contraction, range minimum queries, and ordered-set operations in the binary-forking model.
  • For sorting, the algorithm achieves O(n log n) work and O(log n) span with high probability, improving upon prior deterministic results in the same model.
  • The range minimum query algorithm preprocesses an array in O(n) work and O(log n) span, enabling O(1) per-query time, using a modified sparse table with hierarchical partitioning.
  • Tree contraction is achieved with O(n) work and O(log n) span with high probability, by using randomized leaf-priority labeling and asynchronous rake operations.
  • Ordered-set operations (union, intersection, difference) are solved with optimal work O(m log(n/m + 1)) and O(log n) span, matching the best-known bounds in comparison models.
  • The use of test-and-set is shown to be essential for achieving optimal span in the binary-forking model, as it enables efficient coordination without explicit synchronization.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.