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

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. Copyright © 2010 John Wiley & Sons, Ltd.

[1]  Douglas C. Schmidt,et al.  Techniques and patterns for safe and efficient real-time middleware , 2004 .

[2]  Min Seong Kim,et al.  Refactoring Asynchronous Event Handling in the Real-Time Specification for Java , 2007, 2009 21st Euromicro Conference on Real-Time Systems.

[3]  Alan Burns,et al.  Asynchronous event handling and real-time threads in the real-time specification for Java , 2002, Proceedings. Eighth IEEE Real-Time and Embedded Technology and Applications Symposium.

[4]  Jiongxiong Chen,et al.  Extensions to fixed priority with preemption threshold and reservation-based scheduling , 2005 .

[5]  Peter C. Dibble Real-Time Java Platform Programming , 2002 .

[6]  Alan Burns,et al.  Real-Time Systems and Programming Languages , 2009 .

[7]  Andy J. Wellings,et al.  An efficient and predictable implementation of asynchronous event handling in the RTSJ , 2008, JTRES '08.

[8]  James W. Layland,et al.  Scheduling Algorithms for Multiprogramming in a Hard-Real-Time Environment , 1989, JACM.

[9]  Frank Yellin,et al.  Inside the Java Virtual Machine , 1997 .

[10]  Alan Burns,et al.  Applying new scheduling theory to static priority pre-emptive scheduling , 1993, Softw. Eng. J..

[11]  John P. Lehoczky,et al.  Fixed priority scheduling of periodic task sets with arbitrary deadlines , 1990, [1990] Proceedings 11th Real-Time Systems Symposium.

[12]  Manas Saksena,et al.  Scheduling fixed-priority tasks with preemption threshold , 1999, Proceedings Sixth International Conference on Real-Time Computing Systems and Applications. RTCSA'99 (Cat. No.PR00306).

[13]  Robert I. Davis,et al.  How Embedded Applications using an RTOS can stay within On-chip Memory Limits , 2002 .

[14]  David E. Culler,et al.  A Design Framework for Highly Concurrent Systems , 2000 .

[15]  John Regehr,et al.  Scheduling tasks with mixed preemption relations for robustness to timing faults , 2002, 23rd IEEE Real-Time Systems Symposium, 2002. RTSS 2002..