Hi iam going to implement 'On the fly garbage collector in Jikes RVM. But i hardly understand the complex coding of Jikes RVM. Can you tell me what packages do i need to modify so as to make a garbage collector 'on the fly' .I know there is a 'stop the world' marksweep garbage collector in Jikes. But how to convert that 'stop the world' into 'on the fly'. Please explain me. Iam totally confused.
views:
24answers:
1Look at the documentation for a list of garbage collection algorithms available, as well as how to choose between them.
But I agree that you're confused. :-) There's no single garbage collection algorithm called "on the fly" that I've heard of, and neither is it listed there. I believe that you'd seen that term used solely to distinguish from a "stop the world" collection, which will actually stop execution of VM threads while it does a full collection. The vast majority of garbage collectors will use different strategies at different points; typically using regular cheap and light collections to pick up the "low hanging fruit", and falling back to heavier collection strategies (possibly including "stop the world") if the memory usage continues to grow. Ultimately a GC would have to run a collection algorithm with 100% success rate before throwing an OutOfMemoryError, though it is allowed to use algorithms with false positives before that point.
AFAIK all GCs used in Jikes follow this same principle, so as only to stop the world if needed - so you should think about the question you're really asking a bit more. What is it that has lead you to believe you need to change the GC performance of Jikes? What aspects of the current execution have proved unsatisfactory, and why do you think another GC would improve them? The default garbage collectors on most JVMs are usually a competitive choice unless you have an application with unusual requirements.