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.
- Armstrong, J., Virding, R., Wikström, C., and Williams, M. 1996. Concurrent Programming in Erlang, 2nd ed. Prentice Hall, Herfordshire, UK.]] Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Blanchet, B. 2003. Escape analysis for Java#8482;: Theory and practice. ACM Trans. Program. Lang. Syst. 25, 6 (Nov.), 713--775.]] Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Carlsson, R. 2001. An introduction to Core Erlang. In Proceedings of the PLI'01 Erlang Workshop.]]Google Scholar
- 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 Scholar
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Jones, R. E. and Lins, R. 1996. Garbage Collection: Algorithms for Automatic Memory Management. John Wiley & Sons, Chichester, UK.]] Google Scholar
Digital Library
- 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 Scholar
Digital Library
- Milner, R., Tofte, M., Harper, R., and MacQueen, D. 1997. The Definition of Standard ML (Revised). MIT Press, Cambridge, Mass.]] Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- Ross, D. T. 1967. The AED free storage package. Comm. ACM 10, 8, 481--492.]] Google Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
- 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 Scholar
Digital Library
Index Terms
- Message analysis for concurrent programs using message passing
Recommendations
Efficient memory management for concurrent programs that use message passing
Special issue on five perspectives on modern memory management: Systems, hardware and theoryWe present an efficient memory management scheme for concurrent programming languages where communication occurs by using message passing with copying semantics. The runtime system is built around process-local heaps, which frees the memory manager from ...
Heap architectures for concurrent languages using message passing
ISMM '02: Proceedings of the 3rd international symposium on Memory managementWe discuss alternative heap architectures for languages that rely on automatic memory management and implement concurrency through asynchronous message passing. We describe how interprocess communication and garbage collection happens in each ...
Heap architectures for concurrent languages using message passing
MSP 2002 and ISMM 2002We discuss alternative heap architectures for languages that rely on automatic memory management and implement concurrency through asynchronous message passing. We describe how interprocess communication and garbage collection happens in each ...





Comments