Android system architecture, differences between JVM and DalvikVM, androiddalvikvm
I. System Framework
1. Anroid is roughly divided into four layers, five areas
1) application layer (Applications)
All applications installed on mobile phones belong to this layer.
2) Application Framework)
A large number of APIs are provided for developers. Some core Android applications use these Apis.
3) Library)
-Surface Manager: Manages access to the display subsystem and provides seamless integration with 2D and 3D layers for multiple applications.
-Media Framework: Open Core Based on PacketVideo. It supports playing and recording a variety of popular audio and video formats and viewing static images.
-SQLite provides database support
-OpenGL | ES supports 3D plotting.
-FreeType: displays bitmap and Vector Fonts.
-WebKit: Web browser engine, which provides support for Android browsers
-SGL: underlying 2D graphics engine
-SSL: handshaking for communication in Android
-C/C ++ (libc) library to provide primary feature support for the Android system
4) Runtime (Android Runtime)
It consists of two parts: the Android core library and the Dalvik virtual machine. The core library provides a vast majority of functions available in the core library of the Java language. The Dalvik virtual machine is responsible for running Android applications.
5) Linux Kernel
The Linux Kernel provides core system services such as security, memory management, process management, network protocol stack, and driver model. The Linux kernel is also an abstraction layer between system hardware and software stacks.
Ii. Differences between JVM and DalvikVM
DalvikVM:
The Dalvik virtual machine is a major part of Google's Android platform for mobile devices. Virtual machines can run Java platform applications that are converted to a compact Dalvik executable format (. dex) suitable for systems with limited memory and processor speed.
Differences:
1. Dalvik does not fully comply with JVM specifications, and the two are not compatible.
2. The JVM virtual machine runs bytecode and Dalvik runs its proprietary dex (Dalvik Executable) file.
3. JVM directly from. the class file or jar package can load the bytecode and then run it, while the Dalvik cannot. the class file or jar package loads the bytecode, but uses the DX tool to upload the program. compile the class file. dex file, and then run. dex file.
4. Dalvik is based on registers, while JVM is based on stacks. Register-based virtual machines take less time to compile larger programs.
5. Dalvik is responsible for process isolation and thread management. Each Android Application corresponds to an independent Dalvik Virtual Machine instance at the underlying layer, and its code can be executed under the interpretation of the virtual machine.
Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.