Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

>> JVM does global stop-the-world garbage collection

Does it? Back when I was in HFT, we were definitely running a JVM with background thread GC.



Only Azul's JVM has managed to create a pause-less garbage collector. They use some pretty cool tricks.

It is really a fantastic piece of technology:

http://www.azulsystems.com/zing/pgc

Even just marveling at the complexity and how they got it working.

Otherwise, besides those tricks, how would you do it when you have multiple threads accessing objects on a shared heap?

Erlang's VM is another even wonderful piece of engineering. Each little process lives in its own memory heap. Then pauseless garbage collection become trivial. It has many other really cool and unique features (hot code reloading, inter-node distribution, ability to load C code, etc etc...)


A few simple ways: put shared data in PermGen, and rollover to a new process when memory gets low (erlang-style but at OS-level).


Well I wouldn't say "roll-over" to the new process is exactly simple but it is a good trick though. Forking has its interesting dark cases that have to be handled. Inherited file descriptors, what happens to threads, signals and so on.


Were you paying huge money for Azul? http://www.azulsystems.com/zing/pgc




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: