Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.

Slides:



Advertisements
Similar presentations
Portability and Safety Mahdi Milani Fard Dec, 2006 Java.
Advertisements

Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
Chorus and other Microkernels Presented by: Jonathan Tanner and Brian Doyle Articles By: Jon Udell Peter D. Varhol Dick Pountain.
Lab#1 (14/3/1431h) Introduction To java programming cs425
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
The Java Language. Topics of this Course  Introduction to Java  The Java Language  Object Oriented Programming in Java  Exceptions Handling  Threads.
Chapter 13 Embedded Systems
got ? Research Project – April 1998 Hang Xia, Mark Wang, Richard S. Chang Updated: R Norman, August 1999.
Java: History and Introduction (Lecture # 1). History… Java – Based on C and C++ – Developed in 1991 for intelligent consumer electronic devices – Green.
Java for High Performance Computing Jordi Garcia Almiñana 14 de Octubre de 1998 de la era post-internet.
JETT 2003 Java.compareTo(C++). JAVA Java Platform consists of 4 parts: –Java Language –Java API –Java class format –Java Virtual Machine.
Chapter 13 Embedded Systems
JVM-1 Introduction to Java Virtual Machine. JVM-2 Outline Java Language, Java Virtual Machine and Java Platform Organization of Java Virtual Machine Garbage.
For more Lectures and Notes Visit
CS884 (Prasad)Java Goals1 “Perfect Quote” You know you've achieved perfection in design, Not when you have nothing more to add, But when you have nothing.
1 I/O Management in Representative Operating Systems.
Chapter 10 Application Development. Chapter Goals Describe the application development process and the role of methodologies, models and tools Compare.
1 Software Testing and Quality Assurance Lecture 31 – SWE 205 Course Objective: Basics of Programming Languages & Software Construction Techniques.
© Andy Wellings, 2004 Roadmap  Introduction  Concurrent Programming  Communication and Synchronization  Completing the Java Model  Overview of the.
Copyright Arshi Khan1 System Programming Instructor Arshi Khan.
Introduction to Java.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Introduction to Java Programming. Contents 1. Java, etc. 2. Java's Advantages 3. Java's Disadvantages 4. Types of Java Code 5. Java Bytecodes 6. Steps.
JAVA v.s. C++ Programming Language Comparison By LI LU SAMMY CHU By LI LU SAMMY CHU.
Introduction to Java CSIS 3701: Advanced Object Oriented Programming.
Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
Java Beserkers Group 4. Start of Java Development began on June of 1991 by a group of computer scientist at the Sun Mircrosystems Company Development.
JIT in webkit. What’s JIT See time_compilation for more info. time_compilation.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
Why Java? A brief introduction to Java and its features Prepared by Mithat Konar.
Computer Programming 12 Mr. Jean March 19 th, 2013.
Compilation Technology © 2007 IBM Corporation CGO Performance Overheads In Real-Time Java Programs Mark Stoodley and Mike Fulton Compilation.
Real-Time Java on JOP Martin Schöberl. Real-Time Java on JOP2 Overview RTSJ – why not Simple RT profile Scheduler implementation User defined scheduling.
University of Houston-Clear Lake Proprietary© 1997 Evolution of Programming Languages Basic cycle of improvement –Experience software difficulties –Theory.
Chapter 3.5 Memory and I/O Systems. 2 Memory Management Memory problems are one of the leading causes of bugs in programs (60-80%) MUCH worse in languages.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
CPRG 215 Introduction to Object-Oriented Programming with Java Module 1-Introduction to Java Topic 1.1 Basics of Java Produced by Harvey Peters, 2008 Copyright.
Silberschatz, Galvin and Gagne  2002 Modified for CSCI 399, Royden, Operating System Concepts Operating Systems Lecture 7 OS System Structure.
Enhancements to Java for Real Time Systems Theresa Dsena CSE Fall 2006 Prof. Ganesan.
Reference: Ian Sommerville, Chap 15  Systems which monitor and control their environment.  Sometimes associated with hardware devices ◦ Sensors: Collect.
Java Security Model For Mobile Code Abdo Achkar. Mobile Code A mobile object is a “self contained piece” of executable code. Definition:  Code that can.
What Is Java? According to Sun in a white paper: Java: A simple, object-oriented, network-savvy, interpreted, robust, secure, architecture-neutral, portable,
1 G53SRP: Introduction to Real Time Specification for Java (RTSJ) Chris Greenhalgh School of Computer Science Including material © Andy Wellings from his.
EEL The Real-Time Specification for Java (1)
Computer Programming 2 Why do we study Java….. Java is Simple It has none of the following: operator overloading, header files, pre- processor, pointer.
Challenges and Solutions for Embedded Java Michael Wortley Computer Integrated Surgery March 1, 2001.
CSCI1600: Embedded and Real Time Software Lecture 18: Real Time Languages Steven Reiss, Fall 2015.
Java – in context Main Features From Sun Microsystems ‘White Paper’
Introduction to Programming 1 1 2Introduction to Java.
Language Based Operating Systems by Sean Olson What is a virtual machine? What is managed code? Kernels. Memory and security models. What is a language.
Lesson 2: First Java Programs. 2.1 Why Java? Java is one of the most popular programming languages in the world. Java is a modern object-oriented programming.
JAVA TRAINING IN NOIDA. Introduction to Java:  Java training in noida is a general-purpose computer programming language that is concurrent, class-based,
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
(Not too) Real-Time JVM (Progress Report)
Introduction to Operating Systems Concepts
Object Oriented Programming in
Before You Begin Nahla Abuel-ola /WIT.
Chapter 1 Introduction to Computers, Programs, and Java
Text by: Lambert and Osborne
Introduction Enosis Learning.
Real-time Software Design
Introduction Enosis Learning.
CSCI1600: Embedded and Real Time Software
CSCI1600: Embedded and Real Time Software
CS703 - Advanced Operating Systems
Reasons To Study Programming Languages
Overview of System Development for Windows CE.NET
Presentation transcript:

Embedded Java Research Geoffrey Beers Peter Jantz December 18, 2001

Advantages of the Java Technology Model Simplicity Simplicity –Easier language to learn than traditional C/C++ and still has object-oriented methodology. Security and Safety Security and Safety –Java programs have more robust security checking, with the RTE creating a “sandbox” where applications can run safely. –Lack of pointers eliminates direct memory access Portability and Robust Distribution Portability and Robust Distribution –Applications can be easily developed on desktop systems and ported, with minimal effort, to target device. –“Write-once, run anywhere” mentality.

Disadvantages of Embedded Java Huge speed disadvantage. Interpreted Java code is still 5-10 times slower than a similar C application. Huge speed disadvantage. Interpreted Java code is still 5-10 times slower than a similar C application. –Improvements made to JVM technology have enhanced this over the years. –Often based on how the application is written »A well-written Java program can out-perform a poorly written C program –For embedded applications do we really need to interpret code, or can we use native-compiled code?

Disadvantages of Embedded Java Embedded Java technology still relatively new and industry support has been slow to catch-on. Embedded Java technology still relatively new and industry support has been slow to catch-on. Biggest disadvantage: Lack of RTOS support or standard Biggest disadvantage: Lack of RTOS support or standard –Early embedded Java applications were very similar to conventional desktop programs. Fine for some apps, but deadline control and interrupt handling are necessary. –Great improvement in this genre since 1998.

Real-Time Specification for Java Guiding Principles Applicability to particular Java environments. Applicability to particular Java environments. –Do not include specs that restrict use to a particular Java environment. Backward compatibility Backward compatibility –RTSJ shall not prevent existing, non real-time Java programs, from executing on implementations of the RTSJ. “Write once, run anywhere” mentality should be followed as much as possible. “Write once, run anywhere” mentality should be followed as much as possible.

RTSJ Guiding Principles (cont.) RTSJ should address real-time system practice and allow for the incorporation of advanced features in the future. RTSJ should address real-time system practice and allow for the incorporation of advanced features in the future. Predictable execution as first priority in all tradeoffs. Predictable execution as first priority in all tradeoffs. –May come at expense of general-computing performance, but will allow for greater real-time integration. No syntactic extension No syntactic extension –RTSJ will not introduce new keywords or other syntactic extension to the Java language.

Real-Time Specification for Java Finalized in November Finalized in November Standard specification for garbage collection, memory management, and task/thread control. Standard specification for garbage collection, memory management, and task/thread control. Additional classes and extensions to standard Java JDK. Additional classes and extensions to standard Java JDK. –However, no new syntax was necessary.

javax.realtime Package Real-time specification provides modifications to the Java Language Spec. and JVM Spec. Real-time specification provides modifications to the Java Language Spec. and JVM Spec. New APIs to enable the creation, verification, analysis, execution, and management of real-time Java threads. New APIs to enable the creation, verification, analysis, execution, and management of real-time Java threads. New APIs in a standard extension package, javax.realtime. New APIs in a standard extension package, javax.realtime.

Seven Areas of Enhancement Thread scheduling and dispatching Thread scheduling and dispatching Memory management Memory management Synchronization and resource sharing Synchronization and resource sharing Asynchronous event handling Asynchronous event handling Asynchronous transfer of control Asynchronous transfer of control Thread termination Thread termination Physical memory access Physical memory access

Four Memory Areas Scoped Memory Scoped Memory –Objects have lifetime defined by syntactic scope. Physical Memory Physical Memory –Objects created within specific physical memory regions having certain characteristics. Immortal Memory Immortal Memory –Objects cannot be destroyed; once allocated they stay until the end of the application. Heap Memory Heap Memory –Objects represent an area of memory on the heap.

Asynchronous Events Some internal or external event that happens. Some internal or external event that happens. –Not all real-life events are predictable in time and frequency. System needs to respond to the changing environment. System needs to respond to the changing environment. –Ability of real-time systems to react to the events requires reliable asynchrony techniques.

Major Platforms Supported Operating Systems Operating Systems –Windows CE –Linux Processors Processors –PicoJava – Sun’s Java Processor –StrongArm –MIPs –Intel

Java and Embedded Linux Java does I/O by opening files which are the Linux device drivers (ex: /dev/mem). Java can seek in addition to read, write and open. Java does I/O by opening files which are the Linux device drivers (ex: /dev/mem). Java can seek in addition to read, write and open. Bootstrapping allows Linux to load necessary drivers and networking files and start running the JVM. Bootstrapping allows Linux to load necessary drivers and networking files and start running the JVM. Standard Linux distributions with networking support require lots of memory. Standard Linux distributions with networking support require lots of memory.

Improving Performance Java bytecode programs are typically 10 times slower than programs written in C or C++. Java bytecode programs are typically 10 times slower than programs written in C or C++. How well the program is written is more important. A well-written Java program can equal the efficiency of an average-written C/C++ program. How well the program is written is more important. A well-written Java program can equal the efficiency of an average-written C/C++ program. Interpreting code uses less ROM. Interpreting code uses less ROM.

Compilation into Native Code AOT (Ahead of time) AOT (Ahead of time) JIT (Just in time) JIT (Just in time) Dynamic Compilation Dynamic Compilation

AOT Compilation Similar to C compilers Similar to C compilers Tends to create large executables Tends to create large executables Need to re-compile for different platforms or when loading a different class Need to re-compile for different platforms or when loading a different class Can compile everything including class libraries Can compile everything including class libraries

JIT Compilation Machine independent Machine independent Higher startup cost Higher startup cost Not ideal for embedded systems Not ideal for embedded systems –Requires fast CPU, lots of virtual memory and a fast disk drive for paging

Dynamic Compilation Dynamically compiles code that is being used more frequently Dynamically compiles code that is being used more frequently Typically uses JIT compilers Typically uses JIT compilers Doesn’t require virtual memory, adaptable to available system memory Doesn’t require virtual memory, adaptable to available system memory Isn’t guaranteed to meet timing constraints Isn’t guaranteed to meet timing constraints –Applications can change the compiler’s thread priority for greater predictability

Other Methods to improve Performance Static Linking - place bytecode into ROM Static Linking - place bytecode into ROM Re-write bytecode interpreter in assembly language Re-write bytecode interpreter in assembly language Use a Java Chip Use a Java Chip

Conclusions and Summaries Recent advances in embedded Java technology and advent of RTSJ are allowing real-time capabilities and possibilities in the Java world. Recent advances in embedded Java technology and advent of RTSJ are allowing real-time capabilities and possibilities in the Java world. Many current embedded Java systems are non real-time or a limited subset of RTSJ principles. Many current embedded Java systems are non real-time or a limited subset of RTSJ principles. Sun’s advancements and broad range of distribution environments make embedded Java programming much simpler and more robust. Sun’s advancements and broad range of distribution environments make embedded Java programming much simpler and more robust.