Responsive image
博碩士論文 etd-0729100-111410 詳細資訊
Title page for etd-0729100-111410
論文名稱
Title
一種使用者可構形記憶體費料收集方法的軟體設計
A software design of a user-configurable memory garbage collection method
系所名稱
Department
畢業學年期
Year, semester
語文別
Language
學位類別
Degree
頁數
Number of pages
107
研究生
Author
指導教授
Advisor
召集委員
Convenor
口試委員
Advisory Committee
口試日期
Date of Exam
2000-06-20
繳交日期
Date of Submission
2000-07-29
關鍵字
Keywords
記憶體回收
garbage collection
統計
Statistics
本論文已被瀏覽 5640 次,被下載 19
The thesis/dissertation has been browsed 5640 times, has been downloaded 19 times.
中文摘要
摘要

世代階層式記憶體廢料回收方式(generational garbage collection)是目前最常用的記憶體管理技術。複製(copying)世代階層式記憶體廢料回收方式可由物件的搬動壓緊(compact)達到較佳的回收率,然而物件搬動需要較高的處理負擔。非複製(non-copying)世代階層式記憶體廢料回收記憶體廢料回收方式去除了物件搬動的處理負擔,配合有限度的廢料追蹤,因此可以較迅速的完成每次回收工作,但是因未採搬動壓緊作法造成其較低的回收率。另外對於物件生命週期的低預測準確度與物件生命週期的不同分佈特性,亦會降低世代階層式記憶體廢料回收方式的效能。

我們的研究提出了一種使用者可構形的記憶體廢料回收方法來改進非複製(non-copying)世代階層式記憶體廢料回收方式的回收率與效能,透過使用者將動態配置的物件(object)根據生命週期來做分類,我們的配置系統(allocator)就會根據這樣的分類將物件配置在不同的儲存類別。
目前的分類有:
(1) 一般生命週期物件:以多世代儲存類別方法儲存與回收。
(2) 長生命週期物件:以單世代儲存類別儲存與回收。
(3) 永久生命週期物件:以永久儲存方法儲存。
(4) 使用者層級物件:以使用者層級儲存方法進行直接儲存與回收。
由於一般僅採用各類別方法中的一種,我們解決了此合併作法上的廢料搜尋的整合問題,因此可以實際使用此合併方法於同一程式。

對不同的儲存類別,我們提出對應的決定記憶體回收時機的方法,因而降低回收動作的頻率,藉此來降低記憶體廢料回收週期的時間。對於各儲存類別,我們也提出了改良的回收與再配置方法,以減少有效頁數(page)的需求,造成非複製回收方法中較佳的回收率。我們根據這個方向所探討出的可執行性方法,提出軟體設計的作法,設計對應的可執行性實驗軟體,並做出此方法的效能評估。
Abstract
Abstract

Generational garbage collection is one of the most commonly used dynamic memory management techniques. Copying generational garbage collection can achieve better collection efficiency by compaction via object movement. However, object movement requires more processing overhead during collection time. Non-copying generational garbage collection eliminates the overhead of object movement. In association of with the limited memory traversal technique, it can achieve faster collection runs. But, since no compaction technique is used, poorer collection efficiency us unavoided. In addition, some in-effective design choices can greatly reduce the efficiency of generational garbage collectors. They include poor prediction of object lifetimes, unnecessarily frequent collection runs, and in-effective internal fragmentation reduction within pages, etc.

In this research, we designed a user-configurable garbage collection method to improve collection efficiency and performance of current non-copy generational garbage collection method. Dynamically generated objects are characterized into four collection categories according to the usage characteristic as well as this predicted lifetimes of the objects. Our memory allocator will allocate objects to different storage heaps according to their collection categories.
The four categories are:
(1) short life time objects: allocated in the multiple generations, storage and collect are in the multiple ways of generation .
(2) long life time objects: allocated in the single generation, storage and collect are in the single way of generation.
(3) permanent life time objects: allocated in the area never been collected, the objects will occupy the space until the program terminate.
(4) user-level management objects: allocated in the area never been collected, but the object will be allocated and freed by the user.

For different collection categories, we separately incorportes domain-specific knowledge of memory allocation and garbage collection. We plan to restrict each garbage collection activity on its own category heap. Hence, when certain category heap needs to be collected, only a small portion of dynamic data is involved. Category-specific collection timing decision reclamation, re-allocation, and memory allocation methods can be devised for each category heap. In addition, it allows users to apply their knowledge of the program characteristics to suitabley classify the generated object's collection category to improve the collection efficiency. It also allows users to integrate direct-managed collection and automatic collection technique in one program. For performance validation, we carried out a set of performance experiments. The experiments indicate that we can reduce collection overhead and improve the average number of effective memory pages in running cases with different characteristics with our non
目次 Table of Contents
摘要 …………………………………………………………………………… 1
Abstract …………………………………………………………………………… 3
第一章、 前言 …………………………………………………………… 7
1.1 記憶體廢料回收的介紹………………………………………………… 7
1.2 研究動機與目的………………………………………………………… 8
1.3 論文架構………………………………………………………………… 11

第二章、 記憶體廢料回收技術的概論與相關研究 ……………… 12
2.1 "二段式" (Two-Phase) 的概念 ……………………………………… 12
2.2 參用計數 (Reference Counting) 技術 ……………………………… 13
2.3 記號-掃除(Mark-Sweep)技術……………………………………… 16
2.4 記號-壓緊 (Mark-Compact) 技術 ………………………………… 19
2.5 複製 (Copying) 記憶體廢料回收技術 …………………………… 20
2.6 非複製 (Non-Copying) 記憶體廢料回收技術 ……………………… 26
2.7 世代 (Generational) 記憶體廢料回收技術 ……………………… 26

第三章、 使用者可構形記憶體廢料回收方法的設計 …………… 32
3.1 使用者可構形計憶體廢料回收方法的介紹 ………………………… 32
3.2 堆積區的結構 (Heap Structure) 與動態記憶體的配置方式(Dynamic
Memory Allocation)………………………………………………. 36
3.3 物件的結構(Object Representation)…………………………… 40
3.4 記憶體廢料的回收方式(Garbage Collection Policy)………… 43
3.5 世代間指標的追蹤(Tracking Intergenerational Pointer)…… 52
3.6 使用者可構形的設計及介面(The Design and Interface of the User
Configurable Garbage Collection)……………………………… 55
3.6.1 物件生命週期的種類 ………………………………………….. 55
3.6.2 程式介面的介紹 ……………………………………………….. 57

第四章、 效能評估 …………………………………………………………… 64
4.1 計憶體回收量測的尺度(metric) ……………………………………… 64
4.2 常態分佈的隨機產生……………………………………………………… 65
4.3 實驗規劃…………………………………………………………………… 67
4.4 實驗說明 ………………………………………………………………… 70
4.5 實驗結果與分析 ……………………………………………………… 74
4.5.1 測量不同rs與rl比例 ……………………………………… 75
4.5.2 測量不同使用者層級物件發生比例ru (低生命週期μu)
………………………………………………………………… 78
4.5.3 測量不同使用者層級物件發生比例ru (較高生命週期μu)
………………………………………………………………… 82
4.5.4 測量不同永久物件發生比例(增加rp ) ……………………… 86
4.5.5 測量不同使用者層級物件(低μu)發生比例
………………………………………………………………… 89
4.5.6 測量比例總體物件大小增加μs與μl的比例
………………………………………………………………… 93
4.5.7 改變執行的總數 …………………………………………… 96
第五章、 結論 …………………………………………………………… 104

參考文獻 …………………………………………………………………… 105
參考文獻 References
參考文獻
[App87] Andrew W. Appel, "Garbage collection can be faster than stack allocation,"Information Processing Letters, pages 275-279, June 1987.
[App91] Andrew W. Appel, "Garbage collection," Topics in Advanced Language Implementation , pages 89-100, MIT Press, Cambridge, Massachusetts, 1991.
[Bak78] Henry G. Baker, Jr. ,"List processing in real time on a serial computer," Communications of the ACM, pages 280-294, April 1978.
[Bak91] Henry G. Baker, Jr. ,"Cache-conscious copying collection, "in Proceedings of OOPSLA '91 Workshop on Garbage Collection in Object-Oriented Systems,1991.
[Bak91b]Henry G. Baker, Jr. ,"The Treadmill: real time garbage collection without motion sickness." in OOPSLA '91 Workshop on Garbage Collection in Object-Oriented Systems. Position paper.
[Bak92] Henry G. Baker, Jr. ,"The Treadmill: Real-time garbage collection without motion sickness," ACM SIGPLAN Notices, pages 66-70, March 1992.
[CG77] Douglas W. Clark and C. Cordell Green, "An empirical study of list Structure in LISP," Communication of the ACM, pages: 78-87, February 1977.
[Che70] C. J. Cheney,"A nonrecursive list compacting algorithm," Communications of the ACM, 13(11):677-678, November 1970.
[Cla79] Douglas W. Clark, "Measurements of dynamic list structure use in LISP," IEEE Transactions on Software Engineering, pages:51-59, January 1979.
[CN83] Jacques Cohen and Alexandru Nicolau, "Comparison of compacting algorithm for garbage collection," ACM Transactions on Programming Languages and Systems, 5(4):532-553, October 1983.
[Col60] Geroge E. Collins, "A method for overlapping and ensure of lists," Communications of the ACM, pages 555-557, December 1960.
[Coh81] Jacques Cohen, "Garbage collection of linked data structures," Computing Surveys, 13(3):341-367, September 1981.
[DeT90] John DeTreville, "Experience with current garbage collections for Modula-2+", Technical Report 54, Digital Equipment Corporation Systems Research Center, Palo Alto, California, August 1990.
[DLM78] Edsger W. Dijkstra, "Leslie Lamport, A. J. Martin, C. S. Scholten, and E. F. M. Steffens," On-the-fly garbage collection: An exercise in cooperation, Communications of the ACM, pages 966-975, November 1978.
[EL87] J. D. Eckart and R. J. LcBlanc, "Distributed Garbage Collection," in Proceedings of the ACM SIGPLAN 1987 Symposium on Interpreters and Interpretive Techniques, June 1987.
[Fos89] Ian Foster," A multicomputer garbage collection for single assignment languages," International Journal of Parallel Programming, 18(3), June 1989.
[FY69] Robert T. Fenichel and Jerome C. Yochelson, "A LIDP garbage-collection for virtual-memory computer systems," Communications of the ACM, pages 611-612, November 1969.
[Hay91] Barry Hayes," Using key object opportunism to collect old object," in Paepcke, page: 33-46.
[Knu69] Donald E. Knuth, The Art of Computer Programming, Volume 1: Fundamental Alogrithms, chapter 2.3.5, pages 406-422. Addison-Wesley, Reading, Massachusetts, 1969.
[Lam76] Icslic LamPort, "Garbage collection with multiple processor: A exercise in paralleism," In Proceeding of the IEEE Conference on Parallel processing, August 1976.
[Lar77] R. G. Larson, "Minimizing garbage collection as a function of region size," SIAM Journal on Computing, pages:553-557, December 1977.
[Lee00] T. Lee, User-configurable generaitonal garbage collection, Tech. Rep. CAD-00-02 Rept. of Electrical Engineer, National Sun Yat-Sen university, Kao-Hsiung, Taiwan, ROC, 2000.
[LH83] Henry Lieberman and Carl Hewitt," A real-time garbage collector based on the lifetimes of objects," Communication of the ACM, pages 419-429, June 1983.
[McB63] J. Harold McBeth, "On the reference counter method," Communication of the ACM, page: 575, September 1963.
[McC60] John McCarthy, "Recursive functions of symbolic expressions and their computation by machine," Communications of the ACM.3(4):184-195, April 1960.
[Moo84] David Moon, "Garbage collection in a large Lisp system," in Proceedings of the 1984 ACM Symposium on Lisp and Functional Programming, pages 235-246, Austin, Texas, August 1984.
[Ste75] Guy L. Steel Jr, "Multiprocessing compactifying garbage collection," Communications of the ACM, pages 495-508, September 1975.
[Sha88] Robert A. Shaw, Empirical Analysis of a Lisp system, PhD thesis, Stanford University, Palo Alto, California, February 1988. Technical Report CSL-TR-88-351, Stanford University Computer Systems Laboratory.
[Ung84] David M. Ungar, "Generation scavenging: A non-disruptive high-performance storage reclamation algorithm," in ACM SIGSOFT/SIGPLAN Software Engineering Symposium on practical Software Development Environments, pages 157-167, San Diego, California, September 1988, Pennsylvania, April 1984. Also distributed as ACM SIGPLAN Notices, pages 157-167, May 1987.
[Wan89] Thomas Wang, "MM garbage collector for C++," Master's thesis, California Polytechnic State University, San Luis Obispo, California, October 1989.
[Wci63] J. Wcizcnbaum, "Symmetric list processor," Communication of the ACM, September 1963.
[Wil92] Paul R. Wilson, "Uniprocessor Garbage Collection Techniques." International Workshop on Memory Management. September 1992.
[Zor90] Benjamin Zorn, "Comparing mark-and-sweep and stop-and-copy garbage collection," in Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, pages 87-98, Nice, France, June 1990.

電子全文 Fulltext
本電子全文僅授權使用者為學術研究之目的,進行個人非營利性質之檢索、閱讀、列印。請遵守中華民國著作權法之相關規定,切勿任意重製、散佈、改作、轉貼、播送,以免觸法。
論文使用權限 Thesis access permission:校內公開,校外永不公開 restricted
開放時間 Available:
校內 Campus: 已公開 available
校外 Off-campus:永不公開 not available

您的 IP(校外) 位址是 3.147.73.35
論文開放下載的時間是 校外不公開

Your IP address is 3.147.73.35
This thesis will be available to you on Indicate off-campus access is not available.

紙本論文 Printed copies
紙本論文的公開資訊在102學年度以後相對較為完整。如果需要查詢101學年度以前的紙本論文公開資訊,請聯繫圖資處紙本論文服務櫃台。如有不便之處敬請見諒。
開放時間 available 已公開 available

QR Code