News & Analysis
PROGRAMMING TOOLS: IBM sets real-time tempo for Java code with Metronome
David Lammers
9/12/2005 9:00 AM EDT
Bacon said the T.J. Watson team is in prototyping with even more aggressive techniques that will push Metronome down to a few hundred microseconds of worst-case latency.
"We also have some approaches that we are trying out to provide specialized programming idioms of a few microseconds," he said. "In those, programmers would not be able to use all of Java, but they would not require any changes to the Java semantics. In particular, there is no possibility of run-time exceptions."
Cheng said the real-time spec for Java is somewhat agnostic about the role garbage collectors can play in real-time Java applications. IBM is more specific, putting a worst-case limit on delays due to garbage collection. That, Cheng said, lets customers avoid scoped memory's "onerous programming model," in which programmers must tune their code to remain within performance limits.
The Real-time Specification for Java (RTSJ) model, developed within the Java community, "didn't believe in real-time garbage collection at all," Cheng said.
Bacon said the scoped-to-immortal memory constructs of RTSJ "assume that you can't do real-time garbage collection, therefore you have to do this more-restrictive programming model. So there is a lot of existing library code that you can't use in conjunction with scoped memory."
Programmers often run their code only to find memory access exceptions just because they have tried to read or write a pointer, Bacon said. "We believe that's a fundamental change within the Java language, and we are trying to avoid that."
But Greg Bolella, a distinguished engineer at Sun Microsystems Software and director of the real-time Java program, said RTSJ addresses real-time garbage collection and scoped memory as complementary, not as an either-or situation.
"Applications now being developed will need all three categories of temporal behavior: non-real-time, soft real-time and hard real-time," he said. "Both real-time garbage collection and scoped memory are necessary for these applications. Anyone, or any company, who intimates anything different just isn't clued in."
RTSJ, as defined by the Java community, "embraces real-time collection techniques and has a whole thread class defined just for real-time collection. The spec doesn't mandate a particular algorithm. The real-time-collection vs. scoped memory argument these IBM guys like to make is completely spurious," Bolella said.
By the end of this year, Sun's real-time Java product will include a beta version of the Lund collector. While the IBM researchers said Metronome could be easily used by standard Java programmers, Bolella said Sun is targeting experienced real-time programmers who are interested in converting to Java and its object-oriented programming techniques.
"We don't expect your average Java programmer to do real-time coding, not for any serious applications," he said.

