The RTSJ introduces a memory model that includes immor- tal and scoped memory areas that are not subject to garbage collection. Associated with scoped memory areas are rules that restrict reference assignments to guarantee dangling pointers can not occur. Java includes special references which have different semantics than regular references. Encapsulated by reference objects, these references are treated uniquely way by the garbage collector. In particular, they do not stop their refer- ents from being marked for finalization, finalized and reclaimed. This paper makes four contributions. We first propose semantics for ref- erence objects used in the RTSJ. We then propose a new scoped reference object that allows access to objects where this would be disallowed by the RTSJ scoping rules. Next, we show how reference object reachability changes can be processed using RTSJ asynchronous events. Finally, we show how thread groups, unavailable to RTSJ RealtimeThreads can be implemented safely using scoped reference objects.
['Andrew Borg', 'Andy J. Wellings']
Reference Objects for RTSJ Memory Areas