DOC PREVIEW
UT CS 395T - Comparison of Compacting Algorithms for Garbage Collection

This preview shows page 1-2-3-4-5-6 out of 18 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 18 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Comparison of Compacting Algorithms for Garbage CollectionAlgorithms for Garbage CollectionBy Jacques Cohen & Alexandru NicolauPresented by Sam HarwellMark/Sweep/Compact Collection• Garbage collection is performed in two stages– Identify objects in memory that are live (mark)– Make dead-object memory locations available to the allocator by compacting live objectsthe allocator by compacting live objects• We are focusing on the compaction algorithmAllocator Fundamentals• Memory is allocated for cells:– Variable sized– Each may hold pointers and/or datareservedsize cnpcPointersDatasize cnpcIncoming pointers may only point to the first element in the cellAlgorithms• Classical– Lisp 2• D.E. Knuth, 1973–Table Compactor–Table Compactor• Modified algorithm based on Waite and Haddon, 1967• Modern (at the time)– Morris’ algorithm, 1978– Jonkers’ algorithm, 1979Lisp 2• Requires additional space in each cell for a pointer• Three passes:–Compute new address of each active cell–Compute new address of each active cell– Update pointer fields of each active cell– Relocate active cellsLisp 2 CompactorTable Compactor• Stores relocation data in garbage cells• Fundamental: cells are moved forward by the total size of holes preceding the cell•Pointers are updated similarly•Pointers are updated similarlyHolesThreading• An elegant way to answer, “Where are all the pointers to cell X?”– Threading the root:XYZroot node AXYZroot node AThreading• An elegant way to answer, “Where are all the pointers to cell X?”XYZroot node Anode Bnode BXYZroot node Anode BMorris’ Algorithm• Three-passes: one forward and two backward• Two tag bits per field overhead (one if single cells cannot hold both pointers and data)Morris’ AlgorithmJonkers’ Algorithm• Improved on Morris’:– Only two passes, both forward– One bit per cell overhead•Added assumptions:•Added assumptions:– No pointer-to-members– A cell containing data is always large enough to store a pointerJonkers’ AlgorithmTime-Formulas• Create optimized versions of each algorithm• Describe each procedure with a formula from the type and number of operations performed•Replace unknowns in the formula with •Replace unknowns in the formula with machine-specific constants, leaving the following variables:– α: Marked cell ratio (NMC/NC)– β: Live pointer ratio (NAP-1)/(NPC*NMC)Feature ComparisonLisp 2 Table compact Morris’ Jonkers’Age Classical (1973) Classical (1967) Modern (1978) Modern (1979)Space 1 pointer/cell None 2 bits/field 1 bit/cellPasses 3 3 3 2Member ptr No No Yes NoPerformance ResultsEffects of Increased Sorting in the Table CompactorEffects of Cell


View Full Document

UT CS 395T - Comparison of Compacting Algorithms for Garbage Collection

Documents in this Course
TERRA

TERRA

23 pages

OpenCL

OpenCL

15 pages

Byzantine

Byzantine

32 pages

Load more
Download Comparison of Compacting Algorithms for Garbage Collection
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Comparison of Compacting Algorithms for Garbage Collection and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Comparison of Compacting Algorithms for Garbage Collection 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?