Allocation-Phase Aware Thread Scheduling Policies to Improve Garbage Collection Performance

Feng Xian, Witawas Srisa-an, and Hong Jiang

International Symposium on Memory Management (ISMM), Montreal, Canada, October 21-22, 2007.

Abstract

Past studies have shown that objects are created in phases, and most objects also die in phases. Thus, one way to sustain good garbage collection efficiency is to have a large enough heap to allow many allocation phases to complete and most of the objects to become unreachable before invoking garbage collection. However, studies have shown that such an operating environment is hard to maintain in large multithreaded applications because most typical time-sharing schedulers are not allocation-phase cognizant; thus, they often schedule threads in a way that prevents them from completing their allocation phases quickly. Thus, when garbage collection is invoked, most allocation phases have yet to be completed, resulting in poor collection efficiency.

In this paper, we introduce two new scheduling strategies, LARF (lower allocation rate first) and MQRR (memory-quantum round robin) designed to be allocation-phase aware. Both schemes assign higher execution priority to threads in computation-oriented phases, allowing more objects to die. We simulated the proposed algorithms and evaluated their performances. The results show that the reductions of the garbage collection time in two generational schemes can range from 0%-16% and 0%-27% when LARF and MQRR are used, respectively. The reductions of the overall execution time range from -0.1%-3% for both LARF and MQRR. The reductions of the average thread turnaround time range from -0.1%-12% for LARF and 0.1%-13% for MQRR. Our results also show that LARF and MQRR are more effective when used with generational collectors than when used with non-generational collectors


PDF version