A Cache-Pinning Strategy for Improving Generational Garbage Collection

  • Vimal K. Reddy
  • Richard K. Sawyer
  • Edward F. Gehringer
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4297)


In generational garbage collection, the youngest generation of the heap is frequently traversed during garbage collection. Due to randomness of the traversal, memory access patterns are unpredictable and cache performance becomes crucial to garbage-collection efficiency. Our proposal to improve cache performance of garbage collection is to “pin” the youngest generation (sometimes called the nursery) in the cache, converting all nursery accesses to cache hits. To make the nursery fit inside the cache, we reduce its size, and, to prevent its eviction from the cache, we configure the operating system’s page-fault handler to disallow any page allocation that would cause cache conflicts to the nursery. We evaluated our scheme on a copying-style generational garbage collector using IBM VisualAge Smalltalk and Jikes research virtual machine. Our simulation results indicate that the increase in frequency of garbage collection due to a smaller nursery is overshadowed by gains of converting all nursery accesses to cache hits.


Garbage Collection Pause Time Garbage Collector Page Frame Cache Conflict 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Appel, A.W.: Simple generational garbage collection and fast allocation. Software Practice and Experience 19(2), 171–183 (1989)CrossRefMathSciNetGoogle Scholar
  2. 2.
    Blackburn, S.M., McKinley, K.S.: Ulterior reference counting: fast garbage collection with-out a long wait. In: OOPSLA 2003, pp. 344–358 (2003)Google Scholar
  3. 3.
    Blackburn, S.M., Cheng, P., McKinley, K.S.: Oil and Water? High Performance Garbage Collection in Java with MMTk. In: ICSE 2004, pp. 137–146 (2004)Google Scholar
  4. 4.
    Boehm, H.: Reducing garbage collector cache misses. In: ISMM 2000, pp. 59–64 (2000)Google Scholar
  5. 5.
    Chilimbi, T.M., Larus, J.R.: Using generational garbage collection to implement cache-conscious data placement. In: ISMM 1998, pp. 37–48 (1998)Google Scholar
  6. 6.
    Cmelik, R., Keppel, D.: Shade: A fast instruction-set simulator for execution profiling. SIGMETRICS Performance Evaluation Review 22(1), 128–137 (1994)CrossRefGoogle Scholar
  7. 7.
    Cooper, E., Nettles, S., Subramanian, I.: Improving the performance of SML garbage collection using application-specific virtual memory management. In: LFP 1992, pp. 43–52 (1992)Google Scholar
  8. 8.
    DaCapo benchmarks version beta050224,
  9. 9.
    Diwan, A., Tarditi, D., Moss, E.: Memory system performance of programs with intensive heap allocation. ACM Trans. Comput. Syst. 13(3), 244–273 (1995)CrossRefGoogle Scholar
  10. 10.
    Dynamic SimpleScalar version 1.0.1,
  11. 11.
    Hill, M.D., Smith, A.J.: Evaluating Associativity in CPU Caches. IEEE Transactions on Computers 38(12) (December 1989)Google Scholar
  12. 12.
  13. 13.
    Jikes Research Virtual Machine version 2.4.0,
  14. 14.
    Jones, R., Lins, R.: Garbage Collection: Algorithms for automatic dynamic memory management. John Wiley & Sons, Chichester (1996)MATHGoogle Scholar
  15. 15.
    Kessler, R.E., Hill, M.D.: Page placement algorithms for large real-indexed caches. ACM Trans. Comput. Syst. 10(4), 338–359 (1992)CrossRefGoogle Scholar
  16. 16.
    Reddy, V.K.: Caching strategies for improving generational garbage collection in Smalltalk. MS Thesis, North Carolina State University (August 2003)Google Scholar
  17. 17.
    Reinhold, M.B.: Cache performance of garbage-collected programs. In: PLDI 1994, pp. 206–217 (1994)Google Scholar
  18. 18.
    Sawyer, R.K.: Page Pinning Improves Performance of Generational Garbage Collection. MS Thesis, North Carolina State University (March 2006)Google Scholar
  19. 19.
    Ungar, D.: Generation Scavenging: A non-disruptive high performance storage reclamation algorithm. In: SESPSDE 1984, pp. 157–167 (1984)Google Scholar
  20. 20.
    Wilson, P.R., Lam, M.S., Moher, T.G.: Caching considerations for generational garbage collection. In: LFP 1992, pp. 32–42 (1992)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2006

Authors and Affiliations

  • Vimal K. Reddy
    • 1
  • Richard K. Sawyer
    • 1
  • Edward F. Gehringer
    • 1
  1. 1.Department of Electrical and Computer EngineeringNorth Carolina State UniversityRaleighUSA

Personalised recommendations