Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enhancements to Java for Real Time Systems Theresa Dsena CSE 666 - Fall 2006 Prof. Ganesan.

Similar presentations


Presentation on theme: "Enhancements to Java for Real Time Systems Theresa Dsena CSE 666 - Fall 2006 Prof. Ganesan."— Presentation transcript:

1 Enhancements to Java for Real Time Systems Theresa Dsena CSE 666 - Fall 2006 Prof. Ganesan

2 CSE 666 - Fall 20062 16/10/06 Contents Limitations of Standard Java Overview of RTSJ Guiding Principles of RTSJ Enhancements to Standard Java Concluding notes on RTSJ

3 CSE 666 - Fall 20063 16/10/06 Limitations of Standard Java Major Weakness  Garbage Collection The garbage collector de-allocates objects from the memory heap in no particular order. This non-deterministic behavior could interrupt application execution for unpredictable intervals of time  Thread Scheduling The JVM (Java Virtual Machine) relies on the host operating systems thread scheduler. The operating system must be capable of real-time scheduling

4 CSE 666 - Fall 20064 16/10/06 Overview of RTSJ The Real Time for Java Experts Group (RTJEG) has been developing Real Time Specification for Java (RTSJ) since 1999 under the Java community process RTSJ specifies enhancements to standard Java, specifically for JVM and creation of real time API

5 CSE 666 - Fall 20065 16/10/06 Guiding Principles of RTSJ Applicability to all Java environments Backward compatibility Write once, run anywhere Current real time practices and future implementations Priority to predictable execution

6 CSE 666 - Fall 20066 16/10/06 Enhancements to Standard Java Thread scheduling and dispatching Memory management Thread synchronization Asynchronous event handling Asynchronous transfer of control Asynchronous thread termination Physical memory access

7 CSE 666 - Fall 20067 16/10/06 Enhancements to Standard Java - Thread Scheduling RTSJ requires a base scheduler that provides  Preemptive and priority based execution  A minimum of 28 unique priorities Define classes for execution eligibility and schedule feasibility

8 CSE 666 - Fall 20068 16/10/06 Enhancements to Standard Java - Memory Management Garbage collection in standard Java is unsuitable for real-time threads RTSJ introduces the concept of memory areas  Heap memory – Standard Java heap  Immortal memory – Shared among threads  Scoped memory – For objects with a well- defined lifetime

9 CSE 666 - Fall 20069 16/10/06 Enhancements to Standard Java – Thread synchronization Priority queuing on synchronized blocks Implementation of Java keyword Synchronized includes algorithm for priority inversion Wait free queues

10 CSE 666 - Fall 200610 16/10/06 Enhancements to Standard Java – Asynchronous event handling Real time application must respond to asynchronous real world events RTSJ includes  Asynchronous events  Asynchronous event handlers

11 CSE 666 - Fall 200611 16/10/06 Enhancements to Standard Java – Asynchronous thread termination Drastic and asynchronous changes in the real world may require a java thread to safely transfer its control and terminate RTSJ includes thread interruption with Asynchronous Transfer of Control (ATC) thread handlers

12 CSE 666 - Fall 200612 16/10/06 Enhancements to Standard Java – Physical memory address RTSJ includes direct access to physical memory  A class that allows programmers byte level access to physical memory  A class that allows creation of objects in physical memory

13 CSE 666 - Fall 200613 16/10/06 Concluding notes Java’s main problem for use in real time applications is unsuitable memory management RTSJ originated from the desire to use Java in real time applications Real time Java is emerging

14 CSE 666 - Fall 200614 16/10/06 References http://www.rtsj.org http://www.itl.nist.gov/div897/ctg/real-time http://www.developer.com/java http://www.cs.cmu.edu/~nbeckman

15 Thank You


Download ppt "Enhancements to Java for Real Time Systems Theresa Dsena CSE 666 - Fall 2006 Prof. Ganesan."

Similar presentations


Ads by Google