Dalvik

Dalvik

« Back to Glossary Index
Email
Twitter
Visit Us
Follow Me
LINKEDIN
Share
Instagram

Dalvik is a discontinued virtual machine that was used to execute applications written for Android, an operating system primarily used on mobile devices like smartphones and tablets. Named after a fishing village in Iceland, Dalvik was developed by Google and was an integral part of Android up until version 4.4 KitKat.

Applications for Android are typically written in Java. These Java classes are compiled into bytecode, which is then converted into Dalvik bytecode, also known as .dex (Dalvik Executable) or .odex (Optimized Dalvik Executable) files. This Dalvik bytecode is what the Dalvik virtual machine interprets and executes.

A few key characteristics of Dalvik include:

  1. Register-based Architecture: Unlike the Java Virtual Machine (JVM), which is stack-based, Dalvik is designed as a register-based architecture. This leads to fewer, though more complex, virtual machine instructions.
  2. Optimized for Mobile Devices: Dalvik was specifically designed with the constraints of mobile devices in mind, such as limited battery life, CPU power, and memory.
  3. Multiple VM Instances: Every Android application runs in its own process with its own instance of the Dalvik virtual machine. This isolation creates an environment where an application cannot negatively impact another one.

However, starting from Android version 4.4 (KitKat), Google introduced a new runtime environment called Android Runtime (ART), and since Android 5.0 (Lollipop), it has completely replaced Dalvik. ART offers improved performance, better garbage collection, ahead-of-time (AOT) compilation, among other improvements, which make it more efficient than Dalvik on modern Android devices.

You may also like...