Android Question 1: android Question 1
1. is the process of Android DVM (Dalvik VM) the process of Linux the process of an application the same concept?
DVM (Dalvik VM) refers to the Virtual Machine of dalvik. Every Android application runs in its own process and has an independent Dalvik Virtual Machine instance. Every DVM is a process in Linux, so it can be considered the same concept. Running in your own DVM process, different apps will not interfere with each other, and will not cause all app processes to crash because of the crash of a DVM.
The Android runtime environment mainly refers to the virtual machine technology Dalvik. All Java programs in Android run on Dalvik VM. Every program on Android has its own thread, and DVM only executes the Dalvik executable file of. dex. Each Android Application has an independent DVM instance at the underlying layer and is executed under its interpretation.
2. Similarities and Differences between DVM and JVM in java in Android:
DVM: Dalvik virtual machine
JVM: Java virtual machine
Difference 1: dvm executes the. dex format file. jvm executes the. class file license file. Apk indicates the android package. Jvm executes the. class file.
Difference 2: dvm is a register-based Virtual Machine and jvm execution is a virtual machine based on the virtual stack. The speed of register access is much faster than that of stack. dvm can be optimized based on hardware and is suitable for mobile devices.
Difference 3: The. class file has a lot of redundant information. The dex tool will remove redundant information and integrate all. class files into the. dex file. Reduces I/O operations and improves the search speed of classes.