A run-time algorithm for managing the granularity of parallel functional programs

Gad Aharoni, Dror G. Feitelson, Amnon Barak

Research output: Contribution to journalArticlepeer-review

9 Scopus citations


We present an on-line (run-time) algorithm that manages the granularity of parallel functional programs. The algorithm exploits useful parallelism when it exists, and ignores ineffective parallelism in programs that produce many small tasks. The idea is to balance the amount of local work with the cost of distributing the work. This is achieved by ensuring that for every parallel task spawned, an amount of work that equals the cost of the spawn is performed locally. We analyse several cases and compare the algorithm to the optimal execution. In most cases the algorithm competes well with the optimal algorithm, even though the optimal algorithm has information about the future evolution of the computation that is not available to the on-line algorithm. This is quite remarkable considering we have chosen extreme cases that have contradicting optimal executions. Moreover, we show that no other on-line algorithm can be consistently better than it. We also present experimental results that demonstrate the effectiveness of the algorithm.

Original languageAmerican English
Pages (from-to)387-405
Number of pages19
JournalJournal of Functional Programming
Issue number4
StatePublished - Oct 1992

Bibliographical note

Funding Information:
1 This research was supported in part by the Basic Research Foundation administered by the Israel Academy of Science and Humanities. 2 Current address: IBM TJ Watson Research Center, Yorktown Heights, NY, 10598, USA.


Dive into the research topics of 'A run-time algorithm for managing the granularity of parallel functional programs'. Together they form a unique fingerprint.

Cite this