Using Concurrency and Parallelism Effectively (Parts I and II)
Abstract
The aim of this book is to show both students and practitioners that concurrent and parallel programming does not need to be as hard as it is often portrayed and in fact is often easier than building the equivalent sequential system. This will be achieved by presenting a set of example systems that demonstrate the underlying principles of parallel system design based upon real world examples.
Supplementary resources (2)
... The concept of structured parallel programming based on a set of building blocks has been proposed by Danelutto and Torquati [3]. Even though the academic Computing community has been active [4] there has been little uptake of these concepts by the wider computing community, although in the period October 2014 to December 2019 a book [5] explaining the effective use of concurrency and parallelism has been downloaded more than 0.8 million times (Bookboon Private Communication). It should be noted that, the concept of a generally applicable process-based parallel farming architecture appeared in 1988 [6]. ...
... Groovy [22] support for JCSP was first described in [23] and was introduced to make the concurrent and parallel computing aspects much clearer, mainly by removing the need for much of the boiler-plate code Java requires. This was further developed in [5] which showed how parallel systems could be easily developed for multi-core and cluster-based systems. A set of helper classes have been developed as a Groovy Library called, groovyJCSP [24,5], to make use of JCSP even simpler. ...
... This was further developed in [5] which showed how parallel systems could be easily developed for multi-core and cluster-based systems. A set of helper classes have been developed as a Groovy Library called, groovyJCSP [24,5], to make use of JCSP even simpler. GroovyJCSP comprises four helper classes; PAR that cause a list of processes to run in parallel, ALT that provides a non-deterministic choice over a list of inputs, and Channel Input and Output Lists that allow the manipulation of Lists (arrays) of channels. ...
A novel parallel patterns library, Groovy Parallel Patterns, is presented which, from the outset, has been designed to exploit more general process parallelism than the usual data and task parallel architectures. The library executes on a standard Java Virtual Machine. The library provides a collection of processes that can be plugged together to form a variety of parallel architectures and is intrinsically its own DSL. A network of processes is guaranteed to be deadlock and livelock free and terminate correctly and this is proved by the use of formal methods. Error capture and a basic logging mechanism have been incorporated. The library enables effective refinement of solutions between process networks which can be checked also using formal methods. A library user is only required to create the required methods as pieces of sequential code, typically taken from extant sequential solutions, which can then be invoked by the processes as required. The utility of the library is demonstrated by several examples including; Monte Carlo Methods, Concordance, Jacobi solutions, N-body problems and Mandelbrot, which is implemented on both a multicore processor and a workstation cluster. The examples are analysed for speedup and efficiency, which show good and consistent performance improvement up to the number of available processor cores and workstations.
... Freedom from deadlock and livelock can be guaranteed by correct application of the client/server model so this shall be used throughout the design. The client/server model is needed as there are many additional challenges in distributed systems [1]. ...
... Most of these requirements come from the original problem, though requirement 4 has been introduced due to the nature of the distributed system. External processes are unfeasible due to there not being a physical space to host those processes, unless they are on the Santa device which would contravene requirement 7. Processes can be made up of sub-processes as this is an effective way of producing re-usable, testable code [1]. Requirements 5 and 6 have been introduced as otherwise the problem would become trivial, with predetermined Reindeer and Elf managers. ...
... Table 1. Requirements for solutions proposed in this report 1 The system should have one Santa process. 2 The system should have nine Reindeer processes. 3 The system should have ten Elf processes. ...
A working solution to the Santa Claus Problem is demonstrated that operates over a distributed system. It is designed and modelled using the client/server model to maintain a deadlock and livelock free architecture. The system was developed using the JCSP library for Java and demonstrated over a network of twenty desktop PCs. Each Santa, Reindeer and Elf process is broken down into numerous sub-processes, and are each designed according to the client/server model. A novel approach to the Elves is presented using a chain-based architecture to allow non-determined subgroups to communicate and consult with Santa in sets of three.
... It also utilises a further library Groovy Parallel [12] designed to make utilisation of JCSP much simpler. The use of these libraries is discussed in [13,14]. The libraries are also available as part of the GPars project [15]. ...
... Even though the file handlers run in parallel there is a likelihood that disc access may be having a major effect. A more detailed analysis of the timing associated with each stage of the algorithm shows that the total time spent in each of the stage S 2 to S 4 is relatively small [14]. ...
... This paper has not considered the requirements of cluster processing. In [14] a means of loading process networks over a TCP/IP connected cluster is described. Future work will reflect on that architecture to make it as simple as possible to distribute a solution over a cluster. ...
ResearchGate has not been able to resolve any references for this publication.