skip to main content
research-article

Inferring ownership transfer for efficient message passing

Authors Info & Claims
Published:12 February 2011Publication History
Skip Abstract Section

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.

References

  1. Panel on A single programming model for clusters and multiprocessor nodes: Dream, nightmare, reality, or vision at UIUC, 2009.Google ScholarGoogle Scholar
  2. ActorFoundry. ActorFoundry homepage. http://osl.cs.uiuc.edu/af, 1998--2010.Google ScholarGoogle Scholar
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. L. O. Andersen. Program Analysis and Specialization for the C Programming Language. PhD thesis, University of Copenhagen, DIKU, 1994.Google ScholarGoogle Scholar
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. A. Fuerer. Combining run-time and static universe type inference. Master's thesis, ETH Zurich, 2007.Google ScholarGoogle Scholar
  7. P. Haller and M. Odersky. Capabilities for Uniqueness and Borrowing. In Proceedings of the European Conference on Object Oriented Programming (ECOOP), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. P. Haller and M. Odersky. Actors that unify threads and events. In COORDINATION, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. N. Kelleberger. Static universe type inference. Master's thesis, ETH Zurich, 2005.Google ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. E. A. Lee. The problem with threads. Computer, 39 (5): 33--42, 2006. http://doi.ieeecomputersociety.org/10.1109/MC.2006.180. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. 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 ScholarGoogle Scholar
  16. Microsoft Corporation. Asynchronous Agents Library Walkthrough: Creating an Agent-Based Application. http://msdn.microsoft.com/en-us/library/dd504791.aspx, 2010Google ScholarGoogle Scholar
  17. Microsoft Corporation. Asynchronous Agents Library Walkthrough: Creating a Dataflow Agent. http://msdn.microsoft.com/en-us/library/dd504791.aspx, 2010Google ScholarGoogle Scholar
  18. A. Milanova. Static Inference of Universe Types. In Intl. Workshop on Aliasing, Confinement and Ownership in Object-Oriented Programming, 2008.Google ScholarGoogle Scholar
  19. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  20. M. Niklaus. Static universe type inference using a SAT-solver. Master's thesis, ETH Zurich, 2006.Google ScholarGoogle Scholar
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. S. Srinivasan and A. Mycroft. Kilim: Isolation typed actors for Java. In Proceedings of the European Conference on Object Oriented Programming (ECOOP), 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. WALA. WALA Static Analysis Library. http://wala.sourceforge.net/.Google ScholarGoogle Scholar

Index Terms

  1. Inferring ownership transfer for efficient message passing

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 46, Issue 8
      PPoPP '11
      August 2011
      300 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2038037
      Issue’s Table of Contents
      • cover image ACM Conferences
        PPoPP '11: Proceedings of the 16th ACM symposium on Principles and practice of parallel programming
        February 2011
        326 pages
        ISBN:9781450301190
        DOI:10.1145/1941553
        • General Chair:
        • Calin Cascaval,
        • Program Chair:
        • Pen-Chung Yew

      Copyright © 2011 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 12 February 2011

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!