Applying fixed-priority preemptive scheduling with preemption threshold to asynchronous event handling in the RTSJ

MinSeong Kim, Andy J. Wellings

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


The primary goal for asynchronous event handlers in the Real-Time Specification for Java (RTSJ) is to have a lightweight concurrency mechanism. The emphasis here is on 'lightweightness' which should be achieved by having fewer servers to execute more handlers. Some implementation will, however, simply map a handler to a real-time thread and this results in undermining the original motivations and introduces performance penalties. Furthermore it is generally unclear how to map handlers to real-time threads efficiently with respect to the lightweightness requirement. In this paper we therefore first define the worst case scenario that demands the maximum number of real-time threads for blocking and non-blocking handlers. Based on the worst case scenarios, it is also proved that the number of real-time threads required to execute a given number of non-blocking handlers depends on the number of priority levels, not on the number of handlers. It is also shown that each blocking handler is required to have its own real-time thread to prevent unbounded priority inversion. Based on these results we also propose to adapt the notion of preemption threshold to minimise the number of priority levels in the system, which enables AEH to feasibly schedule a given handler set with the least number of real-time threads. We have extended the non-blocking AEH implementation [8] to support the fixed-priority scheduling with preemption threshold on an existing RTSJ implementation, jRate, to show that the number of real-time threads can be further decreased while feasibly scheduling a set of non-blocking handlers, regardless of the number of them in the system.
Original languageUndefined/Unknown
Title of host publicationProceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems, JTRES 2009, Madrid, Spain, September 23-25, 2009
EditorsM. Teresa Higuera-Toledano, Martin Schoeberl
Number of pages10
Publication statusPublished - 2009

Publication series

NameACM International Conference Proceeding Series

Cite this