摘要

Garbage collection is a memory management mechanism for automatically reclaiming garbage objects in :memory. It can effectively relieve the programmers' burden and optimize the design of programs. Currently many garbage collection methods for distributed systems have been put forth as the distributed systems are more and more popular. Relaxed consistency model is a very important kind of memory consistency model in distributed system, but it is inefficiently to perform garbage collection in the Distributed shared memory system (DSM) on relaxed memory model with traditional methods. This article proposes a trace-based garbage collection algorithm for DSM system based on relaxed memory model. Our algorithm notes the references among active objects of every node in DSM system, which makes the application process and the collection process able to execute concurrently. And it makes use of the relaxed consistency model's features to reduce communication cost and response delay. Furthermore, the use of two tables insures the algorithm correct and effective. This algorithm displays its advantages of real-time and incremental, and it is proved to be correct and effective.