`

转载:Dalvik-Android的虚拟机,引发的重大争论

阅读更多

原文:Dalvik, Android's virtual machine, generates significant debate
引用:http://www.infoq.com/news/2007/11/dalvik

 

With the release of Google's Android SDK earlier this week, there was much discussion of the APIs and the expected impact in the mobile space. However, one particular area which generated significant debate in the Java community was the Dalvik virtual machine which is the basis of the Android platform.

One of the first differences which is noted between Dalvik and a standard Java virtual machine (JVM) is that Dalvik is register-based, whereas JVMs are stack-based. There has been speculation that the register-based approach was chosen because it allows for greater ahead-of-time optimization, which is beneficial in constrained environments like mobile phones. A more in-depth analysis of register-based versus stack-based virtual machines concluded that register-based VMs allow for faster execution times at the expense of programs which are larger when compiled.

Another difference between Dalvik and Java is the execution environment - Dalvik is optimized to allow multiple instances of the virtual machine to run at the same time in limited memory, and each Dalvik application runs as a separate Linux process. Neil Bartlett points out that giving each application it's own process allows dynamic installation, activation and deactivation, however he questions why Dalvik would choose that instead of using OSGi to enable this within a single process - Radoslav Gerganov replied that separate process prevent all applications from being closed if the VM crashes. Carl Rosenberger also pointed out that OSGi could also probably be ported to the Android platform, while Jilles van Gurp wondered why Google was choosing to reimplement several components such as inter-process communication.

Java is also no longer the only language which one can target Dalvik with - there has been some success in running Scala on Dalvik, and Hecl has also been ported. There has also been an attempt to get Groovy running, however it has not been as successful to date. Miguel De Icaza, Mono project founder, has also expressed interest in integrating Mono with Dalvik once the Dalvik source code becomes available, and there has been speculation about several ways that this could be achieved including a CIL-to-Dalvik recompiler similar to the Java-to-Dalvik recompiler provided with the Android SDK.

The creation of Dalvik has also raised concerns that the first major fracturing of the Java platform may be in progress - some have related Dalvik to Microsoft's JVM and the lawsuit that Sun filed against Microsoft, wondering if a similar thing might happen with Google, while others have pointed out that Google is not claiming that Dalvik is a Java implementation, whereas Microsoft was. Sun has expressed concern over this potential fracture, and has offered to work with Google to ensure compatibility between Dalvik and the JVM - Google replied that Dalvik was an attempt to solve the existing fragmentation in the Java ME platform, and to provide a platform which had a less restrictive license. Some have even wondered whether this might be a sign of a larger power struggle between Sun and Google over the future of Java. Ian Skerrett saw the creation of Dalvik as a reaction to Sun's attempts to control and protect the revenue stream from Java ME, as well as a reaction to the lack of progress in establishing a governance board for OpenJDK. This caused Dalibor Topic to wonder if Google might follow Sun's path:

The interesting question is, of course, why doesn’t anyone have the courage to ask the same questions of Google, that they ask about OpenJDK? :)

Android is proprietary, despite being marketed as open source. Android has a compatibility pledge, signed and kept behind closed doors. Android has no governance model, nor any indication there will be one. Android has no spec, and the license prohibits alternative implementations, as that’s not a use licensed by Google in the SDK license. Android is completely controlled by Google, and Google reserves the right to kill off competitors applications if they hurt Google financially, etc. It’s only as open as it is in Google’s financial interest to allow openness, by design. Same old proprietary Java wine, in a different bottle.

It’s as if we’re witnessing the rebirth of the JCP, with folks lined up to lend open source community ’street credibility’ to another closed off vendor cartel around a single, proprietary implementation, this time with Google instead of Sun.

Stefano Mazzocchi posted an in-depth analysis of the license issues surrounding Java ME and Dalvik, and concludes that Dalvik is well positioned to make an imapct in the mobile market. Although Google has been careful to avoid several potential points of litigation, Mazzocchi believes that intellectual property lawsuits will be filed by Sun (and possibly by IBM). He also notes that, by operating outside of the JCP, Google is able to modify Android much more rapidly and is able to avoid Sun's ability to veto any JCP change - they can also add interfaces for components such as USB and Bluetooth which are not available in the base Java ME implementation. Finally, by licensing Dalvik's source code under the Apache license, mobile phone carriers are more likely to adopt it since they can use and modify it without paying licensing fees.

Dalvik appears to be causing quite a stir in the Java community - what are your thoughts?

分享到:
评论

相关推荐

    进入 Android Dalvik 虚拟机

    进入 Android Dalvik 虚拟机,android dalvik介绍 Dalvik 虚拟机的特点——掌握 Android 程序的运行原理 Android 系统的架构采用分层思想,这样的好处是拥有减少各层之间的依赖性、便于独 立分发、容易收敛问题和...

    android的虚拟机dalvik源码-09年7月

    android的虚拟机dalvik源码: run-core-tests.sh Android.mk NOTICE MODULE_LICENSE_APACHE2 README.txt /libdex /libcore-disabled /dexopt /libcore /tools /tests /libnativehelper /dexlist /dexdump /dalvikvm ...

    Android虚拟机Dalvik(略谈Android Dalvik虚拟机)

    Android虚拟机Dalvik(略谈Android Dalvik虚拟机)

    《Android Dalvik虚拟机结构及机制剖析》PDF

    《Android Dalvik虚拟机结构及机制剖析》《Android Dalvik虚拟机结构及机制剖析》《Android Dalvik虚拟机结构及机制剖析》《Android Dalvik虚拟机结构及机制剖析》《Android Dalvik虚拟机结构及机制剖析》《Android ...

    深入解析ANDROID虚拟机

    本书十三个章节,分别讲解了android系统基础知识,android系统的结构和核心框架,Java虚拟机和Dalvik虚拟机的知识,实现程序编译和调试,Dalvik的运作流程,DEX优化和安全管理,Android虚拟机生命周期的管理和内存...

    Dalvik虚拟机 PPT版

    Android应用程序是运行在Dalvik虚拟机里面的,并且每一个应用程序对应有一个单独的Dalvik虚拟机实例。Android应用程序中的Dalvik虚拟机实例实际上是从Zygote进程的地址空间拷贝而来的,这样就可以加快Android应用...

    android-2.0 源码 01

    由于google部分服务器被封,android 2.0 源码不好找,这是从一个外国服务器 上down来,供大家学习研究用,一个压缩包太大分了2个压缩包. 主要目录: android-2.0-src-01.rar -android -dalvik -data -jar -javax -...

    android-2.0 源码 02

    由于google部分服务器被封,android 2.0 源码不好找,这是从一个外国服务器 上down来,供大家学习研究用,一个压缩包太大分了2个压缩包. 主要目录: android-2.0-src-01.rar -android -dalvik -data -jar -javax -...

    android 2.0 源码 02

    由于google部分服务器被封,android 2.0 源码不好找,这是从一个外国服务器 上down来,供大家学习研究用,一个压缩包太大分了2个压缩包. 主要目录: android-2.0-src-01.rar -android -dalvik -data -jar -javax -...

    Android Dalvik虚拟机结构及机制剖析 第2卷.pdf

    Android Dalvik虚拟机结构及机制剖析 第2卷.pdf 个人收集电子书,仅用学习使用,不可用于商业用途,如有版权问题,请联系删除!

    Android虚拟机Dalvik完整源码

    Android虚拟机Dalvik完整源码,宝贵资源,欢迎下载! This directory contains the Dalvik virtual machine and core class library, as well as related tools, libraries, and tests. A note about the licenses...

    Android Dalvik虚拟机初识

    详细讲解了Android_Dalvik_虚拟机初始和架构方向,想了解Android dalvik虚拟机的值得一看。

    Android的核心Dalvik虚拟机

    任何程序的运行都有一个运行环境,Windows和Linux桌面系统就是运行环境,Web App有浏览器,那Java的运行环境就是虚拟机。要写好应用,至少要对应用...这里我们就分析一下Android应用开发中核心的核心---Dalvik虚拟机。

    Analysis-of-Dalvik-VM

    Android Dalvik 虚拟机 分析, 巴基斯坦人写的。

    android虚拟机分析

    学习分析dalvik,android虚拟机分析,学习android利器

    深入理解Android(二):Java虚拟机Dalvik

    深入理解Android(二):Java虚拟机Dalvik

    Android Dalvik虚拟机讲义

    Google原创的Android Dalvik虚拟机讲义

    反编译必备文档-Dalvik虚拟机操作码

    反编译APK修改smali文件必备文档…… 有操作码、指令的详细说明以及示例 提供两个格式的,一个html的一个doc的,内容一样。

    java版商城源码下载-weight-reduction-android:减重-android

    java版商城源码下载 weight-reduction-android ...但由于Android使用的dalvik虚拟机与标准的java虚拟机是不兼容的,dex文件与class文件相比,不论是文件结构还是opcode都不一样。目前常见的java反编译工具都不

    AndroidDalvik虚拟机结构及机制剖析

    资源名称:Android Dalvik虚拟机结构及机制剖析资源截图: 资源太大,传百度网盘了,链接在附件中,有需要的同学自取。

Global site tag (gtag.js) - Google Analytics