Date Posted: November 18, 2008
Update: December 4, 2008 Version 2.0.1 corrects a bug in Version 2.0.0 that caused occasional UnsatisfiedLinkErrors when used with WebSphere Real Time 2.0.
What is Flexible Task Graphs?
Real-time programming is an emerging area of importance, but real-time systems are growing more complex, making Java™ an attractive platform now for doing such programming. IBM®'s WebSphere® Real-Time product with the metronome garbage collector solves some of the problems, but people still need a restricted-thread programming model (observing language restrictions in return for very low latencies). The posting of this technology is part of a strategy for obtaining agreement on this programming model and will help support collaborations with researchers at several locations toward that end.
Flexible Task Graphs provides a single programming model for restricting what Java threads can do in exchange for very low latencies in support of real-time programming. This model uses static analysis to enforce restrictions, so that programs that initialize are guaranteed to meet the restrictions. This contrasts with the Real-Time Specification for Java, whose NoHeapRealtimeThread relies on dynamic checking, meaning that extensive testing is required in order to be relatively assured that a program will always meet the restrictions. The Flexible Task Graphs model subsumes four previous models that also used static analysis to accomplish this goal, combining the strengths of all of them. The four previous models were Eventrons, Exotasks, Reflexes, and StreamFlex.
How does it work?
During development, the Eclipse-based editor and builder monitors the Java language restrictions to ensure that they are being adhered to. The main restrictions concern the use of static storage, although, for performance-critical applications, there are optional restrictions on allocating objects and synchronization. Upon compilation, the Eclipse-based builder rewrites some Java bytecodes to support some Flexible Task Graph features. When the program is executed, the Java VM (virtual machine) checks all the bytecodes for safe enforcement of all of the restrictions. Thereafter, a Flexible Task Graph runs in a privileged, high-priority thread that is exempt from being paused by system activities such as garbage collection and JIT (just-in-time) compilation.
The programming model gives each task in the Flexible Task Graph a private memory area that is optionally divided into a heap (as with Exotasks) and a transient area (as with Reflexes). Communication between tasks can be by deep copy (as with Exotasks, allowing almost any Java object to be communicated) or by reference (as with StreamFlex, requiring some additional language restrictions). Communication between the task graph and the rest of the Java application can be through a restricted form of object sharing (as with Eventrons) or by using transactional methods (as with Reflexes).
The model supports the addition of pluggable schedulers, pluggable "distributors" (for crossing machine boundaries), and pluggable instrumentation. Through the use of an open-source toolkit released on sourceforge.net along with this alphaWorks® release, any developer can build these pluggable components, which extend the Flexible Task Graphs system with new capabilities.
About the technology author(s)
Joshua Auerbach, Ph.D., wrote the Exotask system, which was the starting point for Flexible Task Graphs, and he was the development lead for Flexible Task Graphs. In 24 years at IBM, Dr. Auerbach has contributed to many products, including IBM® WebSphere® Real Time and IBM WebSphere Messaging. His research contributions have been in communications, distributed systems, and programming languages.
Jesper Honig Spring, Ph.D., has worked various research-related projects in different areas, including distributed systems, virtual machines, and programming languages. Prior work includes IBM TSpaces; a replicated tuplespace (GLOBE); and a clustered, scalable, and fault- tolerant JMS server for Softwired AG. He holds a patent for ensuring JMS semantics during partial failures in a cluster JMS server.
David F. Bacon, Ph.D., is a research staff member at IBM""s T. J. Watson Research Center. There he leads the Metronome project, which produced the first hard real-time, garbage-collected system. His algorithms are included in most compilers and run-time systems for modern object-oriented languages. Dr. Bacon holds six patents, is a member of ACM and IEEE, and is on the governing boards of ACM SIGPLAN and SIGBED.
Jan Vitek, Ph.D., is an associate professor at Purdue University. Prof. Vitek""s research interests include programming language, virtual machines, real-time systems, and information security. At Purdue, he leads the Ovm real-time virtual machine project. He is a member of the ACM and IFIP WG2.4 and a founder of the TRANSACT workshop series, the VEE conference, and TiC summer school. He sits on steering committee of the ECOOP, COORDINATION, and JTRes conferences and serves on the JSR302 - Safety Critical Java expert group.
