LCS Publication Details
Publication Title: A Type System for Safe Region-Based Memory Management in Real-Time Java
Publication Author: Salcianu, Alexandru
Additional Authors: Chandrasekhar Boyapati, William Beebee Martin Rinard
LCS Document Number: MIT-LCS-TR-869
Publication Date: 11-18-2002
LCS Group: Computer Architecture
Additional URL:
Abstract:
The Real-Time Specification for Java (RTSJ) allows a program to create real-time threads with hard real time constraints. Real-time threads use immortal memory and region-based memory management to avoid unbounded pauses caused by interference from the garbage collector. The RTSJ uses runtime checks to ensure that deleting a region does not create dangling references and that real-time threads do not access references to objects allocated in the garbage-collected heap. This paper presents a static type system that guarantees that these runtime checks will never fail for well-typed programs. Our type system therefore 1) provides an important safety guarantee for real-time programs and 2) makes it possible to eliminate the runtime checks and their associated overhead. Our system also makes several contributions over previous work on region types. For object-oriented programs, it combines region types and ownership types in a unified type system framework. For multithreaded programs, it allows long-lived threads to share objects without using the heap and without having memory leaks. For real-time programs, it ensures that real-time threads do not interfere with the garbage collector. We have implemented several programs in our system. Our experience indicates that our type system is sufficiently expressive and requires little programming overhead. We also ran these programs on our RTSJ platform. Our experiments show that eliminating the RTSJ runtime checks using a static type system can significantly decrease the execution time of a real-time program.
To obtain this publication:

To purchase a printed copy of this publication please contact MIT Document Services.