1. The serial collector was once the only option for the new generation of virtual machines, a single-threaded collector that must stop the world when collecting garbage, which is the default Cenozoic collector that the virtual machine runs in client mode.
2, Serial old is the older version of the Serial collector, is also a single-threaded collector, using the tag collation algorithm.
3. The Parnew Collector is a multithreaded version of the serial collector , and many of the new generation collectors that run in virtual machines in server mode, except serial, can work with the CMS collector only.
4, Parallel scavenge collector is also a new generation of collectors, using the replication algorithm is a parallel multi-threaded collector, its goal is to achieve a controllable running user code with (running user code + garbage collection Time) percent value.
5. The Parallel old collector is an older version of the Parallel scavenge collector , using multi-threaded and tagging algorithms.
6. The Concurrent Mark Sweep Collector is a collector that targets the shortest recovery pause time, based on the tag-clearing algorithm.
The process is as follows: initial tag , concurrent tagging, re-tagging , concurrent purging, the advantage is concurrent collection, low pauses, the disadvantage is very sensitive to CPU resources, unable to handle floating garbage, the end of the collection will produce a lot of space debris .
7, G1 Collector is based on the implementation of the labeling algorithm, will not produce space debris , can precisely control the pause, the heap is divided into a number of fixed-size independent areas , and track the extent of these areas of garbage accumulation, in the background to maintain a priority list, Priority is given to recovering the most trash area (garbage first) per time, based on the allowable collection times.
Copyright NOTICE: This article is the original blogger article, reproduced please indicate the source: Http://blog.csdn.net/lingzhm
Java Virtual machine Seven garbage collector comparisons