1 / 34

Real-Time Java Fact-no-fiction Java in technical automation

Real-Time Java Fact-no-fiction Java in technical automation. Paul Wijntjes Consultant Turnkiek Technical Systems. Contents. Introduction Java in embedded Real Time Java Demonstrator. Offices in: Amersfoort Delft Eindhoven. R &D. Traffic & Transport. Inproduct sw. Productie Bdr.

walt
Download Presentation

Real-Time Java Fact-no-fiction Java in technical automation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Real-Time JavaFact-no-fictionJava in technical automation Paul Wijntjes Consultant Turnkiek Technical Systems

  2. Contents • Introduction • Java in embedded • Real Time Java • Demonstrator

  3. Offices in: • Amersfoort • Delft • Eindhoven

  4. R &D Traffic & Transport Inproduct sw Productie Bdr. Java V&S systemen Defense Embedded Prod. Autom. Advanced machines Microsoft Network Comp Utilities Unix /Linux Telecom Mission statement: • Early adopter • Quality solutions • Cost effective and future aimed • In technical industrial & scientific market • Reliable and valued partner • Give the customer peace of mind • Commitment = commitment • Small things matter • Treat and respect people as people Market segments Service areas. Platforms

  5. Contents • Introduction • Java in embedded • Real Time Java • Demonstrator

  6. YEAR 2010 Number of subscribers/units (millions) People Automobiles Bicycle Portable PCs Motorcycles, Boats, Vending Machines etc Pets (dogs and cats etc) 120 100 60 50 10 20 360 Total Forecast by DoCoMo based on “Trends in Household Consumption” by Economic Planning Agency, and published materials by Japan Pet Food Manufacturer’s Association etc Not only people

  7. JavaTM 2 Platform ??? Pro File Pro File Pro File Pro File Pro File Pro File Pro File Pro File Pro File Profiles J2EE APIs J2SE APIs J2ME APIs Configu- rations Java Virtual Machine Hardware / Operating System Thanks to Chris Laffra, OTI

  8. Why Java in Embedded ? • More reliable • More productive • Object oriented • High level • Component model • Inherent networking • Less porting effort (if any) • Machine code skills deteriorating Descartes

  9. Evolution -> Revolution -2 y now +2 y SE ME EE

  10. Contents • Introduction • Java in embedded • Real Time Java • Demonstrator

  11. Yes, but……What about Real-Time?

  12. Specification • J-Consortium, RTJWG • NewMonics, HP, Microsoft, Aonix,... • JCP, JSR-0000001 • Specs • Reference implementation • Test suite • Expected Q4-2001

  13. Guiding Principles • Applicability to particular Java environments • Backward compatibility • Write once, run anywhere • Current practice versus advanced future features • Predictable execution • No syntactic extension

  14. RTSJ: 8 modified areas 1. Thread scheduling and dispatching 2. Memory management 3. Synchronization and resource sharing 4. Physical memory access 5. Asynchronous event handling 6. Asynchronous transfer of control 7. Asynchronous thread termination 8. Exceptions

  15. 1. Thread scheduling and dispatching • Introduction of class RealTimeThread • Predictable execution • Unanticipated scheduling algorithms can be used • Preemptive, Priority-based, FIFO within priority with at least 28 unique priority levels

  16. Priority Rt-thread GC Rt-thread Pipe Java thread Time How does it work?

  17. 2. Memory management • Garbage collection • Basic memory areas • Scoped memory • Physical memory • Immortal memory • Heap memory

  18. 3. Synchronisation and resource sharing • Prevent priority inversion • Monitor behavior policy can be set per object. • Determinisme

  19. Priority inheritance Priority Thread 2 Lock Thread 1 Unlock Object Lock Time

  20. 4. Physical memory access • Byte-level access to physical memory • Construction of objects in physical memory

  21. 5. Asynchronous event handling • Two classes • AsyncEvent • AsynchEventHandler • Implemented scheduler for execution

  22. AsyncEvent (how it works) bindTo() Real world event Handler implements Schedulable and Runnable interfaces. AsyncEvent addHandler() abstract class AsyncEventHandler: run() // final handleAsyncEvent() getAndDecrementPendingFireCount()

  23. 6. Asynchronous transfer of control (ATC) • Execution transfer • Time bound • ATC and asynchronous event handling can be combined.

  24. 7. Asynchronous thread termination • Safely transfer of control • New mechanism for stopping threads

  25. 8. Exceptions • New several exceptions • New treatment of exceptions • asynchronous transfer of control • memory allocation

  26. Implementations • TimeSys, reference implementation JSR-1 • OTI/IBM J9 • Esmertec, JBed • Insignia Solutions, Jeode • aJile Systems

  27. Contents • Introduction • Java in embedded • Real Time Java • Demonstrator

  28. Real time demonstrator

  29. Architecture Application OTI’s J9 + Real-Time Extensions JNI QNX Neutrino Drivers PC 104 board motorcontrolers

  30. Visual Age Micro Edition Trace analyzer Memory analyzer After running 3 threads “simultaneously”

  31. Lessons learned • Real-Time Java is Really Real-Time • Implementation of specs not complete • OTI’s J9 and VAME work very well

  32. Summary • Expected exponential growth in J2ME applications • Real-Time Java nearly final • It’s time to make plans to use Real Time Java

  33. More information • java.sun.com • www.rtj.org • www.drtsj.org • www.embedded.oti.com • www.turnkiek.nl • wijntjes@turnkiek.nl

  34. Thank you For your time and attention

More Related