JVM memory management ------ introduction to the Garbage Collector

Source: Internet
Author: User

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)

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.