Offline GC: trashing reachable objects on tiny devices

  • Authors:
  • Faisal Aslam;Luminous Fennell;Christian Schindelhauer;Peter Thiemann;Zartash Afzal Uzmi

  • Affiliations:
  • LUMS & University of Freiburg, DHA, Lahore, Pakistan;University of Freiburg, Freiburg, Germany;University of Freiburg, Freiburg, Germany;University of Freiburg, Freiburg, Germany;LUMS SSE, DHA, Lahore, Pakistan

  • Venue:
  • Proceedings of the 9th ACM Conference on Embedded Networked Sensor Systems
  • Year:
  • 2011

Quantified Score

Hi-index 0.00

Visualization

Abstract

The ability of tiny embedded devices to run large and feature-rich Java programs is typically constrained by the amount of memory installed on those devices. Furthermore, the useful operation of such devices in a wireless sensor application is limited by their battery life. We propose a garbage collection (GC) scheme called Offline GC which alleviates both these limitations. Our approach defies the current practice in which an object may be deallocated only if it is unreachable. Offline GC allows freeing an object that is still reachable but is guaranteed not to be used again in the program. Furthermore, it may deallocate an object inside a function, a loop or a block where it is last used, even if that object is assigned to a global field. This leads to a larger amount of memory available to a program. Based on an inter-procedural and field-sensitive data flow analysis we identify, during program compilation, the point at which an object can safely be deallocated at runtime. We have designed three algorithms for the purpose of making these offline deallocation decisions. Our implementation of Offline GC indicates a significant reduction in the amount of RAM and the number of CPU cycles needed to run a variety of benchmark programs. Offline GC is shown to increase the average amount of RAM available to a program by up to 82% compared to a typical online garbage collector. Furthermore, the number of CPU cycles consumed in freeing the memory is reduced by up to 94% when Offline GC is used.