Cooperative Scheduling of Parallel Tasks with General Synchronization Patterns

  • Shams Imam
  • Vivek Sarkar
Conference paper

DOI: 10.1007/978-3-662-44202-9_25

Part of the Lecture Notes in Computer Science book series (LNCS, volume 8586)
Cite this paper as:
Imam S., Sarkar V. (2014) Cooperative Scheduling of Parallel Tasks with General Synchronization Patterns. In: Jones R. (eds) ECOOP 2014 – Object-Oriented Programming. ECOOP 2014. Lecture Notes in Computer Science, vol 8586. Springer, Berlin, Heidelberg

Abstract

In this paper, we address the problem of scheduling parallel tasks with general synchronization patterns using a cooperative runtime. Current implementations for task-parallel programming models provide efficient support for fork-join parallelism, but are unable to efficiently support more general synchronization patterns such as locks, futures, barriers and phasers. We propose a novel approach to addressing this challenge based on cooperative scheduling with one-shot delimited continuations (OSDeConts) and event-driven controls (EDCs). The use of OSDeConts enables the runtime to suspend a task at any point (thereby enabling the task’s worker to switch to another task) whereas other runtimes may have forced the task’s worker to be blocked. The use of EDCs ensures that identification of suspended tasks that are ready to be resumed can be performed efficiently. Furthermore, our approach is more efficient than schedulers that spawn additional worker threads to compensate for blocked worker threads.

We have implemented our cooperative runtime in Habanero-Java (HJ), an explicitly parallel language with a large variety of synchronization patterns. The OSDeConts and EDC primitives are used to implement a wide range of synchronization constructs, including those where a task may trigger the enablement of multiple suspended tasks (as in futures, barriers and phasers). In contrast, current task-parallel runtimes and schedulers for the fork-join model (including schedulers for the Cilk language) focus on the case where only one continuation is enabled by an event (typically, the termination of the last child/descendant task in a join scope). Our experimental results show that the HJ cooperative runtime delivers significant improvements in performance and memory utilization on various benchmarks using future and phaser constructs, relative to a thread-blocking runtime system while using the same underlying work-stealing task scheduler.

Keywords

Task Parallelism Cooperative Scheduling Delimited Continuations Async-Finish Parallelism Habanero-Java 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2014

Authors and Affiliations

  • Shams Imam
    • 1
  • Vivek Sarkar
    • 1
  1. 1.Department of Computer ScienceRice UniversityUSA

Personalised recommendations