簡易檢索 / 詳目顯示

研究生: 侯曄暘
Hou, Yeh-Young
論文名稱: 高效率環狀偵測器之設計與實作:應用於參考計數系統
Design and Implementation of Efficient Cycle Detectors for Reference Counting Systems
指導教授: 侯廷偉
Hou, Ting-Wei
學位類別: 碩士
Master
系所名稱: 工學院 - 工程科學系
Department of Engineering Science
論文出版年: 2006
畢業學年度: 94
語文別: 中文
論文頁數: 63
中文關鍵詞: 環狀偵測器參考計數垃圾回收
外文關鍵詞: garbage collection, reference counting, java, SCC
相關次數: 點閱:43下載:2
分享至:
查詢本校圖書館目錄 查詢臺灣博碩士論文知識加值系統 勘誤回報
  •   在垃圾收集系統中,參考計數法無法回收環狀垃圾結構,需另外搭配環狀偵測器使用。本論文針對Lin-Hou所提之輕量級環狀垃圾偵測演算法(Lightweight Cyclic Reference Counting Algorithm, LW-CRC)進行一系列改良。LW-CRC兼具高效率及實用性,但無法回收特定的環狀垃圾,本研究在盡量不影響其效率的前提下,設法改善無法完全回收環狀垃圾的情形。此外,本論文也提出一個以Strongly-Connected Component(SCC)為基礎之環狀垃圾偵測演算法(SCC-CRC),該演算法具有良好之效能且不會有無法回收環狀垃圾的情形。
      這兩系列演算法的概念是基於減少物件圖形追蹤的次數,相較於目前普遍使用的三色追蹤法,時間複雜度可從O(2n)~O(3n)改善至O(n)~O(2n)。
      本研究已實作於Jikes RVM(Research Java Virtual Machine),並以SPECjvm 98效能評估程式來進行實驗量測,測試結果依測試程式及記憶體設定的不同,但整體而言,本研究所提出的演算法確實能比傳統方法有更出色的效能表現。

    In garbage collection systems, reference counting technique can not reclaim cyclic garbage. It is often complemented by a cycle detector. In this thesis, we first try to improve the LW-CRC (Lightweight Cyclic Reference Counting) algorithm proposed by Lin-Hou. The original LW-CRC algorithm is a practical approach. However, there exist few cases that can not be properly handled in theory. The algorithms proposed herein relieve such a problem without affecting the practicality, where more cyclic garbage can be collected. In addition, we develop a new cycle collection algorithm based on finding strongly connected components (SCC), denoted SCC-CRC. It is a complete algorithm and it has good performance.
    The main idea of the proposed algorithms is to reduce the number of traces over objects. Compare with the tri-color algorithm, a well-known cycle collection algorithm, our algorithms reduce the time complexity from O(2n) ~ O(3n) to O(n) ~ O(2n).
    We implemented the algorithms on Jikes RVM (Research Java Virtual Machine), and used SPECjvm 98 as the benchmark programs. The experimental results demonstrate that the proposed algorithms are more practical and efficient, compared to the tri-color algorithm.

    中文摘要 I Abstract II 誌謝 III 章節目錄 IV 圖目錄 VI 表目錄 VIII 演算法列表 IX 第一章 緒論 1 1.1 研究動機與背景 1 1.2 研究目的 2 1.3 章節概要 3 第二章 垃圾收集技術 4 2.1 術語說明 4 2.2 參考計數法 5 2.3 標記-清除法 5 2.4 物件複製法 6 2.5 世代收集法 6 2.6 環狀偵測演算法 6 2.6.1 Martinez區域標記-掃瞄演算法 6 2.6.2 Lins延遲追蹤演算法 7 2.6.3 Lins世代環狀參考計數法 7 2.6.4 Lins高效演算法 7 2.6.5 Bacon演算法 7 2.7 環狀偵測器演算法的採用 8 第三章 環狀偵測器設計 9 3.1 環狀偵測器相關技術 9 3.1.1 TD-CRC(Bacon)環狀偵測器 9 3.1.2 LW-CRC環狀偵測器 15 3.2  LW-CRC V1 20 3.2.1 LW-CRC V1演算法 20 3.2.2 LW-CRC V1複雜度分析 21 3.2.3 LW-CRC V1安全性與完整性 21 3.3  LW-CRC V2 22 3.3.1 LW-CRC V2演算法 23 3.3.2 LW-CRC V2複雜度分析 24 3.3.3 LW-CRC V2安全性與完整性 24 3.4  LW-CRC V3 25 3.4.1 LW-CRC V3演算法 26 3.4.2 LW-CRC V3複雜度分析 28 3.4.3 LW-CRC V3安全性與完整性 29 3.5  LW-CRC V4 29 3.5.1 LW-CRC V4演算法 29 3.5.2 LW-CRC V4複雜度分析 32 3.5.3 LW-CRC V4安全性與完整性 32 3.6  SCC-CRC 32 3.6.1 SCC-CRC演算法 35 3.6.2 SCC-CRC複雜度分析 38 3.6.3 SCC-CRC安全性與完整性 38 第四章 環狀偵測器實作與效能評估 40 4.1 Jikes RVM 40 4.2 實作環境與測試平台 40 4.3 實作探討 40 4.4 效能測試程式 41 4.5 實驗參數設定 41 4.6 實驗結果 42 第五章 結論與未來工作 59 參考文獻 61 自述 63

    [1] Bowen Alpern, C. R. Attanasio, Anthony Cocchi, Derek Lieber, Stephen Smith, Ton Ngo, John J. Barton, Susan Flynn Hummel, Janice C. Sheperd, Mark Mergen, “Implementing jalapeño in Java”, Proceedings of the 14th ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applications, pp.314-324, 1999.
    [2] David F. Bacon and V. T. Rajan, “Concurrent cycle collection in reference counted systems.”, In Proceedings of 15th European Conference on Object-Oriented Programming, pp.207-235, 2001.
    [3] Stephen M. Blackburn, Perry Cheng, Kathryn S. McKinley, “Oil and water? High performance garbage collection in Java with MMTk.”, In International Conference on Software Engineering, pp.137-146, 2004.
    [4] Stephen M. Blackburn, Kathryn S. McKinley, “Ulterior reference counting: Fast garbage collection without a long wait. In ACM Conference on Object-Oriented Programming Systems”, Languages, and Applications, Anaheim, pp.244-358, 2003.
    [5] George E. Collins., “A method for overlapping and erasure of lists. “, Communications of the. ACM, vol.3, issue12, pp.655-657, 1960.
    [6] L. Peter Deutsch, Daniel G. Bobrow, “An efficient incremental automatic garbage collector.”, Communications of the ACM, vol.19, issue9, pp.522-526, 1976.
    [7] Yossi Levanoni and Erez Petrank, “A scalable reference counting garbage collector.”, Technical Report CS-0967, Technion Israel Institute of Technology, Haifa, Israel, 1999.
    [8] Yossi Levanoni and Erez Petrank, “An on-the-fly reference counting garbage collector for Java.”, In ACM Conference Proceedings on Object-Oriented Programming Systems, Languages, and Applications, pp.367-380, 2001.
    [9] Henry Lieberman, Carl Hewitt, “A real-time garbage collector based on the lifetimes of objects”, Communications of the ACM, vol.26, issue 6, pp.419-429, 1983.
    [10]Chin-Yang Lin and Ting-Wei Hou, “A Lightweight Cyclic Reference Counting Algorithm”, Lecture Notes in Computer Science, vol.3947, pp.346-359, 2006.
    [11] Rafael Dueire Lins, “An efficient algorithm for cyclic reference counting.”, Information Processing Letters, vol.83, pp.145-150, 2002.
    [12] Rafael Dueire Lins, “Generational cyclic reference counting.”, Information Processing Letters, vol.46, pp.19-20, 1993.
    [13] Rafel D. Lins, “Cyclic Reference counting with lazy mark-scan,” Information Processing Letters, Vol. 44, issue 4, pp.215-220, December 1992.
    [14] A. D. Martínez, R. Wachenchauzer, R. D. Lins, “Cyclic reference counting with local mark-scan.”, Information Processing Letters, vol.34, issue 1, pp.31-35, 1990.
    [15] John McCarthy, “Recursive functions of symbolic expressions and their computation by machine.” Communications of the. ACM, vol.3, pp.184-195, 1960.
    [16] Marvin Minsky, “A LISP garbage collector algorithm using serial secondary storage.”, Technical Report Memo 58 (rev.), Project MAC, MIT, Cambridge, MA, 1963.
    [17] Standard Performance Evaluation Corporation. SPECjvm98.
    [18] Robert E. Tarjan, “Depth-first search and linear graph algorithms”, SIAM J. of Computing, vol 1, pp.146-160, 1972.

    下載圖示 校內:2008-07-27公開
    校外:2008-07-27公開
    QR CODE