Android Pen Question one

Source: Internet
Author: User

1.Android DVM (Dalvik VM) process and Linux process, is the application process the same concept?

A DVM (Dalvik VM) refers to a Dalvik virtual machine. Each Android application runs in its own process and has a separate instance of the Dalvik virtual machine. And each DVM is a process in Linux, so it can be thought of as the same concept. Running in their own DVM process, different apps don't interfere with each other and do not cause all app processes to crash because of a DVM crash.

The Android operating environment mainly refers to the virtual machine technology--dalvik. All Java programs in Android are running on Dalvik VMs. Every program on Android has its own thread, and DVM executes only. Dex's Dalvik executable file. Each Android application should have an independent DVM instance on the ground floor and be executed under its interpretation.

2. The JVM similarities and differences between DVM and Java in Android:

Dvm:dalvik Virtual Machine 
jvm:java  virtual machine

Difference One: The DVM executes a. dex format file The JVM executes a. class file on Android After the program compiles, the. class file is produced, and the Dex tool processes the. class file into a. dex file, and then packages the resource file and the. dex file into an. apk file. APK is the meaning of Android package. The JVM executes a. class file.

Difference Two: The DVM is a register-based virtual machine and the JVM executes the virtual machine based on the virtual stack. Register access speed is much faster than the stack, DVM can be based on hardware to achieve maximum optimization, more suitable for mobile devices.

The difference is that there is a lot of redundancy in the. class file, and the Dex tool removes redundant information and consolidates all the. class files into a. dex file. Reduced I/O operations and improved class lookup speed.

Android Pen Question one

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.