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