Abstract
One of the more popular paradigms for concurrent programming is the Actor model of message passing; it has been adopted in one form or another by a number of languages and frameworks. By avoiding a shared local state and instead relying on message passing, the Actor model facilitates modular programming. An important challenge for message passing languages is to transmit messages efficiently. This requires retaining the pass-by-value semantics of messages while avoiding making a deep copy on sequential or shared memory multicore processors. A key observation is that many messages have an ownership transfer semantics; such messages can be sent efficiently using pointers without introducing shared state between concurrent objects. We propose a conservative static analysis algorithm which infers if the content of a message is compatible with an ownership transfer semantics. Our tool, called SOTER (for Safe Ownership Transfer enablER) transforms the program to avoid the cost of copying the contents of a message whenever it can infer the content obeys the ownership transfer semantics. Experiments using a range of programs suggest that our conservative static analysis method is usually able to infer ownership transfer. Performance results demonstrate that the transformed programs execute up to an order of magnitude faster than the original programs.
- Panel on A single programming model for clusters and multiprocessor nodes: Dream, nightmare, reality, or vision at UIUC, 2009.Google Scholar
- ActorFoundry. ActorFoundry homepage. http://osl.cs.uiuc.edu/af, 1998--2010.Google Scholar
- G. Agha, I. A. Mason, S. Smith, and C. Talcott. A Foundation for Actor Computation. Journal of Functional Programming, 7 (01): 1--72, 1997. Google Scholar
Digital Library
- L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, DIKU, 1994.Google Scholar
- M. Fähndrich, M. Aiken, C. Hawblitzel, O. Hodson, G. Hunt, J. R. Larus, and S. Levi. Language support for fast and reliable message-based communication in singularity os. SIGOPS Oper. Syst. Rev., 40 (4): 177--190, 2006. Google Scholar
Digital Library
- A. Fuerer. Combining run-time and static universe type inference. Master's thesis, ETH Zurich, 2007.Google Scholar
- P. Haller and M. Odersky. Capabilities for Uniqueness and Borrowing. In Proceedings of the European Conference on Object Oriented Programming (ECOOP), 2010. Google Scholar
Digital Library
- P. Haller and M. Odersky. Actors that unify threads and events. In COORDINATION, 2007. Google Scholar
Digital Library
- G. C. Hunt and J. R. Larus. Singularity: Rethinking the software stack. SIGOPS Oper. Syst. Rev., 41 (2): 37--49, 2007. http://doi.acm.org/10.1145/1243418.1243424. Google Scholar
Digital Library
- R. K. Karmani, A. Shali, and G. Agha. Actor frameworks for the JVM platform: A comparative analysis. In Proceedings of the 7th International Conference on the Principles and Practice of Programming in Java, 2009. Google Scholar
Digital Library
- N. Kelleberger. Static universe type inference. Master's thesis, ETH Zurich, 2005.Google Scholar
- S. Lauterburg, M. Dotta, D. Marinov, and G. Agha. A framework for state-space exploration of Java-based actor programs. In 24th IEEE/ACM International Conference on Automated Software Engineering, ASE 2009. IEEE, 2009. Google Scholar
Digital Library
- S. Lauterburg, R. K. Karmani, D. Marinov, and G. Agha. Evaluating ordering heuristics for dynamic partial-order reduction techniques. In Fundamental Approaches to Software Engineering (FASE) with ETAPS, 2010. Google Scholar
Digital Library
- E. A. Lee. The problem with threads. Computer, 39 (5): 33--42, 2006. http://doi.ieeecomputersociety.org/10.1109/MC.2006.180. Google Scholar
Digital Library
- Microsoft Corporation. Best Practices in the Asynchronous Agents Library - Do Not Pass Large Message Payloads by Value. http://msdn.microsoft.com/en-us/library/ff601928.aspx, 2010Google Scholar
- Microsoft Corporation. Asynchronous Agents Library Walkthrough: Creating an Agent-Based Application. http://msdn.microsoft.com/en-us/library/dd504791.aspx, 2010Google Scholar
- Microsoft Corporation. Asynchronous Agents Library Walkthrough: Creating a Dataflow Agent. http://msdn.microsoft.com/en-us/library/dd504791.aspx, 2010Google Scholar
- A. Milanova. Static Inference of Universe Types. In Intl. Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming, 2008.Google Scholar
- P. Müller and A. Rudich. Ownership transfer in universe types. In OOPSLA '07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems and applications, pages 461--478, 2007. Google Scholar
Digital Library
- M. Niklaus. Static universe type inference using a SAT-solver. Master's thesis, ETH Zurich, 2006.Google Scholar
- T. Reps, S. Horwitz, and M. Sagiv. Precise interprocedural dataflow analysis via graph reachability. In POPL'95: Proceedings of the 22nd ACM Symposium on Principles of Programming Languages, pages 49--61, 1995. Google Scholar
Digital Library
- M. Sridharan and S. J. Fink. The complexity of Andersen's analysis in practice. In SAS'09: Proceedings of the 16th International Symposium on Static Analysis, pages 205--221, Berlin, Heidelberg, 2009. Springer-Verlag. Google Scholar
Digital Library
- M. Sridharan, S. J. Fink, and R. Bodik. Thin slicing. In PLDI'07: Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, pages 112--122, New York, NY, USA, 2007. ACM. http://doi.acm.org/10.1145/1250734.1250748. Google Scholar
Digital Library
- S. Srinivasan and A. Mycroft. Kilim: Isolation typed actors for Java. In Proceedings of the European Conference on Object Oriented Programming (ECOOP), 2008. Google Scholar
Digital Library
- WALA. WALA Static Analysis Library. http://wala.sourceforge.net/.Google Scholar
Index Terms
Inferring ownership transfer for efficient message passing
Recommendations
Inferring ownership transfer for efficient message passing
PPoPP '11: Proceedings of the 16th ACM symposium on Principles and practice of parallel programmingOne of the more popular paradigms for concurrent programming is the Actor model of message passing; it has been adopted in one form or another by a number of languages and frameworks. By avoiding a shared local state and instead relying on message ...
Logically Instantaneous Message Passing in Asynchronous Distributed Systems
Asynchrony (due to unknown message transmission delay) complicates the design of protocols for distributed systems. To simplify the protocol design task therefore, the authors propose an interprocess (point-to-point) communication mechanism that has the ...
Specialization of CML message-passing primitives
Proceedings of the 2007 POPL ConferenceConcurrent ML (CML) is a statically-typed higher-order concurrent language that is embedded in Standard ML. Its most notable feature is its support for first-class synchronous operations. This mechanism allows programmers to encapsulate complicated ...







Comments