Skip to main navigation Skip to search Skip to main content

Hardware concurrent garbage collection for object-oriented processor

  • Wing Shing YU

Student thesis: Master's Thesis

Abstract

jHISC is an object-oriented processor for embedded system aiming at accelerating Java execution by hardware approach. Garbage collection is one of the critical tasks in a Java Virtual Machine. A study has been conducted on dynamic object allocation and garbage collection behavior of Java program based on SPECjvm 98 benchmark suite and MIDP applications for mobile phones. In the study, life-span, size, and reference count distribution of Java objects have been measured. It has been observed that most Java objects died very young with small sizes and small reference counts. Generational garbage collection is adopted in jHISC system with two generations: young generation and mature generation. The reference counting algorithm is used in the young generation. In jHISC, reference-counting object cache with hardware write barrier and object allocator provides the hardware concurrent garbage collection for small size objects to greatly reduce the overhead for the reference count updating. The reference counting collector reclaims the memory occupied by the object once the object becomes garbage. The hardware allocator based on traditional bubby system is developed to provide a constant time object allocation. The objects, which cannot be collected by the young generation, are promoted to the mature generation. The mature generation uses an incremental mark-sweep-compact algorithm. There are three phases in the algorithm: Mark, Sweep and Compact. The incremental algorithm eliminates all user-perceivable pauses. It allows garbage collection to be performed in a series of small steps while the program will never stop for long and will break up old-space garbage collection pauses into many tiny pauses. The Mark and Sweep phases are executing while the user application is in idle state. User applications can be resumed from garbage collection thread at anytime after applying the tri-color model. The Compaction phase is used to remove the internal fragmentation in the object heap. In this thesis work, we aim to develop a fine-grained incremental garbage collection algorithm with hardware supported in jHISC architecture. The algorithm is based on reference counting and an incremental mark-sweep-compact algorithm to provide a non-disruptive reclamation of garbage objects. According to the results of the investigation we have conducted, over half of the objects (~60%) can be garbage collected by the reference-counting object cache concurrently while the main applications thread is running. Thus it is unnecessary for these objects to be copied to the main memory. Furthermore, the mature objects are collected by an incremental collector which is supported by jHISC in architecture level. There is not any user-perceivable pause while the incremental collector reclaiming garbage in mature generation. Keywords: object, garbage collection, reference counting, object cache, and object allocator.
Date of Award15 Jul 2005
Original languageEnglish
Awarding Institution
  • City University of Hong Kong
SupervisorShi Sheung Anthony FONG (Supervisor)

Keywords

  • Garbage collection (Computer science)

Cite this

'