incremental garbage collection
play

Incremental Garbage Collection Part II Roland Schatz Incremental - PowerPoint PPT Presentation

Incremental Garbage Collection Part II Roland Schatz Incremental Garbage Collection p.1/22 Baker Disadvantages not concurrent Incremental Garbage Collection p.2/22 Baker Disadvantages not concurrent not even threadsafe


  1. Incremental Garbage Collection Part II Roland Schatz Incremental Garbage Collection – p.1/22

  2. Baker – Disadvantages not concurrent Incremental Garbage Collection – p.2/22

  3. Baker – Disadvantages not concurrent not even threadsafe Incremental Garbage Collection – p.2/22

  4. Baker – Disadvantages not concurrent not even threadsafe expensive read trap Incremental Garbage Collection – p.2/22

  5. Baker – Disadvantages not concurrent not even threadsafe expensive read trap requires hardware support Incremental Garbage Collection – p.2/22

  6. Appel-Ellis-Li Collector no black ⇒ white pointers Incremental Garbage Collection – p.3/22

  7. Appel-Ellis-Li Collector no black ⇒ white pointers Baker’s invariant Incremental Garbage Collection – p.3/22

  8. Appel-Ellis-Li Collector no black ⇒ white pointers Baker’s invariant mutator never sees white pointers Incremental Garbage Collection – p.3/22

  9. Appel-Ellis-Li Collector no black ⇒ white pointers Baker’s invariant mutator never sees white pointers intercept all pointer reads Incremental Garbage Collection – p.3/22

  10. Appel-Ellis-Li Collector no black ⇒ white pointers Baker’s invariant mutator never sees white pointers intercept all pointer reads slightly stricter constraint Incremental Garbage Collection – p.3/22

  11. Appel-Ellis-Li Collector no black ⇒ white pointers Baker’s invariant mutator never sees white pointers intercept all pointer reads slightly stricter constraint mutator only sees black objects Incremental Garbage Collection – p.3/22

  12. Appel-Ellis-Li Collector no black ⇒ white pointers Baker’s invariant mutator never sees white pointers intercept all pointer reads slightly stricter constraint mutator only sees black objects use page protection hardware Incremental Garbage Collection – p.3/22

  13. Memory Layout end new objects alloc free space unscanned potential unscanned objects garbage scanned scanned objects start fromspace tospace Incremental Garbage Collection – p.4/22

  14. Page Protection black pages Incremental Garbage Collection – p.5/22

  15. Page Protection black pages contain only tospace pointers Incremental Garbage Collection – p.5/22

  16. Page Protection black pages contain only tospace pointers no problem Incremental Garbage Collection – p.5/22

  17. Page Protection black pages contain only tospace pointers no problem white pages Incremental Garbage Collection – p.5/22

  18. Page Protection black pages contain only tospace pointers no problem white pages mutator never sees white pointers Incremental Garbage Collection – p.5/22

  19. Page Protection black pages contain only tospace pointers no problem white pages mutator never sees white pointers so we don’t care Incremental Garbage Collection – p.5/22

  20. Page Protection gray pages Incremental Garbage Collection – p.6/22

  21. Page Protection gray pages mutator may see gray pointers Incremental Garbage Collection – p.6/22

  22. Page Protection gray pages mutator may see gray pointers mutator must not see gray objects Incremental Garbage Collection – p.6/22

  23. Page Protection gray pages mutator may see gray pointers mutator must not see gray objects set to no access Incremental Garbage Collection – p.6/22

  24. Handling Page Faults Tospace Read barrier Mutator before the trap Incremental Garbage Collection – p.7/22

  25. Handling Page Faults Tospace Read barrier Mutator before the trap Incremental Garbage Collection – p.7/22

  26. Handling Page Faults Tospace Tospace Read barrier Mutator before the trap after the trap Incremental Garbage Collection – p.7/22

  27. Handling Page Faults Tospace Tospace Read barrier Mutator before the trap after the trap Incremental Garbage Collection – p.7/22

  28. Summary advantages Incremental Garbage Collection – p.8/22

  29. Summary advantages concurrent scanning possible Incremental Garbage Collection – p.8/22

  30. Summary advantages concurrent scanning possible cheaper read trap Incremental Garbage Collection – p.8/22

  31. Summary advantages concurrent scanning possible cheaper read trap problems Incremental Garbage Collection – p.8/22

  32. Summary advantages concurrent scanning possible cheaper read trap problems relies on virtual memory Incremental Garbage Collection – p.8/22

  33. Summary advantages concurrent scanning possible cheaper read trap problems relies on virtual memory global lock is bottleneck Incremental Garbage Collection – p.8/22

  34. Summary advantages concurrent scanning possible cheaper read trap problems relies on virtual memory global lock is bottleneck flip is still stop-the-world Incremental Garbage Collection – p.8/22

  35. Nettle’s Replicating Collector read barrier is still expensive Incremental Garbage Collection – p.9/22

  36. Nettle’s Replicating Collector read barrier is still expensive use write barrier instead Incremental Garbage Collection – p.9/22

  37. Nettle’s Replicating Collector Fromspace Tospace getHeader forward ptr header word read Mutator original write replica GC Incremental Garbage Collection – p.10/22

  38. Nettle’s Replicating Collector Fromspace Tospace getHeader forward ptr header word read Mutator original write replica GC Mutation Log Incremental Garbage Collection – p.10/22

  39. Huelsbergen-Laurus Collector distinguish mutable/immutable objects Incremental Garbage Collection – p.11/22

  40. Huelsbergen-Laurus Collector distinguish mutable/immutable objects e.g. ML Incremental Garbage Collection – p.11/22

  41. Huelsbergen-Laurus Collector distinguish mutable/immutable objects e.g. ML immutable objects Incremental Garbage Collection – p.11/22

  42. Huelsbergen-Laurus Collector distinguish mutable/immutable objects e.g. ML immutable objects replicating collection Incremental Garbage Collection – p.11/22

  43. Huelsbergen-Laurus Collector distinguish mutable/immutable objects e.g. ML immutable objects replicating collection mutable objects Incremental Garbage Collection – p.11/22

  44. Huelsbergen-Laurus Collector distinguish mutable/immutable objects e.g. ML immutable objects replicating collection mutable objects classic copying collection Incremental Garbage Collection – p.11/22

  45. Doligez-Leroy Collector Problem: heavy synchronization Incremental Garbage Collection – p.12/22

  46. Doligez-Leroy Collector Problem: heavy synchronization seperate thread-local data Incremental Garbage Collection – p.12/22

  47. Doligez-Leroy Collector Problem: heavy synchronization seperate thread-local data young generation Incremental Garbage Collection – p.12/22

  48. Doligez-Leroy Collector Problem: heavy synchronization seperate thread-local data young generation thread-local Incremental Garbage Collection – p.12/22

  49. Doligez-Leroy Collector Problem: heavy synchronization seperate thread-local data young generation thread-local immutable Incremental Garbage Collection – p.12/22

  50. Doligez-Leroy Collector Problem: heavy synchronization seperate thread-local data young generation thread-local immutable old generation Incremental Garbage Collection – p.12/22

  51. Doligez-Leroy Collector Problem: heavy synchronization seperate thread-local data young generation thread-local immutable old generation the rest Incremental Garbage Collection – p.12/22

  52. Thread Local Heaps thread 1 thread 2 thread 3 young generation old generation Global variables Incremental Garbage Collection – p.13/22

  53. In-Place Garbage Collection uncooperative environment Incremental Garbage Collection – p.14/22

  54. In-Place Garbage Collection uncooperative environment relaxed consistency requirements Incremental Garbage Collection – p.14/22

  55. In-Place Garbage Collection uncooperative environment relaxed consistency requirements Fragmentation! Incremental Garbage Collection – p.14/22

  56. Four-Color Abstraction black: scanned Incremental Garbage Collection – p.15/22

  57. Four-Color Abstraction black: scanned gray: marked, not scanned Incremental Garbage Collection – p.15/22

  58. Four-Color Abstraction black: scanned gray: marked, not scanned white: not marked Incremental Garbage Collection – p.15/22

  59. Four-Color Abstraction black: scanned gray: marked, not scanned white: not marked dead-white: free objects Incremental Garbage Collection – p.15/22

  60. Four-Color Implementation end new objects alloc free space unscanned potential unscanned objects garbage scanned scanned objects start fromspace tospace Incremental Garbage Collection – p.16/22

  61. Baker’s Treadmill scan Tospace new objects top Fromspace free list free bottom Incremental Garbage Collection – p.17/22

  62. Baker’s Treadmill scan Tospace new objects top Fromspace free list free bottom Incremental Garbage Collection – p.17/22

  63. Baker’s Treadmill scan Tospace new objects free list Fromspace top free bottom Incremental Garbage Collection – p.17/22

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend