垃圾收集技术被广泛地应用于现代高级编程语言环境中,它在解决内存泄露等问题的同时也影响了应用程序的响应时间。为了减小甚至消除由于垃圾收集所造成的应用程序停顿,设计并实现了能与应用程序并发运行的垃圾收集器Tick。在研究过程中,使用Snapshot-at-the-Beginning算法解决了"一致性丢失"的问题;并动态地对垃圾收集线程进行调度,从而更加有效地利用系统资源。测试结果表明,Tick能有效地消除应用程序因垃圾收集所造成的停顿并减少应用程序的执行时间。
Garbage Collection has been wildly used in advanced programming language runtime systems. While overcoming the problems of memory leakage, etc. , the garbage collection impacts the real,time responsiveness of the applications too. In order to shorten or even eliminate the pause time caused by garbage collection, we design and implement a garbage collector Tick which can run in concurrence with the applica- tions. The problem of "consistency loss" is resolved by using Snapshot-at-the-Beginning algorithm in process of the study ; and the dynamic scheduling has been carried out on threads of garbage collecti0n,which helps to use system resources more efficiently. Our testing results show that Tick can effectively clear up the GC pauses of applications incurred by the garbage collection and reduces execution time of the applica- tions.