Abstract
Advances in operating systems and languages have brought the ideal of reasonably-bounded execution time closer to developers who need such assurances for real-time and embedded systems applications. Recently, extensions to the Java libraries and virtual machine have been proposed in an emerging standard, which provides for specification of release times, execution costs, and deadlines for a restricted class of threads. To use such features, the code executing in the thread must never reference storage that could be subject to garbage collection. The new standard provides for region-like, stack-allocated areas (scopes) of storage that are ignored by garbage collection and deallocated en masse. It now falls to the developer to adapt ordinary Java code to use the real-time Java scoped memory regions.Unfortunately, it is difficult to determine manually how to map object instantiations to scopes. Moreover, if ordinary Java code is modified to effect instantiations in scopes, the resulting code is difficult to read, maintain, and reuse. Static analysis can yield scopes that are correct across all program executions, but such analysis is necessarily conservative in nature. If too many objects appear to live forever under such analysis, then developers cannot rely on static analysis alone to form reasonable scopes.In this paper we present an approach for automatically determining appropriate storage scopes for Java objects, based on dynamic analysis---observed object lifetimes and object referencing behavior. While such analysis is perhaps unsafe across all program executions, our analysis can be coupled with static analysis to bracket object lifetimes, with the truth lying somewhere in between. We provide experimental results that show the memory regions discovered by our technique.
- Ken Arnold, James Gosling, and David Holmes. The Java Programming Language. Addison-Wesley, Boston, 2000 Google ScholarDigital Library
- The AspectJ Organization. The AspectJ Programming Guide: Implementation Limitations. http://www.aspectj.org/doc/dist/progguide/apc.html, 2001Google Scholar
- William S. Beebee, Jr. and Martin Rinard. An implementation of scoped memory for real-time java. In EMSOFT, pages 289--305, 2001 Google ScholarDigital Library
- B. Blanchet. Escape analysis for object-oriented languages. ACM SIG-PLAN Notices, 34(10):20--34, 1999 Google ScholarDigital Library
- Bollella, Gosling, Brosgol, Dibble, Furr, Hardin, and Turnbull. The Real-Time Specification for Java. Addison-Wesley, 2000 Google ScholarDigital Library
- Dante J. Cannarozzi, Michael P. Plezbert, and Ron K. Cytron. Contaminated garbage collection. Proceedings of the ACM SIGPLAN '00 conference on Programming language design and implementation, pages 264--273, 2000 Google ScholarDigital Library
- Perry Cheng and Guy Belloch. A parallel, real-time garbage collector. ACM SIG-PLAN Notices, 36(5):125--136, May 2001 Google ScholarDigital Library
- J. Choi, M. Gupta, M. Serrano, V. Sreedhar, and S. Midkiff. Escape analysis for java. ACM SIG-PLAN Notices, 34(10):1--19, 1999 Google ScholarDigital Library
- SPEC Corporation. Java SPEC benchmarks. Technical report, SPEC, 1999. Available by purchase from SPECGoogle Scholar
- Morgan Deters and Ron K. Cytron. Introduction of program instrumentation using aspects. In Proceedings of the OOPSLA 2001 Workshop on Advanced Separation of Concerns in Object-Oriented Systems, Tampa Bay, FL, October 2001. ACM. http://www.cs.ubc.ca/~kdvolder/Workshops/OOPSLA2001/ASoC.htmlGoogle Scholar
- Morgan Deters, Nicholas Leidenfrost, and Ron K. Cytron. Translation of Java to Real-Time Java using aspects. In Proceedings of the International Workshop on Aspect-Oriented Programming and Separation of Concerns, pages 25--30, Lancaster, United Kingdom, August 2001. Proceedings published as Tech. Rep. CSEG/03/01 by the Computing Department, Lancaster UniversityGoogle Scholar
- Amer Diwan, Kathryn S. McKinley, and J. Eliot B. Moss. Type-based alias analysis. ACM SIG-PLAN Notices, 33(5):106--117, 1998 Google ScholarDigital Library
- David Gay and Alex Aiken. Language support for regions. In Proceedings of ACM SIGPLAN '01 Conference on Programming Language Design and Implementation (PLDI), pages 70--80, Snowbird, Utah, May 2001. ACM Google ScholarDigital Library
- Niels Hallenberg, Martin Elsman, and Mads Tofte. Combining region inference and garbage collection. In ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI'02). ACM Press, June 2002. Berlin, Germany Google ScholarDigital Library
- Michael Hind, Michael Burke, Paul Carini, and Jong-Deok Choi. Interprocedural pointer alias analysis. ACM Transactions on Programming Languages and Systems, 21(4):848--894, 1999 Google ScholarDigital Library
- Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier, and John Irwin. Aspect-Oriented Programming. In Proceedings of the 11th European Conference on Object-Oriented Programming, June 1997Google Scholar
- William Landi and Barbara G. Ryder. A safe approximate algorithm for interprocedural pointer aliasing. In Proceedings of the Conference on Programming Language Design and Implementation (PLDI), pages 235--248, New York, NY, 1992. ACM Press Google ScholarDigital Library
- C.L. Liu and J.W. Layland. Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment. JACM, 20(1):46--61, January 1973 Google ScholarDigital Library
- Robin Milner, Mads Tofte, Robert Harper, and David McQueen. The Definition of Standard ML (Revised). MIT Press, May 1997 Google ScholarDigital Library
- The ML Kit. http://www.it-c.dk/research/mlkit/, 2002Google Scholar
- Scott Nettles and James O'Toole. Real-time replication garbage collection. ACM SIG\-PLAN Notices, 28(6):217--226, 1993 Google ScholarDigital Library
- Kelvin Nilsen. Issues in the design and implementation of real-time Java. Java Developer's Journal, 1(1):44, 1996Google Scholar
- Ran Shaham, Elliot Kolodner, and Mooly Sagiv. Heap profiling for space-efficient Java. ACM SIG-PLAN Notices, 36(5):104--113, May 2001 Google ScholarDigital Library
- Alexandru Sualcianu and Martin C. Rinard. Pointer and escape analysis for multithreaded programs. In Principles Practice of Parallel Programming, pages 12--23, 2001 Google ScholarDigital Library
- Mads Tofte. A brief introduction to regions. Proceedings of the International Symposium on Memory Management (ISMM), pages 186--195, 1998 Google ScholarDigital Library
- Mads Tofte and Jean-Pierre Talpin. Region-based memory management. Information and Computation, 132(2):109--176, February 1997 Google ScholarDigital Library
- F. Vivien and M. Rinard. Incrementalized pointer and escape analysis. In Proceedings of the SIGPLAN '01 Conference on Program Language Design and Implementation, Snowbird, Utah, June 2001 Google ScholarDigital Library
- John Whaley and Martin Rinard. Compositional pointer and escape analysis for Java programs. ACM SIG-PLAN Notices, 34(10):187--206, 1999 Google ScholarDigital Library
- Paul R. Wilson. Uniprocessor garbage collection techniques (Long Version). Submitted to ACM Computing Surveys, 1994Google Scholar
Index Terms
- Automated discovery of scoped memory regions for real-time Java
Recommendations
Automated discovery of scoped memory regions for real-time Java
ISMM '02: Proceedings of the 3rd international symposium on Memory managementAdvances in operating systems and languages have brought the ideal of reasonably-bounded execution time closer to developers who need such assurances for real-time and embedded systems applications. Recently, extensions to the Java libraries and virtual ...
On the connection between functional programming languages and real-time Java scoped memory
JTRES '07: Proceedings of the 5th international workshop on Java technologies for real-time and embedded systemsJava has recently joined C and C++ as a relatively high-level language suitable for developing real-time applications. Java's garbage collection, while generally a useful feature, can be problematic for real-time applications if collection occurs with ...
Efficient memory-reference checks for real-time java
LCTES '03: Proceedings of the 2003 ACM SIGPLAN conference on Language, compiler, and tool for embedded systemsThe scoped-memory feature is central to the Real-Time Specification for Java. It allows greater control over memory management, in particular the deallocation of objects without the use of a garbage collector. To preserve the safety of storage ...
Comments