The Android platform can promote innovation of mobile devices and allow users to experience the most advantageous mobile services, such as AT&T and Verizon, which are not supported by Microsoft, the distinctive Canadian RIM and their Blackberry are also blocked.
Memory Allocation and Management, Mutex, and so on are implemented based on the underlying operating system. All Android Application threads correspond to a Linux thread. Therefore, virtual machines can rely more on the thread scheduling and management mechanisms of the operating system. Different applications run in different process spaces. In addition, different Linux users are used for applications from different sources to maximize the Security and independent operation of applications.
Zygote is a virtual machine process and also an incubator for Virtual Machine instances. Whenever the system requires an Android Application to be executed, Zygote will generate a sub-process to execute the application. The advantages of doing so are obvious: the Zygote process is generated when the system starts. It completes VM initialization, Library Loading, loading and initialization of Preset class libraries, and so on.
When the system needs a new Virtual Machine instance, Zygote provides a system in the fastest way by copying itself. In addition, for some read-only system libraries, All VM instances share a memory area with Zygote, greatly saving the memory overhead.
After the application package APK is published to the mobile phone, the DEX file is optimized before running, and the optimized file is saved to the cache region. The optimized format is called DEY ), run the file directly. If the application package file does not change, the DEY file will not be regenerated.
Android applications use the Java programming language. Similar to Java SE, Sun JDK is used to program Java source programs into standard Java bytecode files. class files during compilation ). Then, convert all the bytecode files to the DEX file classes. dex through the tool software DX ). Finally, use the Android packaging tool aapt) to combine DEX files, resource files, and binary formats of AndroidManifest. xml files into an application package APK ). Application packages can be published to mobile phones for running.