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

  • Authors:
  • MinSeong Kim;Andy Wellings

  • Affiliations:
  • University of York, UK;University of York, UK

  • Venue:
  • JTRES '08 Proceedings of the 6th international workshop on Java technologies for real-time and embedded systems
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

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.