当前位置: 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 0.9 ) 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.



中文翻译:

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

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

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