Mark and sweep is a tracing garbage collector algorithm that follows live object references in order to establish a live set. Then it removes all untraversed objects that are known not to be live after all references have been traced. The phases of mark and sweep can be parallelized with varying degrees of efficiency. Mark and sweep is the basis of virtually all garbage collectors in commercial JVMs today.
See also Tracing garbage collection.