News for hackers. Stuff that matters.
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by TeMPOraL on Friday September 17, 2021 @10:29AM (#28565905)
Might be a naive question, but can't you just disable GC while missiles are in the air? Defer it until there are no immediate threats, and then let it catch up, even if it takes a couple of seconds?

I can't imagine a scenario in which an enemy would be able to saturate the defense system with a continuous onslaught that would make the system run out of memory. You'll sooner run out of SAMs and ammo for that fancy gun that's used to shoot down missiles at close range. And if the enemy can mount such an onslaught, then the ultimate GC will soon run anyway - all memory will be released when the ship sinks.

(I think back to that famous story of a missile with a memory leak, whose designers figured the missile will hit its target or run out of fuel faster than it'll run out of memory.)

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by kaba0 on Friday September 17, 2021 @10:55AM (#28566187)
I think it was a satirical answer, that GC can indeed be used for even hard real time systems (though in this case it is a specific hard real time JVM implementation that has a maximum allowed time to spend on GC). Contrary to what many thinks, hard real time is not about speed, but predictability. And calculating even I don’t know how many missile paths is computationally not too hard, compared to eg. even a computer game.

But to answer your question, there are cases where the JVM is used without GC and it runs for a day, and gets restarted at night. Afaik some bank does it for some form of HFT.

Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by lmilcin on Friday September 17, 2021 @11:26AM (#28566569)
Actually, if you think about it, the missile is already equipped with ultimate in garbage collection:)
Re:Shenandoah in OpenJDK 17: Sub-millisecond GC pauses by cesarb on Friday September 17, 2021 @11:54AM (#28566940)
> Actually, if you think about it, the missile is already equipped with ultimate in garbage collection:)

https://devblogs.microsoft.com/oldnewthing/20180228-00/?p=98...

"[...] Since the missile will explode when it hits its target or at the end of its flight, the ultimate in garbage collection is performed without programmer intervention."