In Chapter 7, Leveraging the New Default G1 Garbage Collector, we reviewed the changes to the Concurrent Mark Sweep (CMS) garbage collector. CMS garbage collection involves scanning heap memory, marking objects for removal and then making a sweep to actually remove those objects. The CMS method of garbage collection is essentially an upgraded "Mark and Sweep" method; which you can refer to Chapter 7, Leveraging the New Default G1 Garbage Collector, for additional information.
The current downside to CMS garbage collection is that the serial mark and sweep is implemented using a single thread. This results in unwanted pause times. Currently, full garbage collection takes place in four phases:
- Marking phase ...