Click here to learn
about this Sponsor:
Home  |  News  |  Articles  |  Forum

  Home arrow Linux For Devices Articles arrow A Java Technology overview for the Embedded Linux market

A Java Technology overview for the Embedded Linux market
By David Tannenbaum

Rate This Article: Add This Article To:

If the shoe fits . . .The vast array of disparate hardware and software architectures present throughout the embedded market begs for a common language and platform with which to develop applications. It was to address this issue that Sun initially developed the Java technology platform.

Java, according to Sun's vision, would provide a unifying platform for embedded devices through a Virtual Machine (VM) which would execute Java byte codes portably and transparently. The goal was: "Write once, run anywhere" (WORA).

Unfortunately, problems with Java's speed and predictability in the early days prevented it from delivering on this vision. Today, however, vast increases in microprocessor speed and execution efficiency, combined with improvements in Java technology itself, have greatly mitigated the performance issues.

Additionally, in today's increasingly networked world it has become highly desirable to freely move applications from one system to another, in some cases running web-based applications on "thin" clients of varying architectures. Obviously, the ability to run a single software implementation written in Java byte codes on multiple machines, rather requiring than numerous machine specific binaries, presents a tremendous value proposition.

In short: Java is ready for prime time in the world of embedded systems and smart, interconnected devices. Blame it on the web!

First Iteration of Java in the embedded space

Sun's first iteration of virtual machines for the embedded space included the Personal Java Virtual Machine and the Embedded Java Virtual Machine . . .
  • Personal Java Virtual Machine -- the Personal Java Virtual Machine (pJava) is a modified version of the standard Java Virtual Machine (Java 1.1). The pJava VM developers took the full Java Virtual machine and optimized it for footprint. The personal Java virtual machine has a full Abstract Windowing Toolkit (AWT) implementation, but does not support Java Swing out of the box.

  • Embedded Java Virtual Machine -- the Embedded Java Virtual Machine is the Personal Java VM with the option to remove class libraries to meet very small footprint requirements for embedded applications. The Embedded Java Virtual Machine includes a utility called the Java Filter that takes an applications dependencies on class libraries and filters the class libraries to only include the class libraries needed for that particular application. Part of Sun's licensing terms for the Embedded Java Virtual Machine is that the API's for the class libraries cannot be exposed to the community so that Java compatibility is not jeopardized.
The memory footprint for the Embedded Java and Personal Java virtual machines are a recommended minimum of 8MB RAM.

What about "very small" devices?

The emergence of "very small" devices such as pagers and cell phones, with extremely limited system resources, caused a project within Sun Labs to become a Sun product team.

The KVM or Kauai virtual machine (named after a tiny island in Hawaii) is a very small virtual machine that requires only 128KB of RAM. The KVM is a "clean room" implementation, which means it is not a subset/modification of another virtual machine. The KVM lacks many of the features and API's of the standard Java virtual machine, including support for AWT, the common Java API for graphics

Sun also produces another very small Java implementation called the Java Card. The Java Card Virtual Machine is capable of running on "Smart Cards". The code created for the Java Card VM is compiled and linked before being downloaded to the card in the Java card file format. The Java Card now represents a large percentage of the Smart Card marketplace.

Emergence of the J2ME architecture

The Java 2 Micro Edition (J2ME) architecture is Sun's attempt at creating a set of configurations and profiles to fit many different vertical markets which share certain common characteristics including constrained resources. The J2ME set of configurations is part of Sun's Java 2 array of products that include (biggest to smallest): the Java 2 enterprise edition (J2EE); Java 2 standard edition (J2SE); Java 2 Micro Edition (J2ME); and Java Card.

To further complicate matters, the Java 2 Micro Edition currently contains two basic configurations: the Connected Device Configuration (CDC); and the Connected Limited Device Configuration (CLDC). The CDC is the replacement for Personal Java, and the CLDC is built on the KVM. On top of each configuration, there are several profiles that contain class libraries optimized for certain vertical market segments. These profiles are being defined as part of the Java Community Process (JCP). The JCP allows companies from throughout the industry participate in defining the API specification for their particular vertical market.

Further information about J2ME is available here.
  • CDC -- the reference virtual machine for the CDC is a new virtual machine called the C virtual machine (CVM), which is a clean room virtual machine built to the blue book specification (Java 1.2). The first profile available for the CDC, called the foundation profile, contains some basic class libraries. Another profile, being created using the JCP, is the Personal Profile; it allows the CDC to replace personal Java. Other profiles are actively being defined using the JCP. Further information on CDC is available here.

  • CLDC -- the reference virtual machine for the CLDC is the Kauai virtual machine (KVM). An active profile on top of the CLDC is the mobile information device profile (MIDP) that meets the requirements of wireless application developers. The CLDC and MIDP is targets the small battery operated devices that often have a wireless, intermittent connection such as cell phones. Further information on CLLC is available here.
Real-time considerations

A large number of embedded devices have real-time requirements. To meet those requirements, a Java specification request (JSR) was submitted as part of the Java community process (JCP). The first JSR (JSR-000001) is the real-time specification for Java (RTSJ). The real-time specification for Java enables processes to interrupt the garbage collector to ensure predictable response amongst many other improvements.

TimeSys Corporation is developing the reference implementation for the real-time Java specification.

Compilation Technologies

To meet the performance requirements of many embedded devices, compilation technology is required. There are several different compilation methods depending on your requirements . . .
  • Ahead-of-Time (AoT) -- an ahead-of-time compiler is very similar to a standard C compiler in functionality. It takes Java code and converts it to machine code. The compiler may compile everything, including class libraries. Some ahead-of-time compilers allow you to perform dependency analysis on your code to determine which classes/methods to compile. The resulting executable is referenced during runtime using the Java class path. The problem with compiling everything ahead-of-time for embedded systems is that the size of the executable can be very large. Another issue is that if you want to deploy code on several different hardware/operating system architectures you need to compile the code for each. Also, if you want to change the classes loaded you need to recompile.

  • Just-in-Time (JIT) -- a just-in-time compiler will take byte codes that are being loaded into the system and compile them. There is a start-up cost associated with this methodology as well as a footprint requirement. The advantage of this solution over the AoT compilers is that it utilizes machine independent Java byte codes.

  • Dynamic Compilation -- this method looks at the running system and determines what pieces of code are most frequently executing. The dynamic compiler then compiles the "hot" areas of code in order to speed up system performance. The advantage of dynamic compilation is that the amount of memory consumed is configurable - and the ability to dynamically change classes is maintained. An issue with Dynamic Compilation is that it is an unbounded process and therefore can't be used when meeting timing constraints is critical.
Conclusions

The growing use of Linux on embedded devices is part of a general trend of equipment manufacturers adopting open standards and community-developed software. The benefits of this trend are numerous, including: decreased cost per unit, a large and enthusiastic developer community, and a common platform for which to distribute value-added software applications.

Linux is quickly becoming the community-accepted standard for an operating system, while Java is gaining ground as the application environment and programming language of choice. The combination of these two technologies offers a compelling software platform for embedded devices -- a much needed solution for the vast array of disparate hardware and software architectures present in the embedded market.



Author's bio: David Tannenbaum graduated with a Computer Science Engineering degree from the University Of Pennsylvania. He subsequently worked for Sun MicroSystems technology licensing division, before joining TimeSys Corporation where he currently serves in the role of Director of Marketing.



Related stories: Talk back! Do you have questions or comments on this story? talkback here




Discuss A Java Technology overview for the Embedded Linux market
 
>>> Be the FIRST to comment on this article!
 
 
 
>>> More Linux For Devices Articles Articles          >>> More By David Tannenbaum
 



FUEL Database on MontaVista Linux
Whether building a mobile handset, a car navigation system, a package tracking device, or a home entertainment console, developers need capable software systems, including an operating system, development tools, and supporting libraries, to gain maximum benefit from their hardware platform and to meet aggressive time-to-market goals.

Breaking New Ground: The Evolution of Linux Clustering
With a platform comprising a complete Linux distribution, enhanced for clustering, and tailored for HPC, Penguin Computing¿s Scyld Software provides the building blocks for organizations from enterprises to workgroups to deploy, manage, and maintain Linux clusters, regardless of their size.

Data Monitoring with NightStar LX
Unlike ordinary debuggers, NightStar LX doesn¿t leave you stranded in the dark. It¿s more than just a debugger, it¿s a whole suite of integrated diagnostic tools designed for time-critical Linux applications to reduce test time, increase productivity and lower costs. You can debug, monitor, analyze and tune with minimal intrusion, so you see real execution behavior. And that¿s positively illuminating.

Virtualizing Service Provider Networks with Vyatta
This paper highlights Vyatta's unique ability to virtualize networking functions using Vyatta's secure routing software in service provider environments.

High Availability Messaging Solution Using AXIGEN, Heartbeat and DRBD
This white paper discusses a high-availability messaging solution relying on the AXIGEN Mail Server, Heartbeat and DRBD. Solution architecture and implementation, as well as benefits of using AXIGEN for this setup are all presented in detail.

Understanding the Financial Benefits of Open Source
Will open source pay off? Open source is becoming standard within enterprises, often because of cost savings. Find out how much of a financial impact it can have on your organization. Get this methodology and calculator now, compliments of JBoss.

Embedded Hardware and OS Technology Empower PC-Based Platforms
The modern embedded computer is the jack of all trades appearing in many forms.

Data Management for Real-Time Distributed Systems
This paper provides an overview of the network-centric computing model, data distribution services, and distributed data management. It then describes how the SkyBoard integration and synchronization service, coupled with an implementation of the OMG¿s Data Distribution Service (DDS) standard, can be used to create an efficient data distribution, storage, and retrieval system.

7 Advantages of D2D Backup
For decades, tape has been the backup medium of choice. But, now, disk-to-disk (D2D) backup is gaining in favor. Learn why you should make the move in this whitepaper.

Got a HOT tip?   please tell us!
Free weekly newsletter
Enter your email...
Click for a profile of each sponsor:
SUPER-PLATINUM SPONSOR
MOBLIN NEWS & LINKS
Moblin Official Blog
Aigo to Go
Wind River's Moblin stack
Adobe AIR for devices
FEATURED VIDEO

Moblin v2 "Fastboot"
PLATINUM SPONSORS
GOLD SPONSORS
(Become a sponsor)

ADVERTISEMENT
(Advertise here)

Check out the latest Linux powered...

Mobile phones!

MIDs, UMPCs
& tablets

Mobile devices

Other cool
gadgets

Resource Library

• Unix, Linux Uptime and Reliability Increase: Patch Management Woes Plague Windows Yankee Group survey finds IBM AIX Unix is highest in ...
• Scalable, Fault-Tolerant NAS for Oracle - The Next Generation For several years NAS has been evolving as a storage ...
• Managing Software Intellectual Property in an Open Source World This whitepaper draws on the experiences of the Black Duck ...
• Open Source Security Myths Dispelled Is it risky to trust mission-critical infrastructure to open source ...
• Bringing IT Operations Management to Open Source & Beyond Download this IDC analyst report to learn how open source ...


BREAKING NEWS

• NAS system houses 2.5-inch drives for up to 6TB
• Atom SBC boasts special low-power mode
• Android leaps to rugged handheld, and more phones
• Simulator runs Android apps on Ubuntu
• Fanless industrial PC taps Atom
• Router platform runs OpenWRT Linux
• Feature-packed UMPC survives four-foot drops
• UMPC pioneer gives up the ghost
• Biodegradable, solar-powered netbook runs Linux
• Hypervisor rev'd for higher reliability
• Eurotech spins Atom development kits
• Home media server to demo on Intel Atom platform
• Atom boards feature fanless DC operation
• Low-cost pluggable NAS adds Linux support
• Taiwan open source conference sets agenda


Most popular stories -- past 90 days:
• Linux boots in 2.97 seconds
• Tiniest Linux system, yet?
• Linux powers "cloud" gaming console
• Report: T-Mobile sells out first 1.5 million G1s
• Open set-top box ships
• E17 adapted to Linux devices, demo'd on Treo650
• Android debuts
• First ALP Linux smartphone?
• Cortex-A8 gaming handheld runs Linux
• Ubuntu announces ARM port


DesktopLinux headlines:
• Simulator runs Android apps on Ubuntu
• Hypervisor rev'd for higher reliability
• Pluggable NAS now supports Linux desktops
• Moblin v2 beta targets netbooks
• Linux-ready netbook touted as "Student rugged"
• USB display technology heading for Linux
• Ubuntu One takes baby step to the cloud
• Game over for Linux netbooks?
• Linux Foundation relaunches Linux web site
• Dell spins lower-cost netbook


Also visit our sister site:


Sign up for LinuxForDevices.com's...

news feed


Or, follow us on Twitter...