Garbage Collection in Compilers MCQs

30 min Score: 0 Attempted: 0/30 Subscribe
1. What is the primary purpose of garbage collection in compilers?





2. Which of the following programming languages relies heavily on garbage collection?





3. Which type of garbage collection identifies unreachable objects by tracing references from root objects?





4. What is a “root” in garbage collection terminology?





5. Which garbage collection technique counts the number of references to each object?





6. What is a major drawback of reference counting?





7. What are “garbage” objects?





8. In mark-and-sweep garbage collection, what does the “mark” phase do?





9. In mark-and-sweep, what happens in the “sweep” phase?





10. What is generational garbage collection?





11. Which of the following is an advantage of generational garbage collection?





12. What is a “stop-the-world” event in garbage collection?





13. What is a major disadvantage of stop-the-world garbage collection?





14. What is incremental garbage collection?





15. What does “compacting garbage collection” do?





16. What is a “memory leak”?





17. Which of the following is a sign of memory leak in a program?





18. What is weak reference in garbage collection?





19. In reference counting, what is a cyclic reference problem?





20. Which garbage collection algorithm is most suitable for real-time systems?





21. What is the role of a “finalizer” in garbage collection?





22. Which type of garbage collection runs concurrently with the application?





23. Which of the following is an advantage of automated garbage collection over manual memory management?





24. What is a “dangling pointer”?





25. What is the “stop-and-copy” garbage collection method?





26. What is “automatic memory management”?





27. Which of the following languages typically requires manual memory management?





28. What is the main difference between tracing and reference counting garbage collection?





29. Which of the following reduces the frequency of garbage collection?





30. What is a key challenge in garbage collection for multi-threaded applications?





Leave a Comment

All copyrights Reserved by MCQsAnswers.com - Powered By T4Tutorials