Garbage collector with concurrent flipping without read barrier and without verifying copying
AssigneeClausal Computing Oy
InventorTatu J. Ylonen
Life of this patent
Estimating the term…
Abstract
In an object-relocating garbage collector, objects are copied and new copies taken into use concurrently with mutator execution without needing to use a read barrier, and importantly, without requiring verification (read-back) of each copied word and without requiring atomic instructions for the copying. Write barriers, thread-local write barrier buffers and processing them by the garbage collector, and write propagation are used for achieving this.
Claims16
A method comprising:
- relocating, by a garbage collector, a plurality of objects from one or more old copy memory areas to one or more new copy memory areas, the original objects in the old copy memory areas being called the old copies of the objects, and the new copies of the objects in the new copy memory areas being called the new copies;
- switching one or more mutators to use the new copies of the relocated objects concurrently with at least one mutator executing;
- and
- achieving dynamic consistency between the old copies and the new copies without activating a read barrier to synchronize activities of the garbage collector and activities of the one or more mutators;
- wherein the improvement comprises:
- copying, during the relocating, objects from the old copies to the new copies without verifying copying of each copied word.
The method of 3, wherein:
- the re-copying uses an atomic instruction to ensure that a propagated value is not overwritten by re-copying a previously written value.
An apparatus comprising:
- one or more processors;
- and
- a memory comprising instructions for causing the one or more processors to:
- copy, without verifying copying of each copied word, a plurality of objects from one or more old copy memory areas to one or more new copy memory areas, the original objects in the old copy memory areas being called the old copies of the objects, and the new copies of the objects in the new copy memory areas being called the new copies;
- achieve dynamic consistency between the old copies and the new copies without activating a read barrier to synchronize activities of a garbage collector and activities of one or more mutators;
- and
- switch one or more mutators to use the new copies concurrently with at least one mutator executing.
A computer control logic stored on non-transitory computer-readable medium operable to cause one or more processors to:
- relocate a plurality of objects from one or more old copy memory areas to one or more new copy memory areas, the original objects in the old copy memory areas being called the old copies of the objects, and the new copies of the objects in the new copy memory areas being called the new copies;
- switch one or more mutators to use the new copies of the relocated objects concurrently with at least one mutator executing;
- and
- achieve dynamic consistency between the old copies and the new copies without activating a read barrier to synchronize activities of the garbage collector and activities of the one or more mutators;
- wherein the improvement comprises:
- copying, during the relocating, objects from the old copies to the new copies without verifying copying of each copied word.
Dependencies are inferred from the claim text.