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

Andy Wellings, Minseong Kim

Research output: Contribution to journalArticlepeer-review


The primary goal of asynchronous event handlers (handlers for short) 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 real-time threads (servers for short) to execute more handlers. However, it is generally unclear how to efficiently map handlers to servers. In this paper we first define the worst case scenario that demands the least upper bound of servers for self-suspending and non-self-suspending handlers. Based on the worst case scenarios, it is proved that the number of servers required to execute a given number of non-self-suspending handlers depends on the number of priority levels, and not on the number of handlers. It is also shown that each self-suspending handler is required to have its own server to prevent unbounded priority inversion. Based on these results we also propose to adapt the notion of preemption threshold to further minimize the number of priority levels in the system. We have extended the non-self-suspending asynchronous event handling (AEH) implementation to support the fixed-priority scheduling with preemption threshold on an existing RTSJ implementation to show that the number of servers can be further decreased while feasibly scheduling a set of non-self-suspending handlers, regardless of the number of the handlers or the priority levels in the system.
Original languageEnglish
Pages (from-to)1609–1622
Number of pages14
JournalConcurrency and Computation: Practice and Experience
Issue number14
Publication statusPublished - 25 Sept 2011

Cite this