University of Tasmania
Dermoudy_PhD.pdf (1.67 MB)

Effective run-time management of parallelism in a functional programming context

Download (1.67 MB)
posted on 2023-05-26, 07:58 authored by Dermoudy, J
This thesis considers how to speed up the execution of functional programs using parallel execution, load distribution, and speculative evaluation. This is an important challenge given the increasing complexity of software systems, the decreasing cost of individual processors, and the appropriateness of the functional paradigm for parallelisation. Processor speeds are continuing to climb ‚àö¬¢vîv¿Œ©vîv¿Œ© but the magnitudes of increase are overridden by both the increasing complexity of software and the escalating expectation of users. Future gains in speed are likely to occur through the combination of today‚àö¬¢vîv¿Œ©vîv¿Œ©s conventional uni-processors to form loosely-coupled multicomputers. Parallel program execution can theoretically provide linear speed-ups, but for this theoretical benefit to be realised two main hurdles must be overcome. The first of these is the identification and extraction of parallelism within the program to be executed. The second hurdle is the runtime management and scheduling of the parallel components to achieve the speed-up without slowing the execution of the program. Clearly a lot of work can be done by the programmer to ‚àö¬¢vîv¿Œ©vîv¿Œ©parallelise‚àö¬¢vîv¿Œ©vîv¿Œ© the algorithm. There is often, however, much parallelism available without significant effort on the part of the programmer. Functional programming languages and compilers have received much attention in the last decade for the contributions possible in parallel executions. Since the semantics of languages from the functional programming paradigm manifest the Church-Rosser property (that the order of evaluation of sub-expressions does not affect the result), sub-expressions may be executed in parallel. The absence of side-effects and the lack of state facilitate the availability of expressions suitable for concurrent evaluation. Unfortunately, such expressions may involve varying amounts of computation or require high amounts of data ‚àö¬¢vîv¿Œ©vîv¿Œ© both of which complicate the management of parallel execution. If the future of computation is through the formation of multicomputers, we are faced with the high probability that the number of available processing units will quickly outweigh the known parallelism of an algorithm at any given moment during execution. Intuitively this spare processing power should be utilised if possible. The premise of speculative evaluation is that it employs otherwise idle tasks on work that may prove beneficial. The more program components available for execution the greater the opportunity for speculation and potentially the quicker the program‚àö¬¢vîv¿Œ©vîv¿Œ©s result may be obtained. The second impediment for the parallel execution of programs is the scheduling of program components for evaluation. Multicomputer execution of a program involves the allocation of program components among the available tasks to maximise throughput. We present a decentralised, speculation-cognate, load distribution algorithm that allocates and manages the distribution of program components among the tasks with the co-aim of minimising the impact on tasks executing program components known to be required. In this dissertation we present our implementation of minimal-impact speculative evaluation in the context of the functional programming language Haskell augmented with a number of primitives for the indication of useful parallelism. We expound four (two quantitative and two qualitative) novel schemes for expressing the initial speculative contribution of program components and provide a translation mechanism to illustrate the equivalence of the four. The implementation is based on the Glasgow Haskell Compiler (GHC) version 0‚àö¬¢vîv¿Œ©¬¨¬¢29 ‚àö¬¢vîv¿Œ©vîv¿Œ© the de facto standard for parallel functional programming research ‚àö¬¢vîv¿Œ©vîv¿Œ© and strives to minimise the runtime overhead of managing speculative evaluation. We have augmented the Graph reduction for a Unified Machine model (GUM) runtime system with our load distribution algorithm and speculative evaluation sub-system. Both are motivated by the need to facilitate speculative evaluation without adversely impacting on program components directly influencing the program‚àö¬¢vîv¿Œ©vîv¿Œ©s result. Experiments have been undertaken using common benchmark programs. These programs have been executed under sequential, conservative parallel, and speculative parallel evaluation to study the overheads of the runtime system and to show the benefits of speculation. The results of the experiments conducted using an emulated multicomputer add evidence of the usefulness of speculative evaluation in general and effective speculative evaluation in particular.


Publication status

  • Unpublished

Rights statement

Copyright the Author - The University is continuing to endeavour to trace the copyright owner(s) and in the meantime this item has been reproduced here in good faith. We would be pleased to hear from the copyright owner(s).

Repository Status

  • Open

Usage metrics

    Thesis collection


    No categories selected


    Ref. manager