Concurrent marker scan (CMS) collector (to be completed)

The Concurrent Markup Scan (CMS) collector is designed for applications that require shorter garbage collection pauses and can share processor resources with the garbage collector while the application is running.
For any application with low moratorium, this collector should be considered.
Using the command line option to enable the CMS collector-XX:+UseConcMarkSweepGC
 
Like other available collectors, CMS collectors are generational; therefore, both small and major collections occur
CMSThe collector attempts to reduce pause time due to primary collection by tracking accessible objects while executing application threads using separate garbage collector threads.
During each major collection cycle, the CMS collector pauses all application threads for a period of time at the start of the collection, and then pauses again in the middle of the collection.
 
Concurrency mode failure
CMSThe collector uses one or more garbage collector threads that run concurrently with the application thread, with the goal of completing lifetime collection before completing.
In normal operation, the CMS collector performs most of the tracking and scanning work while the application thread is still running, so the application thread can only see a brief pause.
 
suspend
CMSThe collector suspends two applications in the concurrent collection cycle. The first pause marks objects directly accessible in the root directory (for example, object references from application thread stacks and registers, static objects, etc.) and other locations in the heap (for example, younger generation) as pauses. The first suspension is calledInitial mark pause。The second pause is found at the end of the concurrent trace phase, and after the CMS collector completes tracking the object, the missing object is found concurrently because the application thread referenced in the object is updated. The second suspension is calledNote pause
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Leave a Reply

Your email address will not be published. Required fields are marked *