Legal claims defining the scope of protection. Each claim is shown in both the original legal language and a plain English translation.
1. A method of pause-less garbage collection, comprising: garbage collecting within a first region of a memory; and garbage collecting within a second region of the memory, wherein the second region of the memory includes a second plurality of objects stored therein, wherein the second plurality of objects includes one or more live objects, and wherein garbage collecting within the second region includes incrementally replicating the one or more live objects from the second region as one or more replicated objects within the first region while maintaining application read and write access to the one or more live objects within the second region via application references to the one or more live objects within the second region.
2. The method of claim 1 , wherein the memory includes a plurality of locations, and wherein the method further comprises, prior to garbage collecting within the first region and garbage collecting within the second region, selecting memory locations that comprise the first region as a consolidation region and selecting memory locations that comprise the second region as an evacuation region.
3. The method of claim 1 , wherein garbage collecting within the first region and garbage collecting within the second region are performed using a plurality of garbage collection threads.
4. The method of claim 1 , wherein the application includes a plurality of application threads, and wherein the method further comprises incrementally scanning a runtime stack for each application thread when garbage collecting within each of the first and second regions.
5. The method of claim 1 , further comprising inhibiting relocation of a first object resident in the second region in response to the application temporarily pinning the first object while the object is shared with an operating system or coprocessor.
6. The method of claim 1 , wherein garbage collecting within each of the first and second regions is performed by one or more garbage collection threads resident in each of a plurality of processing cores, wherein each processing core is allocated a different portion of the first region and a different portion of the second region, and wherein the one or more garbage collection threads resident in each of the plurality of processing cores handle garbage collection for the allocated portions of the first and second regions for the processing cores upon which the one or more garbage collection threads reside.
7. The method of claim 1 , wherein garbage collecting within the first region is performed concurrently with garbage collecting within the second region.
8. A system comprising: a memory; and a processor coupled with the memory, the processor configured to perform pause-less garbage collection by: garbage collecting within a first region of a memory; and garbage collecting within a second region of the memory, wherein the second region of the memory includes a second plurality of objects stored therein, wherein the second plurality of objects includes one or more live objects, and wherein garbage collecting within the second region includes incrementally replicating the one or more live objects from the second region as one or more replicated objects within the first region while maintaining application read and write access to the one or more live objects within the second region via application references to the one or more live objects within the second region.
9. A computer program product comprising a computer readable storage medium including program instructions embodied therewith, the program instructions executable by an electronic computer processor to perform pause-less garbage collection by: garbage collecting within a first region of a memory; and garbage collecting within a second region of the memory, wherein the second region of the memory includes a second plurality of objects stored therein, wherein the second plurality of objects includes one or more live objects, and wherein garbage collecting within the second region includes incrementally replicating the one or more live objects from the second region as one or more replicated objects within the first region while maintaining application read and write access to the one or more live objects within the second region via application references to the one or more live objects within the second region.
10. The method of claim 1 , further comprising overwriting, after replicating the one or more live objects from the second region, the application references to reference the one or more replicated objects within the first region.
This invention relates to data replication in distributed systems, specifically addressing the challenge of efficiently transferring live objects between regions while maintaining application consistency. The method involves replicating one or more live objects from a second region to a first region, ensuring that the objects are copied accurately and remain accessible during the process. After replication, the system overwrites application references to point to the replicated objects in the first region, ensuring that applications continue to access the correct data without disruption. This approach minimizes downtime and data inconsistency by dynamically updating references once replication is complete, improving system reliability and performance in distributed environments. The method is particularly useful in cloud computing, where data must be replicated across geographically dispersed regions to enhance availability and fault tolerance. By automating the reference update process, the invention reduces manual intervention and potential errors, ensuring seamless data access for applications. The solution is designed to work with various types of live objects, including databases, files, or other shared resources, making it versatile for different use cases. The key innovation lies in the automated reference overwriting step, which ensures that applications are always directed to the most recent and relevant data copies.
11. The method of claim 10 , wherein the first region of the memory includes a first plurality of objects stored therein, wherein the first plurality of objects includes one or more live objects and one or more reclaimable objects, wherein garbage collecting within the first region further comprises: incrementally reclaiming the one or more reclaimable objects of the first plurality of objects while retaining the one or more live objects of the first plurality of objects in the first region; and incrementally scanning the first plurality of objects to identify the one or more live objects and the one or more reclaimable objects of the first plurality of objects; and wherein garbage collecting within the second region further comprises incrementally scanning the second plurality of objects to identify the one or more live objects and one or more reclaimable objects of the second plurality of objects.
This invention relates to memory management in computing systems, specifically to garbage collection techniques for reclaiming memory occupied by unreachable objects while preserving live objects. The problem addressed is the inefficiency and disruption caused by traditional garbage collection methods, which often pause application execution or require significant computational overhead. The solution involves an incremental garbage collection process that operates on distinct memory regions, minimizing performance impact. The method divides memory into at least two regions, each containing multiple objects, some of which are live (still in use) and others reclaimable (no longer needed). In the first region, the process incrementally reclaims memory from reclaimable objects while retaining live objects in place. This involves scanning the objects in the first region to distinguish between live and reclaimable objects, then reclaiming memory from the reclaimable objects in small, manageable steps. The second region undergoes a similar incremental scanning process to identify live and reclaimable objects, though the method does not specify reclamation for this region, suggesting it may be handled differently or in a subsequent step. The incremental approach reduces the burden on system resources by distributing the garbage collection workload over time, rather than performing it all at once. This technique is particularly useful in systems where continuous operation and low latency are critical.
12. The method of claim 11 , further comprising reclaiming the one or more reclaimable objects of the second plurality of objects.
13. The method of claim 12 , wherein reclaiming the one or more reclaimable objects of the second plurality of objects further includes reclaiming a portion of the second region that includes the one or more live objects of the second plurality of objects after overwriting the application references.
14. The method of claim 13 , wherein the portion of the second region additionally includes the one or more reclaimable objects of the second plurality of objects.
A system and method for managing memory allocation and reclamation in a computing environment involves tracking objects in memory regions to optimize performance and resource utilization. The method includes identifying a first region containing a first plurality of objects and a second region containing a second plurality of objects. The first region is designated for active use, while the second region is designated for reclamation. The method further involves reclaiming memory from the second region by identifying and reclaiming one or more reclaimable objects within it. Additionally, the method ensures that a portion of the second region, which may include some of the reclaimable objects from the second plurality, is processed to facilitate efficient memory management. This approach helps reduce fragmentation and improve memory allocation efficiency by systematically reclaiming unused or less frequently accessed objects while maintaining system performance. The method may also involve dynamically adjusting the boundaries between regions based on memory usage patterns to further optimize resource allocation.
15. The method of claim 10 , wherein garbage collecting within the first and second regions and overwriting the application references are performed in a plurality of garbage collection phases, wherein overwriting the application references is performed during a predetermined garbage collection phase among the plurality of garbage collection phases, wherein the method further comprises enabling an application read barrier in the predetermined garbage collection phase, and wherein the application has read access to objects in the first and second regions without any read barrier during each garbage collection phase among the plurality of garbage collection phases other than the predetermined garbage collection phase.
16. The method of claim 10 , further comprising: enabling an application read barrier during overwriting the application references; and disabling the application read barrier during garbage collecting within the first and second regions such that the application has read access to objects in the first and second regions without any read barrier while the application read barrier is disabled.
17. The method of claim 10 , wherein the application includes a plurality of functions, wherein each function among the plurality of functions performs one or more read accesses, wherein each function among the plurality of functions includes first and second implementations, wherein the first and second implementations of each function among the plurality of functions have corresponding behaviors but with the second implementation thereof additionally implementing a read barrier on each of the one or more read accesses performed thereby, and wherein the method further comprises: executing second implementations of any functions among the plurality of functions that are called while garbage collection is in one or more predetermined garbage collection phases; and executing first implementations of any functions among the plurality of functions that are called while garbage collection is not in the one or more predetermined garbage collection phases.
18. The method of claim 17 , further comprising: in response to returning to an application thread after preemption of the application thread by a garbage collection thread, determining whether a transition has occurred to or from the one or more predetermined garbage collection phases; and in response to a determination that the transition has occurred, overwriting a return address in a runtime stack for the application thread to return to a different implementation of a calling function than that which called a current function being executed by the application thread.
19. The method of claim 18 , further comprising automatically inserting one or more preemption points into the application to enable an application thread of the application to be preempted by garbage collection.
20. The method of claim 17 , wherein overwriting the application references is performed during the one or more predetermined garbage collection phases, wherein incrementally reclaiming the one or more reclaimable objects of the first plurality of objects while retaining the one or more live objects of the first plurality of objects in the first region, and incrementally replicating the one or more live objects from the second region as one or more replicated objects within the first region while maintaining application read and write access to the one or more live objects within the second region via application references to the one or more live objects within the second region, are performed in one or more other garbage collection phases than the one or more predetermined garbage collection phases.
This invention relates to memory management in computing systems, specifically a method for optimizing garbage collection in a memory region. The problem addressed is the inefficiency in reclaiming memory while maintaining application performance, particularly during garbage collection phases where live objects must be preserved while reclaiming unused objects. The method involves dividing memory into at least two regions, where a first region contains a plurality of objects, some of which are live and others reclaimable. During one or more predetermined garbage collection phases, the application references to live objects are overwritten. In separate garbage collection phases, the method incrementally reclaims the reclaimable objects from the first region while retaining the live objects in place. Simultaneously, it incrementally replicates the live objects from a second region into the first region, ensuring that application read and write access to the live objects in the second region remains uninterrupted via application references. This phased approach minimizes disruptions to application performance by separating the tasks of reclaiming memory and replicating live objects into distinct phases, allowing continuous access to live data. The technique improves memory efficiency while maintaining system responsiveness.
Unknown
March 2, 2021
Browse 5M+ US patents with plain-English claim translations and AI-generated analysis.