1 / 227

Incremental Garbage Collection

Incremental Garbage Collection. Uwe Kern 23. Januar 2002 kern@cs.uni-sb.de. Incremental GC. Mutator runs while collecting is performed Collecting is done in small, partial steps Drastically reduced pause times Extension of existing tracing GC's. A. B. Cells & GC state. C.

mjulius
Download Presentation

Incremental Garbage Collection

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Incremental Garbage Collection Uwe Kern 23. Januar 2002 kern@cs.uni-sb.de

  2. Incremental GC • Mutator runs while collecting is performed • Collecting is done in small, partial steps • Drastically reduced pause times • Extension of existing tracing GC's

  3. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  4. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  5. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  6. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  7. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  8. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  9. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  10. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  11. A B Cells & GC state C completed found unvisited/garbage Problem: Intertwined mutation Root

  12. Solution: Synchronization • Idea: • Intercept access to or modification of references in objects (barrier) • Do something in barrier to prevent race conditions

  13. Example Barrier Which kind of mutations are fatal ? Reference to white object X written into one or more black objects. All references from white/grey objects to X deleted.

  14. Example Barrier Which kind of mutations are fatal ? Reference to white object X written into one or more black objects. All references from white/grey objects toXdeleted. Idea: Eliminate black-white pointers by coloring black object grey again

  15. Example Barrier Root A B C

  16. Example Barrier Root A B C

  17. Example Barrier Root A B C

  18. Example Barrier Root A B C

  19. Example Barrier Root A B C

  20. Example Barrier Root A B C

  21. Example Barrier Root A B C

  22. Example Barrier Root A B C

  23. Example Barrier Root A B C

  24. Example Barrier Root A B C

  25. Example Barrier Root A B C

  26. Example Barrier Root A B C

  27. Example Barrier Root A B C

  28. Example Barrier Root A B C

  29. Example Barrier Root A B C

  30. Example Barrier Root A B C

  31. Example Barrier Root A B C

  32. Example Barrier Root A B C

  33. Example Barrier Root A B C

  34. Example Barrier Root A B C

  35. Example Barrier Root A B C

  36. Example Barrier Root A B C

  37. Example Barrier Root A B C

  38. Example Barrier Root A B C

  39. Example Barrier Root A B C

  40. Incremental GC Properties

  41. Incremental GC Properties • Collector sees conservative approximation of reachability graph

  42. Incremental GC Properties • Collector sees conservative approximation of reachability graph • Conservatism leads to floating garbage

  43. Incremental GC Properties • Collector sees conservative approximation of reachability graph • Conservatism leads to floating garbage • Strong approximations decrease incrementality

  44. Quality Criterias

  45. Quality Criterias • Conservatism: level of floating garbage produced

  46. Quality Criterias • Conservatism: level of floating garbage produced • Incrementality: more fine-grained is better

  47. Quality Criterias • Conservatism: level of floating garbage produced • Incrementality: more fine-grained is better • Mutator overhead: processor and memory costs

  48. Concurrent Mark-Sweep

  49. Concurrent Mark-Sweep • [Steele, 1975]

  50. Concurrent Mark-Sweep • [Steele, 1975] • mutator and collector running parallel

More Related