3 ms·
I've used a GC language (Java) in hard-realtime systems successfully. Realtime Java (RTSJ) gives you control over which threads can trigger a GC and which opera
by pron 11y ago
I've used a GC language (Java) in hard-realtime systems successfully. Realtime Java (RTSJ) gives you control over which threads can trigger a GC and which operate in an arena. Even hard realtime systems have a very small core that's actually hard realtime, and real-time Java isolates it nicely.
- vvanders 11y agoIsn't that effectively the same thing as embedding the JVM inside C/C++ with thread execution control? From what I've read on the RTJS spec the real-time areas you're talking about use an arena allocator which is a different memory allocation strategy than GC.
- pron 11y ago> Isn't that effectively the same thing as embedding the JVM inside C/C++ with thread execution control? I don't see how. > From what I've read on the RTJS spec the real-time areas you're talking about use an arena allocator which is a different memory allocation strategy than GC. Yes, but both hard- and soft-realtime threads (that do use a GC) share the same JVM and can share some objects. Also, keep in mind that realtime JVMs guarantee scheduling latency for hard realtime threads of up to a few microseconds. If you can live with higher latencies, you can use realtime GCs.