Integration of ParralellGC and CMS

Jon Masamitsu jon.masamitsu at
Mon Jan 24 15:19:11 UTC 2011

On 01/22/11 12:19, Clemens Eisserer wrote:
> Hi,
> Just to be curious, how hard would it be to integrate the
> Parallell(Old)GC with CMS?
> As far as I can imagine it would be quite beneficial to fall back to a
> multithreaded stop-the-world collector compared to a single-threaded
> one.

I've tried it.  It's hard.  Partly because the ParallelGC collector that
has the ParallelOldGC is written in a different style than the CMS
collector.  Besides the necessity of creating interfaces to the
ParallelOldGC that can be shared by both ParallelGC and CMS,
there are some not so obvious differences between concepts
in the two styles that tripped me up.  Conceptually it's
straightforward, but the engineering is complicated.

If you just want to re-implement the ParallelOldGC in CMS,
lots of the code can be reused.  You'll just have to find
the places where code has to be modified to make it work.

> Another idea would be a multithreaded CMS stop-the-world
> defragmentation phase, which could prevent CMS to fail because of
> fragmentation.
> The reason I ask is because I should start to work on a master thesis
> soon and java's garbage collectors would surely be an intersting topic
> :)
> Thank you in advance, Clemens

More information about the hotspot-gc-dev mailing list