Incremental lock-free stack scanning for garbage collection
First Claim
Patent Images
1. A system of incremental lock free stack frame scanning, the system comprising:
- a processor;
a memory coupled to the processor and comprising computer readable storage medium storing instructions that, when executed by the processor, configure the processor to implement computer components comprising;
a mutator stack comprising a mutator stack frame, the mutator stack frame comprising a pointer value;
a summary data structure comprising a summary of the mutator stack frame;
a mutator reading the mutator stack frame and creating a summary of the pointer value and inserting the summary of the pointer value into the summary data structure when an atomic insertion operation is successful, the mutator being permitted to read, or modify, or both, the mutator stack, and wherein the mutator inserts the summary of the pointer value into the summary data structure before modifying the contents of the mutator stack frame and the mutator installs a return barrier after the atomic insertion operation; and
a garbage collector concurrently reading the mutator stack frame and creating a summary of the pointer and inserting the summary of the pointer into the summary data structure when an atomic insertion operation is successful, the garbage collector being permitted to read the mutator stack.
2 Assignments
0 Petitions
Accused Products
Abstract
Concurrent, incremental, and lock-free stack scanning for garbage collectors is disclosed. This method uses a summary table and return barriers to allow high responsiveness. The method also supports programs that employ fine-synchronization to avoid locks, imposes negligible overhead on program execution, can be used with existing concurrent collectors, and supports the special in-stack references existing in languages such as C#.
22 Citations
13 Claims
-
1. A system of incremental lock free stack frame scanning, the system comprising:
-
a processor; a memory coupled to the processor and comprising computer readable storage medium storing instructions that, when executed by the processor, configure the processor to implement computer components comprising; a mutator stack comprising a mutator stack frame, the mutator stack frame comprising a pointer value; a summary data structure comprising a summary of the mutator stack frame; a mutator reading the mutator stack frame and creating a summary of the pointer value and inserting the summary of the pointer value into the summary data structure when an atomic insertion operation is successful, the mutator being permitted to read, or modify, or both, the mutator stack, and wherein the mutator inserts the summary of the pointer value into the summary data structure before modifying the contents of the mutator stack frame and the mutator installs a return barrier after the atomic insertion operation; and a garbage collector concurrently reading the mutator stack frame and creating a summary of the pointer and inserting the summary of the pointer into the summary data structure when an atomic insertion operation is successful, the garbage collector being permitted to read the mutator stack. - View Dependent Claims (2, 3)
-
-
4. A system comprising:
-
a memory comprising a computer readable storage medium; a processor coupled to the memory; a garbage collector stored in the memory and configured to execute on the processor, concurrently scan a stack comprising stack frames, and read from the stack frame; and a mutator stored in the memory and configured to; execute on the processor, update a summary data structure comprising pointer values from the stack using an atomic insertion operation, during separate concurrent scans of the stack by the garbage collector and the mutator, read, or modify, or both, the stack frame, and install a return barrier after the atomic insertion operation. - View Dependent Claims (5, 6, 7, 8, 9)
-
-
10. A method comprising:
-
scanning a stack in a computer system comprising stack fragments concurrently with a garbage collector and a mutator; updating a summary data structure in the computer system using an atomic insertion operation initiated by the garbage collector and updating the summary data structure in the computer system using an atomic insertion operation initiated by the mutator, wherein each of the updatings occurs during separate concurrent scans of the stack by the garbage collector and the mutator, wherein the summary data structure comprises a pointer value from the stack; permitting the garbage collector to read from the stack; permitting the mutator to read, or write, or both, to the stack; and installing, by the mutator, a return barrier after the atomic insertion operation. - View Dependent Claims (11, 12, 13)
-
Specification