Affiliation:
1. Carnegie Mellon University, USA
Abstract
Because of its many desirable properties, such as its ability to control effects and thus potentially disastrous race conditions, functional programming offers a viable approach to programming modern multicore computers. Over the past decade several parallel functional languages, typically based on dialects of ML and Haskell, have been developed. These languages, however, have traditionally underperformed procedural languages (such as C and Java). The primary reason for this is their hunger for memory, which only grows with parallelism, causing traditional memory management techniques to buckle under increased demand for memory. Recent work opened a new angle of attack on this problem by identifying a memory property of determinacy-race-free parallel programs, called disentanglement, which limits the knowledge of concurrent computations about each other’s memory allocations. The work has showed some promise in delivering good time scalability.
In this paper, we present provably space-efficient automatic memory management techniques for determinacy-race-free functional parallel programs, allowing both pure and imperative programs where memory may be destructively updated. We prove that for a program with sequential live memory of
R
*
, any
P
-processor garbage-collected parallel run requires at most
O
(
R
*
·
P
) memory. We also prove a work bound of
O
(
W
+
R
*
P
) for
P
-processor executions, accounting also for the cost of garbage collection. To achieve these results, we integrate thread scheduling with memory management. The idea is to coordinate memory allocation and garbage collection with thread scheduling decisions so that each processor can allocate memory without synchronization and independently collect a portion of memory by consulting a collection policy, which we formulate. The collection policy is fully distributed and does not require communicating with other processors. We show that the approach is practical by implementing it as an extension to the MPL compiler for Parallel ML. Our experimental results confirm our theoretical bounds and show that the techniques perform and scale well.
Publisher
Association for Computing Machinery (ACM)
Subject
Safety, Risk, Reliability and Quality,Software
Reference139 articles.
1. 2011. Finagle: A Protocol-Agnostic RPC System. https://twitter.github.io/finagle/. 2011. Finagle: A Protocol-Agnostic RPC System. https://twitter.github.io/finagle/.
2. 2015. Folly: Facebook Open-source Library. https://github.com/facebook/folly. 2015. Folly: Facebook Open-source Library. https://github.com/facebook/folly.
3. Umut A. Acar Guy Blelloch Matthew Fluet Stefan K. Muller and Ram Raghunathan. 2015. Coupling Memory and Computation for Locality Management. In Summit on Advances in Programming Languages (SNAPL). Umut A. Acar Guy Blelloch Matthew Fluet Stefan K. Muller and Ram Raghunathan. 2015. Coupling Memory and Computation for Locality Management. In Summit on Advances in Programming Languages (SNAPL).
4. Heartbeat scheduling: provable efficiency for nested parallelism
Cited by
11 articles.
订阅此论文施引文献
订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献
1. Disentanglement with Futures, State, and Interaction;Proceedings of the ACM on Programming Languages;2024-01-05
2. Automatic Parallelism Management;Proceedings of the ACM on Programming Languages;2024-01-05
3. DisLog: A Separation Logic for Disentanglement;Proceedings of the ACM on Programming Languages;2024-01-05
4. Efficient Parallel Functional Programming with Effects;Proceedings of the ACM on Programming Languages;2023-06-06
5. Parallelism in a Region Inference Context;Proceedings of the ACM on Programming Languages;2023-06-06