skip to main content
research-article

Efficient asynchronous event handling in the real-time specification for Java

Published:27 August 2010Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle Scholar
  2. 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 ScholarGoogle Scholar
  3. Corsaro, A. 2004. Techniques and patterns for safe and efficient real-time middleware. Ph.D. dissertation, Washington University, St. Louis, MO. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle Scholar
  5. 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 ScholarGoogle Scholar
  6. Dibble, P. 2002. Real-Time Java Platform Programming. Sun Microsystems, CA. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. Liu, J. W. 2000. Real-Time Systems. Prentice Hall, Englewood Cliffs, NJ.Google ScholarGoogle Scholar
  10. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 ScholarGoogle Scholar
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Efficient asynchronous event handling in the real-time specification for Java

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader
      About Cookies On This Site

      We use cookies to ensure that we give you the best experience on our website.

      Learn more

      Got it!