APICe » Publications » How to Write Parallel Programs: A Guide to the Perplexed

How to Write Parallel Programs: A Guide to the Perplexed

Nicholas Carriero, David Gelernter
We present a framework for parallel programming, based on three conceptual classes for understanding parallelism and three programming paradigms for implementing parallel programs. The conceptual classes are result parallelism, which centers on parallel computation of all elements in a data structure; agenda parallelism, which specifies an agenda of tasks for parallel execution; and specialist parallelism, in which specialist agents solve problems cooperatively. The programming paradigms center on live data structures that transform themselves into result data structures; distributed data structures that are accessible to many processes simultaneously; and message passing, in which all data objects are encapsulated within explicitly communicating processes. There is a rough correspondence between the conceptual classes and the programming methods, as we discuss. We begin by outlining the basic conceptual classes and programming paradigms, and by sketching an example solution under each of the three paradigms. The final section develops a simple example in greater detail, presenting and explaining code and discussing its performance on two commercial parallel computers, an 18-node shared-memory multiprocessor, and a 64-node distributed-memory hypercube. The middle section bridges the gap between the abstract and the practical by giving an overview of how the basic paradigms are implemented. We focus on the paradigms, not on machine architecture or programming languages: The programming methods we discuss are useful on many kinds of parallel machine, and each can be expressed in several different parallel programming languages. Our programming discussion and the examples use the parallel language C-Linda for several reasons: The main paradigms are all simple to express in Linda; efficient Linda implementations exist on a wide variety of parallel machines; and a wide variety of parallel programs have been written in Linda.
ACM Computing Surveys 21(3), pages 323-357, September 1989, ACM, New York, NY, USA
@article{parallellinda-acmsurvey21,
	Acmid = {72553},
	Address = {New York, NY, USA},
	Author = {Carriero, Nicholas and Gelernter, David},
	Doi = {10.1145/72551.72553},
	Issn = {0360-0300},
	Journal = {ACM Computing Surveys},
	Month = sep,
	Number = 3,
	Pages = {323--357},
	Publisher = {ACM},
	Title = {How to Write Parallel Programs: A Guide to the Perplexed},
	Url = {http://dl.acm.org/citation.cfm?doid=72551.72553},
	Volume = 21,
	Year = 1989}