IP Library Granted Patent US 8,024,378
Granted Patent B2
US 8,024,378 · App. 11/954,107 · Granted Sep 20, 2011

System and method to reduce the promotion rate in a generational garbage collector in a virtual machine environment

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,024,378
App. No.
11/954,107
Granted
Sep 20, 2011
Kind
B2
Abstract

A system for generational garbage collection in a virtual machine environment, comprising a virtual machine for executing a software application; a memory space for use by the virtual machine in storing software objects and pointers as part of the software application, divided into a three space nursery and an old space heap; a nursery garbage collector that can collect two out of the three spaces to reduce the promotion rate; and an old space garbage collector.

Claims (87)

1. A system for nursery garbage collection in a virtual machine environment, comprising:

a computer server that includes a microprocessor;

a virtual machine for executing a software application;

a memory space, divided into a multiple space nursery and an old space heap, for use by the virtual machine in storing software objects and pointers as part of the software application, wherein the multiple space nursery includes

a nursery body space including a nursery body, and

a plurality of nursery tail spaces, including a first nursery tail and a second nursery tail, each of which nursery tails are provided separately from each other and from the nursery body within the nursery, each of which nursery tails can also be garbage-collected separately from one another so that live objects therein are promoted to the old space heap;

a nursery garbage collector that garbage collects the nursery spaces to reduce the promotion rate, including alternately garbage collecting within a selection of the nursery body, first nursery tail, and second nursery tail;

wherein during execution of the software application, the system alternately selects one of the nursery tails within which to allocate the objects,

allocates the objects in an order that includes the nursery body, and then the selected nursery tail,

garbage collects a selection of the nursery body and nursery tails, leaving others of the nursery body and nursery tails until a subsequent nursery collection,

allocates the objects in an order that includes the nursery body and the other nursery tail, and

repeats the object allocation and garbage collection with different selections and orders of allocation of the objects within the nursery body and the nursery tails; and

an old space garbage collector, that subsequently garbage collects objects that have been promoted to the old space heap.

2. The system of claim 1 wherein the multiple space nursery is provided as a three space nursery that includes a nursery body and two or more nursery tails, and wherein the nursery garbage collector alternately selects and garbage collects, during each nursery collection, the nursery body and a selected one of the nursery tails, to reduce the promotion rate.

3. The system of claim 2 wherein during nursery collection the nursery body and the selected nursery tail are garbage collected and all live objects found within these two spaces are promoted to the old space heap, and wherein additional objects in the non-selected nursery tail are not promoted, but are instead saved in the nursery until the next young collection.

4. The system of claim 2 wherein the three nursery spaces are divided into a body and two tails and wherein the body is larger than a tail.

5. The system of claim 2 wherein the three nursery spaces are divided into a body and two tails and wherein the size of the tails compared to the body can be tuned to adapt to the application behavior.

6. The system of claim 1 wherein during the execution of the software application, the system alternately

allocates objects to the nursery body and the first nursery tail,

garbage collects the second nursery tail, leaving the first nursery tail until a subsequent nursery collection,

allocates objects to the nursery body and the second nursery tail,

garbage collects the first nursery tail, leaving the second nursery tail until a subsequent nursery collection, and

repeats the object allocation and garbage collection of the nursery body and tails as required.

7. The system of claim 1 wherein

the multiple space nursery is provided as a three space nursery that includes a nursery body and two or more nursery tail, and

the nursery garbage collector alternately selects and garbage collects, during each nursery collection, the nursery body and a selected one of the nursery tails, and

during the execution of the software application, the system alternately

allocates objects to the nursery body and the first nursery tail,

garbage collects the second nursery tail, leaving the first nursery tail until a subsequent nursery collection,

allocates objects to the nursery body and the second nursery tail,

garbage collects the first nursery tail, leaving the second nursery tail until a subsequent nursery collection, and

repeats the object allocation and garbage collection of the nursery body and tails as required.

8. A method for nursery garbage collection in a virtual machine environment, comprising the steps of:

providing a virtual machine for executing a software application;

providing a memory space, divided into a multiple space nursery and an old space heap, for use by the virtual machine in storing software objects and pointers as part of the software application, wherein the multiple space nursery includes

a nursery body space including a nursery body, and

a plurality of nursery tail spaces, including a first nursery tail and a second nursery tail, each of which nursery tails are provided separately from each other and from the nursery body within the nursery, each of which nursery tails can also be garbage-collected separately from one another so that live objects therein are promoted to the old space heap;

using a nursery garbage collector that garbage collects the nursery spaces to reduce the promotion rate, including alternately garbage collecting within a selection of the nursery body, first nursery tail, and second nursery tail;

during execution of the software application, alternately

selecting one of the nursery tails within which to allocate the objects,

allocating the objects in an order that includes the nursery body, and then the selected nursery tail,

garbage collecting a selection of the nursery body and nursery tails, leaving others of the nursery body and nursery tails until a subsequent nursery collection,

allocating the objects in an order that includes the nursery body and the other nursery tail, and

repeating the object allocation and garbage collection with different selections and orders of allocation of the objects within the nursery body and the nursery tails; and

subsequently garbage collecting objects that have been promoted to the old space heap.

9. The method of claim 8 wherein the multiple space nursery is provided as a three space nursery that includes a nursery body and two or more nursery tails, and wherein the nursery garbage collector alternately selects and garbage collects, during each nursery collection, the nursery body and a selected one of the nursery tails, to reduce the promotion rate.

10. The method of claim 9 wherein during nursery collection the nursery body and the selected nursery tail are garbage collected and all live objects found within these two spaces are promoted to the old space heap, and wherein additional objects in the non-selected nursery tail are not promoted, but are instead saved in the nursery until the next young collection.

11. The method of claim 9 wherein the three nursery spaces are divided into a body and two tails and wherein the body is larger than a tail.

12. The method of claim 9 wherein the three nursery spaces are divided into a body and two tails and wherein the size of the tails compared to the body can be tuned to adapt to the application behavior.

13. The method of claim 8 , wherein during the execution of the software application, the method includes

allocating objects to the nursery body and the first nursery tail,

garbage collecting the second nursery tail, leaving the first nursery tail until a subsequent nursery collection,

allocating objects to the nursery body and the second nursery tail,

garbage collecting the first nursery tail, leaving the second nursery tail until a subsequent nursery collection, and

repeating the object allocation and garbage collection of the nursery body and tails as required.

14. The method of claim 8 , wherein

the multiple space nursery is provided as a three space nursery that includes a nursery body and two or more nursery tails, and

the nursery garbage collector alternately selects and garbage collects, during each nursery collection, the nursery body and a selected one of the nursery tails, and

during the execution of the software application, the system alternately

allocates objects to the nursery body and the first nursery tail,

garbage collects the second nursery tail, leaving the first nursery tail until a subsequent nursery collection,

allocates objects to the nursery body and the second nursery tail,

garbage collects the first nursery tail, leaving the second nursery tail until a subsequent nursery collection, and

repeats the object allocation and garbage collection of the nursery body and tails as required.

15. A non-transitory computer readable medium, including instructions stored thereon which when executed cause the computer to perform the steps of:

providing a virtual machine for executing a software application;

providing a memory space, divided into a multiple space nursery and an old space heap, for use by the virtual machine in storing software objects and pointers as part of the software application, wherein the multiple space nursery includes

a nursery body space including a nursery body, and

a plurality of nursery tail spaces, including a first nursery tail and a second nursery tail, each of which nursery tails are provided separately from each other and from the nursery body within the nursery, each of which nursery tails can also be garbage-collected separately from one another so that live objects therein are promoted to the old space heap;

using a nursery garbage collector that garbage collects the nursery spaces to reduce the promotion rate, including alternately garbage collecting within a selection of the nursery body, first nursery tail, and second nursery tail;

during execution of the software application, alternately

selecting one of the nursery tails within which to allocate the objects,

allocating the objects in an order that includes the nursery body, and then the selected nursery tail,

garbage collecting a selection of the nursery body and nursery tails, leaving others of the nursery body and nursery tails until a subsequent nursery collection,

allocating the objects in an order that includes the nursery body and the other nursery tail, and

repeating the object allocation and garbage collection with different selections and orders of allocation of the objects within the nursery body and the nursery tails; and

subsequently garbage collecting objects that have been promoted to the old space heap.

16. The non-transitory computer readable medium of claim 15 wherein the multiple space nursery is provided as a three space nursery that includes a nursery body and two or more nursery tails, and wherein the nursery garbage collector alternately selects and garbage collects, during each nursery collection, the nursery body and a selected one of the nursery tails, to reduce the promotion rate.

17. The non-transitory computer readable medium of claim 16 wherein during nursery collection the nursery body and the selected nursery tail are garbage collected and all live objects found within these two spaces are promoted to the old space heap, and wherein additional objects in the non-selected nursery tail are not promoted, but are instead saved in the nursery until the next young collection.

18. The non-transitory computer readable medium of claim 16 wherein the three nursery spaces are divided into a body and two tails and wherein the body is larger than a tail.

19. The non-transitory computer readable medium of claim 16 wherein the three nursery spaces are divided into a body and two tails and wherein the size of the tails compared to the body can be tuned to adapt to the application behavior.

20. The non-transitory computer readable medium of claim 15 wherein during the execution of the software application, the steps include

allocating objects to the nursery body and the first nursery tail,

garbage collecting the second nursery tail, leaving the first nursery tail until a subsequent nursery collection,

allocating objects to the nursery body and the second nursery tail,

garbage collecting the first nursery tail, leaving the second nursery tail until a subsequent nursery collection, and

repeating the object allocation and garbage collection of the nursery body and tails as required.

Assignments (2)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 15, 2010
From: BEA SYSTEMS, INC.
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 025192/0244 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Dec 11, 2007
From: PEURA, NOORA; LINDHOLM, DAVID
To: BEA SYSTEMS, INC.
Reel/Frame 020238/0071 →