Abstract
We describe an analysis-driven storage allocation scheme for concurrent languages that use message passing with copying semantics. The basic principle is that in such a language, data which is not part of any message does not need to be allocated in a shared data area. This allows for 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, which 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 an industrial-strength 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 shared-heap memory architecture.
Research supported in part by the ASTEC (Advanced Software Technology) competence center with matching funds by Ericsson Development.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Similar content being viewed by others
References
J. Armstrong, R. Virding, C. Wikström, and M. Williams. Concurrent Programming in Erlang. Prentice-Hall, second edition, 1996.
G. Back, W. C. Hsieh, and J. Lepreau. Processes in KaffeOS: Isolation, resource management, and sharing in Java. In Proceedings of the 4th USENIX Symposium on Operating Systems Design and Implementation, Oct. 2000. http://www.cs.utah.edu/flux/papers/.
B. Blanchet. 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), pages 25–37. ACM Press, Jan. 1998.
B. Blanchet. Escape analysis for object oriented languages. Application to Java™. In Proceedings of the 14th Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA’99), pages 20–34. ACM Press, Nov. 1999.
J. Bogda and U. Hölzle. Removing unnecessary synchronization in Java. In Proceedings of the 14th Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA’99), Nov. 1999.
R. Carlsson. An introduction to Core Erlang. In Proceedings of the PLI’01 Erlang Workshop, Sept. 2001.
R. Carlsson, B. Gustavsson, E. Johansson, T. Lindgren, S.-O. Nyström, M. Pettersson, and R. Virding. Core Erlang 1.0 language specification. Technical Report 030, Information Technology Department, Uppsala University, Nov. 2000.
J.-D. Choi, M. Gupta, M. Serrano, V. C. Shreedhar, and S. Midkiff. Escape analysis for Java. In Proceedings of the 14th Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA’99), pages 1–19. ACM Press, Nov. 1999.
A. Deutsch. On the complexity of escape analysis. In Conference Record of the 24th Annual ACM SIGACT-SIGPLAN Symposium on Principles of Programming Languages, pages 358–371, Jan. 1997.
D. Doligez and X. Leroy. 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, pages 113–123. ACM Press, Jan. 1993.
T. Domani, G. Goldshtein, E. Kolodner, E. Lewis, E. Petrank, and D. Sheinwald. Threadlocal heaps for Java. In Proceedings of ISMM’2002: ACM SIGPLAN International Symposium on Memory Management, pages 76–87. ACM Press, June 2002.
C. Flanagan, A. Sabry, B. F. Duba, and M. Felleisen. The essence of compiling with continuations. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation. ACM Press, June 1993.
E. Johansson, M. Pettersson, and K. Sagonas. HiPE: A High Performance Erlang system. In Proceedings of the ACM SIGPLAN Conference on Principles and Practice of Declarative Programming, pages 32–43. ACM Press, Sept. 2000.
E. Johansson, K. Sagonas, and J. Wilhelmsson. Heap architectures for concurrent languages using message passing. In Proceedings of ISMM 2002: ACM SIGPLAN International Symposium on Memory Management, pages 88–99. ACM Press, June 2002.
R. E. Jones and R. Lins. Garbage Collection: Algorithms for automatic memory management. John Wiley & Sons, 1996.
Y. G. Park and B. Goldberg. Escape analysis on lists. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 116–127. ACM Press, July 1992.
E. Ruf. Effective synchronization removal for Java. In Proceedings of the SIGPLAN Conference on Programming Language Design and Implementation, pages 208–218. ACM Press, June 2000.
O. Shivers. Control flow analysis in Scheme. In Proceedings of the ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 164–174. ACM Press, June 1988.
B. Steensgaard. Thread-specific heaps for multi-threaded programs. In Proceedings of the ACM SIGPLAN International Symposium on Memory Management, pages 18–24. ACM Press, Oct. 2000.
M. Tofte and J.-P. Talpin. Region-based memory management. Information and Computation, 132(2):109–176, Feb. 1997.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2003 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Carlsson, R., Sagonas, K., Wilhelmsson, J. (2003). Message Analysis for Concurrent Languages. In: Cousot, R. (eds) Static Analysis. SAS 2003. Lecture Notes in Computer Science, vol 2694. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-44898-5_5
Download citation
DOI: https://doi.org/10.1007/3-540-44898-5_5
Published:
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-40325-8
Online ISBN: 978-3-540-44898-3
eBook Packages: Springer Book Archive