Skip to main content

Message Analysis for Concurrent Languages

  • Conference paper
  • First Online:
  • 617 Accesses

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 2694))

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.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. J. Armstrong, R. Virding, C. Wikström, and M. Williams. Concurrent Programming in Erlang. Prentice-Hall, second edition, 1996.

    Google Scholar 

  2. 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/.

    Google Scholar 

  3. 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.

    Google Scholar 

  4. 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.

    Google Scholar 

  5. 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.

    Google Scholar 

  6. R. Carlsson. An introduction to Core Erlang. In Proceedings of the PLI’01 Erlang Workshop, Sept. 2001.

    Google Scholar 

  7. 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.

    Google Scholar 

  8. 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.

    Google Scholar 

  9. 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.

    Google Scholar 

  10. 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.

    Google Scholar 

  11. 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.

    Google Scholar 

  12. 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.

    Google Scholar 

  13. 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.

    Google Scholar 

  14. 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.

    Google Scholar 

  15. R. E. Jones and R. Lins. Garbage Collection: Algorithms for automatic memory management. John Wiley & Sons, 1996.

    Google Scholar 

  16. 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.

    Google Scholar 

  17. 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.

    Google Scholar 

  18. 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.

    Google Scholar 

  19. 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.

    Google Scholar 

  20. M. Tofte and J.-P. Talpin. Region-based memory management. Information and Computation, 132(2):109–176, Feb. 1997.

    Article  MATH  MathSciNet  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints 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

Publish with us

Policies and ethics