Font Size: a A A

Memory Management Mechanism Analysis And Optimization Of The Android Virtual Machine

Posted on:2017-10-30Degree:MasterType:Thesis
Country:ChinaCandidate:H B MaoFull Text:PDF
GTID:2348330491464000Subject:Integrated circuit engineering
Abstract/Summary:PDF Full Text Request
Android is the most popular mobile operating system.From Android 5.0, the new ART Runtime improves the speed of Android system significantly by pre-compiling (Ahead-Of-Time) technology and more efficient fine-grained garbage collection mechanism (GC). However, the original GC algorithm still has the problem of long pause time and too frequent GC.It brings negative influences to Android devices, such as response delay, and most important, poor user experience.This thesis analyzes the memory management mechanism of Android Runtime. After analyzing the process of object allocation and garbage collection, we find out that:At the end of each garbage collection, the system always assigns fixed sizeofreserve memory to the heap. If the requirement of object allocation is very strong, the fixed size of reserve momory will be used up very quickly, which is one of factors that cause the increasing numberof GCs. This thesis designs and implements an optimization algorithm which dynamicly adjusts the size of GC reserve memory mainly according to the current GC frequency, GC pause time, GC execution time, GC recyle memory and the memory usage of applications. By using this improved algorithm, applications can effectively reduce the number of GC without impacting the system performance.In this thesis, we use automated testing tools Monkeyrunner to mimic the behavior of users in order to test the outcomes of our optimization. The test results show thatthe optimized algorithm can reduce about 20%of the number of GC without affecting the GC pause time. The results from Oxbenchmark show that the proposed algorithm has reduced the number of GC by 47.93%, and the total time required to finish the object allocation task is reduced by 24.55%.Tests of CaffeineMark and Standard Quadrant show that the optimization of this thesis does not give additional negative impact on the overall performance of Android.
Keywords/Search Tags:Android, ART, Garbage Collection, Auto Memory Management
PDF Full Text Request
Related items