Download [] Challenges and Solutions for Embedded Java

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
Challenges and Solutions for
Embedded Java
Michael Wortley
Computer Integrated Surgery
March 1, 2001
TINI CORBA ORB Project
• Goal: to port Java
based CORBA ORB
to TINI board
• Problem: Converting
from JDK1.3 to
TINI’s embedded
Java
Goals of this Presentation
• Provide background of Java’s benefits
• Show how embedded environment
presents challenges to the Java
platform
• Highlight available solutions
Main Sources
• “Challenges to Embedded Java”
– Charlie McDowell, UC Santa Cruz
– 1998 PowerPoint presentation
• “Technical Overview of Embedded
Java”
– 4/2000, From Sun Website
Other Sources
• “Java Schism?”
– Rick Cook, Java Report 6/99
• “About Java Technology”
– Sun Website
• TINI software information from
www.iButton.com
Goals of this Presentation
• Provide background of Java’s
benefits
• Show how embedded environment presents
challenges to the Java platform
• Highlight available solutions
“Write Once, Run Anywhere.”
Why do Programmers like
Java?
• Compiled and Interpreted
• Easy Upgrades through API
• JVM = Portability
Goals of this Presentation
• Provide background of Java’s benefits
• Show how embedded
environment presents
challenges to the Java platform
• Highlight available solutions
“Challenges to Embedded
Java”
PowerPoint Presentation by
Charlie McDowell, 1998.
Key Points
• Java is superior to C++ in ease of
development, maintenance, and
portability
• Java API and JVM put too much stress
on embedded processors
• Java tends to have slower execution
time
Key Points
• Automatic garbage collection causes
problems
• Java lacks real-time support
Java Memory Requirements
• Storage of Java API
– up to 9 MB for JDK1.1
• JVM
– between 300 and 800 KB
• Garbage Collection Overhead
– copy collectors -> requires 2x max. heap
usage
– conservative collectors -> memory leaks
Java Execution Time
• Interpreted code runs more slowly than
compiled code
• Resolving references prior to execution
reduces run time
• Using final and static methods can
reduce dynamic dispatch of functions
• Garbage Collection eats memory
Garbage Collection
• Part of what makes Java simple
• Problematic for real-time applications
Java and Real-Time
Applications
• Java lacks:
– reliable methods of estimating worst case
– ability to measure CPU time, memory use
– enforcement of time and space budgets
– real-time garbage collection
• IMPROVEMENTS NEEDED!
Suggested Optimizations for
Embedded Java
• Reduce API to free memory
• Use final and static functions to
decrease execution time
• Eliminate automatic garbage collection
• Find ways to improve real-time
performance
Non-Sun Embedded Java
• PERC by NewMonics
– real-time garbage collection
• VxWorks
– only 628 KB
• JN from UCSC
– JIT from Kaffe
– reduced API
Goals of this Presentation
• Provide background of Java’s benefits
• Show how embedded environment presents
challenges to the Java platform
• Highlight available solutions
“Technical Overview of
Embedded Java Technology”
Sun Microsystems
http://java.sun.com/products/embeddedjava/overview.html
Improvements in Sun’s
Embedded Java
• Configurable API
• Configurable JVM
• JavaFilter tool
• JavaCodeCompact
• JavaDataCompact
New Programming Tools
• JavaFilter
– input
• source code
• Java API
– output
• list of necessary API
classes and methods
New Programming Tools
• JavaCodeCompact
– input
• Source Code
• Java API
• list of necessary API
classes and methods
– output
• data structures in C
code
New Programming Tools
• JavaDataCompact
– input
• associated data files
• Java API
– output
• data structures in C
code
How this Relates to TINI
• TINI’s embedded
Java is Sun
compatible.
• Limitted API
• Development Tools
– TINI API
– TINIConvertor
Conclusions about Embedded
Java
• Increasing complexity of embedded
devices will force makers to use high
level language
• Java’s fast development time and
portability are ideal for large
manufacturers
• Competition needed to drive
advancements
So long, and thanks for all the
fish.