Restoration of Legacy Parallelism: Transforming Pthreads into Farm and Pipeline Patterns
-
Published:2021-06-10
Issue:6
Volume:49
Page:886-910
-
ISSN:0885-7458
-
Container-title:International Journal of Parallel Programming
-
language:en
-
Short-container-title:Int J Parallel Prog
Author:
Janjic Vladimir, Brown ChristopherORCID, Barwell Adam D.
Abstract
AbstractParallel patterns are a high-level programming paradigm that enables non-experts in parallelism to develop structured parallel programs that are maintainable, adaptive, and portable whilst achieving good performance on a variety of parallel systems. However, there still exists a large base of legacy-parallel code developed using ad-hoc methods and incorporating low-level parallel/concurrency libraries such as pthreads without any parallel patterns in the fundamental design. This code would benefit from being restructured and rewritten into pattern-based code. However, the process of rewriting the code is laborious and error-prone, due to typical concurrency and pthreading code being closely intertwined throughout the business logic of the program. In this paper, we present a new software restoration methodology, to transform legacy-parallel programs implemented using pthreads into structured farm and pipeline patterned equivalents. We demonstrate our restoration technique on a number of benchmarks, allowing the introduction of patterned farm and pipeline parallelism in the resulting code; we record improvements in cyclomatic complexity and speedups on a number of representative benchmarks.
Funder
Engineering and Physical Sciences Research Council
Publisher
Springer Science and Business Media LLC
Subject
Information Systems,Theoretical Computer Science,Software
Reference37 articles.
1. Aldinucci, M., Danelutto, M.: Stream Parallel Skeleton Optimization. In: PDCS, pp. 955–962 (1999) 2. Aldinucci, M., Danelutto, M., Kilpatrick, P., Torquati, M.: Fastflow: High-level and efficient streaming on multicore, chap. 13, pp. 261–280 (2017). 10.1002/9781119332015.ch13 3. Asanovic, K., Bodík, R., Demmel, J., Keaveny, T., Keutzer, K., Kubiatowicz, J., Morgan, N., Patterson, D.A., Sen, K., Wawrzynek, J., Wessel, D., Yelick, K.A.: A view of the parallel computing landscape. Commun. ACM 52(10), 56–67 (2009) 4. Axelsson, E., Claessen, K., Sheeran, M., Svenningsson, J., Engdal, D., Persson, A.: The design and implementation of feldspar—an embedded language for digital signal processing. In: The 22nd International Symposium on Implementation and Application of Functional Languages, IFL 2010, Lecture Notes in Computer Science, vol. 6647, pp. 121–136. Springer (2010) 5. Barwell, A.D., Brown, C., Hammond, K., Turek, W., Byrski, A.: Using program shaping and algorithmic skeletons to parallelise an evolutionary multi-agent system in Erlang. J. Comput. Inform. 35(4), 792–818 (2016)
|
|