Non-blocking root scanning for real-time garbage collection

  • Authors:
  • Wolfgang Puffitsch;Martin Schoeberl

  • Affiliations:
  • Vienna University of Technology, Austria;Vienna University of Technology, Austria

  • Venue:
  • JTRES '08 Proceedings of the 6th international workshop on Java technologies for real-time and embedded systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Root scanning is a well known source of blocking times due to garbage collection. In this paper, we show that root scanning only needs to be atomic with respect to the thread whose stack is scanned. We propose two solutions to utilize this fact: (a) block only the thread whose stack is scanned, or (b) shift the responsibility for root scanning from the garbage collector to the application threads. The latter solution eliminates blocking due to root scanning completely. Furthermore, we show that a snapshot-at-beginning write barrier is sufficient to ensure the consistency of the root set even if local root sets are scanned independently of each other. The impact of solution (b) on the execution time of a garbage collector is shown for two different variants of the root scanning algorithm. Finally, we evaluate the resulting real-time garbage collector in a real system to confirm our theoretical findings.