An efficient and predictable implementation of asynchronous event handling in the RTSJ

MinSeong Kim, Andy J. Wellings

Research output: Chapter in Book/Report/Conference proceedingConference contribution


Asynchronously happenings are crucial in real-time systems. Many real-time applications are designed with some periodic execution logics and a significant number of asynchronous events. Evidently it would not be a good performance choice if each event handler is constructed with its own thread of control. However it is generally unclear how to map threads to handlers effectively in the Real-Time Specification for Java (RTSJ). This paper, therefore, summarizes the Asynchronous Event Handler (AEH) techniques used in several popular RTSJ implementations and proposes two efficient and predictable implementations of AEH for the RTSJ. Currently the support for non-blocking handlers in the RTSJ is criticised as lacking in configurability [12] as the AEH of the RTSJ takes no advantage of non-blocking handlers. In the proposed models, non-blocking handlers are serviced by real-time threads that assume handlers may not block and blocking handlers are dealt by real-time threads that assume handlers may block. In this way it is possible to assign a thread to handlers at the right time in the right place while maintaining the least possible number of threads overall. We have implemented the proposed models on an existing RTSJ implementation, jRate. With the implementations of the models we ran a set of performance tests that measure their respective dispatch and multiple handlers completion latency. The results from the tests are promising and indicates that the proposed models have fewer threads on average with better performance than other approaches.
Original languageUndefined/Unknown
Title of host publicationProceedings of the 6th International Workshop on Java Technologies for Real-time and Embedded Systems, JTRES 2008, 24-26 September 2008, Santa Clara, California, USA
EditorsGregory Bollella, C. Douglas Locke
Number of pages10
ISBN (Electronic)978-1-60558-337-2
Publication statusPublished - 2008

Publication series

NameACM International Conference Proceeding Series

Cite this