Skip to main content
QUICK REVIEW

[Paper Review] Deterministic Consistency: A Programming Model for Shared Memory Parallelism

Amittai Aviram, Bryan Ford|arXiv (Cornell University)|Dec 4, 2009
Parallel Computing and Optimization TechniquesComputer Science32 references6 citations
TL;DR

This paper proposes Deterministic Consistency (DC), a shared memory programming model that ensures all parallel threads read inputs before writing shared outputs, eliminating data races and heisenbugs. By enforcing deterministic synchronization via explicit acquire/release pairs, DC enables reliable, predictable parallelism without language restrictions or artificial scheduling, achieving low overhead (<10%) in prototype implementations for OpenMP-like workloads.

ABSTRACT

The difficulty of developing reliable parallel software is generating interest in deterministic environments, where a given program and input can yield only one possible result. Languages or type systems can enforce determinism in new code, and runtime systems can impose synthetic schedules on legacy parallel code. To parallelize existing serial code, however, we would like a programming model that is naturally deterministic without language restrictions or artificial scheduling. We propose "deterministic consistency", a parallel programming model as easy to understand as the "parallel assignment" construct in sequential languages such as Perl and JavaScript, where concurrent threads always read their inputs before writing shared outputs. DC supports common data- and task-parallel synchronization abstractions such as fork/join and barriers, as well as non-hierarchical structures such as producer/consumer pipelines and futures. A preliminary prototype suggests that software-only implementations of DC can run applications written for popular parallel environments such as OpenMP with low (&lt;10%) overhead for some applications.

Motivation & Objective

  • To address the challenge of developing reliable parallel software plagued by nondeterministic behavior and hard-to-reproduce heisenbugs.
  • To design a shared memory programming model that is intuitive, deterministic, and compatible with existing sequential code and common parallel abstractions.
  • To eliminate data races and schedule-dependent bugs without requiring language-level type systems or runtime speculation.
  • To enable efficient, software-only implementation of deterministic parallelism for legacy and newly parallelized code.

Proposed method

  • Defining a memory model where concurrent threads read all inputs before writing shared outputs, modeled after parallel assignment in sequential languages.
  • Introducing synchronization primitives: release (publishing writes) and acquire (receiving updates), with a happens-before relation enforced via matching pairs.
  • Ensuring determinism by requiring unique pairing of acquires and releases, and handling conflicting writes through deterministic resolution at synchronization points.
  • Supporting hierarchical abstractions like fork/join and barriers, as well as non-hierarchical patterns such as pipelines and futures.
  • Implementing DC as a distributed shared memory abstraction where releases transmit updates and acquires integrate them locally.
  • Using a software-only prototype to demonstrate low overhead (<10%) on existing parallel workloads, including OpenMP applications.

Experimental results

Research questions

  • RQ1Can a shared memory model be designed that ensures deterministic execution without requiring language-level type systems or static analysis?
  • RQ2How can deterministic consistency be achieved in practice with minimal performance overhead on existing parallel code?
  • RQ3Can DC support common parallel programming idioms like pipelines, futures, and task parallelism while maintaining determinism?
  • RQ4How does DC compare to existing deterministic models such as transactional memory or replay-based debugging in terms of efficiency and correctness?
  • RQ5Can DC be implemented efficiently in software without relying on hardware transactional memory or artificial scheduling?

Key findings

  • Deterministic Consistency ensures that all threads read inputs before writing shared outputs, eliminating data races and nondeterministic behavior.
  • The model supports common synchronization patterns such as fork/join, barriers, pipelines, and futures with deterministic semantics.
  • A software prototype of DC achieves less than 10% overhead on certain OpenMP-like applications, demonstrating practical efficiency.
  • DC avoids the need for speculation, rollback, or artificial scheduling, unlike transactional memory or DMP-based systems.
  • The model enables full determinism even in the presence of shared state, provided external inputs are logged, making execution reproducible.
  • DC provides a practical alternative to sequential consistency by combining simplicity, determinism, and compatibility with existing parallel programming idioms.

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.