NASA NTRS · 20110016056
Hard Real-Time: C++ Versus RTSJ
Abstract
In the domain of hard real-time systems, which language is better: C++ or the Real-Time Specification for Java (RTSJ)? Although ordinary Java provides a more productive programming environment than C++ due to its automatic memory management, that benefit does not apply to RTSJ when using NoHeapRealtimeThread and non-heap memory areas. As a result, RTSJ programmers must manage non-heap memory explicitly. While that's not a deterrent for veteran real-time programmers-where explicit memory management is common-the lack of certain language features in RTSJ (and Java) makes that manual memory management harder to accomplish safely than in C++. This paper illustrates the problem for practitioners in the context of moving data and managing memory in a real-time producer/consumer pattern. The relative ease of implementation and safety of the C++ programming model suggests that RTSJ has a struggle ahead in the domain of hard real-time applications, despite its other attractive features.
Explore related subjects
Keep this discovery
Explore connections, maps & timelines
Dvorak, Daniel L., Reinholtz, William K.. 2004-10-24. Hard Real-Time: C++ Versus RTSJ. https://ntrs.nasa.gov/citations/20110016056
Cite the original work for its findings. Save a collection to share your selection of sources.