SAS 2003: Static Analysis pp 73-90 | Cite as

Message Analysis for Concurrent Languages

  • Richard Carlsson
  • Konstantinos Sagonas
  • Jesper Wilhelmsson
Conference paper
Part of the Lecture Notes in Computer Science book series (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.

Keywords

Garbage Collection Hybrid Architecture Garbage Collector Interprocess Communication Call Site 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    J. Armstrong, R. Virding, C. Wikström, and M. Williams. Concurrent Programming in Erlang. Prentice-Hall, second edition, 1996.Google Scholar
  2. 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. 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. 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. 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. 6.
    R. Carlsson. An introduction to Core Erlang. In Proceedings of the PLI’01 Erlang Workshop, Sept. 2001.Google Scholar
  7. 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. 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. 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. 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. 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. 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. 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. 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. 15.
    R. E. Jones and R. Lins. Garbage Collection: Algorithms for automatic memory management. John Wiley & Sons, 1996.Google Scholar
  16. 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. 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. 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. 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. 20.
    M. Tofte and J.-P. Talpin. Region-based memory management. Information and Computation, 132(2):109–176, Feb. 1997.MATHCrossRefMathSciNetGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Richard Carlsson
    • 1
  • Konstantinos Sagonas
    • 1
  • Jesper Wilhelmsson
    • 1
  1. 1.Computing Science DepartmentUppsala UniversitySweden

Personalised recommendations