The Real Time Specifications For Java Computer Science Essay

4.1 Introduction

In olden yearss the most Real-time package applications are developed utilizing C and Ada. Due to the drawbacks present in such linguistic communications that is proving, keeping and widen to the other platforms is difficult. Due to the important characteristics of Java such as portability, hardiness and simpleness etc. are forced the real-time system developers to utilize the important advantages of the Java. However due to the draw dorsums of the nucleus Java, chiefly ciphering the worst instance executing clip of Java codification is really hard because of automatic refuse aggregation, lading categories dynamically and method supplication. To get the better of these jobs the API ( Application programming interface ) which provides the functionality of the real-time application development heighten the Java to accommodate to the real-time applications development. This RTSJ ‘s API provides the incremental refuse aggregator and memory direction. These issues are non addressed in the basic Java. This is easing tremendous betterment and improves the suitableness of Java for machine critical applications.

Some of the basic fundamental of the Real-time Specification for Java ( RTSJ ) are discussed in the old chapters. RTSJ is fundamentally dwelling of set of categories which supports the scheduling for Real-time applications. The below figure is shows the basic architecture of the RTSJ.

Fig.4.1.1: Basic architecture of the RTSJ.

4.2 Features of RTSJ

Java RTS is one of the first Real clip execution in commercial existent clip application development and it is addressed the jobs associated with the other existent clip programming linguistic communications that is complexness of the linguistic communication, productiveness and development cost these are major issues in the other existent clip programming linguistic communications.

To get the better of the jobs associated with the normal Java, RTSJ introduced the new constructs which allow developers to develop the existent clip applications utilizing the Java. The major sweetenings are listed below.

RTSJ introduced the new togss for back uping the existent clip development. These are existent clip togss and non heap existent clip togss these togss are non intercept by the Java refuse aggregator. The major maps of these togss are precise scheduling harmonizing the precedence mentioned in the plan without intercepted by refuse aggregator which is most of import map for existent clip application development. The major sweetenings are listed below.

Thread programming

Thread despatching

Memory direction

Synchronism and resource programming

Asynchronous event handling

Asynchronous transportation of control

Asynchronous yarn expiration

Physical memory entree

These major captivations are discussed in the subsequent countries clearly and these characteristics play a major important function in the existent clip application development utilizing the existent clip specifications for Java.

4.3 Real-time Specification for Java

RTSJ is a complete specification for development of predictable real-time Java-based applications. The basic nucleus Java JVM is implemented the two new constructs that are thread precedences and memory country which is significantly effects the Real-time application development. Real-time Specification for Java ( RTJS ) addressed the chief drawbacks which are present in the nucleus Java. The chief issues are weaving theoretical account, a and memory direction and

4.3.1 Types of Java Thread

In Real-time applications deadlines are most of import constructs, because of the refuse aggregator in nucleus Java critical undertakings in Real-time systems lost their of import deadlines. Because of the RTSJ execution for nucleus Java refuse aggregator performs three of import undertakings which are most critical for real-time scheduling, that is

Low-priority undertakings are broad with GC,

High-priority undertakings can non accept uncontrolled preemption latencies by the GC,

Critical undertakings can non digest preemption latencies by the GC [ 4 ]

In Java objected are created in the heap memory, less precedence togss, or normal Java togss, are cases of the java.lang.Thread category. For Real-time applications high precedence and critical togss are most critical elements, to back up this RTJS implemented two new yarn categories. These togss provide the perfect programming and execute the critical undertakings.

RealTimeThread

NoHeapRealTimeThread ( NHRT )

Because of this execution in RTJS, ever highest precedence togss are running. This is most critical component to develop the Real-time applications. The below figure shows the new thread execution for nucleus Java architecture.

& lt ; interface & gt ;

Java.lang.Runnable

Java.lang.Thread

& lt ; interface & gt ;

Schedulable

Schedulable

AsyncEventHandler

RealtimeThread

NoHeapRealtimeThread

Fig.4.3.1.1: New Types of Threads introduced by RTSJ.

4.3.2 NoHeapRealTimeThread

This yarn provides the execution of RealtimeThread Java category, because of this the Java objects are non referenced to the heap memory. When the objects are non referenced to the heap memory the refuse aggregator is non eligible for uncluttering the Java objects because of this characteristic high precedence togss are ever guaranteed the safe executing. NHRT must entree merely the scoped memory or immortal memory ; it can non entree the heap memory any more.

4.3.3 Memory Management

In Real-time applications memory direction is one of the cardinal factors for successful executing of the real-time plans. RTJS has the three memory parts they are

Scoped memory

Immortal memory

Heap memory

We know that in nucleus Java architecture heap memory is to a great extent influenced by the refuse aggregator, because of this ground nucleus Java is non suited for machine critical applications, this is bypassed in the RTSJ execution, this provides the safe memory direction in RTJS.

“ ImmortalMemory is a individual memory country that is shared among all togss. Objects allocated in the immortal memory alive until the terminal of the application. In fact, unlike standard Java pile objects, immortal objects continue to be even after there are no other mentions to them. Importantly, objects in immortal memory are ne’er capable to garbage aggregation ” . ( Ales PLSEK ) [ 4 ] .

Immortal Memory Heap Memory

Scoped Memory Instance

Scope Rearing Relation

Legal Memory mention

Scope A Scope B

Scoped Memory Reference

Physical Memory

Memory Object

Fig.4.3.3.1: Memory countries defined by RTSJ

“ ScopedMemory is an abstract base category for memory countries holding limited life-times. A scoped memory country is valid every bit long as there are real-time togss with entree to it ” ( Ales PLSEK ) [ 4 ] .

4.4 Advantages and Disadvantages of RTSJ

Advantages:

Ability to back up the difficult, soft and non-real clip undertakings in the same application.

Devloppers can foretell executing timings and all other constituents before get downing the procedure.

It has extended libraries.

With the new memory paradigm we can forestall unexpected holds caused by the refuse aggregator.

Because of two new togss we can supply perfect yarn programming and synchronism to the Real-time applications.

We can give clip garentee to the procedure to make its deadlines.

In RTSJ we can acquire asynchronous event handling and reassign control.

In RTSJ application developpers can entree ”physical memory ” straight.

RTSJ can maintain all records of events happened, so developpers can cancel unwanted events when of all time they want.

Disadvantage:

Complexity of the RTSJ execution.

Because of the three types of memory country complexness for the developer point of position.

RTSJ can non back up ”debugging ” . For this developpers should different interface called Desktop because RTSJ got pick of pluggable engineering.

4.5 Real-time JVMs

To utilize the RTJS for Real-time application development, java practical machine has to implement the RTJS application programming interface. There are many commercial RT-JVMs are available.

Name of the JVM

Beginning

TimeSys RTSJ Reference Implementation

www.timesys.com.

Java RTS Sun Java SE Real-time ( Java RTS ) .

hypertext transfer protocol: //java.

sun.com/javase/technologies/realtime/rts/ .

IBM WebSphere Real Time

www.ibm.com/software/webservers/realtime/ .

OVM

hypertext transfer protocol: //www.ovmj.org

JamaicaVM implements RTSJ and a deterministic refuse aggregator

hypertext transfer protocol: //www.aicas.com/jamaica.html.

jRate ( Java Real-Time Extension )

hypertext transfer protocol: //jrate.sourceforge.net/ .

Aonix PERC

www.aonix.com/perc.

aJ100

www.ajile.com.

JRockit Real-Time JRockit

World Wide Web.

oracle.com/jrockit.

IBM/Apogee Aphelion

hypertext transfer protocol: //www.apogee.com/