Serial collector: it has only one GC thread, and as mentioned earlier, it needs to stop the world when running ).
Parallel collector: It has multiple GC threads, and it also needs to stop the world ).
Concurrent collector: it has one or more GC threads, and it needs to stop the world in some stages, and concurrently execute some stages with the user program.
Concurrency means that two tasks A and B need to run independently of each other. After task A starts, Task B starts before task A ends..
Parallelism is a way of implementing concurrency.. LZ thinks that this may be better understood. Of course, parallelism is not the only way to implement concurrency, but also the time slice switching that we are familiar. That is, if task A is executed for A while, and task B is executed for A while, it is executed alternately.
Parallel processing can only take place on the premise of multi-core multi-processor or distributed system (essentially multi-core multi-processor), while alternate execution or time slice switching occurs on a single-core processor..
Implementation of the serial COLLECTOR: serial (used for the new generation, using the replication algorithm), serial old (used for the old generation, using the marking/Sorting Algorithm)
Implementation of Parallel collectors: ParNew (used for the new generation, using the replication algorithm), Parallel Scavenge (used for the new generation, using the replication algorithm), Parallel old (used for the old generation, using the tag/Sorting Algorithm)
Implementation of concurrent collectors: concurrent mark sweep [CMS] (used for the elderly generation, using the mark/clear algorithm)