Channel: Gaurav Sen
Category: Education
Tags: software interviewinterview preparationcracking the coding interviewgaurav sensystem designgrokking the system design interviewcoding interviewprogrammingsystem design interviewinterviews
Description: We continue trying to optimize our the garbage collection process with concurrent algorithms, write barriers and compaction. Concurrent algorithms allow our application to respond to requests intermittently while the GC runs. This reduces app latency (although it also reduces app throughput). Compaction allows efficient memory allocation, but has the downside of stopping the application while objects are moved from one region to another. We discuss the problems, solutions and algorithms to speed up garbage collection here. Part 1: youtu.be/ZhbIReLe-r8 0:00 - Agenda 0:41 - Concurrency 1:34 - Lost object problem 2:41 - Defining constraints 3:25 - Solving through Write Barrier 3:49 - Memory Fragmentation 4:51 - G1GC 5:45 - Remembered Set 6:28 - Lost Update problem 7:09 - Solution teaser Final part coming soon! References: Tricolor Algorithm: Knuth, The art of computer programming Generational Hypothesis: people.cs.umass.edu/~emery/classes/cmpsci691s-fall2004/papers/p157-ungar.pdf System Design Video Course: get.interviewready.io Software Engineering Fundamentals: youtube.com/playlist?list=PLMCXHnjXnTntYbKsUs6Pj8_BO_8ou4y07 You can follow me on: Instagram: instagram.com/applepie404 LinkedIn: linkedin.com/in/gaurav-sen-56b6a941 Quora: quora.com/profile/Gaurav-Sen-6 Twitter: twitter.com/gkcs_ #GarbageCollection #JavaGC #JavaGarbageCollection