Hostname: page-component-6766d58669-fx4k7 Total loading time: 0 Render date: 2026-05-21T13:33:37.899Z Has data issue: false hasContentIssue false

Oracle-guided scheduling for controlling granularity in implicitly parallel languages*

Published online by Cambridge University Press:  10 November 2016

UMUT A. ACAR
Affiliation:
Carnegie Mellon University, Pittsburgh, PA, USA Inria, Paris, France (e-mail: umut@cs.cmu.edu)
ARTHUR CHARGUÉRAUD
Affiliation:
Inria, Université Paris-Saclay, Palaiseau, France LRI, CNRS & Univ. Paris-Sud, Université Paris-Saclay, Orsay, France (e-mail: arthur.chargueraud@inria.fr)
MIKE RAINEY
Affiliation:
Inria, Paris, France (e-mail: mike.rainey@inria.fr)
Rights & Permissions [Opens in a new window]

Abstract

Core share and HTML view are not available for this content. However, as you have access to this content, a full PDF is available via the 'Save PDF' action button.

A classic problem in parallel computing is determining whether to execute a thread in parallel or sequentially. If small threads are executed in parallel, the overheads due to thread creation can overwhelm the benefits of parallelism, resulting in suboptimal efficiency and performance. If large threads are executed sequentially, processors may spin idle, resulting again in sub-optimal efficiency and performance. This “granularity problem” is especially important in implicitly parallel languages, where the programmer expresses all potential for parallelism, leaving it to the system to exploit parallelism by creating threads as necessary. Although this problem has been identified as an important problem, it is not well understood—broadly applicable solutions remain elusive. In this paper, we propose techniques for automatically controlling granularity in implicitly parallel programming languages to achieve parallel efficiency and performance. To this end, we first extend a classic result, Brent's theorem (a.k.a. the work-time principle) to include thread-creation overheads. Using a cost semantics for a general-purpose language in the style of lambda calculus with parallel tuples, we then present a precise accounting of thread-creation overheads and bound their impact on efficiency and performance. To reduce such overheads, we propose an oracle-guided semantics by using estimates of the sizes of parallel threads. We show that, if the oracle provides accurate estimates in constant time, then the oracle-guided semantics reduces the thread-creation overheads for a reasonably large class of parallel computations. We describe how to approximate the oracle-guided semantics in practice by combining static and dynamic techniques. We require the programmer to provide the asymptotic complexity cost for each parallel thread and use runtime profiling to determine hardware-specific constant factors. We present an implementation of the proposed approach as an extension of the Manticore compiler for Parallel ML. Our empirical evaluation shows that our techniques can reduce thread-creation overheads, leading to good efficiency and performance.

Information

Type
Articles
Copyright
Copyright © Cambridge University Press 2016 
Submit a response

Discussions

No Discussions have been published for this article.