Ownership types for safe region-based memory management in real-time Java
- 9 May 2003
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 38 (5) , 324-337
- https://doi.org/10.1145/781131.781168
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 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 the benefits of 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 memory leaks. For real-time programs, it ensures that real-time threads do not interfere with the garbage collector. Our experience indicates that our type system is sufficiently expressive and requires little programming overhead, and that eliminating the RTSJ runtime checks using a static type system can significantly decrease the execution time of real-time programs.Keywords
This publication has 30 references indexed in Scilit:
- External Uniqueness Is Unique EnoughPublished by Springer Nature ,2003
- Automated discovery of scoped memory regions for real-time JavaPublished by Association for Computing Machinery (ACM) ,2002
- Region-based memory management in cyclonePublished by Association for Computing Machinery (ACM) ,2002
- Alias annotations for program understandingPublished by Association for Computing Machinery (ACM) ,2002
- Ownership types for safe programmingPublished by Association for Computing Machinery (ACM) ,2002
- Pointer and escape analysis for multithreaded programsPublished by Association for Computing Machinery (ACM) ,2001
- Language support for regionsPublished by Association for Computing Machinery (ACM) ,2001
- The real-time specification for JavaComputer, 2000
- Region-Based Memory ManagementInformation and Computation, 1997
- List processing in real time on a serial computerCommunications of the ACM, 1978