NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Parallel Programming of General-Purpose Programs Using Task-Based Programming Models

Hans Vandierendonck, Polyvios Pratikakis, Dimitrios S. NikolopoulosHotPar 2011

Introduction

As multicore processors become ubiquitous, the need for accessible parallel programming models has intensified. Traditional thread-and-lock paradigms are notoriously error-prone and difficult to scale. While high-level models like Cilk++ and Intel Threading Building Blocks (TBB) have simplified "embarrassingly parallel" tasks, they often struggle with complex dependency patterns, such as those found in parallel pipelines. This paper introduces a hybrid model that combines the nested parallelism of Cilk with the data-dependency tracking of SMPSS to address these challenges.

The Hybrid Task-Based Model

The proposed model merges two powerful concepts: nested parallelism and explicit task dependencies. In this framework, tasks can spawn sub-tasks to any depth, and function arguments are annotated with dependency types: indep (input), outdep (output), or inoutdep (both). This allows the runtime to automatically infer the data flow and schedule tasks accordingly.

A significant innovation is the introduction of versioned hyperobjects. These objects automatically manage renaming (privatization) to break anti-dependencies. When a task has an output dependency on an object currently in use, the system creates a new "version" or view of that object, allowing concurrent execution without manual buffer management.

Dependency-Aware Scheduling

To support this model, the authors extended a Cilk-like work-first scheduler. If a spawned task's dependencies are not yet satisfied, the scheduler postpones the task and continues with other available work, revisiting the postponed task once its data producers complete.

Execution time comparison showing that the overhead of dependency tracking is negligible.

As shown in the execution time analysis, the overhead introduced by tracking these dependencies is minimal. The "Cilk-like" implementation with dependencies performs nearly identically to the version without them, and both outperform standard Cilk++ in absolute execution time for the tested workloads, proving that performance is not sacrificed for expressiveness.

Performance and Scalability

The model was evaluated using real-world applications with complex dependencies: bzip2 (file compression) and hmmer (biological sequence analysis).

Speedup comparison between Cilk++ and the proposed dependency-aware model on the bzip2 benchmark.

In the bzip2 tests, the proposed model achieved performance parity with Cilk++, reaching a speedup of approximately 6x on 8 threads. Furthermore, the hmmer tests confirmed that the dependency tracking mechanism scales effectively with increasing thread counts, matching the scalability of industry-standard frameworks.

Programmability and Expressiveness

Beyond performance, the primary advantage of this model is its impact on code complexity. Implementing a parallel pipeline in Intel TBB required 36 lines of intricate code, while Cilk++ required a 130-line custom "reducer" object. In contrast, the hybrid model achieved the same result through simple annotations on function signatures, significantly reducing the burden on the programmer and making complex parallelism more readable.

Conclusion

By integrating nested parallelism with automated dependency tracking, this hybrid model provides a highly expressive and performant solution for general-purpose parallel programming. It eliminates the need for verbose restructuring of code for complex patterns like pipelines while maintaining the scalability and efficiency required for modern multicore systems.

Summary updated

BibTeX
@inproceedings{vandierendonck2011parallel,
  author = {Hans Vandierendonck and Polyvios Pratikakis and Dimitrios S. Nikolopoulos},
  title = {{Parallel Programming of General-Purpose Programs Using Task-Based Programming Models}},
  booktitle = {HotPar},
  year = {2011},
}
Figure