Constant-Time Root Scanning for Deterministic Garbage Collection

  • Fridtjof Siebert
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2027)


Root scanning is the task of identifying references to heap objects that are stored outside of the heap itself, in global and local variables and on the execution stack. Root scanning is particularly difficult within an incremental garbage collector that needs to be deterministic or give hard realtime guarantees. Here, a method that allows exact root scanning is presented. The basic idea is to ensure that copies of all root references exist on the heap whenever the garbage collector might become active. This approach reduces the root scanning phase of the garbage collection cycle to an efficient constant-time operation. AJava virtual machine and a static Java bytecode compiler that use this technique have been implemented and analysed using the SPECjvm98 benchmark suite. This Java implementation allows for deterministic memory management as needed in real-time systems that is difficult to achieve with traditional methods to perform root scanning.


Garbage Collection Runtime Overhead Garbage Collector Synchronization Point White Object 
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.


  1. [1]
    Ken Arnold and James Gosling: The Java Programming Language, 2nd edition, Addison Wesley, 1998Google Scholar
  2. [2]
    J-Consortium: Real Time Core Extension for the Java Platform, Draft International JConsortium Specification, V1.0.14, September 2, 2000Google Scholar
  3. [3]
    The Real-Time Java Experts Group: Real Time Specification for Java, Addison-Wesley, 2000,
  4. [4]
    Edsgar W. Dijkstra, L. Lamport, A. Martin, C. Scholten and E. Steffens: On-the-fly Garbage Collection: An Exercise in Cooperation, Communications of the ACM, 21,11 (November 1978), p. 966–975zbMATHCrossRefGoogle Scholar
  5. [5]
    Henry G. Baker: List processing in Real Time on a Serial Computer. Communications of the ACM 21,4 (April 1978), p. 280–294, zbMATHCrossRefGoogle Scholar
  6. [6]
    Damien Doligez and Georges Gonthier: Portable, Unobtrusive Garbage Collection for Multiprocessor Systems, POPL, 1994Google Scholar
  7. [7]
    Danny Dubé, Marc Feeley and Manuel Serrano: Un GC temps r.el semi-compactant, Journées Francophones des Langages Applicatifs, JFLA, Janvier 1996Google Scholar
  8. [8]
    Joel F. Barlett: Compacting Garbage Collection with Ambiguous Roots, Digital Equipment Corporation, 1988Google Scholar
  9. [9]
    Hans-Juergen Boehm: Garbage Collection in an Uncooperative Environment, Software Practice & Experience, Vol 18 (9), p. 807–820, September 1988CrossRefGoogle Scholar
  10. [10]
    Hans-Juergen Boehm: Space Efficient Conservative Garbage Collection, PLDI, 1993Google Scholar
  11. [11]
    Benjamin Goldberg: Tag-Free Garbage Collection for Strongly Typed Programming Languages, PLDI, 1991Google Scholar
  12. [12]
    A. W. Appel: Runtime Tags Aren’t Necessary, Lisp and Symbolic Computation, 2, p. 153–162, 1989CrossRefGoogle Scholar
  13. [13]
    Amer Diwan, Eliot Moss and Richard Hudson: Compiler Support for Garbage Collection in a Statically Typed Language, PLDI, 1992Google Scholar
  14. [14]
    Ole Agesen, David Detlefs, J. Eliot and B. Moss: Garbage Collection and Local Variable Type-Precision and Liveness in Java™ Virtual Machines, PLDI, 1998Google Scholar
  15. [15]
    James Stichnoth, Guei-Yuan Lueh and Michal Cierniak: Support for Garbage Collection at Every Instruction in A Java™ Compiler, PLDI, 1999Google Scholar
  16. [16]
    Donald E. Knuth: The Art of Computer Programming, Volume 1, 1973Google Scholar
  17. [17]
    Thomas W. Christopher: Reference Count Garbage Collection, Software Practice & Experience, Vol 14(6), p. 503–507, June 1984CrossRefGoogle Scholar
  18. [18]
    Fridtjof Siebert: Real-Time Garbage Collection in Multi-Threaded Systems on a Single Processor, Real-Time Systems Symposium (RTSS’99), Phoenix, 1999Google Scholar
  19. [19]
    Ole Agesen: GC points in a Threaded Environment, Sun Labs Tech report 70, 1998Google Scholar
  20. [20]
    Fridtjof Siebert: Hard Real-Time Garbage Collection in the Jamaica Virtual Machine, Real-Time Computing Systems and Applications (RTCSA’99), Hong Kong, 1999Google Scholar
  21. [21]
    Fridtjof Siebert: Eliminating External Fragmentation in a Non-Moving Garbage Collector for Java, Compilers, Architectures and Synthesis for Embedded Systems (CASES), San Jose, 2000Google Scholar
  22. [22]
    Fridtjof Siebert: Guaranteeing Non-Fisruptiveness and Teal-Time Deadlines in an Incremental Garbage Collector (corrected version), International Symposium on Memory Management (ISMM’98), Vancouver, 1998, corrected version available at
  23. [23]
    M. Weiss, F. de Ferrière, B. Delsart, C. Fabre, F. Hirsch, E. A. Johnson, V. Joloboff, F. Roy, F. Siebert, and X. Spengler: TurboJ, a Bytecode-to-Native Compiler, Languages, Compilers, and Tools for Embedded Systems (LCTES’98), Montreal, in Lecture Notes in Computer Science 1474, Springer, June 1998CrossRefGoogle Scholar
  24. [24]
    Pekka P. Pirinen: Barrier techniques for incremental tracing, International Symposium on Memory Management (ISMM’98), Vancouver, 1998Google Scholar
  25. [25]
    Paul R. Wilson and Thomas G. Moher: A card-marking scheme for controlling intergenerational references in generation-based GC on stock hardware, SIGPLAN Notices 24 (5), p. 87–92, 1989CrossRefGoogle Scholar
  26. [26]
    Urs Hölzle: A Fast Write Barrier for Generational Garbage Collectors, OOPSLA, 1993Google Scholar
  27. [27]
    SPECjvm98 benchmarks suite, V1.03, Standard Performance Evaluation Corporation, July 30, 1998Google Scholar
  28. [28]
    Java Development Kit 1.1.8, 1.2 and 1.2.2, SUN Microsystems Inc., 1998–2000Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2001

Authors and Affiliations

  • Fridtjof Siebert
    • 1
  1. 1.Institut für Programmstrukturen and Datenorganisation (IPD)Universität KarlsruheKarlsruheGermany

Personalised recommendations