Assignment no 1
Zain Mushtaq
70067944
Section B
MAD
Dalvik VM is the part of Android OS Architecture. Write the
performance Dalvik VM with reference to limited power
consumption. (5 Marks)
In this DataFlair Android article, we’ll read about Dalvik
Virtual Machine(DVM). Android DDM was written by Dan
Bornstein, and Dalvik is the name of a town in Iceland.
Virtual Machine
Firstly let us understand what a virtual machine is? It is
basically a software implementation of a physical computer.
This implementation works like a real physical computer. It
even compiles and runs programs the same as a physical
computer. It can be understood like an emulator. There are
some issues with virtual machines too. One is that it is less
efficient when compared to physical computers. Another issue
is its performance, which is unstable when multiple virtual
machines are working simultaneously on the same machine.
Even though Java Virtual machine has a high performance
and provides great memory management, it is not optimized
for low-powered devices. Dalvik VM is also a virtual machine
that is highly optimized for mobile devices. Thus, it provides
all the three things, that are memory management, high performance
as well as battery life. It is strictly developed for Android mobile
phones.
Role of the Dalvik Virtual Machine
The Role of the DVM in Android includes:
Optimizing the Virtual Machine for memory, battery life,
and performance
Conversion of class files into .dex file through Dex
compiler that runs on Dalvik VM.
Converting multiple class files into dex files.
How you compare DVM with Android Runtime.
(5Marks)
DALVIK VIRTUAL
MACHINE ANDROID RUN TIME
Faster Booting time Rebooting is significantly longer
Cache builds up
overtime The cache is built during the first boot
Occupies less space Consumes a lot of storage space internally due to
due to JIT AOT
Works best for small
storage devices Works best for Large storage devices
Stable and tested Experimental and new – not much app support
virtual machine comparatively
Longer app loading Extremely Faster and smoother Faster and app
time loading time and lower processor usage
DALVIK VIRTUAL
MACHINE ANDROID RUN TIME
Uses AOT compiler(Ahead-Of-Time) thereby
Uses JIT compiler(JIT: compiling apps when installed storage space
Just-In-Time consumption
What’s Better?
It depends on the device and one’s own device and preferences:
in the long run, ART is better, but the apps do get bigger, requiring
large storage space over time, unlike flappy bird which was just
1MB and required less space.