DOC PREVIEW
UT CS 395T - GENERATIONAL GARBAGE COLLECTION

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

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

Unformatted text preview:

Slide 1Garbage Collection – A ReviewLooking For Garbage In The Right PlaceWish ListBaker (Copying) ReviewBaker Review (2)Some Insights Towards A SolutionSome Insights Towards A Solution (graphic)Murphy’s Law: Forever With UsTracking Forward PointersOne, Two, ManyCondemnationConcurrent CondemnationsClarificationsDetails AboundReferences/Resources/AcknowledgementsSome interesting notes, Possible DiscussionDiscussionTerminology Review (From Baker to here)GENERATIONAL GARBAGE COLLECTIONA Real-Time Garbage Collector Based on the Lifetimes of ObjectsLieberman and Hewitt, CACM June 1983, pp 419-429Curtis DunhamCS 395T Memory Management, Spring 2011GARBAGE COLLECTION – A REVIEWPurpose:Obtain Memory by Reclaiming GarbageEffort expended with no garbage found is wastedTechniques covered so far are for whole heapCopying: O(live objects)Mark-Sweep: Mark also O(live objects), Sweep is O(allocated memory)Pesky non-garbage data continuously copied, marked/swept-over, or marked/compacted, etc.2LOOKING FOR GARBAGE IN THE RIGHT PLACEMost garbage comes from recently allocatedor “young” objectsProgramming intuition backed up by empirical dataExample: map-filter-reduce paradigm in LispVisual: pdf/cdf cartoons3WISH LISTGoal: efficiency in the face of “infant mortality”Pay-as-you-go: cheaper storage for short-lived objects than for long-lived objectsGoal: reclaim young, dead objects with minimal effort; i.e. without examining the whole heapStay away from O(heap size), O(heap objects) complexitiesShorter GC pause times!4BAKER (COPYING) REVIEW5New objectsEvacuated objectsTracedTospaceFromspaceUntraced“Scavenging”BAKER REVIEW (2)Semi-space is wasteful of spaceCopies whole heapAll objects treated the same,regardless of longevityBut it’s not all thorns…LocalityCompaction6SOME INSIGHTS TOWARDS A SOLUTIONNo Time Travel: Impossible to point to a newer object than oneself at object creationi.e. all pointers initially point “backwards in time”,or are nullA pointer must be updated to point “forward in time”, from older to newer.7SOME INSIGHTS TOWARDS A SOLUTION (GRAPHIC)8YoungstersFogiesRootsImagine no forward pointersWe only have to trace this space!Ignore the pointers to fogies.We allocated in here for awhile,until it filled up.Then we started allocating over here.RegionsMURPHY’S LAW: FOREVER WITH USPointers can be updatedPointers will be updatedPointers will inevitably point forward in time,across the region boundarySolution:Track these troublesome forward pointersWe expect (hope for) them to be rareGreat things become possible (pruned heap traces)9TRACKING FORWARD POINTERS10YoungstersFogiesRootsEntry tableHonorary roots(for this region)We still only have to trace this space!Still ignoring the pointers to fogies, too.ONE, TWO, MANY11YoungestOldestRootsOlderOldYoungerYoungAllows an arbitrary number of regions called “generations”CONDEMNATION12g0.v0 g1.v0 g2.v0 g3.v0 g4.v0 g5.v0g5.v1Like Bakers algorithm (Copying),space is reclaimed through evacuationGC is initiated by condemning a regionRegion keeps same generation number,but increments its version numbercondemn v.4. to judge or pronounce to be unfit for use or service: to condemn an old building.5. U.S. Law. to acquire ownership of for a public purpose, under the right of eminent domain: The city condemned the property.memory regionGCregionVMCONCURRENT CONDEMNATIONS13g0.v1 g1.v1 g2.v2 g3.v2 g4.v3 g5.v4g5.v5g4.v3CLARIFICATIONSThe heap structure is only time-based by practicality-driven convention; the real invariants revolve around pointer directionsCan put new objects anywhereGives system and user optimization opportunitiesRegion/Generation coalescing is possible14DETAILS ABOUNDGC of Entry tablesRecord generation/version of source pointerOrthogonality of forward pointers and intra-region collectionCollecting younger regions more oftenWeak pointersStore in Entry table with Forward pointersScavenging stacks, globals15REFERENCES/RESOURCES/ACKNOWLEDGEMENTS(other than this paper, cited on title slide)Richard Jones and Rafael Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. (Chapter 7) 1996.Previous slides by Rudy Depena (2009), Maria Jump (2003)Dictionary.comNUnabridgedNBasedNonNtheNRandomNHouseNDictionary,N2011.16SOME INTERESTING NOTES, POSSIBLE DISCUSSIONLanguages like Haskell also adopted another mitigating technique called deforestationOriginally called Listlessness by Wadler (1984)Escape analysis, a type of static extent analysisHas roots in call-graph reclamation schemes (Hudak 1981), closure allocation strategies (ORBIT paper, Kranz et al 1986)Even if we can’t prove that a new object will die quickly, it probably will anyway – and for that, we have generational GC!17DISCUSSIONEmpirical analysis??We think it should work…“… future research plans include … [testing] the behavior of real programs”“Judging [GC] algorithms is tricky”“… we expect good performance…”Heap reorganization“Pointer length”Region size – parallels with ImmixRelationship with incremental designs18TERMINOLOGY REVIEW (FROM BAKER TO HERE)Tracing → ScavengingSemi-spaces (fromspace, tospace) → Regions corresponding to generationsFlip (fromspace ↔ tospace) → Condemning a regionFromspace → Condemned


View Full Document

UT CS 395T - GENERATIONAL GARBAGE COLLECTION

Documents in this Course
TERRA

TERRA

23 pages

OpenCL

OpenCL

15 pages

Byzantine

Byzantine

32 pages

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