https://abiasforaction.net/understanding-jvm-garbage-collection-part-1/

JVM overview

GC approaches

To run the garbage collection safely (without any concurrency issues) older GC algorithms stop all application threads (Stop the World Pauses) so that memory can be safely reclaimed. Thus a GC cycle does the following:

  • Stops all application threads
  • Runs garbage collection
  • Starts all application threads again

Variations

  • Mark Sweep

  • Mark Sweep and Compaction

  • Mark and Copy