skip to main content
article
Open Access

Message analysis for concurrent programs using message passing

Published:01 July 2006Publication History
Skip Abstract Section

Abstract

We describe an analysis-driven storage allocation scheme for concurrent systems that use message passing with copying semantics. The basic principle is that in such a system, data which is not part of any message does not need to be allocated in a shared data area. This allows for the deallocation of thread-specific data without requiring global synchronization and often without even triggering garbage collection. On the other hand, data that is part of a message should preferably be allocated on a shared area since this allows for fast (O(1)) interprocess communication that does not require actual copying. In the context of a dynamically typed, higher-order concurrent functional language, we present a static message analysis which guides the allocation. As shown by our performance evaluation, conducted using a production-quality language implementation, the analysis is effective enough to discover most data which is to be used as a message, and to allow the allocation scheme to combine the best performance characteristics of both a process-centric and a communal memory architecture.

References

  1. Armstrong, J., Virding, R., Wikström, C., and Williams, M. 1996. Concurrent Programming in Erlang, 2nd ed. Prentice Hall, Herfordshire, UK.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. Back, G., Hsieh, W. C., and Lepreau, J. 2000. Processes in KaffeOS: Isolation, resource management, and sharing in Java. In Proceedings of the 4th USENIX Symposium on Operating Systems Design and Implementation. USENIX, 333--346. http://www.cs.utah.edu/flux/papers/.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Blanchet, B. 1998. Escape analysis: Correctness proof, implementation and experimental results. In Conference Record of the 25th ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages (POPL'98). ACM Press, New York, 25--37.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Blanchet, B. 2003. Escape analysis for Java#8482;: Theory and practice. ACM Trans. Program. Lang. Syst. 25, 6 (Nov.), 713--775.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Bogda, J. and Hölzle, U. 1999. Removing unnecessary synchronization in Java. In Proceedings of the 14th Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA'99). ACM Press, New York, 35--46.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. Brooks, R. A. 1984. Trading data space for reduced time and code space in real-time garbage collection on stock hardware. In Proceedings of the 1984 ACM Symposium on LISP and Functional Programming, G. L. Steele, ed. ACM Press, New York, 256--262.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. Carlsson, R. 2001. An introduction to Core Erlang. In Proceedings of the PLI'01 Erlang Workshop.]]Google ScholarGoogle Scholar
  8. Carlsson, R., Gustavsson, B., Johansson, E., Lindgren, T., Nyström, S.-O., Pettersson, M., and Virding, R. 2000. Core Erlang 1.0 language specification. Tech. Rep. 030, Information Technology Department, Uppsala University. Nov.]]Google ScholarGoogle Scholar
  9. Cheng, P. and Blelloch, G. E. 2001. A parallel, real-time garbage collector. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, New York, 125--136.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Choi, J.-D., Gupta, M., Serrano, M., Shreedhar, V. C., and Midkiff, S. P. 2003. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Trans. Program. Lang. Syst. 25, 6 (Nov.), 876--910.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. Deutsch, A. 1997. On the complexity of escape analysis. In Conference Record of the 24th Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages. ACM Press, New York, 358--371.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. Doligez, D. and Leroy, X. 1993. A concurrent, generational garbage collector for a multithreaded implementation of ML. In Conference Record of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, New York, 113--123.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Domani, T., Goldshtein, G., Kolodner, E., Lewis, E., Petrank, E., and Sheinwald, D. 2002. Thread-Local heaps for Java. In Proceedings of ISMM'2002: ACM SIGPLAN International Symposium on Memory Management. D. Detlefs, ed. ACM Press, New York. 76--87.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Flanagan, C., Sabry, A., Duba, B. F., and Felleisen, M. 1993. The essence of compiling with continuations. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, New York, 237--247.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Heintze, N. and McAllester, D. A. 1997. On the cubic bottleneck in subtyping and flow analysis. In Proceedings of the 12th Annual IEEE Symposium on Logic in Computer Science. IEEE Computer Society Press, Los Alamitos, Calif. 342--351.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Johansson, E., Pettersson, M., and Sagonas, K. 2000. HiPE: A high performance Erlang system. In Proceedings of the ACM SIGPLAN Conference on Principles and Practice of Declarative Programming. ACM Press, New York, 32--43.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Johansson, E., Sagonas, K., and Wilhelmsson, J. 2002. Heap architectures for concurrent languages using message passing. In Proceedings of ISMM'2002: ACM SIGPLAN International Symposium on Memory Management. D. Detlefs, ed. ACM Press, New York, 88--99.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Jones, R. E. and Lins, R. 1996. Garbage Collection: Algorithms for Automatic Memory Management. John Wiley & Sons, Chichester, UK.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. Mattsson, H., Nilsson, H., and Wikström, C. 1999. Mnesia---A distributed robust DBMS for telecommunications applications. In Practical Applications of Declarative Languages: Proceedings of the PADL'1999 Symposium, G. Gupta, ed. LNCS, vol. 1551. Springer, Berlin, 152--163.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. Milner, R., Tofte, M., Harper, R., and MacQueen, D. 1997. The Definition of Standard ML (Revised). MIT Press, Cambridge, Mass.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Park, Y. G. and Goldberg, B. 1992. Escape analysis on lists. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, New York, 116--127.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. Pettersson, M., Sagonas, K., and Johansson, E. 2002. The HiPE/x86 Erlang compiler: System description and performance evaluation. In Proceedings of the 6th International Symposium on Functional and Logic Programming, Z. Hu and M. Rodríguez-Artalejo, eds. LNCS, vol. 2441. Springer, Berlin, 228--244.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. Ross, D. T. 1967. The AED free storage package. Comm. ACM 10, 8, 481--492.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Ruf, E. 2000. Effective synchronization removal for Java. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, New York, 208--218.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. Serrano, M. and Feeley, M. 1996. Storage use analysis and its applications. In Proceedings of the 1996 ACM SIGPLAN International Conference on Functional Programming (ICFP'96). ACM Press, New York, 50--61.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. Shivers, O. 1988. Control flow analysis in Scheme. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, New York, 164--174.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. Steensgaard, B. 2000. Thread-Specific heaps for multi-threaded programs. In Proceedings of the ACM SIGPLAN International Symposium on Memory Management. ACM Press, New York, 18--24.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Tofte, M. and Talpin, J.-P. 1994. Implementation of the typed call-by-value λ-calculus using a stack of regions. In Conference Record of the ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages. ACM Press, New York, 188--201.]] Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. Wilson, P. R. 1992. Uniprocessor garbage collection techniques. In Proceedings of IWMM'92: International Workshop on Memory Management, Y. Bekkers and J. Cohen, eds. LNCS, vol. 637. Springer, Berlin, 1--42. See also expanded version as Univ. of Texas Austin technical report submitted to ACM Computing Surveys.]] Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Message analysis for concurrent programs using 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 Transactions on Programming Languages and Systems
                  ACM Transactions on Programming Languages and Systems  Volume 28, Issue 4
                  July 2006
                  217 pages
                  ISSN:0164-0925
                  EISSN:1558-4593
                  DOI:10.1145/1146809
                  Issue’s Table of Contents

                  Copyright © 2006 ACM

                  Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                  Publisher

                  Association for Computing Machinery

                  New York, NY, United States

                  Publication History

                  • Published: 1 July 2006
                  Published in toplas Volume 28, Issue 4

                  Permissions

                  Request permissions about this article.

                  Request Permissions

                  Check for updates

                  Qualifiers

                  • article

                PDF Format

                View or Download as a PDF file.

                PDF

                eReader

                View online with eReader.

                eReader