skip to main content
10.1145/958420.958431acmconferencesArticle/Chapter ViewAbstractPublication PagesadaConference Proceedingsconference-collections
Article

A practical comparison between Java and Ada in implementing a real-time embedded system

Published:07 December 2003Publication History

ABSTRACT

This paper presents a student's observations from an undergraduate research project that explored using Java to implement the software for a real-time embedded system that was originally implemented in a university-level real-time systems course using Ada 95. It briefly gives an overview of the project, the decision made concerning which Java virtual machine to use, and how that virtual machine performed in the real-time environment. It then goes into detail about the merits and drawbacks of using Java to implement real-time and embedded systems such as this one and how using Java to implement them compares with using Ada.

References

  1. Bergmann, Joe. Safety Critical JSR Draft 2 R3. The Open Group. http://www.opengroup.org/rtforum/uploads/40/2932/SafteyCriticalJSRDraft2_r3.doc (accessed on 20 Sep 2003).Google ScholarGoogle Scholar
  2. Bollella, Gregory (ed.). The Real-Time Specification for Java. Addison-Wesley, Boston, MA, 2000.Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. Brosgol, Benjamin M. "A Comparison of the Concurrency and Real-Time Features of Ada 95 and Java.'' SIGAda '98 Proceedings. Association for Computing Machinery, Inc., 1998, 175--192. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. Burns, Alan, and Andy Wellings. Real-Time Systems and Programming Languages. Pearson Education Limited, New York, NY, 2001. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. Developer's Guide to Simple Real Time Java. RTJ Computing Pty. Ltd. http://rtjcom.com/files/simplertj-1.4.0-doc.zip (accessed on 20 Sep 2003).Google ScholarGoogle Scholar
  6. DoubleTalk Voice Synthesizers. RC Systems, Inc. http://www.rcsys.com/dt.htm (accessed on 10 Aug 2003).Google ScholarGoogle Scholar
  7. Ada 95 Reference Manual. Intermetrics, Inc., Cambridge, MA, 1995. International Standard ISO/IEC 8652:1995.Google ScholarGoogle Scholar
  8. Joy, Bill (ed.). The Java Language Specification, Second Edition. Addison Wesley, Boston, MA, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. MaRTE OS Home Page. http://marte.unican.es/ (accessed on 11 Aug 2003).Google ScholarGoogle Scholar
  10. Real-Time Core Extensions. J Consortium, Cupertino, CA, 2000. http://www.j-consortium.org/rtjwg/rtce.1.0.14.pdf (accessed on 20 Sep 2003)Google ScholarGoogle Scholar
  11. Real-Time Embedded Systems Lab. Computer Science Department, University of Northern Iowa. http://www.cs.uni.edu/mccormic/RealTime/ (accessed on 10 Aug 2003).Google ScholarGoogle Scholar
  12. Real-Time Java. Real-Time for Java Expert Group. http://www.rtj.org/ (accessed on 10 Aug 2003).Google ScholarGoogle Scholar
  13. Simple Real Time Java, The. RTJ Computing Pty. Ltd. http://www.rtjcom.com/ (accessed on 10 Aug 2003).Google ScholarGoogle Scholar
  14. Source For Java Technology, The. Sun Microsystems, Inc. http://java.sun.com/ (accessed on 11 Aug 2003).Google ScholarGoogle Scholar
  15. TimeSys Java - Reference Implementation. TimeSys. http://www.timesys.com/index.cfm?hdr=java_header.cfm&bdy=java_bdy_ri.cfm (accessed on 7 Sep 2003).Google ScholarGoogle Scholar
  16. Welcome to Ada Core Technologies. Ada Core Technologies. http://www.gnat.com/ (accessed on 10 Aug 2003).Google ScholarGoogle Scholar

Index Terms

  1. A practical comparison between Java and Ada in implementing a real-time embedded system

                  Recommendations

                  Reviews

                  Chenglie Hu

                  Undergraduate research on real-time control, using a model railway system at the University of Northern Iowa, is described in this paper. In lieu of the typical Ada implementation for such an embedded system, Java was used, with a scaled-down runtime known as SimpleRTJ, supporting Java Development Kit (JDK) 1.1. Two main benefits of using Java were identified: Java supports direct execution of the machine code (as opposed to interpretation of the bytecode) when a native method is called, and Java has direct support for concurrency, although this is a weakness when using native methods. The drawbacks of using Java were also identified in several areas. First, as opposed to Ada, Java does not support declaring entry conditions on synchronized methods, which makes producing entry barriers more complicated, by requiring the careful arrangement of algorithms coordinating the behaviors of the low-level Java thread methods wait , notify , and notifyall . Moreover, implementing multiple entry barriers based on these thread methods generally requires more threads to be awakened when an entry condition becomes true than are actually waiting on the condition. This situation imposes extra processing overhead due to context switching, especially when the system must manage a large number of threads. Second, Java does not support thread scheduling based on task priorities and does not address priority inversion, where resource utilization causes a lower priority thread to block a higher priority one. Third, for life-critical embedded systems where dynamic memory management is prohibited, Java is disqualified. Fourth, Java's bit-shifting operations do not support conveniently mapping the components of a record (class) onto the bits of a byte or word that would be used to internally represent the record. Fifth, a particular Java runtime (such as SimpleRTJ) may not provide checks on necessary initializations to ensure that unintended results are not produced when circular package dependencies are present. The paper certainly provides a valuable reference on how Java performs for implementing real-time systems. However, it would be more productive to refine the languages that are more typically used for real-time programming (such as C and Ada) in the first place, rather than making Java (fundamentally designed for different purposes) work better in real-time programming environments, which is the goal of some real-time Java working groups. Online Computing Reviews Service

                  Access critical reviews of Computing literature here

                  Become a reviewer for Computing Reviews.

                  Comments

                  Login options

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

                  Sign in
                  • Published in

                    cover image ACM Conferences
                    SigAda '03: Proceedings of the 2003 annual ACM SIGAda international conference on Ada: the engineering of correct and reliable software for real-time & distributed systems using ada and related technologies
                    December 2003
                    96 pages
                    ISBN:1581134762
                    DOI:10.1145/958420
                    • cover image ACM SIGAda Ada Letters
                      ACM SIGAda Ada Letters  Volume XXIV, Issue 1
                      Proceedings of the ACM SIGAda annual international conference
                      March 2004
                      83 pages
                      ISSN:1094-3641
                      DOI:10.1145/992211
                      Issue’s Table of Contents

                    Copyright © 2003 ACM

                    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

                    Publisher

                    Association for Computing Machinery

                    New York, NY, United States

                    Publication History

                    • Published: 7 December 2003

                    Permissions

                    Request permissions about this article.

                    Request Permissions

                    Check for updates

                    Qualifiers

                    • Article

                  PDF Format

                  View or Download as a PDF file.

                  PDF

                  eReader

                  View online with eReader.

                  eReader