Restoration of legacy parallelism: transforming pthreads into farm and pipeline patterns
File(s) Janjic2021_Article_RestorationOfLegacyParallelism.pdf (1.29 MB)
Published version
Author(s)
Janjic, Vladimir
Brown, Christopher
Barwell, Adam D
Type
Journal Article
Abstract
Parallel 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.
Date Issued
2021-06-10
Date Acceptance
2021-05-04
Citation
International Journal of Parallel Programming, 2021, 49 (6), pp.886-910
ISSN
0091-7036
Publisher
Springer
Start Page
886
End Page
910
Journal / Book Title
International Journal of Parallel Programming
Volume
49
Issue
6
Copyright Statement
© The Author(s) 2021. Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
License URL
Identifier
http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:000659778800001&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=1ba7043ffcc86c417c072aa74d649202
Subjects
Science & Technology
Technology
Computer Science, Theory & Methods
Computer Science
Parallel patterns
Restoration
Pthreads
Program transformation
Refactoring
Code analysis
Farm
Pipeline
TBB
SYSTEM
Publication Status
Published
Date Publish Online
2021-06-10
