Can the RTGC work on memory in the regular heap with java.lang.Threads? In other words, with a third-party application binary (with no source code), can I still benefit from Java RTS?
The java.lang.Threads are not deterministic. They can only run in the Time-Sharing priority class. This means a thread that takes too many computation cycles will relinquish the CPU to let other threads run. The only advantage of the RTGC is that, on a multi-processor machine, it could run at the same time as your application thread, on another CPU. If you run the GC at a higher priority than the java.lang.Thread, you can ensure that it will recycle memory on time and that the threads will not be blocked because of the GC (for example, they will at worst just see one less CPU, the one used by the RTGC). In short, on a multiprocessor system, the RTGC can solve the jitter due to the GC even for java.lang.Threads, but it does not solve all the other sources of non-determinism (for example, TimeSharing priorities, JIT compilation).
Related Questions
- Can the RTGC work on memory in the regular heap with java.lang.Threads? In other words, with a third-party application binary (with no source code), can I still benefit from Java RTS?
- My child has a good visual memory and seems to be memorizing words. Is READ designed to encourage memorization?
- How does human memory retain words of different languages?