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.
Download Not Available

BibTex Entry

@inproceedings{Kim2009a,
 address = {New York, NY, USA},
 author = {M-S. Kim and A.J. Wellings},
 booktitle = {Proceedings of the 7th International Workshop on Java Technologies for Real-Time and Embedded Systems},
 editor = {},
 pages = {81-89},
 publisher = {ACM},
 series = {ACM International Conference Proceeding Series},
 title = {Applying fixed-priority preemptive scheduling with preemption threshold to asynchronous event handling in the RTSJ},
 year = {2009}
}