skip to main content
10.1145/1375657.1375659acmconferencesArticle/Chapter ViewAbstractPublication PagescpsweekConference Proceedingsconference-collections
research-article

Flexible task graphs: a unified restricted thread programming model for java

Published:12 June 2008Publication History

ABSTRACT

The disadvantages of unconstrained shared-memory multi-threading in Java, especially with regard to latency and determinism in realtime systems, have given rise to a variety of language extensions that place restrictions on how threads allocate, share, and communicate memory, leading to order-of-magnitude reductions in latency and jitter. However, each model makes different trade-offs with respect to expressiveness, efficiency, enforcement, and latency, and no one model is best for all applications.

In this paper we present Flexible Task Graphs (Flexotasks), a single system that allows different isolation policies and mechanisms to be combined in an orthogonal manner, subsuming four previously proposed models as well as making it possible to use new combinations best suited to the needs of particular applications. We evaluate our implementation on top of the IBM Web-Sphere Real Time Java virtual machine using both a microbenchmark and a 30 KLOC avionics collision detector. We show that Flexotasks are capable of executing periodic threads at 10 KHz with a standard deviation of 1.2μs and that it achieves significantly better performance than RTSJ's scoped memory constructs while remaining impervious to interference from global garbage collection.

References

  1. AICAS. The Jamaica virtual machine, www.aicas.com.Google ScholarGoogle Scholar
  2. Austin Armbuster, Jason Baker, Antonio Cunei, David Holmes, Chapman Flack, Filip Pizlo, Edward Pla, Marek Prochazka, and Jan Vitek. A Real-time Java virtual machine with applications in avionics. ACM Transactions in Embedded Computing Systems (TECS), 7(1):1--49, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Joshua Auerbach, David F. Bacon, Bob Blainey, Perry Cheng, Michael Dawson, Mike Fulton, David Grove, Darren Hart, and Mark Stoodley. Design and implementation of a comprehensive real-time Java virtual machine. In Proceedings of the 7th ACM & IEEE international conference on Embedded software (EMSOFT), pages 249--258, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Joshua Auerbach, David F. Bacon, Florian Bömers, and Perry Cheng. Real-time music synthesis in Java using the Metronome garbage collector. In Proceedings of the International Computer Music Conference, Copenhagen, Denmark, August 2007.Google ScholarGoogle Scholar
  5. Joshua S. Auerbach, David F. Bacon, Daniel T. Iercan, Christoph M. Kirsch, V. T. Rajan, Harald Roeck, and Rainer Trummer. Java takes flight: time-portable real-time programming with exotasks. In ACM SIGPLAN/SIGBED Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES'07), pages 51--62, San Diego, CA, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. David F. Bacon, Perry Cheng, and V. T. Rajan. A real-time garbage collecor with low overhead and consistent utilization. In Conference Record of the Thirtieth Annual ACM Symposium on Principles of Programming Languages, New Orleans, LA, January 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. David F. Bacon and Peter F. Sweeney. Fast static analysis of C virtual function calls. In Proceedings of the ACM Conference on Object-Oriented Programming Systems, Languages and Applications, volume 31, pages 324--341, October 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. BEA. Weblogic real time. www.bea.com, 2006.Google ScholarGoogle Scholar
  9. William S. Beebee, Jr. and Martin Rinard. An implementation of scoped memory for Real-Time Java. In Embedded Software Implementation Tools for Fully Programmable Application Specific Systems (EMSOFT), pages 289--305, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. Edward G. Benowitz and Albert F. Niessner. Experiences in adopting real-time java for flight-like software. In Proceedings of the International workshop on Java technologies for real-time and embedded systems (JTRES), pages 490--496, 2003.Google ScholarGoogle Scholar
  11. Edward G. Benowitz and Albert F. Niessner. A patterns catalog for RTSJ software designs. In Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES), OTM Workshops, pages 497--507, 2003.Google ScholarGoogle Scholar
  12. Greg Bollella, Tim Canham, Vanessa Carson, Virgil Champlin, Daniel Dvorak, Brian Giovannoni, Mark Indictor, Kenny Meyer, Alex Murray, and Kirk Reinholtz. Programming with non-heap memory in the real-time specification for Java. In Companion of the 18th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pages 361--369, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. Greg Bollella, Bertrand Delsart, Romain Guider, Christophe Lizzi, and Frederic Parain. Mackinac: Making hotspot real-time. In Proceedings of the Eighth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC'05), pages 45--54, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Greg Bollella, James Gosling, Benjamin Brosgol, Peter Dibble, Steve Furr, and Mark Turnbull. The Real-Time Specification for Java. Addison-Wesley, June 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. Angelo Corsaro and Ron K. Cytron. Efficient memory reference checks for real-time Java. In Proceedings of Languages, Compilers, and Tools for Embedded Systems (LCTES'03), 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. Mike Fulton and Mark Stoodley. Compilation techniques for real-time Java programs. In Proc. International Symposium on Code Generation and Optimization, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. Sven Gestegard Robertz, Roger Henriksson, Klas Nilsson, Anders Blomdell, and Ivan Tarasov. Using real-time Java for industrial robot control. In Proceedings of the 5th international workshop on Java technologies for real-time and embedded systems (JTRES), pages 104--110, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. Roger Henriksson. Scheduling Garbage Collection in Embedded Systems. PhD thesis, Lund University, July 1998.Google ScholarGoogle Scholar
  19. IBM. DDG1000 Next Generation Navy Destroyers, www.ibm.com/press/us/en/pressrelease/21033.wss, 2007.Google ScholarGoogle Scholar
  20. IBM Corporation. IBM Expedited Real Time Task Graphs. www.alphaworks.ibm.com/tech/xrtgs, 2007.Google ScholarGoogle Scholar
  21. Nicolas Juillerat, Stefan Müller Arisona, and Simon Schubiger-Banz. Real-time, low latency audio processing in Java. In Proceedings of the International Computer Music Conference, Copenhagen, Denmark, August 2007.Google ScholarGoogle Scholar
  22. E.A. Lee. Overview of the Ptolemy project. Technical Report UCB/ERL M03/25, EECS Department, University of California, Berkeley, 2003.Google ScholarGoogle Scholar
  23. Ingo Molnar and Thomas Gleixner. The RT-PREEMPT patch set for Linux.Google ScholarGoogle Scholar
  24. Albert F. Niessner and Edward G. Benowitz. Rtsj memory areas and their affects on the performance of a flight-like attitude control system. In Proceedings of the International workshop on Java technologies for real-time and embedded systems (JTRES), pages 508--519, 2003.Google ScholarGoogle Scholar
  25. Krzysztof Palacz and Jan Vitek. Java subtype tests in real-time. In Proceedings of the European Conference on Object-Oriented Programming (ECOOP), pages 378--404, Darmstadt, Germany, July 2003.Google ScholarGoogle ScholarCross RefCross Ref
  26. Filip Pizlo, Jason Fox, David Holmes, and Jan Vitek. Real-time Java scoped memory: design patterns and semantics. In Proceedings of the IEEE International Symposium on Object-oriented Real-Time Distributed Computing (ISORC), Vienna, Austria, May 2004.Google ScholarGoogle ScholarCross RefCross Ref
  27. Filip Pizlo and Jan Vitek. An empirical evalutation of memory management alternatives for Real-time Java. In Proceedings of the 27th IEEE Real-Time Systems Symposium (RTSS), December 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. Purdue University. The Ovm virtual machine, www.ovmj.org.Google ScholarGoogle Scholar
  29. Fridtjof Siebert. The impact of realtime garbage collection on realtime Java programming. In Seventh IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (ISORC'04), pages 33--40, 2004.Google ScholarGoogle ScholarCross RefCross Ref
  30. Simulink. www.mathworks.com/products/simulink. 2007.Google ScholarGoogle Scholar
  31. Daniel Spoonhower, Joshua Auerbach, David F. Bacon, Perry Cheng, and David Grove. Eventrons: a safe programming construct for high-frequency hard real-time applications. In ACM SIGPLAN Conference on Programming language design and implementation (PLDI), pages 283--294, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  32. Jesper H. Spring, Jean Privat, Rachid Guerraoui, and Jan Vitek. StreamFlex: High-throughput stream programming in Java. In Proceedings of the ACM SIGPLAN Conference on Object-Oriented Programming Systems, Languages and Applications (OOPSLA), October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. Jesper Honig Spring, Filip Pizlo, Rachid Guerraoui, and Jan Vitek. Reflexes: Abstractions for highly responsive systems. In Proceedings of the 2nd International Conference on Virtual Execution Environments (VEE), 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. William Thies, Michal Karczmarek, and Saman Amarasinghe. Streamit: A language for streaming applications. In International Conference on Compiler Construction (CC'02), April 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  35. Tian Zhao, James Noble, and Jan Vitek. Scoped types for real-time Java. In Proceedings of the 25th IEEE International Real-Time Systems Symposium (RTSS), Lisbon, Portugal, December 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Flexible task graphs: a unified restricted thread programming model for java

              Recommendations

              Reviews

              R. Clayton

              The real-time specification for Java (RTSJ) established real-time extensions for the Java system. From RTSJ, a hundred flowers have bloomed, each designed to orient RTSJ to a particular niche in the real-time ecosystem. Enough time has passed to see patterns developing, leading to efforts to group related patterns into a framework providing consistent and convenient access to common properties. Flexotask, the flexible task graphs model described in this paper, is one such framework. Flexotask unifies four models into a restricted thread programming model for programs with real-time constraints tighter than those possible with real-time garbage collection. Flexotask tools ensure memory operation safety guarantees by verifying bytecode against type constraints, eliminating the runtime memory checks required by RTSJ scoped memory. Atomic methods or immutable objects allow nonblocking communication between time-constrained tasks and time-oblivious code; bytecode rewriting provides atomicity without programmer effort. Flexotask also supports roll-forward transaction logs for multiprocessors. A 10-kilohertz (kHz) reading benchmark shows Flexotask to be predictable with a few microsecond (?s) jitter and all tasks scheduled within 40 ?s of the period. A collision detection benchmark shows Flexotask to be fast, relative to RTSJ, and imperturbable, relative to Java with or without special garbage collectors. The paper is well written, with enough background for those who are familiar, but not current, with Java real-time systems. Online Computing Reviews Service

              Access critical reviews of Computing literature here

              Become a reviewer for Computing Reviews.

              Comments

              Login options

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

              Sign in
              • Published in

                cover image ACM Conferences
                LCTES '08: Proceedings of the 2008 ACM SIGPLAN-SIGBED conference on Languages, compilers, and tools for embedded systems
                June 2008
                180 pages
                ISBN:9781605581040
                DOI:10.1145/1375657
                • cover image ACM SIGPLAN Notices
                  ACM SIGPLAN Notices  Volume 43, Issue 7
                  LCTES '08
                  July 2008
                  167 pages
                  ISSN:0362-1340
                  EISSN:1558-1160
                  DOI:10.1145/1379023
                  Issue’s Table of Contents

                Copyright © 2008 ACM

                Publisher

                Association for Computing Machinery

                New York, NY, United States

                Publication History

                • Published: 12 June 2008

                Permissions

                Request permissions about this article.

                Request Permissions

                Check for updates

                Qualifiers

                • research-article

                Acceptance Rates

                Overall Acceptance Rate116of438submissions,26%

              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!