J. Eliot B. MossBenjamin MarlinPhilip ThomasAntony HoskingJacek, Nicholas2024-04-262024-04-262020-022020-0210.7275/qbxt-jm66https://hdl.handle.net/20.500.14394/18095Garbage collectors are nearly ubiquitous in modern programming languages, and we want to minimize the cost they impose in terms of time and space. Generally, a collector waits until its space is full and then performs a collection to reclaim needed memory. However, this is not the only option; a collection could be performed early when some free space remains. For copying collectors, which are what we consider here, the system must traverse the graph of live objects and copy them, so the cost of a collection is proportional to the volume of objects that are live. Since this value fluctuates during a program's execution, a collector can minimize its cost by carefully choosing the points at which it collects. We help to realize this goal in two ways. First, by developing an algorithm that analyzes after-the-fact traces and computes optimal collection points, we can explore the theoretical limits of garbage collectors. This gives insight into what performance gains are possible, and can guide future collector development into areas that could be most fruitful. Second, we use techniques from machine learning to find improved garbage collection policies that could be implemented in real systems. The optimal collection points provide ground truth from which a model can learn.http://creativecommons.org/licenses/by-nc-sa/4.0/garbage collectionmemory managementbehavioral cloningdynamic programmingArtificial Intelligence and RoboticsOptimization and Training of Generational Garbage Collectorsdissertationhttps://orcid.org/0000-0003-3021-8804