当前位置: X-MOL 学术Int. J. Parallel. Program › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Restoration of Legacy Parallelism: Transforming Pthreads into Farm and Pipeline Patterns
International Journal of Parallel Programming ( IF 1.5 ) Pub Date : 2021-06-10 , DOI: 10.1007/s10766-021-00716-z
Vladimir Janjic , Christopher Brown , Adam D. Barwell

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.



中文翻译:

传统并行的恢复:将 Pthreads 转换为 Farm 和 Pipeline 模式

并行模式是一种高级编程范式,它使非并行专家能够开发可维护、自适应和可移植的结构化并行程序,同时在各种并行系统上实现良好的性能。然而,仍然存在大量使用临时方法开发的遗留并行代码,并结合了低级并行/并发库,如pthreads在基本设计中没有任何平行模式。此代码将受益于重组和重写为基于模式的代码。但是,由于典型的并发和 pthreading 代码在整个程序的业务逻辑中紧密交织在一起,因此重写代码的过程既费力又容易出错。在本文中,我们提出了一种新的软件恢复方法,将使用pthread实现的遗留并行程序转换为结构化农场和管道模式等价物。我们在许多基准测试中展示了我们的恢复技术,允许在结果代码中引入模式化的农场和管道并行性;我们在许多有代表性的基准测试中记录了圈复杂度和加速方面的改进。

更新日期:2021-06-11
down
wechat
bug