IP Library Granted Patent US 7,756,912
Granted Patent B2
US 7,756,912 · App. 11/864,849 · Granted Jul 13, 2010

Method and system for minor garbage collection in a multitasking 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 7,756,912
App. No.
11/864,849
Granted
Jul 13, 2010
Kind
B2
Abstract

A method for minor garbage collection in a multitasking environment involves marking cards as clean, where the cards designate ranges of memory locations in a shared older generation. The method further involves marking a card as dirty when a reference field of an object within the card is modified, where a memory location of the reference field is designated by the card, where the reference field references a live young object in a task-specific young generation, and where the task-specific young generation is associated with a first task. The method further involves marking the card as single-dirty when the card only includes roots of live young objects in the task-specific young generation, and optimizing task-specific minor garbage collection for a second task by skipping the card when the card is marked as single-dirty.

Claims (49)

1. A method for minor garbage collection in a multitasking environment comprising:

marking, by a processor, a plurality of cards as clean, wherein the plurality of cards designates ranges of memory locations in a shared older generation;

marking, by the processor, a card selected from the plurality of cards as dirty when a reference field of an object within the card is modified,

wherein a memory location of the reference field is designated by the card,

wherein the reference field references a live young object in a task-specific young generation selected from a plurality of task-specific generations, and

wherein the task-specific young generation is associated with a first task selected from a plurality of tasks;

marking, by the processor, the card as single-dirty when the card only includes roots of live young objects in the task-specific young generation, wherein marking the card as single-dirty comprises recording a unique identifier associated with the first task, wherein the unique identifier is a byte comprising a plurality of possible values, and wherein the plurality of possible values is associated with dirty, clean, and the plurality of tasks; and

optimizing, by the processor, task-specific minor garbage collection for a second task selected from the plurality of tasks by skipping the card when the card is marked as single-dirty.

2. The method of claim 1 , further comprising:

including the card during task-specific minor garbage collection for the first task when the card is marked as single-dirty.

3. The method of claim 1 , further comprising:

including the card during task-specific minor garbage collection for the second task when the card is marked as dirty.

4. The method of claim 1 , further comprising:

scanning the card to identify roots of live young objects when the card is marked as dirty, wherein marking the card as single-dirty is performed based on information gathered while scanning the card.

5. The method of claim 1 , wherein marking the card as single-dirty is performed when the card is filled with promoted objects associated with the first task.

6. A system comprising:

a processor;

a memory comprising:

a plurality of task-specific young generations for storing young objects associated with a plurality of tasks; and

a shared older generation for storing promoted objects associated with the plurality of tasks; and

a garbage collector executing on the processor and configured to perform minor garbage collection by:

marking a plurality of cards as clean, wherein the plurality of cards designates ranges of memory locations in the shared older generation;

marking a card selected from the plurality of cards as dirty when a reference field of an object within the card is modified,

wherein a memory location of the reference field is designated by the card, and

wherein the reference field references a live young object in a task-specific young generation selected from the plurality of task-specific generations;

marking the card as single-dirty when the card only includes roots of live young objects in the task-specific young generation, wherein marking the card as single-dirty comprises recording a unique identifier associated with the first task, wherein the unique identifier is a byte comprising a plurality of possible values, and wherein the plurality of possible values is associated with dirty, clean, and the plurality of tasks; and

optimizing task-specific minor garbage collection for a second task selected from the plurality of tasks by skipping the card when the card is marked as single-dirty.

7. The system of claim 6 , wherein the garbage collector is further configured to perform minor garbage collection by:

including the card during task-specific minor garbage collection for the first task when the card is marked as single-dirty.

8. The system of claim 6 , wherein the garbage collector is further configured to perform minor garbage collection by:

including the card during task-specific minor garbage collection for the second task when the card is marked as dirty.

9. The system of claim 6 , wherein the garbage collector is further configured to perform minor garbage collection by:

scanning the card to identify roots of live young objects when the card is marked as dirty, wherein marking the card as single-dirty is performed based on information gathered while scanning the card.

10. The system of claim 6 , wherein the garbage collector is configured mark the card as single-dirty when the card is filled with promoted objects associated with the first task.

11. A computer readable medium comprising executable instructions for minor garbage collection in a multitasking environment, wherein the executable instructions comprise instructions to:

mark a plurality of cards as clean, wherein the plurality of cards designates ranges of memory locations in a shared older generation;

mark a card selected from the plurality of cards as dirty when a reference field of an object within the card is modified,

wherein a memory location of the reference field is designated by the card,

wherein the reference field references a live young object in a task-specific young generation selected from a plurality of task-specific generations, and

wherein the task-specific young generation is associated with a first task selected from a plurality of tasks;

mark the card as single-dirty when the card only includes roots of live young objects in the task-specific young generation, wherein instructions to mark the card as single-dirty comprise instructions to record a unique identifier associated with the first task, wherein the unique identifier is a byte comprising a plurality of possible values, and wherein the plurality of possible values is associated with dirty, clean, and the plurality of tasks; and

optimize task-specific minor garbage collection for a second task selected from the plurality of tasks by skipping the card when the card is marked as single-dirty.

12. The computer readable medium of claim 11 , wherein the executable instructions further comprise instructions to:

include the card during task-specific minor garbage collection for the first task when the card is marked as single-dirty.

13. The computer readable medium of claim 11 , wherein the executable instructions further comprise instructions to:

include the card during task-specific minor garbage collection for the second task when the card is marked as dirty.

14. The computer readable medium of claim 11 , wherein the executable instructions further comprise instructions to:

scan the card to identify roots of live young objects when the card is marked as dirty, wherein instructions to mark the card as single-dirty are executed based on information gathered while scanning the card.

15. The computer readable medium of claim 11 , wherein instructions to mark the card as single-dirty are executed when the card is filled with promoted objects associated with the first task.

Assignments (2)
MERGER AND CHANGE OF NAME Recorded Dec 16, 2015
From: ORACLE USA, INC.; SUN MICROSYSTEMS, INC.; ORACLE AMERICA, INC.
To: ORACLE AMERICA, INC.
Reel/Frame 037306/0514 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Oct 2, 2007
From: DAYNES, LAURENT PHILIPPE
To: SUN MICROSYSTEMS, INC.
Reel/Frame 019905/0921 →