Android Architecture : Android Runtime (ART) | Application Framework | Application

Android Runtime (ART)

Android Runtime (ART) is an application runtime environment used by the Android operating system. Replacing Dalvik, the process virtual machine originally used by Android, ART performs the translation of the application’s bytecode into native instructions that are later executed by the device’s runtime environment.
Unlike Dalvik, ART introduces the use of ahead-of-time (AOT) compilation by compiling entire applications into native machine code upon their installation. By eliminating Dalvik’s interpretation and trace-based JIT compilation, ART improves the overall execution efficiency and reduces power consumption, which results in improved battery autonomy on mobile devices. At the same time, ART brings faster execution of applications, improved memory allocation and garbage collection (GC) mechanisms, new applications debugging features, and more accurate high-level profiling of applications.

To maintain backward compatibility, ART uses the same input bytecode as Dalvik, supplied through standard .dex files as part of APK files, while the .odex files are replaced with Executable and Linkable Format (ELF) executables. Once an application is compiled by using ART’s on-device dex2oat utility, it is run solely from the compiled ELF executable; as a result, ART eliminates various application execution overheads associated with Dalvik’s interpretation and trace-based JIT compilation. As a downside, ART requires additional time for the compilation when an application is installed, and applications take up slightly larger amounts of secondary storage (which is usually flash memory) to store the compiled code.
Android 7.0 Nougat introduced JIT compiler with code profiling to ART, which lets it constantly improve the performance of android app as they run. The JIT compiler complements ART’s Current Ahead of time compiler and helps improve runtime performance.

Application Framework

Android is an OS (and more, look below) which provides its own framework. But it is definitely not a language. Android is a software stack for mobile devices that includes an operating system, middleware and key applications.

Android is implemented in the form of a software stack architecture consisting of a Linux kernel, a runtime environment and corresponding libraries, an application framework and a set of applications. Applications are predominantly written in Java and run within individual instances of the Dalvik virtual machine. The Android Framework is the entire stack of stuff that makes up the OS. This is the underlying Native libraries that are not directly accessible, the layer above that that you actually interact with and the code that developers write to run on the system. Yo are confused about Libraries vs APIs.

Application

The Android platform is made up of a number of different components. It includes core applications such as Contacts, a set of APIs to help you control what your app looks and how it behaves, and a whole load of supporting files and libraries. Here’s a quick look at how they all fit together. Android comes with a set of core applications such as Contacts, Calendar, Maps, and a browser. When you build your apps, you have access to the same APIs used by the core applications. You use these APIs to control what your app looks like and how it behaves.

Underneath the application framework lies a set of C and C++ libraries. These libraries get exposed to you through the framework APIs. Underneath everything else lies the Linux kernel. Android relies on the kernel for drivers, and also core services such as security and memory management.

Post a Comment

Previous Post Next Post