Abstract
The Real-Time Specification for Java (RTSJ) is becoming mature. It has been implemented, formed the basis for research and used in serious applications. Some strengths and weaknesses are emerging. One of the areas that requires further elaboration is asynchronous event handling (AEH). The primary goal for handlers in the RTSJ is to have a lightweight concurrency mechanism. 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. However it is generally unclear how to map handlers to real-time threads effectively. Also the support for nonblocking handlers in the RTSJ is criticized as lacking in configurability as implementations are unable to take advantage of them. This article, therefore, examines the AEH techniques used in some popular RTSJ implementations and proposes two efficient AEH models for the RTSJ. We then define formal models of the RTSJ AEH implementations using the automata formalism provided by the UPPAAL model checking tool. Using the automata models, their properties are explored and verified. In the proposed models, blocking and nonblocking handlers are serviced by different algorithms. In this way, it is possible to assign a real-time thread to a handler at the right time in the right place while maintaining the fewest possible threads overall and to give a certain level of configurability to AEH. We also have implemented the proposed models on an existing RTSJ implementation, jRate and executed a set of performance tests that measure their respective dispatch and multiple-handler completion latencies. The results from the tests and the verifications indicate that the proposed models require fewer threads on average with better performance than other approaches.
- Behrmann, G., David, A., and Larsen, K. G. 2004. A tutorial on uppaal. Lecture Notes in Computer Science vol. 3185, Springer-Verlag, Berlin, Germany, 200--236.Google Scholar
- Belliardi, R., Brosgol, B., Dibble, P., Holmes, D., and Wellings, A. J. 2008. Real-Time Specification for Java Ver. 1.0.2. http://www.rtsj.org/.Google Scholar
- Corsaro, A. 2004. Techniques and patterns for safe and efficient real-time middleware. Ph.D. dissertation, Washington University, St. Louis, MO. Google Scholar
Digital Library
- Davis, R., Merriam, N., and Tracey, N. 2000. How embedded applications using an rtos can stay within on-chip memory limits. In Proceedings of the 12th EuroMicro Conference on Real-Time Systems. IEEE Computer Society, Los Alamitos, CA, 71--77.Google Scholar
- Debattista, K., Vella, K., and Cordina, J. 2002. Cache-affinity scheduling for fine grain multithreading. In Proceedings of Communicating Process Architectures. IOS Press, Amsterdam, The Netherlands, 135--146.Google Scholar
- Dibble, P. 2002. Real-Time Java Platform Programming. Sun Microsystems, CA. Google Scholar
Digital Library
- Kim, M. and Wellings, A. 2007. Asynchronous event handling in the real-time specification for Java. In Proceedings of the 5th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES'07). ACM, New York, 3--12. Google Scholar
Digital Library
- Kim, M. and Wellings, A. 2008. An efficient and predictable implementation of asynchronous event handling in the RTSJ. In Proceedings of the 6th International Workshop on Java Technologies for Real-Time and Embedded Systems (JTRES'08). ACM, New York, 48--57. Google Scholar
Digital Library
- Liu, J. W. 2000. Real-Time Systems. Prentice Hall, Englewood Cliffs, NJ.Google Scholar
- Rivas, M. A. and Harbour, M. G. 2001. MaRTE OS: An Ada kernel for real-time embedded applications. Lecture Notes in Computer Science, vol. 2043, Springer-Verlag, Berlin, Germany, 305--315. Google Scholar
Digital Library
- Schmidt, D. C., O'Ryan, C., Kircher, M., and Pyarali, I. 2000. Leader/Followers—A design pattern for efficient multi-threaded event demultiplexing and dispatching. http://www.cs.wustl.edu/~schmidt/pdf/lf.pdf.Google Scholar
- Wellings, A. J. and Burns, A. 2002. Asynchronous event handling and real-time threads in the real-time specification for Java. In Proceedings of the 8th IEEE Real-Time and Embedded Technology and Applications Symposium. IEEE Computer Society Press, Los Alamitos, CA, 81. Google Scholar
Digital Library
- Welsh, M., Gribble, S. D., Brewer, E. A., and Culler, D. 2000. A design framework for highly concurrent systems. Tech. rep. UCB/CSD-00-1108, EECS Department, University of California, Berkeley, Berkeley, CA. Google Scholar
Digital Library
Index Terms
Efficient asynchronous event handling in the real-time specification for Java
Recommendations
Refactoring Asynchronous Event Handling in the Real-Time Specification for Java
ECRTS '09: Proceedings of the 2009 21st Euromicro Conference on Real-Time SystemsThe primary goal for asynchronous event handling (AEH) in the Real-Time Specification for Java (RTSJ) is to have a lightweight concurrency mechanism. However the RTSJ neither provides a well-defined guideline on how to implement AEH nor requires the ...
Asynchronous event handling in the real-time specification for Java
JTRES '07: Proceedings of the 5th international workshop on Java technologies for real-time and embedded systemsThe Real-Time Specification for Java (RTSJ) is becoming mature. It has been implemented, formed the basis for research and used in serious applications. Some strengths and weaknesses are emerging. One of the areas that require further elaboration is ...
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-...






Comments