Reflective parallel programming: extensible and high-level control of runtime, compiler, and application interaction

  • Authors:
  • Nicholas D. Matsakis;Thomas R. Gross

  • Affiliations:
  • ETH Zurich;ETH Zurich

  • Venue:
  • HotPar'10 Proceedings of the 2nd USENIX conference on Hot topics in parallelism
  • Year:
  • 2010

Quantified Score

Hi-index 0.00

Visualization

Abstract

Thread support in most languages is opaque and low-level. Primitives like wait and signal do not allow users to determine the relative ordering of statements in different threads in advance. In this paper, we extend the reflection and meta-programming facilities of object-oriented languages to cover parallel program schedules. The user can then access objects representing the extant threads or other parallel tasks. These objects can be used to modify or query happens before relations, locks, and other high-level scheduling information. These high-level models enable users to design their own parallel abstractions, visualizers, safety checks, and other tools in ways that are not possible today. We discuss one implementation of this technique, the intervals library, and show how the presence of a first-class, queryable program schedule allows us to support a flexible data race protection scheme. The scheme supports both static and dynamic checks and also permits users to define their own "pluggable" safety checks based on the reflective model of the program schedule.