3 ms·
I'd love to hear about how GCs can be useful for hard real-time systems! I was always under the impression that you needed to avoid that kind of stuff, so any
by someone13 12y ago
I'd love to hear about how GCs can be useful for hard real-time systems! I was always under the impression that you needed to avoid that kind of stuff, so any links / information you have would be really interesting.
- aidenn0 12y agoIt comes down to the fact that in hard real-time you care about doing things in bounded amounts of time, and in soft real-time you typically want to do things "as fast as possible" and fixed-cost incremental GCs tend to be comparably high fraction of CPU usage versus a good generational stop-the-world collector. Many hard real-time systems already operate with an excess of CPU power in order to simplify analysis of scheduling. Furthermore you are already bounding things like allocations, and a simple incremental GC that runs on a timer tick can guarantee to run in fixed time if you have bounded allocations per timer-tick. All of this is somewhat moot though as many hard real-time systems completely eschew dynamic allocations.