Following references from roots

Roots are runtime-known entry points, such as references in stacks, registers or global state. Tracing expands outward from them; reachability is a conservative lifetime criterion, not a prediction that an object will actually be used again.

Two objects can point to each other yet be unreachable from every root. Tracing can reclaim that isolated component without first finding an object whose incoming-reference count is zero.

References: [1] [2]

Coordinating concurrent mutation

When application threads run during collection, references can change while being scanned. Go’s implementation separates preparation, concurrent marking, mark termination and sweeping, using write barriers and brief stop-the-world coordination.

Concurrent collection therefore does not mean zero pauses or zero application overhead. Barriers, background work and allocation-time assistance distribute costs that otherwise might concentrate in a long pause.

References: [1]

Garbage retained for another cycle

Oracle’s historical CMS documentation describes floating garbage: an object reachable when traced can lose its references later and survive until another collection. Safely retaining extra objects is possible in a concurrent design.

Correctness first requires keeping objects that may still be used. Pause time, throughput, memory overhead and prompt reclamation trade off, and one collector’s phase structure does not define every tracing collector.

References: [2]