DOC PREVIEW
UT CS 395T - Cycle Tracing

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

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 16 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 16 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 16 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 16 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 16 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 16 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Slide 1OutlineConcurrent Mark SweepCollector-Mutator RaceCollector-Mutator RaceBase Backup Tracing AlgorithmConcurrency OptimizationInherent Acyclic ObjectsSweep OptimizationImplementation with RCAn ExampleAn ExampleAn ExampleAn ExampleAn ExampleAn ExampleCYCLE TRACINGChapter 4, pages 41--56, 2010. From: "Garbage Collection and the Case for High-level Low-level Programming," Daniel Frampton, Doctoral Dissertation, Australian National University.OutlineBrief Intro: Snapshot-at-the-Beginning Concurrent Mark-SweepBase Backup Tracing AlgorithmOptimizations In a Ref Count EnvironmentConcurrency: Reduce the fix-up setAcyclic objectsSweep less than whole heapMore Interaction with the RCExample2Concurrent Mark SweepCollector processes a work queueHeap objects are one of:Collector and mutator run simultaneouslySnapshot-at-the-beginning – trace heap as it wasOnly want to track changes that were harmfulUnvisitedVisited ChildrenVisited3Collector-Mutator RaceC1: A pointer from a black object to a white object is createdC2: The original reference to a white object is destroyed4Collector-Mutator RaceC1: A pointer from a black object to a white object is createdC2’: The original path reference to a white object is destroyed5Base Backup Tracing Algorithm1. Roots: All objects referenced by roots are added to the work queue.2. Mark: The work queue is exhaustively processed.a) Process: Each object is taken off the work queue, and if the object is not marked, it is marked and then each of its referents are added to the work queue.b) Check: Before leaving the mark phase, we process any object potentially subject to the collector—mutator race. If any of these objects are not marked, they are marked, added to the work queue, and the Mark phase is resumed.3. Sweep: Reclaim space used by objects that have not been marked.6Concurrency OptimizationC1: A pointer from a black object to a white object is createdC2’: The original path to a white object is destroyedFor C2’ to happen, white object or some object in the path to it gets a reference count decrement to nonzeroWe trace the fix-up set, so we can add any object in the path to the white obj.Objects whose ref count decrements to nonzero become the new fix-up setBetter: we only need to determine this as we are collecting7Inherent Acyclic ObjectsProposed by Bacon and Rajan[2001]Acyclic objectNo pointer fieldsOR can only point to another acyclic objectWe’ll make them greenTrivial to skip in mark phase: green=marked8Sweep OptimizationLimit sweep to potentially cyclic garbage: purple setAcyclic garbage swept by reference counterDisadvantage: now we need the purple set to be known9Implementation with RCConsistent root set for objects: already in RCFix-up set must be added to gray-queue when known to be completeTrivial if we make the RC a stop-the-world, even if the tracing algorithm is concurrentRC cannot free objects known to the trace algorithmDangling pointersMark purple or grey objects, cycle tracer will free them when removed from queue10An ExampleRegisters!11An ExampleRegisters!12An ExampleRegisters!13An ExampleRegisters!14An ExampleRegisters!15An


View Full Document

UT CS 395T - Cycle Tracing

Documents in this Course
TERRA

TERRA

23 pages

OpenCL

OpenCL

15 pages

Byzantine

Byzantine

32 pages

Load more
Download Cycle Tracing
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 Cycle Tracing 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 Cycle Tracing 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?