Upload
preetam-palwe
View
1.098
Download
0
Embed Size (px)
DESCRIPTION
The presentation on RTSJ, I had given in Aftek Ltd.
Citation preview
RTSJ
Real Time Specification for Java
Real Time
“Real-Time” Does Not Mean “Real Fast” “Scientifically speaking, real-time means the
ability to reliably and predictably reason about and control the temporal behavior of program logic”
Real time control system: sensing, control, and actuation
Why not Java SE ?
Unpredictable latencies introduced by automatic memory management (garbage collectors)
Inadequate scheduling control Unpredictable synchronization delays Very coarse timer support No asynchronous event processing No "safe" asynchronous transfer of control
Features and Benefits
New Real-Time Threads, Scheduling, and Synchronization – Real-time threads
More levels (28) of thread priority and enforced strictly Precise thread scheduling hence no priority inversion
scenario Real time GC
– No-heap real-time threads Uninterruptible by GC Uses immortal and scoped memory
Features and Benefits
New Memory Management Schemes – Immortal memory
Used for life long objects in a process Be cautious while allocating and managing
– Scoped memory Used while a process executes within a particular scope Object creation/deletion within a particular scope
– No GC interference
Features and Benefits
Asynchronous Events Handling & Asynchronous Transfer of Control – Asynchronous event handlers
Responds happenings outside JVM Can schedule a response to happening
– Asynchronous Transfer of Control Thread interruption in safe manner
Features and Benefits
Time & Timers – Nanosecond accuracy– Absolute and relative time
Direct Access to Physical Memory – Write device drivers in java
Requirements
dual UltraSparc III or higher with 512 MB preferred
Solaris 10 Java version 1.4.1 hotspot (for RTS 1.0)
Performance
Non real time – Throughput 85% more than J2SE program
Hard real time– Latency 20 micro seconds – Jitter 10 micro seconds
Applications
RT-CORBA ORB vendors Application Servers Mars Rover The 2006 JavaOne Conference Slot Car
Programming Challenge
Today
Mackinac commercial project by Sun Support for Java SE 5.0, PowerPC, x86 and
various RTOS NetBeans as IDE Current release 1.0.2 (JSR 1) Next release 1.1 (JSR 282)
Tomorrow
In physical systems that make use of RTSJ code, a lot of non-real-time Java code will have to be written as well, another opportunity for Java programmers.
In my opinion, there's no way that the code for the 2009 mission for the Mars Science Laboratory (MSL) will be written in C++. It's just too complex. I think that Java technology is going to be a requirement for that system. …Greg Bollella
Summary
RTSJ is NOT an OS but cleverly uses underneath OS features and provides simple APIs for real time application development
Don’t compare with languages like C/C++
References
http://java.sun.com/javase/technologies/realtime.jsp http://www.rtsj.org/ http://jcp.org/en/home/index (JSR 1 and 182) http://java.sun.com/developer/technicalArticles/Interviews/Bollella_qa2.html http://java.sun.com/developer/technicalArticles/Interviews/Bollella_qa.html http://research.sun.com/projects/mackinac/
Thanks
Preetam Palwe– Aftek Limited