[Paper Review] QuickSched: Task-based parallelism with dependencies and conflicts
QuickSched is a lightweight, open-source C library for task-based shared-memory parallelism that extends traditional dependency-only task scheduling with explicit task conflicts—modeled via hierarchical, lockable resources—to enable efficient, order-independent serialization of tasks that access shared resources. It achieves high performance and strong scaling on 64-core systems, with scheduler overheads below 1% of total execution time, by combining critical-path-based task prioritization with efficient lock-based conflict resolution and minimal runtime abstraction.
This paper describes QuickSched, a compact and efficient Open-Source C-language library for task-based shared-memory parallel programming. QuickSched extends the standard dependency-only scheme of task-based programming with the concept of task conflicts, i.e.~sets of tasks that can be executed in any order, yet not concurrently. These conflicts are modelled using exclusively lockable hierarchical resources. The scheduler itself prioritizes tasks along the critical path of execution and is shown to perform and scale well on a 64-core parallel shared-memory machine for two example problems: A tiled QR decomposition and a task-based Barnes-Hut tree code.
Motivation & Objective
- Address the limitation of existing task-based systems that enforce arbitrary ordering via dependencies for non-overlapping tasks, which can reduce parallelism.
- Enable efficient, order-independent serialization of tasks that access shared resources (e.g., reductions or exclusive writes) without artificial ordering constraints.
- Design a minimal, portable, and high-performance task scheduler in standard C, avoiding compiler extensions or preprocessors.
- Achieve low overhead and high scalability in shared-memory environments by combining critical-path task prioritization with efficient resource locking.
- Provide a simple, extensible API that allows explicit specification of task dependencies and conflicts at compile time, enabling better scheduling decisions.
Proposed method
- Model task dependencies as a Directed Acyclic Graph (DAG), with tasks as nodes and data-flow constraints as edges.
- Introduce task conflicts as sets of tasks that must not execute concurrently but can be ordered arbitrarily, modeled using exclusive locks on hierarchical resources.
- Use a critical path length heuristic to weight tasks and prioritize scheduling along the longest data-dependent path to maximize parallelism.
- Implement a work-stealing task queue system using OpenMP or pthreads, with each thread maintaining a local queue and probing others when idle.
- Enforce both dependencies and conflicts via fine-grained, hierarchical resource locks that are acquired and released during task execution.
- Minimize runtime overhead by keeping the scheduler logic lightweight and avoiding complex runtime analysis or pre-processing, relying on static task graph specification.
Experimental results
Research questions
- RQ1Can explicit modeling of task conflicts—beyond dependencies—improve parallelism in task-based systems with shared-resource access?
- RQ2How does a lock-based conflict model compare to dependency-based serialization in terms of performance and scalability on shared-memory architectures?
- RQ3To what extent can a minimal, C-based task scheduler achieve low overhead and strong scaling without compiler extensions or complex runtime systems?
- RQ4Does critical-path-based task prioritization improve load balancing and execution efficiency in irregular task graphs with mixed data and resource dependencies?
- RQ5What is the impact of memory hierarchy and cache coherency on task scheduling overhead and performance in large-scale shared-memory systems?
Key findings
- QuickSched achieves sub-1% scheduler overhead (qsched_gettask) across all core counts, even on 64-core systems, indicating minimal runtime cost.
- The cost of pair interaction tasks grows by up to 30% when scaling from 16 to 64 cores due to L2 cache sharing, while particle-cell interaction costs grow by only 10%, reflecting better memory locality.
- The library scales well on 64-core shared-memory systems, demonstrating strong performance for both tiled QR decomposition and Barnes-Hut tree-code workloads.
- Explicit modeling of conflicts via hierarchical locks enables correct serialization of non-commuting tasks (e.g., reductions) without imposing arbitrary execution order.
- The critical path-based task weighting strategy leads to high parallel efficiency by prioritizing tasks on the longest data-dependent path.
- QuickSched’s design, based on standard C and OpenMP/pthreads, ensures portability and simplicity, with less than 3,000 lines of code and minimal abstraction layer.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.