Amazon Interview Question

How would you implement a garbage collector? How would this deal with multi-thread applications?