Sriram Ananthanarayanan - PowerPoint PPT Presentation

1 / 17
About This Presentation
Title:

Sriram Ananthanarayanan

Description:

Mark-Sweep. Mark-Compact. Copying Algorithms. Different ... Metronome. Goals. Detailed Analysis of RTSJ including design issues, advantages, disadvantages ... – PowerPoint PPT presentation

Number of Views:96
Avg rating:3.0/5.0
Slides: 18
Provided by: sriramanan
Category:

less

Transcript and Presenter's Notes

Title: Sriram Ananthanarayanan


1
Issues in Real-Time Java DesignCOSC
6384Instructor Dr. Albert Cheng
  • Sriram Ananthanarayanan
  • April 14, 2005

2
Outline
  • Where Java falls short
  • RTSJ
  • Implementations
  • RTJPerf
  • Problems with RTSJ
  • Garbage Collection
  • Goals
  • References

3
Where Java falls short
  • Traditional Java not appropriate for development
    of real-time software
  • Garbage Collection
  • In real-time systems it is important that memory
    is available always
  • Garbage Collection runs as a low priority
    background process
  • Can impose long delays
  • JRE does not allow applications to determine how
    much memory they require and total memory
    available

4
Where Java falls short
  • Task Scheduling
  • No mechanism for scheduling tasks
  • No way to determine other tasks running on the
    system and their priorities
  • Lack of Support for Predictability
  • WCET Analysis
  • Scheduling Analysis
  • Periodic processes
  • Priority Inversion

5
RTSJ
  • Requirements
  • Backward Compatibility with non real-time Java
    programs
  • Support the principle Write Once Run Anywhere
    but not at the expense of predictability
  • Requires no syntactic extensions to Java Language
  • Scheduling
  • No guarantee that highest priority runnable
    thread will always execute
  • Defines only 10 priority levels
  • Weak definition of scheduling
  • Lacks predictability

6
RTSJ
  • Scheduling
  • Allow new schedulers other than Timer class
  • Provide a Priority Scheduler
  • Provision for adding more schedulers
  • Memory Management
  • Garbage Collection
  • Elminate GCs effect on real-time threads
  • Different types of memories
  • Scoped Memory
  • Physical Memory
  • Immortal Memory
  • Heap Memory

7
RTSJ
  • Synchronization
  • To maintian proper behavior based on execution
    rules
  • Thread executes in the order of execution
    eligibilty
  • FIFO when the eligibilities are equal
  • Real-time features not in Java
  • Asynchronous Event Handling
  • Asynchronous Transfer of Control
  • Asynchronous Thread Termination
  • Physical Memory Access

8
Implementations
  • Several Implementations
  • Timesys RTSJ RI
  • Official Implementation of RTSJ Reference
    Implementation
  • CVM
  • J2ME platform targetted for embedded
    systems
  • jRate
  • Open-Source RTSJ based extension of the
    GNU Compiler for Java

9
Evaluating RTSJ Implementations
  • RTJPerf
  • An open-source benchmarking suite developed at
  • UC Irvine
  • Features evaluated
  • Memory
  • Asynchrony
  • Threads
  • Timer

10
Evaluating RTSJ Implementations
  • Tests that can be performed
  • Allocation Time Test
  • Asynchronous Event Handler Dispatch Delay Test
  • Asynchronous Event Handler Priority Inervsion
    Test
  • Context Switch Test
  • Periodic Thread Test
  • One Short Timer Test

11
Problems with RTSJ
  • Semantics not well defined
  • Adds complexity to the VM
  • Adds complexity to the programming model
  • Alternative Approaches
  • Ravenscar Java
  • JNI
  • Real-Time Core
  • JOP (Java Optimized Processor)

12
Garbage Collection
  • Conservative Garbage Collection Algorithms
  • Reference Counting
  • Mark-Sweep
  • Mark-Compact
  • Copying Algorithms
  • Different requirements for Real-Time Systems
  • GC needs to keep deadlines due to the
    predictability requirement
  • Guarantee that it never exceeds its free memory
  • Handle Memory Fragmentation
  • Not all GC algorithms are schedulable

13
Approach I
  • Revise the Memory Model
  • Define new Memory Areas
  • Scoped Memory
  • Physical Memory
  • Raw Memory
  • Immortal Memory
  • Heap Memory
  • Assignment Rules between different memory areas
    have to be checked by the implementation
  • This approach is followed by RTSJ

14
Approach II
  • Real-Time Garbage Collection
  • Incremental
  • Exact
  • Non-fragmenting
  • Operate as a mid-priority process separating high
    priority hard real time processes from low
    priority soft real time processes
  • Hard upper bounds for execution time of any
    operation
  • Hard upper bound for pre-emption delay

15
Approach II
  • Implementations
  • IVM (Infinitesimal Virtual Machine)
  • Implemented from scratch instead of rewriting an
    existing JVM implementation
  • JVM (Jamaica Virtual Machine)
  • Metronome

16
Goals
  • Detailed Analysis of RTSJ including design
    issues, advantages, disadvantages
  • Evaluate and compare Timesys RI with latest
    version of JDK using RTJPerf
  • Analyze the Real-time Garbage Collection
    algorithms
  • Provide some further extension and scope of
    improvements in design of RTSJ

17
References
  • Evaluating Real-Time Java Feature and Performance
    for Real-time Embedded Systems - Angelo Corsaro,
    Douglas C. Schmidt
  • Implications of Real-Time Garbage Collection in
    Java Anders Ive
  • Adding Real-Time Capabilities to Java - Kevin
    Nelsen
  • Restriction of Java for Embedded Real-Time
    Systems Martin Schoeberl
Write a Comment
User Comments (0)
About PowerShow.com