TY - GEN
T1 - Partial memoization of concurrency and communication
AU - Ziarek, Lukasz
AU - Sivaramakrishnan, K. C.
AU - Jagannathan, Suresh
PY - 2009/8/31
Y1 - 2009/8/31
N2 - Memoization is a well-known optimization technique used to eliminate redundant calls for pure functions. If a call to a function f with argument v yields result r, a subsequent call to f with v can be immediately reduced to r without the need to re-evaluate f 's body. Understanding memoization in the presence of concurrency and communication is significantly more challenging. For example, if f communicates with other threads, it is not sufficient to simply record its input/output behavior; we must also track inter-thread dependencies induced by these communication actions. Subsequent calls to f can be elided only if we can identify an interleaving of actions from these call-sites that lead to states in which these dependencies are satisfied. Similar issues arise if f spawns additional threads. In this paper, we consider the memoization problem for a higher-order concurrent language whose threads may communicate through synchronous message-based communication. To avoid the need to perform unbounded state space search that may be necessary to determine if all communication dependencies manifest in an earlier call can be satisfied in a later one, we introduce a weaker notion of memoization called partial memoization that gives implementations the freedom to avoid performing some part, if not all, of a previously memoized call. To validate the effectiveness of our ideas, we consider the benefits of memoization for reducing the overhead of recomputation for streaming, server-based, and transactional applications executed on a multi-core machine. We show that on a variety of workloads, memoization can lead to substantial performance improvements without incurring high memory costs. Copyrightc 2009 ACM.
AB - Memoization is a well-known optimization technique used to eliminate redundant calls for pure functions. If a call to a function f with argument v yields result r, a subsequent call to f with v can be immediately reduced to r without the need to re-evaluate f 's body. Understanding memoization in the presence of concurrency and communication is significantly more challenging. For example, if f communicates with other threads, it is not sufficient to simply record its input/output behavior; we must also track inter-thread dependencies induced by these communication actions. Subsequent calls to f can be elided only if we can identify an interleaving of actions from these call-sites that lead to states in which these dependencies are satisfied. Similar issues arise if f spawns additional threads. In this paper, we consider the memoization problem for a higher-order concurrent language whose threads may communicate through synchronous message-based communication. To avoid the need to perform unbounded state space search that may be necessary to determine if all communication dependencies manifest in an earlier call can be satisfied in a later one, we introduce a weaker notion of memoization called partial memoization that gives implementations the freedom to avoid performing some part, if not all, of a previously memoized call. To validate the effectiveness of our ideas, we consider the benefits of memoization for reducing the overhead of recomputation for streaming, server-based, and transactional applications executed on a multi-core machine. We show that on a variety of workloads, memoization can lead to substantial performance improvements without incurring high memory costs. Copyrightc 2009 ACM.
KW - Concurrent ml
KW - Concurrent programming
KW - Multicore systems
KW - Partial memoization
KW - Software transactions
UR - https://www.scopus.com/pages/publications/70450184314
U2 - 10.1145/1596550.1596575
DO - 10.1145/1596550.1596575
M3 - Conference contribution
AN - SCOPUS:70450184314
SN - 9781605583327
T3 - Proceedings of the ACM SIGPLAN International Conference on Functional Programming, ICFP
SP - 161
EP - 172
BT - ICFP'09 - Proceedings of the 2009 ACM SIGPLAN International Conference on Functional Programming
PB - Association for Computing Machinery
T2 - 14th ACM SIGPLAN International Conference on Functional Programming, ICFP 2009
Y2 - 31 August 2009 through 2 September 2009
ER -