Asynchronously happening events are crucial in real-time systems. Many real-time applications are designed with some periodic execution logics and a vast number of asynchronous events. Evidently it would not be a good performance choice if each event is constructed with its own thread of control. However it is unclear how to map threads to handlers effectively in the Real-Time Speci cation for Java (RTSJ). This paper, therefore, discusses the Asynchronous Event Handler (AEH) techniques used in 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 con gurability [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 imple- mentations 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 models fewer threads on average with better performance than other approaches.

Download Not Available

BibTex Entry

@inproceedings{Kim2008,
 address = {New York, NY, USA},
 author = {MinSeong Kim and Andy Wellings},
 booktitle = {JTRES '08: Proceedings of the 6th international workshop on {Java} technologies for real-time and embedded systems},
 doi = {},
 isbn = {978-1-60558-337-2},
 location = {Santa Clara, USA},
 pages = {48--57},
 publisher = {ACM},
 title = {An efficient and predictable implementation of asynchronous event handling in the {RTSJ}},
 year = {2008}
}