跳到主要內容

臺灣博碩士論文加值系統

(216.73.216.15) 您好!臺灣時間:2026/06/12 10:38
字體大小: 字級放大   字級縮小   預設字形  
回查詢結果 :::

詳目顯示

: 
twitterline
研究生:文昌明
研究生(外文):Chang Ming Wen.
論文名稱:Android系統中選用Dalvik和原生碼程式開發與最佳化之研究
論文名稱(外文):A Study of Using Dalvik and Native Code for Android Application Development and Optimization
指導教授:竇其仁竇其仁引用關係林志鴻林志鴻引用關係
口試委員:林正敏
口試日期:2013-06-01
學位類別:碩士
校院名稱:逢甲大學
系所名稱:資電碩士在職專班
學門:電算機學門
學類:電算機一般學類
論文種類:學術論文
論文出版年:2013
畢業學年度:101
語文別:英文
論文頁數:54
中文關鍵詞:AndroidSDKNDK效能分析Native codeDalvik code執行緒
外文關鍵詞:AndroidSDKNDKBenchmarkNative CodeDalvik codeMulti-thread
相關次數:
  • 被引用被引用:1
  • 點閱點閱:471
  • 評分評分:
  • 下載下載:11
  • 收藏至我的研究室書目清單書目收藏:0
在Android系統上開發程式,Google提供了Software Development Kit (SDK)及Native Development Kit (NDK)開發工具,分別用來開發JAVA及C的程式APP。
通常新手開發人員並不會注重程式的效能,所以使用Dalvik code或native code對他們來說並不重要。但當他們的應用程式在Android上的執行效能不佳情況出現時,他們就會開始煩惱什麼時機要使用Dalvik code或native code。另外,在國內外文獻中大多都不是用Android實體設備或者是使用模擬器中完成文獻資料數據,這導致與實體Android設備得到的結果會有很大落差。其次,Google Play商店上使用NDK開發的比例以及Dalvik code和native code的效率比較,可以提供新手開發人員開發程式的一個參考。還有目前Android裝置大多都是多核心系統,在多執行序程式部分Google並沒有提供一個最佳化執行序數給程式開發者參考。
在本文中,我們使用完整的方法提供開發人員參考資料:
1. Google Play商店上使用NDK的比例以及使用在何種功能上。
2. 在Android設備上進行Dalvik code與native code效能分析。
3. 多核心上開發程式時所建議的執行序數目。
論文中做了三種方法的實驗,首先在Google Play商店上分析了28項目,280支Android熱門軟體的結果,我們發現使用NDK與沒有NDK技術比例為3:7。其次在實體Android裝置上實作了12項測試程式的效能分析,發現native code比Dalvik code的速度整體上快了34.14%。最後進行了多執行緒運算測試並提供了最佳效能發生在執行緒數等於核心數等結果。
In Android system, Google provides Software Development Kit (SDK) and Native Development Kit (NDK) for user to develop JAVA and C programming application.
A junior developer usually does not focus on the performance of the program that using Dalvik code or native code. When the performance of their program becomes pool, they start to consider that what time to use Dalvik code and native code. In most of the papers, comparisons between Dalvik code and native code were obtain by PC or simulator that the results are not reliable. The proportion of the Apps in Google Play using Dalvik code and native code and benchmark of the two provides a good reference for novice. Also, most of the Android devices are multi-core systems. There is no recommend for the developers that how many threads should be used in multi-core systems.
In this paper, we provide some recommends for junior developer.
1. The proportions of the Apps in Google Play using Dalvik code and native code.
2. Use Android devices to analysis performance of Dalvik code and native code.
3. The best number of threads in multi-core systems.
In this paper, we do the three experiments. First, we analysis 28 categories with 280 top Android apps in the Google Play store. We find that the ratio of using of NDK and with no NDK is 3:7. Second, we use 12 benchmark programs to analysis the performance of Dalvik code and native code in the real Android device. We find that the overall speed of native code is 34.14% faster than the Dalvik code. Finally, the results multithreaded computing test provides that the optimal number of threads is equal to the number of CPU core.
摘要 I
Abstract II
Table of Contents III
List of Figures IV
List of Tables V
Chapter 1 Introduction 1
1.1 Motivation 2
1.2 Objectives 3
1.3 Thesis Organization 3
Chapter 2 Related Work 4
2.1 Android SDK and Google Play 4
2.2 JNI and Android NDK Overview 7
2.3 The Relevant Discussion 9
Chapter 3 Analysis Methods 12
3.1 Analysis NDK Usage in Google Play 12
3.2 Benchmark Dalvik and Native Code in Android System 14
3.2.1 Implementation of JNI OnLoad() Function 16
3.2.2 Adjust Maximum Heap Size in Android System 18
3.2.3 Exclude Application Not Responding (ANR) 20
3.3 Multi-Thread Optimization 22
3.3.1 Observe the State of the Multi-Thread on Android Device 25
Chapter 4 Experimental Results 26
4.1 Experimental Environment 26
4.2 Experiment Results 28
4.2.1 Results of NDK Usage in Google Play 28
4.2.2 Results of Benchmark Dalvik and Native Code 30
4.2.3 Experimental Results of Multi-thread Optimization 39
4.3 Summary 46
Chapter 5 Conclusions 47
References 49
Acknowledgements 55
[1]E. Azimzadeh, M. Sameki, and M. Goudarzi, “Performance Analysis of Android Underlying Virtual Machine in Mobile Phones,” in Proceedings of 2012 IEEE International Conference on Consumer Electronics, pp. 292-295, Sep. 2012.
[2]L. Batyuk, A. D. Schmidt, H. G. Schmidt, A. Camtepe and S. Albayrak, “Developing and Benchmarking native Linux Applications on Android,” Lecture Notes of the Institute for Computer Sciences, Social Informatics and Telecommunications Engineering, Vol. 7, pp. 381-392, 2009.
[3]S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann,“The DaCapo Benchmarks: JAVA Benchmarking Development and Analysis,” in Proceedings of the 21st annual ACM SIGPLAN conference on Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA ’06), pp. 169-190, 2006.
[4]K. Chen, J. Chang, and T. Hou, “Multithreading in JAVA: Performance and Scalability on Multicore Systems,” IEEE Transactions on Computers, Vol. 60, Issue 11, pp. 1521-1534, Nov. 2012.
[5]D. L. Davis, “To JNI or not to JNI?,” in Proceedings of the Computer 20th Science Seminar, pp. sc3-t2-1 - sc3-t2-5, 2004.
[6]P. M. Dickens and R. Thakur, “An Evaluation of JAVA&;#39;s I/O Capabilities for High-Performance Computing,” in Proceedings of the ACM 2000 Conference on JAVA Grande, pp. 26-35, 2000.
[7]D. Gavalas and D. Economou, “Development Platforms for Mobile Applications: Status and Trends,” IEEE Software, Vol. 28, Issue 1, pp. 77-86, Feb. 2011.
[8]M. R. Guthaus, J. S. Ringenberg, D. Ernst, T. M. Austin, T. Mudge, and R. B. Brown, “MiBench: A free, commercially representative embedded benchmark suite,” in Proceedings of the IEEE International Workshop on Workload Characterization, pp. 3-14, Dec. 2001.
[9]W. Hsu, W. Lin, Y. Liu, W. Tai, and J. Wu, “A measurement of time synchronization on mobile devices,” in Proceedings of the 2012 IEEE International on Instrumentation and Measurement Technology Conference, pp. 2692-2694, May 2012.
[10]I. Kazi, H. Chen, B. Stanley, and D. Lilja, “Techniques for Obtaining High Performance in JAVA Programs,” ACM Computing Surveys, Vol. 32, Issue 3, pp. 213-240, 2000.
[11]Y. J. Kim, S. J. Cho, K. J. Kim, E. H. Hwang, S. H. Yoon and J. Jeon, “Benchmarking JAVA application using JNI and native C application on Android,” in Proceedings of the 2012 12th International Conference on Control, Automation and Systems, pp. 284-288, Oct. 2012.
[12]D. Kurzyniec and V. Sunderam, “Efficient cooperation between JAVA and native codes - JNI performance benchmark” in Proceedings of the 2001 International Conference on Parallel and Distributed Processing Techniques and Applications, 2001.
[13]S. Lee and J. W. Jeon, “Evaluating Performance of Android Platform Using native C for Embedded Systems,” in Proceedings of the 2010 International Conference on Control Automation and Systems, pp.1160-1163, Oct. 2010.
[14]Y. Lee, P. Chandrian, and B. Li, “Efficient JAVA Native Interface for Android Based Mobile Devices,” in Proceedings of the 2011 IEEE 10th International Conference on Trust, Security and Privacy in Computing and Communications, pp. 1202-1209, Nov. 2011.
[15]L. Prechelt, “Technical opinion: comparing JAVA vs. C/C++ efficiency differences to interpersonal differences,” Communications of the ACM, Vol. 42, Issue 10, pp. 109-112, 1999.
[16]X. Qian and J. Xu, “Optimization and implementation of sorting algorithm based on multi-core and multi-thread,” in Proceedings of the 2011 IEEE 3rd International Conference on Communication Software and Networks, pp. 29-32, 2011.
[17]K. Reinholtz, “JAVA will be faster than C++,” ACM SIGPLAN Notices, Vol. 35 Issue 2, pp. 25-28, 2000.
[18]S. Sangappa, K. Palaniappan and R. Tollerton, “Benchmarking JAVA against C/C++ for Interactive Scientific Visualization,” in Proceedings of the 2002 joint ACM-ISCOPE conference on JAVA Grande, pp. 236-236, 2002.
[19]K, Son and J. Lee, “The method of android application speed up by using NDK,” in Proceedings of the 2011 3rd International Conference on Awareness Science and Technology, pp. 382-385, Sep. 2011.
[20]X. I. Zheng, D. Cao and S. Zheng, “Development and Implementation of Eclipse-based File Transfer for Android Smartphone,” in Proceedings of the 7th International Conference on Computer Science &; Education, pp.568-571, Jul. 2012.
[21]P. R. Bruno, “Data Structures and Algorithms with Object-Oriented Design Patterns in C++,” Wiley; First edition, pp.73, 1998.
[22]P. R. Bruno, “Data Structures and Algorithms with Object-Oriented Design Patterns in JAVA,” John Wiley &; Sons, pp. 75, 1999.
[23]I. Jacobson, M. Christerson, P. Jonsson, and G. Overgaard, “Object-Oriented Software Engineering: A Use Case Driven Approach,” Addison-Wesley Longman, Inc. USA, 1992.
[24]A. Ulvesand and D. Eriksson, “Native Code on Android - A performance comparison of JAVA and native C on Android,” Bachelor’s Thesis in Computer Science at the School of Computer Science and Engineering Royal Institute of Technology, 2011.
[25]Android Developers, “ActivityManager,” Available: http://developer.android. com/reference/android/app/ActivityManager.html.
[26]Android Developers, “Android NDK,” Available: http://developer.android.com/ intl/zh-CN/tools/sdk/ndk/index.html.
[27]Android Developers, “Designing for Performance,” Available : http://developer. android.com/ intl/zh-CN/guide/practices/performance.html.
[28]Android Developers, “Keeping Your App Responsive,” Available : http://developer.android.com/training/articles/perf-anr.html.
[29]Android Developers, “Random,” Available : http://developer.android.com/ intl/zh-CN/reference/JAVA/util/Random.html.
[30]Android Developers, “SDK Archives,” Available: http://developer. android.com/sdk/older_releases.html.
[31]Android Developers, “SDK Tools,” Available: http://developer. android.com/intl/zh-CN/tools/sdk/tools-notes.html.
[32]Android Developers, “StackOverflowError,” Available: http://developer. android.com/intl/zh-CN/reference/JAVA/lang/StackOverflowError.html.
[33]Android Developers, “Using DDMS,” Available: http://developer.android.com/
tools/debugging/ddms.html.
[34]Android Developers, “What is Android?,” Available: http://developer. android.com/guide/basics/what-is-android.html.
[35]Android Developers, “What is the NDK?,” Available: http://developer. android.com/sdk/ndk/overview.html.
[36]Eclipse, “Eclipse,” Available: http://www.eclipse.org.
[37]Google code, “Google Projects for Android,” Available: http://code. google.com/intl/en/android/.
[38]Google I/O 2012, “Keynotes Day 1,” Available: https://developers.google.com /events/io/.
[39]Przemysław Bruski, “The JAVA (not really) Faster than C++ Benchmark,” Available:http://bruscy.republika.pl/pages/przemek/JAVA_not_really_faster_than_cpp.html.
[40]Christian Felde, “C++ vs JAVA performance; It&;#39;s a tie!,” Available: http://blog.cfelde.com/2010/06/c-vs-JAVA-performance.
[41]J. Smakov, “JNI Examples for Android,” Available: http://JNIExample.nw.
42[42]Lasse Kärkkäinen, “Yet Another JAVA vs. C++ Shootout,” Available: http://zi.fi/shootout.
[43]Keith, “The JAVA is Faster than C++ and C++ Sucks Unbiased Benchmark,” Available: http://keithlea.com/JAVAbench.
[44]S. Liang, “The JAVA™ native Interface Programmer&;#39;s Guide and Specification,” Sun Microsystems Inc, 1999.
[45]SystemPanel App, NextApp, Inc. Available: http://android.nextapp.com/site/ systempanel.
[46]ToMMTi-Systems, “Performance comparison C++, C# and JAVA, ” Available: http://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html.
[47]Wikipedia, “Eclipse(software),” Available: http://en.wikipedia.org/wiki /Eclipse_(software).
[48]Wikipedia, “Pseudorandom number generator,” Available: http://en.wikipedia.org /wiki/Pseudorandom_number_generator.
[49]段維瀚, “猛虎出閘制霸版:最新OCP JAVA SE 6 Programmer專業認證,” 碁峰資訊股份有限公司, 2011.
[50]蓋索林, “Google!Android 3 手機應用程式設計與入門,” 松崗資產管理公司, 2011.
連結至畢業學校之論文網頁點我開啟連結
註: 此連結為研究生畢業學校所提供,不一定有電子全文可供下載,若連結有誤,請點選上方之〝勘誤回報〞功能,我們會盡快修正,謝謝!
QRCODE
 
 
 
 
 
                                                                                                                                                                                                                                                                                                                                                                                                               
第一頁 上一頁 下一頁 最後一頁 top