Safe parallel programming with session Java
File(s) DTR10-14.pdf (703.04 KB)
Published version
Author(s)
Pernet, Olivier
Ng, Nicholas
Hu, Raymond
Yoshida, Nobuko
Kryftis, Yiannos
Type
Report
Abstract
The session-typed programming language Session Java (SJ) has proved
to be an effective tool for distributed programming, promoting productivity and
compile-time safety. This paper investigates the use of SJ for session-typed parallel
programming, and introduces new language primitives for chained iteration and
multi-channel communication. These primitives allow the efficient coordination of
parallel computation across multiple processes, thus enabling SJ to express the complex
communication topologies often used by parallel algorithms with static safety
guarantees. We demonstrate that the new primitives yield clearer and safer code for
pipeline, ring and mesh topologies, and through implementations of a parallel Jacobi
method and an n-Body simulation. We then present a semantics and session
typing system including the new primitives, and prove type soundness and deadlockfreedom
for our parallel algorithm implementations. Finally, we benchmark several
implementations of the n-Body simulation on a hybrid computing cluster, demonstrating
the performance gains due to the new primitives. The SJ implementation is
also substantially faster than an MPJ Express1 implementation used as reference.
to be an effective tool for distributed programming, promoting productivity and
compile-time safety. This paper investigates the use of SJ for session-typed parallel
programming, and introduces new language primitives for chained iteration and
multi-channel communication. These primitives allow the efficient coordination of
parallel computation across multiple processes, thus enabling SJ to express the complex
communication topologies often used by parallel algorithms with static safety
guarantees. We demonstrate that the new primitives yield clearer and safer code for
pipeline, ring and mesh topologies, and through implementations of a parallel Jacobi
method and an n-Body simulation. We then present a semantics and session
typing system including the new primitives, and prove type soundness and deadlockfreedom
for our parallel algorithm implementations. Finally, we benchmark several
implementations of the n-Body simulation on a hybrid computing cluster, demonstrating
the performance gains due to the new primitives. The SJ implementation is
also substantially faster than an MPJ Express1 implementation used as reference.
Date Issued
2010-01-01
Citation
Departmental Technical Report: 10/14, 2010, pp.1-35
Publisher
Department of Computing, Imperial College London
Start Page
1
End Page
35
Journal / Book Title
Departmental Technical Report: 10/14
Copyright Statement
© 2010 The Author(s). This report is available open access under a CC-BY-NC-ND (https://creativecommons.org/licenses/by-nc-nd/4.0/)
Publication Status
Published
Article Number
10/14
