David Ehringer
March, 2010
THE DALVIK VIRTUAL MACHINE ARCHITECTURE
Introduction
Java has always been marketed as “write once, run anywhere.” The capability has largely been
made possible by the Java Platform, the foundation of which is the Java Virtual Machine (JVM).
Although this goal has largely been met for the Java platform on desktop (JSE) and server (JEE)
environments, the mobile Java ecosystem (JME) is a bit more fragmented with various
configurations, profiles, and packages causing significant modifications to applications in order to
support different devices.
While Google has selected Java as the language for developing Android applications, it has
chosen to abandon both JME and the JVM in favor of an alternative deployment target, the Dalvik
virtual machine. Google has also chosen to use an alternative and limited implementation of the
standard Java libraries. Both of these are non-standard Java, and effectively represent forking of the
Java platform. This seems to break from the trend of people targeting the JVM as a the runtime
platform for a very wide range of languages. Scala, Groovy, JRuby, Jython, and Clojure are only a few
of the dozens of languages that run on the JVM. These languages can not only take advantage of
the many features of the JVM but also seamlessly leverage all the standard Java libraries and the
countless custom libraries created by individuals and organizations. Recently, Google has been
subtlety bucking this trend by created non-standard Java technologies. This includes non only the
Android platform but also Google Web Toolkit (GWT) and Google App Engine, the reasons of
which they are non-standard is beyond the scope of this paper as they aren’t mobile technologies.
But the trend may be applicable to what has happened in the JME space. Non-standard Java
implementations may further fragment the platform cause additional headaches for developers
looking to support the wide array devices currently on the market.
This paper looks to understand the architecture of Dalvik virtual machine and understand the
technical reasons for why Google chose to developer their own non-standard virtual machine.
While there are most likely also business reasons behind creating Dalvik, this paper only addresses
technical considerations.
Design Constraints Imposed by the Target Platforms
The Android platform was created for devices with constrained processing power, memory, and
storage. The minimum device requirements for an Android device are the following:
1
128 MB RAM; 256 MB Flash External
评论0
最新资源