Real-time Java: Difference between revisions

Content deleted Content added
Dautelle (talk | contribs)
No edit summary
Bender the Bot (talk | contribs)
m HTTP to HTTPS for Cornell University
 
(129 intermediate revisions by 82 users not shown)
Line 1:
{{more footnotes|date=June 2017}}
[[Java programming language|Java]] supported threaded [[programming]] from the very beginning, though had scarce support for synchronization and locking.
{{primary sources|date=June 2017}}
'''Real-time Java''' is a catch-all term for a combination of technologies that enables programmers to write [[computer program|program]]s that meet the demands of [[real-time computing|real-time]] [[systems]] in the [[Java (programming language)|Java programming language]].
 
Java's sophisticated [[memory management]], native support for [[thread (computing)|threading]] and concurrency, [[type safety]], and relative simplicity have created a demand for its use in many domains. Its capabilities have been enhanced to support real-time computational needs:
==Real Time System?==
It was not immediately suitable for [[Real time]] systems for two reasons:
 
* Real-time Java supports a strict [[preemption (computing)|priority-based]] [[thread (computing)|threading]] model,
* The threading behavior was largely unspecified. This, reputedly, was a concession to [[Microsoft]] to allow for the weak threading models underlying the [[Microsoft Windows]] operating system at the time.
* because Java threads support priorities, Java [[lock (computer science)|locking]] mechanisms support [[priority inversion]] avoidance techniques, such as [[priority inheritance]] or the [[priority ceiling protocol]], and
* event handling.
 
The initial proposal<ref>{{Cite web| title=Issues in the Design and Implementation of Real-Time Java | url=https://www.cs.cornell.edu/courses/cs614/1999sp/papers/rtji.pdf | archive-url=https://web.archive.org/web/20170809011950/http://www.cs.cornell.edu/courses/cs614/1999sp/papers/rtji.pdf | archive-date=2017-08-09}}</ref> for an open standard for real-time Java was put forth by Kelvin Nilsen, then serving as a research faculty member at Iowa State University. A follow-on overview paper was published in the ''[[Communications of the ACM]]''.<ref>{{cite journal | url=https://dl.acm.org/doi/abs/10.1145/276609.276619 | doi=10.1145/276609.276619 | title=Adding real-time capabilities to Java | date=1998 | last1=Nilsen | first1=Kelvin | journal=Communications of the ACM | volume=41 | issue=6 | pages=49–56 }}</ref> The overwhelmingly positive response to these early proposals resulted in a series of meetings hosted by the National Institute of Standards and Technology in an effort to establish an open standard for real-time Java. NIST was ultimately told that they were not the appropriate body to establish standards related to the Java language, as Java was trademarked, and the technologies were owned by Sun Microsystems. Therefore, NIST ended their efforts with publication of consensus requirements.<ref>{{cite journal | url=https://www.itl.nist.gov/div897/ctg/real-time/rtj-final-draft.pdf | title=Information Technology Laboratory | journal=NIST | date=28 April 2015 }}</ref> that could be considered by future standardization efforts to be hosted by Sun Microsystems.
* Still, there is only one synchronization primitive available for [[Lock (software engineering)]], the [[Monitor (synchronization)]] pattern, meaning that only code sections can be guarded, not data.
 
When the [[Java Community Process|Java Community]] was formed, the very first effort was the specification for real-time Java, JSR001. A number of implementations of the resulting ''Real-time specification for Java'' (''RTSJ'') have emerged, including a [[reference implementation (computing)|reference implementation]] from [[TimeSys|Timesys]], [[IBM]]'s WebSphere Real Time, [[Sun Microsystems]]'s Java SE Real-Time Systems,<ref>{{Cite web|url=http://java.sun.com/javase/technologies/realtime/index.jsp|title=Sun Java Real-Time System|website=java.sun.com}}</ref> PTC Perc from [[PTC, Inc.]],<ref>{{Cite web|url=http://www.ptc.com/developer-tools/perc|title=Real-Time Java with PTC Perc &#124; PTC}}</ref> or [[JamaicaVM]] from aicas.
* More critically, the [[garbage]] collector behavior introduces unbounded delays in [[computation]], immediately destroying any chance of making real-time guarantees for programs written in Java.
 
The RTSJ addressesaddressed the critical issues by mandating a minimum specification for the threading model (and allowing other models to be plugged into the VM) and by providing for areas of [[memory]] that are not subject to garbage collection, along with threads that are not preemptable by the garbage collector. These areas are instead managed using [[region-based memory management]]. The latest specification, 2.0, supports direct device access and deterministic garbage collection as well.
==The Java Programming Language==
Because Java is such an elegant language for [[programming]], and because it supports [[threading]] generally and several [[language]] features that promote correcntness, it is a good prospect for real-time systems. To produce a specification for Java that would allow its use in such environments, [[JSR001]] was created. As of 2005, a number of implementations of the resulting Real-Time Specification for Java (RTSJ) have emerged, including a reference implementation [[Timesys]],and a full fledged product from [[Sun Microsystems]].
 
==Real-Time Specification for Java==
The RTSJ addresses the critical issues by mandating a minimum specification for the threading model (and allowing other models to be plugged into the VM) and by providing for areas of [[memory]] that are not subject to garbage collection, along with threads that are not preemptable by the garbage collector.
The ''Real-Time Specification for Java'' (RTSJ) is a set of [[Interface (computer science)|interface]]s and behavioral refinements that enable real-time [[computer programming]] in the [[Java (programming language)|Java programming language]]. RTSJ 1.0 was developed as JSR 1 under the [[Java Community Process]], which approved the new standard in November, 2001. RTSJ 2.0 is being developed under JSR 282. A draft version is available at a JCP page.<ref>https://www.jcp.org/en/jsr/detail?id=282 JSR 282</ref> More information can be found from Aicas.<ref>{{Cite web | title=Real-Time Specification for Java {{!}} aicas.com | url=https://www.aicas.com/cms/rtsj | archive-url=https://web.archive.org/web/20150526085240/https://www.aicas.com/cms/rtsj | access-date=2025-02-17 | archive-date=2015-05-26}}</ref>
 
In addition, many other enhancements to the Java system have been included resulting in a specification that provides realistic support for writing real-time systems in Java.
 
==See also==
* [[Javolution]] - Real-TimeRTSJ Compliant Java Library ([[open-source]])
 
==References==
{{Reflist}}
 
==External links==
*[[Javolution]] - Real-Time Java Library ([[open-source]])
* [https://www.cs.cornell.edu/courses/cs614/1999sp/papers/rtji.pdf Issues in the Design and Implementation of Real-Time Java]
* [https://dl.acm.org/doi/abs/10.1145/276609.276619 Adding Real-Time Capabilities to Java]
* [https://www.itl.nist.gov/div897/ctg/real-time/rtj-final-draft.pdf Requirements for Real-Time Extensions for the Java Platform]
* [http://aicas.com/cms/en/rtsj Real-Time Specification for Java 2.0 (RTSJ 2.0)]
* [http://jcp.org/en/jsr/detail?id=282 JSR-282]
* [http://www.rtsj.org/ Real-Time Specification for Java (RTSJ)]
* [http://jcp.org/en/jsr/detail?id=1 JSR-1]
* [https://web.archive.org/web/20090130041631/http://www-03.ibm.com/linux/realtime.html IBM WebSphere Real Time] a fully conformant RTSJ SE VM
* [http://www.aicas.com/jamaica.html JamaicaVM] {{Webarchive|url=https://web.archive.org/web/20120229051714/http://www.aicas.com/jamaica.html |date=2012-02-29 }} an RTSJ SE implementation with deterministic garbage collection
* [http://www.ptc.com/developer-tools/perc PTC Perc] a real-time VM based on Java Standard Edition but with a patented deterministic garbage collection technology rather than RTSJ
* [http://www.oracle.com/technetwork/java/javase/tech/index-jsp-139921.html Sun Java SE Real-Time System]
* [http://www.apogee.com/ Apogee real-time Java with real-time GC (discontinued)]
* [http://www.timesys.com/java/ Timesys RTSJ implementation and testing toolkit]
* [https://jrate.sourceforge.net/ jRate (Java Real-Time Extension)] an open-source extension of the GNU GCJ compiler front-end and runtime system which adds support for most of the features required by the RTSJ.
* [http://www.cs.purdue.edu/homes/jv/JTRES05/index.html International Workshop on Java Technologies for Realtime and Embedded Systems (JTRES 2005)] {{Webarchive|url=https://web.archive.org/web/20130831081730/http://www.cs.purdue.edu/homes/jv/JTRES05/index.html |date=2013-08-31 }} [http://www-users.cs.york.ac.uk/~andy/JTRES06/ JTRES 2006] [http://www.vmars.tuwien.ac.at/jtres2007/ JTRES 2007] {{Webarchive|url=https://web.archive.org/web/20120206032740/http://www.vmars.tuwien.ac.at/jtres2007/ |date=2012-02-06 }} [http://jtres.java.sun.com/2008/ JTRES 2008] {{Webarchive|url=https://web.archive.org/web/20080628074409/http://jtres.java.sun.com/2008/ |date=2008-06-28 }} [http://pan.vmars.tuwien.ac.at/jtres2009/ JTRES 2009] {{Webarchive|url=https://web.archive.org/web/20150714214039/http://pan.vmars.tuwien.ac.at/jtres2009/ |date=2015-07-14 }} [http://d3s.mff.cuni.cz/conferences/jtres2010/ JTRES 2010] [http://www.artist-embedded.org/artist/JTRES-2011.html JTRES 2011] [http://jtres2013.atego.com/ JTRES 2012] {{Webarchive|url=https://web.archive.org/web/20131007110627/http://jtres2013.atego.com/ |date=2013-10-07 }} [http://jtres2013.atego.com/ JTRES 2013] {{Webarchive|url=https://web.archive.org/web/20131007110627/http://jtres2013.atego.com/ |date=2013-10-07 }} [http://jtres2014.compute.dtu.dk/ JTRES 2014] [http://jtres2015.univ-mlv.fr/ JTRES 2015]
* [https://git.cs.lth.se/ljrt/ljrtcompiler LJRT Lund Java based Real-Time open source]
* {{usurped|1=[https://web.archive.org/web/20110106194536/http://www.ovmj.net/ Ovm]}}
* {{usurped|1=[https://web.archive.org/web/20090714105647/http://www.fiji-systems.com/ Fiji VM real-time Java ]}}
* [https://rtjava.blogspot.com/2009/07/real-time-java-vms.html Real-time Java VMs ]
 
[[Category:Java (programming language)]]
[[Category:Real-time computing]]