簡易檢索 / 詳目顯示

研究生: 李文權
Lee, Wen-Chuan
論文名稱: Dalvik虛擬機器記憶體回收之最佳化
Garbage Collection Optimization in Dalvik Virtual Machine
指導教授: 李政崑
Lee, Jenq-Kuen
口試委員:
學位類別: 碩士
Master
系所名稱: 電機資訊學院 - 資訊工程學系
Computer Science
論文出版年: 2010
畢業學年度: 98
語文別: 英文
論文頁數: 34
中文關鍵詞: 虛擬機器動態記憶體回收虛擬指令資料流分析
外文關鍵詞: virtual machine, garbage collection, bytecode, data flow analysis
相關次數: 點閱:3下載:0
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  • 在許多高階程式語言中,動態記憶體回收是一個很重要的技術。由於許多高階語言沒有提供讓使用者回收動態記憶體的功能。或是有提供,但是讓使用者手動回收動態記憶體也有可能因為使用著的疏忽造成記憶體洩漏。最後系統因為記憶體不夠而崩潰。而動態記憶體回收的設計會影響到整個系統的性能。由於目前的Dalvik虛擬機器沒辦法很精確的去辨認每個虛擬占存器裡面所儲存的資料是指標位址或者是
    本篇論文著重在最佳化Google 開發的Android平台上的Dalvik虛擬機器的動態記憶體回收的功能。在本論文中,我們會先從Dalvik虛擬機器的虛擬指令集下手。 對所有不同的虛擬指令做分析以及分類。知道每一個虛擬指令的作用後,我們就可以趁虛擬機器在執行使用者的程式之前,用傳統編譯器的向後資料流分析技術, 加上所有的虛擬指令集的資訊,分析每個指令位址的占存器的資訊。
    在靜態獲得這些資訊之後,我們就可以在動態時,讓Dalvik虛擬機器的動態記憶體回收器可以使用這些資訊,以便能收集更多不再被用到的記憶體。這些記憶體之後就可以充分的被利用,而不會造成記憶體洩漏的問題。


    Abstract i Contents iii List of Figures v 1 Introduction 1 1.1 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 The Garbage Collection Algorithms . . . . . . . . . . . . . . . . . . . 4 1.2.1 Basic Terminology . . . . . . . . . . . . . . . . . . . . . . . . 4 1.2.2 The Reference Counting Algorithm . . . . . . . . . . . . . . . 5 1.2.3 The Mark and Sweep Algorithm . . . . . . . . . . . . . . . . . 9 1.3 Thesis Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2 The Compiler Optimization Approach 11 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 2.2 The Data-Flow Analysis Schema . . . . . . . . . . . . . . . . . . . . . 12 3 Optimization for Dalvik VM GC 19 3.1 The Details of Dalvik Garbage Collection . . . . . . . . . . . . . . . . 19 3.1.1 Basic Data Structures . . . . . . . . . . . . . . . . . . . . . . 19 iii3.1.2 The Work ow of Dalvik Garbage Collector . . . . . . . . . . . 22 3.2 Optimizing the Dalvik Garbage Collector . . . . . . . . . . . . . . . . 24 3.2.1 Weaknesses of Conservative Scan . . . . . . . . . . . . . . . . 24 3.2.2 Optimizing The Garbage Collector . . . . . . . . . . . . . . . 25 3.2.3 Liveness Analysis . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.3 Experiments and Discussion . . . . . . . . . . . . . . . . . . . . . . . 27 4 Related Works 29 4.1 The Garbage Collection . . . . . . . . . . . . . . . . . . . . . . . . . 29 5 Conclusions 31 5.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.2 Future Works . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

    [1] Amruth N. Kumar. Learning the interation between pointers and scope in c++.
    ACM SIGCSE Bulletin, 2001.
    [2] Jun Xu et al. Transparent runtime randomization for security. 22nd International
    Symposium on Reliable Distributed Systems, 2003.
    [3] John McCarthy. Lisp:a programming system for symbolic manipulations. ACM:
    Preprints of papers presented at the 14th national meeting of the Association for
    Computing Machinery, 1959.
    [4] Richard Jones and Rafael Lins. Garbage Collection: Algorithms for Automatic
    Dynamic Memory Management. JOHN WILEY and SONS, 1996.
    [5] Daniel R. Edelson. A mark-and-sweep collector c++. ACM SIGPLAN-SIGACT,
    1992.
    [6] J. Ullman A. Aho, R. Sethi. Compilers Principles, Techniques, and Tools.
    Addison-Wesley, 1985.
    [7] Hans-Juergen Boehm. Space ecient conservative garbage collection. ACM
    SIGPLAN Notices, 1993.
    33REFERENCES 34
    [8] Agesen et al. Garbage collection and local variable type-precision and liveness
    in java virtual machine. ACM SIGPLAN Notices, 1998.
    [9] Google. Android open source project. http://source.android.com/source/
    index.html.
    [10] John Ellis et al. Gcbench. http://hnxgc.harnixworld.com/benchmarks/
    GCBench, 1997.
    [11] Paul R. Wilson. Uniprocessor garbage collection techniques. Memory Manage-
    ment - Springer, 2006.
    [12] D. R. BrownBrifge. Cyclic reference counting for combinator machines. Func-
    tional Programming Languages and Computer Architecture - Springer, 2006.
    [13] Katherine et al. Mostly accurate stack scanning. Proceedings of the 2001 Sympo-
    sium on JavaTM Virtual Machine Research and Technology Symposium, 2001.

    無法下載圖示 全文公開日期 本全文未授權公開 (校內網路)
    全文公開日期 本全文未授權公開 (校外網路)
    全文公開日期 本全文未授權公開 (國家圖書館:臺灣博碩士論文系統)
    QR CODE