`

转载: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虚拟机是Android操作系统的核心组成部分,它是Google为移动设备特别设计的一种高效、轻量级的虚拟机。在Android系统中,应用程序以Dalvik可执行文件(.dex)的形式运行...

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

    但我可以根据标题所揭示的主题,即“Android Dalvik虚拟机结构及机制剖析”,来生成相关的知识点。 Dalvik是Android操作系统中用于执行应用程序的虚拟机。它专为移动设备优化,使得Android应用能够高效运行。Dalvik...

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

    根据提供的文件信息,我们可以了解到文件内容是关于Android Dalvik虚拟机的结构及机制的深入剖析。虽然文件本身并没有提供实际的内容,但我们可以从标题和描述中提取出相关知识点。 首先,标题“Android Dalvik...

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

    ### Android虚拟机Dalvik概述 #### 一、Dalvik虚拟机简介 Dalvik虚拟机是Android操作系统的核心组件之一,由Google公司开发并用于其移动操作系统Android中。它是一种专为移动设备设计的轻量级虚拟机,旨在提高性能...

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

    在Android系统中,Dalvik虚拟机(Dalvik Virtual Machine,DVM)是应用程序运行的基石。它是Google专为Android设计的一种轻量级的虚拟机,它执行的是.dex(Dalvik Executable)格式的字节码。当我们谈论反编译...

    进入 Android Dalvik 虚拟机

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

    深入理解Android之dalvik

    《深入理解Android之Dalvik》是一本专注于探讨Android操作系统核心组件——Dalvik虚拟机的专著。 Dalvik是Android系统早期采用的一种优化过的Java虚拟机,它为移动设备的资源有限性进行了专门的设计和优化。在本文中...

    虚拟机 dalvik4.2 源代码

    在Android操作系统中,Dalvik虚拟机扮演着至关重要的角色,它是Android系统早期版本中的核心组件,负责执行应用程序的字节码。在Android 4.2版本中,Dalvik虚拟机进一步优化,提升了性能和效率。这里我们将深入探讨...

    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虚拟机结构及机制剖析第2卷

    Android Dalvik虚拟机是Android操作系统的核心组件之一,它为Android应用程序提供了一个运行环境。本卷主要探讨了Dalvik虚拟机的结构与工作机制,旨在深入理解Android应用的执行流程和优化策略。 首先,我们要理解...

    《Android Dalvik虚拟机结构及机制剖析 Dalvik虚拟机各模块机制分析 第2卷》PDF

    《Android Dalvik虚拟机结构及机制剖析 Dalvik虚拟机各模块机制分析 第2卷》是一部深入探讨Android系统核心组件——Dalvik虚拟机的专业书籍。它详细解析了Dalvik虚拟机的内部构造和运行机制,是Android开发者和系统...

    dalvik linux-x86.zip

    【描述】描述中提到,“linux-x86下的android虚拟机dalvik”意味着这个压缩包包含的是在基于Intel x86处理器的Linux系统上运行的Dalvik虚拟机。它可以让你在Linux环境下运行Android应用,因为Dalvik虚拟机能够处理...

    Android虚拟机ART

    Android运行环境的核心组成部分之一就是虚拟机,从早期的Dalvik到现在的Android RunTime(ART),这一进化过程极大地提升了Android应用的性能和效率。本文将深入探讨ART的工作原理、优势以及其对Android系统的影响。...

    深入解析Android虚拟机(钟世礼)

    《深入解析Android虚拟机》是由钟世礼编著的一本专为Android开发者深入理解Android虚拟机(Dalvik或ART)而撰写的书籍。在Android系统中,虚拟机扮演着至关重要的角色,它负责运行应用程序、内存管理、垃圾回收以及...

    Dalvik虚拟机简要介绍

    Dalvik虚拟机是Android操作系统中用于执行应用程序的虚拟机。它的作用主要是解释执行Android应用程序中的Dalvik可执行文件(DEX格式),使得Java程序能够在Android设备上运行。Dalvik虚拟机与Java虚拟机(JVM)有很...

    Android Dalvik虚拟机结构及机制剖析第1卷

    《Android Dalvik虚拟机结构及机制剖析第1卷》是一本深入探讨Android系统核心组件——Dalvik虚拟机的专业书籍。本书旨在为读者揭示Android应用程序运行的底层机制,帮助开发者理解和优化应用性能。作为Android开发的...

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

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

    深入解析ANDROID虚拟机

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

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

    ### 深入理解Android(二):Java虚拟机Dalvik #### 一、背景与研究目的 在深入了解Dalvik虚拟机之前,我们先来探讨一下背景与研究目的。随着移动设备性能的不断提高,Android系统因其开放性而吸引了众多开发者...

Global site tag (gtag.js) - Google Analytics