Skip to main content

Enhancements to Stop-The-World Collector

Java Memory Management

Overview

Although the on-the-fly collector eliminates GC program pauses, it pays a performance price due to the complexities of synchronizing mutator and GC activities. The stop-the-world (STW) algorithm has much simpler synchronization demands: it stops the mutators while it works, causing a pause. Several projects explored ways of improving the STW algorithm so that these pauses remain acceptably short.

An obvious approach was to speed up the collector through parallelization. Since the STW algorithm stops the mutators, all the CPUs on multiprocessor platforms are free to help GC, thus shortening the unavoidable GC pauses. Several parallel collectors have been implemented in the past, but adapting the IBM JVM for servers required special effort. New ideas conceived in the process are described in several publications. An efficient way to handle inter-generational pointers in the generational collector algorithm is described in [2]. A new method for parallel copying collection that uses delayed allocation appeared in [12]. This approach solves the fragmentation problem that plagues previous parallel collectors while adding almost no overhead. Finally, [1] discusses the implementation of the replication-based garbage collector [15,16] on a multiprocessor machine and in a multithreaded environment.