I'm studying garbage collectors and it seems like to have a concurrent garbage collector that can handle multiple threads, you'd need to have a lock or atomic refs to restrict garbage collector from changing something at the same moment another thread writes to memory. Do garbage collectors use locks/atomic or am I missing something? I've found references to 'write barriers' but I can't seem to find anything indicating one way or another on this front.
I'm counting a CAS loop as locking.
Thanks!