Parallel programming using skeleton functions
Programming parallel machines is notoriously difficult. Factors contributing to this difficulty include the complexity of concurrency, the effect of resource allocation on performance and the current diversity of parallel machine models. The net result is that effective portability, which depends crucially on the predictability of performance, has been lost. Functional programming languages have been put forward as solutions to these problems, because of the availability of implicit parallelism. However, performance will be generally poor unless the issue of resource allocation is addressed explicitly, diminishing the advantage of using a functional language in the first place.
We present a methodology which is a compromise between the extremes of explicit imperative programming and implicit functional programming. We use a repertoire of higher-order parallel forms, skeletons, as the basic building blocks for parallel implementations and provide program transformations which can convert between skeletons, giving portability between differing machines. Resource allocation issues are documented for each skeleton/machine pair and are addressed explicitly during implementation in an interactive, selective manner, rather than by explicit programming.
KeywordsParallel Machine Program Transformation Functional Language Implementation Option Functional Programming Language
Unable to display preview. Download preview PDF.
- J. Backus, Can Programming Be Liberated from the von-Neumann Style? A Functional Style and its Algebra of Programs, CACM vol. 21, no. 8, pp. 613–41, 1978.Google Scholar
- M. Cole, Algorithmic Skeletons: Structured Management of Parallel Computation, Pitman/MIT Press, 1989.Google Scholar
- J. Darlington, Y-k. Guo and H.M. Pull, A New Perspective on Integrating Functional and Logic Languages, Conf. on Fifth Generation Computing Systems, Tokyo, June 1992.Google Scholar
- J. Darlington and H.M. Pull, A Program Development Methodology Based on a Unified Approach to Execution and Transformation, in Partial Evaluation and Mixed Computation, North-Holland, 1988.Google Scholar
- J. Darlington, M.J. Reeve and S. Wright, Programming Parallel Computer Systems using Functional Languages and Program Transformation, in Parallel Processing '89, Leiden, 1989.Google Scholar
- P.G. Harrison, Towards the Synthesis of Static Parallel Algorithms: a Categorical Approach, IFIP TC2 Working Conference on Constructing Programs from Specifications, Pacific Grove, California, May 1991 (published as Constructing Programs from Specifications, North-Holland).Google Scholar
- P.G. Harrison and N. Patel, Performance Modelling: Application to Communication Networks and Computer Architecture, Addison-Wesley, 1992.Google Scholar
- P. Hudak, S.L. Peyton Jones, P.L. Wadler, B. Boutel, J. Fairburn, J. Fasel, M. Guzmán, K. Hammond, J. Hughes, T. Johnsson, R. Kieburtz, R.S. Nikhil, W. Partain and J. Peterson, Report on the Functional Programming Language Haskell, SIGPLAN Notices 27(5), May 1992.Google Scholar
- C. A. Isaac, Structural Implementations of Functional Skeletons, MSc Project Report, Dept. of Computing, Imperial College 1992.Google Scholar
- G.K. Jouret, Compiling Functional Languages for SIMD Architectures, 3rd IEEE Symposium on Parallel and Distributed Processing, Dallas, December 1991.Google Scholar
- P.H.J. Kelly, Functional Programming for Loosely-coupled Microprocessors, Pitman/MIT Press, 1989.Google Scholar
- K. Li and P. Hudak, Memory Coherence in Shared Virtual Memory Systems, ACM Transactions on Computer Systems vol.7, no. 4, pp. 329–59, 1989.Google Scholar
- Meiko Ltd., CS Tools for SunOS, 1990 Edition: 83-009A00-02.02.Google Scholar
- G. Papachrysantou, High Level Forms for Computation in Solid Modelling, MSc Project Report, Dept. of Computing, Imperial College 1992.Google Scholar
- N. Perry, Hope+, Internal document IC/FPR/LANG/2.5.1/7, Dept. of Computing, Imperial College, 1989.Google Scholar
- D.W.N. Sharp and M.D. Cripps, Parallel Algorithms that Solve Problems by Communication, 3rd IEEE Symposium on Parallel and Distributed Processing, Dallas, December 1991.Google Scholar
- L.G. Valiant, General Purpose Parallel Architectures, in Handbook of Theoretical Computer Science, North-Holland, 1990.Google Scholar
- R.L. While, Transforming Divide-and-Conquer to Pipeline, Internal note, Dept. of Computing, Imperial College, 1991.Google Scholar
- J.H. Williams, On the Development of the Algebra of Functional Programs, ACM Transactions on Programming Languages and Systems vol. 4, pp. 733–57, 1982.Google Scholar