G1 Full GC Write Barrier Mechanism

Thomas Schatzl thomas.schatzl at oracle.com
Tue Mar 2 16:24:34 UTC 2021


Hi,

On 02.03.21 15:20, Ofir Gordon wrote:
 > Thank you for the clarification.
 > I have a couple of followup questions -
 >
 > 1. Is the G1 Full collector not concurrent? Which algorithm does it
 > use?
 > How is it different from the Serial Full GC?

a) No.

b) Parallel-Mark-Sweep-Compact. I do not think there is literature about 
it or the Parallel GC variant but I may be wrong about Parallel.

Basically, the heap is split into regions (G1 uses it's region 
boundaries, I think parallel uses 512kb regions), and mark-sweep-compact 
is applied to them in parallel. Except for marking, where it uses 
traditional task queues with work stealing.

c) Parallelizes the various steps of the Mark-Sweep-Compact algorithm.

 >
 > 2. The young/mixed G1 gc is the only concurrent gc available? And
 > again, which algorithm does it use?

G1 is a partially concurrent collector - minor gcs are STW, and as 
replacement for stw full gc, this work is split into concurrent old 
generation liveness analysis (marking) and memory reclamation in old gen 
  incrementally in minor pauses using evacuation only.

Thanks,
   Thomas



More information about the hotspot-gc-dev mailing list