skip to main content
tutorial

A Practical Getaway: Applications of Escape Analysis in Embedded Real-Time Systems

Authors Info & Claims
Published:04 June 2015Publication History
Skip Abstract Section

Abstract

The use of a managed, type-safe language such as Java in real-time and embedded systems offers productivity and, in particular, safety and dependability benefits at a reasonable cost. It has been shown for commodity systems that escape analysis (EA) enables a set of useful optimization, and benefits from the properties of a type-safe language. In this paper, we explore the application of escape analysis in KESO [34], a Java ahead-of-time compiler targeting (deeply) embedded real-time systems. We present specific applications of EA for embedded programs that go beyond the widely known stack-allocation and synchronization optimizations such as extended remote procedure call support for software-isolated applications, automated inference of immutable data or improved upper space and time bounds for worst-case estimations.

References

  1. Absint aiT. Worst-Case Execution Time Prediction by Static Program Analysis. URL http://www.absint.com/aiT_WCET.pdf.Google ScholarGoogle Scholar
  2. M. Aiken, M. Fähndrich, C. Hawblitzel, G. Hunt, and J. Larus. Deconstructing process isolation. In MSPC '06: 2006 W'shop on Memory System Performance and Correctness, pages 1--10, New York, NY, USA, 2006. ACM. ISBN 1-59593-578-9. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. AUTOSAR. Specification of operating system (version 4.0.0). Technical report, Automotive Open System Architecture GbR, Dec. 2009.Google ScholarGoogle Scholar
  4. B. Blanchet. Escape analysis: Correctness proof, implementation and experimental results. In POPL '98: 25th ACM SIGACT-SIGPLAN Symp. on Principles of Programming Languages, pages 25--37, 1998. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. B. Blanchet. Escape analysis for Java: Theory and practice. ACM Trans. Program. Lang. Syst., 25(6):713--775, Nov. 2003. ISSN 0164-0925. . URL http://doi.acm.org/10.1145/945885.945886. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. G. Bollella, B. Brosgol, J. Gosling, P. Dibble, S. Furr, and M. Turnbull. The Real-Time Specification for Java. AW, 1st edition, Jan. 2000.Google ScholarGoogle Scholar
  7. S. Borkar. Designing reliable systems from unreliable components: the challenges of transistor variability and degradation. IEEE Micro, 25(6): 10--16, November 2005. ISSN 0272-1732. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. W.-N. Chin, F. Craciun, S. Qin, and M. Rinard. Region inference for an object-oriented language. In Proceedings of the ACM SIGPLAN 2004 Conference on Programming Language Design and Implementation, PLDI '04, pages 243--254, New York, NY, USA, 2004. ACM. ISBN 1-58113-807-5. . URL http://doi.acm.org/10.1145/996841.996871. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. J.-D. Choi, M. Gupta, M. Serrano, V. C. Sreedhar, and S. Midkiff. Escape analysis for Java. In 14th ACM Conf. on OOP, Systems, Languages, and Applications (OOPSLA '99), pages 1--19, New York, NY, USA, 1999. ACM. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. J.-D. Choi, M. Gupta, M. J. Serrano, V. C. Sreedhar, and S. P. Midkiff. Stack allocation and synchronization optimizations for Java using escape analysis. ACM Trans. Program. Lang. Syst., 25(6):876--910, Nov. 2003. ISSN 0164-0925. . URL http://doi.acm.org/10.1145/945885.945892. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. T. Domani, G. Goldshtein, E. K. Kolodner, E. Lewis, E. Petrank, and D. Sheinwald. Thread-local heaps for java. In Proceedings of the 3rd International Symposium on Memory Management, ISMM '02, pages 76--87, New York, NY, USA, 2002. ACM. ISBN 1-58113-539-4. . URL http://doi.acm.org/10.1145/512429.512439. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. B. Goldberg and Y. G. Park. Higher order escape analysis: Optimizing stack allocation in functional program implementations. In N. D. Jones, editor, ESOP, volume 432 of LNCS, pages 152--160. Springer, 1990. ISBN 3-540-52592-0. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. D. Grossman, G. Morrisett, T. Jim, M. Hicks, Y. Wang, and J. Cheney. Region-based memory management in Cyclone. In ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI '02), pages 282--293, New York, NY, USA, 2002. ACM. ISBN 1-58113-463-0. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. N. Hallenberg, M. Elsman, and M. Tofte. Combining region inference and garbage collection. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, PLDI '02, pages 141--152, New York, NY, USA, 2002. ACM. ISBN 1-58113-463-0. . URL http://doi.acm.org/10.1145/512529.512547. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. T. Kalibera, J. Hagelberg, F. Pizlo, A. Plsek, B. Titzer, and J. Vitek. CDx: A family of real-time Java benchmarks. In JTRES '09: 7th Int. W'shop on Java Technologies for real-time & embedded systems, pages 41--50, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-732-5. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. C. Lang. Compiler-Assisted Memory Management Using Escape Analysis in the KESO JVM, June 2014.Google ScholarGoogle Scholar
  17. K. Lee, X. Fang, and S. P. Midkiff. Practical escape analyses: How good are they? In Proceedings of the 3rd International Conference on Virtual Execution Environments, VEE '07, pages 180--190, New York, NY, USA, 2007. ACM. ISBN 978-1-59593-630-1. . URL http://doi.acm.org/10.1145/1254810.1254836. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. O. Lhoták and L. Hendren. Run-time evaluation of opportunities for object inlining in Java. In Proceedings of the 2002 Joint ACM-ISCOPE Conference on Java Grande, JGI '02, pages 175--184, New York, NY, USA, 2002. ACM. ISBN 1-58113-599-8. . URL http://doi.acm.org/10.1145/583810.583830. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. T. K. Martin Schoeberl, Stephan Korsholm and A. P. Ravn. A hardware abstraction layer in Java. In ACM Transactions on Embedded Computing Systems, volume 5, pages 1--42. ACM, Sept. 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Molnar, A. Krall, and F. Brandner. Stack allocation of objects in the cacao virtual machine. In Proceedings of the 7th International Conference on Principles and Practice of Programming in Java, PPPJ '09, pages 153--161, New York, NY, USA, 2009. ACM. ISBN 978-1-60558-598-7. . URL http://doi.acm.org/10.1145/1596655.1596680. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. Y. G. Park and B. Goldberg. Escape analysis on lists. SIGPLAN Notices, 27(7):116--127, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. F. Pizlo, L. Ziarek, E. Blanton, P. Maj, and J. Vitek. High-level programming of embedded hard real-time devices. In ACM SIGOPS/EuroSys Eur. Conf. on Computer Systems 2010 (EuroSys '10), pages 69--82, New York, NY, USA, Apr. 2010. ACM. ISBN 978-1-60558-577-2. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. F. Pizlo, L. Ziarek, P. Maj, A. L. Hosking, E. Blanton, and J. Vitek. Schism: Fragmentation-tolerant real-time garbage collection. In ACM SIGPLAN Conf. on Programming Language Design and Implementation (PLDI '10), pages 146--159, New York, NY, USA, 2010. ACM. ISBN 978-1-4503-0019-3. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. Polyspace. Comprehensive Static Analysis Using Polyspace Products, 2013. URL http://www.mathworks.com/tagteam/77340_91517v02_30211_Polyspace-WhitePaper_final.pdf.Google ScholarGoogle Scholar
  25. P. Roy, M. Manoharan, and W. F. Wong. Envm: Virtual memory design for new memory architectures. In Proceedings of the 2014 International Conference on Compilers, Architecture and Synthesis for Embedded Systems, CASES '14, pages 12:1--12:10, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-3050-3. . URL http://doi.acm.org/10.1145/2656106.2656121. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. M. Schoeberl, S. Korsholm, C. Thalinger, and A. P. Ravn. Hardware objects for Java. In 11th IEEE Int. Symp. on OO Real-Time Distributed Computing (ISORC '08), pages 445--452, Washington, DC, USA, 2008. IEEE. ISBN 978-0-7695-3132-8. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. F. Siebert. Realtime garbage collection in the JamaicaVM 3.0. In JTRES '07: 5th Int. W'shop on Java Technologies for real-time & embedded systems, pages 94--103, New York, NY, USA, 2007. ACM. ISBN 978-59593-813-8. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. V. C. Sreedhar, R. D.-C. Ju, D. M. Gillies, and V. Santhanam. Translating out of static single assignment form. In Proceedings of the 6th International Symposium on Static Analysis, SAS '99, pages 194--210, Heidelberg, Germany, 1999. Springer. ISBN 3-540-66459-9. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. B. Steensgaard. Points-to analysis in almost linear time. In Proceedings of the 23rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '96, pages 32--41, New York, NY, USA, 1996. ACM. ISBN 0-89791-769-3. . URL http://doi.acm.org/10.1145/237721.237727. Google ScholarGoogle ScholarDigital LibraryDigital Library
  30. I. Stilkerich, M. Strotz, C. Erhardt, M. Hoffmann, D. Lohmann, F. Scheler, and W. Schröder-Preikschat. A JVM for soft-error-prone embedded systems. In 2013 ACM SIGPLAN/SIGBED Conf. on Languages, Compilers and Tools for Embedded Systems (LCTES '13), pages 21--32, New York, NY, USA, June 2013. ACM. ISBN 978-1-4503-2085-6. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. I. Stilkerich, M. Strotz, C. Erhardt, and M. Stilkerich. RT-LAGC: Fragmentation-Tolerant Real-Time Memory Management Revisited. In JTRES '14: 12th Int. W'shop on Java Technologies for real-time & embedded systems, pages 87--96, New York, NY, USA, Oct. 2014. ACM. ISBN 978-1-4503-2813-5/14/10. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. I. Stilkerich, P. Taffner, C. Erhardt, C. Dietrich, C. Wawersich, and M. Stilkerich. Team up: Cooperative memory management in embedded systems. In 2014 Int. Conf. on Compilers, Architectures, and Synthesis for Embedded Systems (CASES '14), page Art. No. 10, New York, NY, USA, Oct. 2014. ACM. ISBN 978-1-4503-3050-3/14/10. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. M. Stilkerich. Memory Protection at Option - Application-Tailored Memory Safety in Safety-Critical Embedded Systems. PhD thesis, Friedrich-Alexander University Erlangen-Nuremberg, 2012.Google ScholarGoogle Scholar
  34. M. Stilkerich, I. Thomm, C. Wawersich, and W. Schröder-Preikschat. Tailor-made JVMs for statically configured embedded systems. Concurrency and Computation: Practice and Experience, 24(8):789--812, 2012. ISSN 1532-0634. . Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. A. Taber and E. Normand. Single event upset in avionics. IEEE Transactions on Nuclear Science, 40(2):120--126, Apr. 1993. ISSN 0018-9499. .Google ScholarGoogle ScholarCross RefCross Ref
  36. M. Tofte and J.-P. Talpin. Implementation of the typed call-by-value lamba-calculus using a stack of regions. In Proceedings of the 21st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL '94, pages 188--201, New York, NY, USA, 1994. ACM. ISBN 0-89791-636-0. . URL http://doi.acm.org/10.1145/174675.177855. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. A Practical Getaway: Applications of Escape Analysis in Embedded Real-Time Systems

            Recommendations

            Comments

            Login options

            Check if you have access through your login credentials or your institution to get full access on this article.

            Sign in

            Full Access

            • Published in

              cover image ACM SIGPLAN Notices
              ACM SIGPLAN Notices  Volume 50, Issue 5
              LCTES '15
              May 2015
              141 pages
              ISSN:0362-1340
              EISSN:1558-1160
              DOI:10.1145/2808704
              • Editor:
              • Andy Gill
              Issue’s Table of Contents
              • cover image ACM Conferences
                LCTES'15: Proceedings of the 16th ACM SIGPLAN/SIGBED Conference on Languages, Compilers and Tools for Embedded Systems 2015 CD-ROM
                June 2015
                149 pages
                ISBN:9781450332576
                DOI:10.1145/2670529

              Copyright © 2015 ACM

              Publisher

              Association for Computing Machinery

              New York, NY, United States

              Publication History

              • Published: 4 June 2015

              Check for updates

              Qualifiers

              • tutorial
              • Research
              • Refereed limited

            PDF Format

            View or Download as a PDF file.

            PDF

            eReader

            View online with eReader.

            eReader
            About Cookies On This Site

            We use cookies to ensure that we give you the best experience on our website.

            Learn more

            Got it!