15
RTSJ Real Time Specification for Java

RTSJ

Embed Size (px)

DESCRIPTION

The presentation on RTSJ, I had given in Aftek Ltd.

Citation preview

Page 1: RTSJ

RTSJ

Real Time Specification for Java

Page 2: RTSJ

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

Page 3: RTSJ

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

Page 4: RTSJ

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

Page 5: RTSJ

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

Page 6: RTSJ

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

Page 7: RTSJ

Features and Benefits

Time & Timers – Nanosecond accuracy– Absolute and relative time

Direct Access to Physical Memory – Write device drivers in java

Page 8: RTSJ

Requirements

dual UltraSparc III or higher with 512 MB preferred

Solaris 10 Java version 1.4.1 hotspot (for RTS 1.0)

Page 9: RTSJ

Performance

Non real time – Throughput 85% more than J2SE program

Hard real time– Latency 20 micro seconds – Jitter 10 micro seconds

Page 10: RTSJ

Applications

RT-CORBA ORB vendors Application Servers Mars Rover The 2006 JavaOne Conference Slot Car

Programming Challenge

Page 11: RTSJ

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)

Page 12: RTSJ

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

Page 13: RTSJ

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++

Page 14: RTSJ

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/

Page 15: RTSJ

Thanks

Preetam Palwe– Aftek Limited