IP Library › Granted Patent US 8,516,019
Granted Patent B2
US 8,516,019 · App. 13/251,922 · Granted Aug 20, 2013

Time-based object aging for generational garbage collectors

Inventors: Charlie J. Hunt (Libertyville, IL); Antonios Printezis (Burlington, MA); Staffan Friberg (Hagersten, SE)
Assignee: Oracle America, Inc.
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,516,019
App. No.
13/251,922
Granted
Aug 20, 2013
Kind
B2
Abstract

System and Methods for time-based object aging for generational garbage collectors are provided. Time data is received from a user identifying the amount of time an object should survive in a generation defined in a heap. A circular buffer is generated to store a plurality of starting time for a plurality of garbage collections. Generational garbage collection is performed, and the time data in conjunction with the starting times stored in the circular buffer are used to determine when objects are promoted from one generation to the next oldest generation.

Claims (46)

1. A method for time-based object aging generational garbage collection comprising:

receiving, using at least one processor, a time tenuring threshold specifying a time a plurality of objects survive in a memory;

receiving, using the at least one processor, a plurality of time stamps corresponding to a plurality of garbage collections, each time stamp of the plurality of time stamps including a start time of a particular garbage collection of the plurality of garbage collections;

calculating, using the at least one processor, an object tenure age threshold based on the plurality of time stamps and the time tenuring threshold, the object tenure age threshold specifying whether a particular object of a plurality of objects is promoted and wherein calculating the object tenure age threshold comprises:

storing, at the at least one processor, each time stamp of the plurality of time stamps in a circular buffer;

determining, at the at least one processor, an elapsed time value for each time stamp of the plurality of time stamps stored in the circular buffer and a time stamp of a current garbage collection;

identifying a youngest index slot in the circular buffer where the corresponding elapsed time value is equal to or greater than the time tenuring threshold; and

setting the tenure age to the youngest index slot+1; and

promoting, using the at least one processor, at least one object of the plurality of objects when an object age corresponding to the at least one object meets the object tenure age threshold.

2. The method of claim 1 , wherein the object age is equal to the number of garbage collections each object has survived.

3. The method of claim 1 , wherein the memory includes a heap arranged with at least a first generation and a second generation, and wherein promoting the at least one object of the plurality of objects comprises copying the at least one object from the first generation to the second generation when the object age corresponding to the at least one object meets the object tenure age threshold.

4. The method of claim 1 , further comprising incrementing the object age of each object promoted.

5. The method of claim 1 , further comprising incrementing the object age of each object promoted when an increment flag is set to true.

6. A system for time-based object aging generational garbage collection comprising:

at least one processor;

a memory in operable communication with the at least one processor; and

a time-based object aging generational garbage collection application comprising modules executable by the processor, the modules comprising:

a receiving module to:

receive a time tenuring threshold specifying a time a plurality of objects survive in a memory; and

receive a plurality of time stamps corresponding to a plurality of garbage collections, each time stamp of the plurality of time stamps including a start time of a particular garbage collection of the plurality of garbage collections;

an age calculation module to:

calculate an object tenure age threshold based on the plurality of time stamps and the time tenuring threshold, the object tenure age threshold specifying whether a particular object of a plurality of objects is promoted and wherein calculating the object tenure age threshold comprises:

storing each time stamp of the plurality of time stamps in a circular buffer;

determining an elapsed time value for each time stamp of the plurality of time stamps stored in the circular buffer and a time stamp of a current garbage collection;

identifying a youngest index slot in the circular buffer where the corresponding elapsed time value is equal to or greater than the time tenuring threshold; and

setting the tenure age to the youngest index slot+1; and

an object promotion module to promote at least one object of the plurality of objects when an object age corresponding to the at least one object meets the object tenure age threshold.

7. The system of claim 6 , wherein the object age is equal to the number of garbage collections each object has survived.

8. The system of claim 6 , wherein the memory includes a heap arranged with at least a first generation and a second generation, and wherein the object promotion module is further configured to copy the at least one object from the first generation to the second generation when the object age corresponding to the at least one object meets the object tenure age threshold.

9. The system of claim 6 , wherein the object promotion module is further configured to increment the object age of each object promoted.

10. The system of claim 6 , wherein the object promotion module is further configured to increment the object age of each object promoted when an increment flag is set to true.

11. A computer-readable medium encoded with time-based object aging generational garbage collection application comprising modules executable by a processor, the modules comprising:

a receiving module to:

receive a time tenuring threshold specifying a time a plurality of objects survive in a memory; and

receive a plurality of time stamps corresponding to a plurality of garbage collections, each time stamp of the plurality of time stamps including a start time of a particular garbage collection of the plurality of garbage collections;

an age calculation module to:

calculate an object tenure age threshold based on the plurality of time stamps and the time tenuring threshold, the object tenure age threshold specifying whether a particular object of a plurality of objects is promoted and wherein calculating the object tenure age threshold comprises:

storing each time stamp of the plurality of time stamps in a circular buffer;

determining an elapsed time value for each time stamp of the plurality of time stamps stored in the circular buffer and a time stamp of a current garbage collection;

identifying a youngest index slot in the circular buffer where the corresponding elapsed time value is equal to or greater than the time tenuring threshold; and

setting the tenure age to the youngest index slot+1; and

an object promotion module to promote at least one object of the plurality of objects when an object age corresponding to the at least one object meets the object tenure age threshold.

12. The computer-readable medium of claim 11 , wherein the object age is equal to the number of garbage collections each object has survived.

13. The computer-readable medium of claim 11 , wherein the memory includes a heap arranged with at least a first generation and a second generation, and wherein the object promotion module is further configured to copy the at least one object from the first generation to the second generation when the object age corresponding to the at least one object meets the object tenure age threshold.

14. The computer-readable medium of claim 11 , wherein the object promotion module is further configured to increment the object age of each object promoted.

15. The computer-readable medium of claim 11 , wherein the object promotion module is further configured to increment the object age of each object promoted when an increment flag is set to true.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 3, 2011
From: PRINTEZIS, ANTONIOS; HUNT, CHARLES J.; FRIBERG, STAFFAN
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 027008/0166 →
Continuity (1)
Related Publication 20130086131A1 · Apr 4, 2013