Overview of G1 Garbage Collection cycles
G1 follows a cyclical recovery process: Young GC $\rightarrow$ Concurrent Marking $\rightarrow$ Mixed GC.
- Young GC: Occurs when Eden is full. STW, parallel collection of Young regions.
- Concurrent Marking: Triggered when heap usage hits a threshold (default 45%). Identifies live objects in the Old generation.
- Mixed GC: Follows concurrent marking. Collects Young regions and a subset of Old regions (based on the efficiency calculated during marking). Unlike other collectors, G1 does not need to collect the entire Old generation at once.
- Full GC: A single-threaded, exclusive, high-intensity fallback mechanism used when G1's evaluation fails or when contiguous Humongous regions cannot be found.