Projects : An Efficient Architecture for a Simplified Dalvik Processor

By: Ehsan Azimzadeh, MSc Thesis, Department of Computer Engineering, Oct 2012.

Google Inc. states that, 400 million Android-powered devices have been activated and used by people until 2012. This rapid growth of Android operating system in mobile phones and other electronic devices makes it very important to improve the efficiency of this Operating System. Dalvik is the underlying virtual machine (VM) in Android that executes Android-based applications, and hence, its performance directly affects Android-powered devices. De-virtualization is a technique to improve performance of VMs. In this method, VM's instructions (bytecode) are natively and directly executed by hardware. In addition, de-virtualization technique eliminates the software interpretation/translation step, so that total execution time is improved and Android applications can run faster. In this thesis, after exploration of Dalvik internal structure and profiling common Android applications, we measured bytecode's frequency of appearance in the execution trace, as well as their execution time in this VM. Our experimental results show that the family of move between registers instructions comprises the most frequently used instructions, and the family of method invocation instructions is the most time consuming bytecode family. Also method length measurement for Android applications showed that over 80% of methods are shorter than 128 bytes; this fact can be taken advantage of in cache design. After that, we designed and simulated a hardware called DalvikProcessor for bytecode execution. Here with the help of a custom-design we successfully executed 70% of bytecodes in 4 clock cycles on average. Our investigation shows that ARM7 processors execute the same instructions in 11.9 clock cycles on average. In this starting work, we did not find time to implement the rest of the instructions, and in performance comparisons assumed that they can execute in the same number of clock cycles as in an ARM7 processor. In this work, we used an analytic method and showed that our Dalvik processor can improve the average speed of Android application execution up to 4.7 times in the best case, and 3 times on average.


Keywords: Computer Architecture, Virtual machine, Android, Dalvik, Bytecode