Font Size: a A A

Research On The Structure And Performance Of Dalvik Virtual Machine

Posted on:2012-07-02Degree:MasterType:Thesis
Country:ChinaCandidate:P X YiFull Text:PDF
GTID:2178330335450186Subject:Software engineering
Abstract/Summary:PDF Full Text Request
With the development of mobile networks, portable device also develop rapidly, embedded technique play an important role in this field. Android platform developed by google company is an embedded operating system. Now, Android already has the 3.3 Honeycomb edition which is used to pad computer. Dalvik virtual machine is carried by Android platform, it is used to execute application programs, provide multiple threads and collect garbage on Android platform. Dalvik virtual machine will optimize applications in each step of dealing applications. Dexopt optimizes dex files, reduces the size of programs, cut the useless codes. Dalvik virtual machine add JIT compiler in Android 2.1, JIT complier can compile hot codes to machine codes, accelerate programs.Dalvik virtual machine is the cornerstone of Android platform, because its performance is depend on the performance of Dalvik. Dalvik is used to portable device, each class file uses a Heterogeneous constant pool, but dex file will merge several class files to a dex file and each dex file has five isomorphism constant pools: stirng_ids, type_ids, proto_ids, field_ids, method_ids. Each kind of constant will put into its constant pool. Dex format file saves programs can reduce the size of program and save about 50% space. Dalvik virtual machine is based on the architecture of register, the operand is stored in virtual register, the instruct gets operands from register and compute, then stores the result into register. Although register virtual machine is difficult to realize, but it can take advantage of ARM9 which has more registers. Dalvik maps virtual register to real register, can reduce data moving and save much time for programs. The process model of Dalvik virtual machine is Zygote, it is similar to fork process in linux. Actually, Android platform use Linux kernel, a Zygote process corresponds a for process.The JIT compiler has two states: method compiler and trace compiler. Compare to trace JIT compiler, method JIT compiler need more resource,but it can provide peek performance. Trace JIT compiler has fine granularity, take little resource. This paper simply describes: how to construct a trace tree and compile the race tree. Dalvik virtual machine use method compiler when Android is charging, use trace compiler when Android is using battery, so Android platform will quicker when it is charging.
Keywords/Search Tags:Android, Dalvik虚拟机, JIT, Dex, HotSpot
PDF Full Text Request
Related items