Open In App

What is DVM(Dalvik Virtual Machine)?

Dalvik Virtual Machine is a Register-Based virtual machine. It was designed and written by Dan Bornstein with contributions of other Google engineers as part of the Android mobile phone platform. The Dalvik virtual machine was named after Bornstein after the fishing village “Dalvík” in Eyjafjörður, Iceland, where some of his ancestors used to live.



Working of DVM

The Java Compiler(javac) converts the Java Source Code into Java Byte-Code(.class). Then DEX Compiler converts this (.class) file into in Dalvik Byte Code i.e. “.dex” file.



Application

For Android, a new Virtual machine was developed by Google as stated above. It uses registers of the CPU to store the operands. So no requirement of any pushing and popping of instructions. Hence making execution faster. The instructions operate on virtual registers, being those virtual registers memory positions in the host device. Register-based models are good at optimizing and running on low memory. They can store common sub-expression results which can be used again in the future. This is not possible in a Stack-based model at all. Dalvik Virtual Machine uses its own byte-code and runs “.dex”(Dalvik Executable File) file.

Advantages

Disadvantages

Article Tags :