Garbage Collecting the World Presentation: Mark Mastroieni Authors: Bernard Lang, Christian Queinne, Jose Piquer.

Slides:



Advertisements
Similar presentations
CS 603 Process Synchronization: The Colored Ticket Algorithm February 13, 2002.
Advertisements

Optimistic Methods for Concurrency Control By : H.T. Kung & John T. Robinson Presenters: Munawer Saeed.
Resource Management §A resource can be a logical, such as a shared file, or physical, such as a CPU (a node of the distributed system). One of the functions.
Ch. 7 Process Synchronization (1/2) I Background F Producer - Consumer process :  Compiler, Assembler, Loader, · · · · · · F Bounded buffer.
Garbage Collection CS Introduction to Operating Systems.
Garbage Collection What is garbage and how can we deal with it?
Garbage Collecting the World Bernard Lang Christian Queinnec Jose Piquer Presented by Yu-Jin Chia See also: pp text.
June 1, 2000 Object Oriented Programming in Java (95-707) Java Language Basics 1 Lecture 6 Object Oriented Programming in Java Language Basics Objects.
Garbage Collecting the World. --Bernard Lang, Christian and Jose Presented by Shikha Khanna coen 317 Date – May25’ 2005.
Garbage Collecting the World: One Car at a Time Richard L. Hudson, Ron Monison,~ J. Eliot B. Moss, & David S. Munrot Department of Computer Science, University.
Locality-Conscious Lock-Free Linked Lists Anastasia Braginsky & Erez Petrank 1.
Distributed Process Management
Chapter 18 Distributed Process Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Programming Logic and Design, Third Edition Comprehensive
On-the-Fly Garbage Collection: An Exercise in Cooperation Edsget W. Dijkstra, Leslie Lamport, A.J. Martin and E.F.M. Steffens Communications of the ACM,
By Jacob SeligmannSteffen Grarup Presented By Leon Gendler Incremental Mature Garbage Collection Using the Train Algorithm.
CPSC 388 – Compiler Design and Construction
An Efficient Machine-Independent Procedure for Garbage Collection in Various List Structures, Schorr and Waite CACM August 1967, pp Curtis Dunham.
Memory Management. History Run-time management of dynamic memory is a necessary activity for modern programming languages Lisp of the 1960’s was one of.
1 Complexity of Network Synchronization Raeda Naamnieh.
Tutorial 6 & 7 Symbol Table
Distributed Process Management
Honors Compilers Addressing of Local Variables Mar 19 th, 2002.
Incremental Garbage Collection
Memory Allocation and Garbage Collection. Why Dynamic Memory? We cannot know memory requirements in advance when the program is written. We cannot know.
1 An Efficient On-the-Fly Cycle Collection Harel Paz, Erez Petrank - Technion, Israel David F. Bacon, V. T. Rajan - IBM T.J. Watson Research Center Elliot.
Reference Counters Associate a counter with each heap item Whenever a heap item is created, such as by a new or malloc instruction, initialize the counter.
1 ICS 214B: Transaction Processing and Distributed Data Management Distributed Database Systems.
SEG Advanced Software Design and Reengineering TOPIC L Garbage Collection Algorithms.
1 The Google File System Reporter: You-Wei Zhang.
C. Varela; Adapted w/permission from S. Haridi and P. Van Roy1 Declarative Computation Model Memory management (CTM 2.5) Carlos Varela RPI April 6, 2015.
Distributed Garbage Collection for Network Objects Presented by Olga Convey Systems Research Center © Digital Equipment Corporation Algorithm by Andrew.
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects Maged M. Michael Presented by Abdulai Sei.
More Distributed Garbage Collection DC4 Reference Listing Distributed Mark and Sweep Tracing in Groups.
G ARBAGE C OLLECTION CSCE-531 Ankur Jain Neeraj Agrawal 1.
Ben Miller.   A distributed algorithm is a type of parallel algorithm  They are designed to run on multiple interconnected processors  Separate parts.
Distributed systems. distributed systems and protocols distributed systems: use components located at networked computers use message-passing to coordinate.
Parallel Computing Presented by Justin Reschke
1 Distributed Vertex Coloring. 2 Vertex Coloring: each vertex is assigned a color.
Mutual Exclusion Algorithms. Topics r Defining mutual exclusion r A centralized approach r A distributed approach r An approach assuming an organization.
GC Assertions: Using the Garbage Collector To Check Heap Properties Samuel Z. Guyer Tufts University Edward Aftandilian Tufts University.
An Efficient, Incremental, Automatic Garbage Collector P. Deutsch and D. Bobrow Ivan JibajaCS 395T.
Naming CSCI 6900/4900. Unreferenced Objects in Dist. Systems Objects no longer needed as nobody has a reference to them and hence will not use them Garbage.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Remote Backup Systems.
Garbage Collection What is garbage and how can we deal with it?
Synchronization: Distributed Deadlock Detection
Chapter 3: Process Concept
Topic 3 (Textbook - Chapter 3) Processes
Distributed Shared Memory
Parallel and Distributed Simulation
Operating Systems (CS 340 D)
Definition of Distributed System
Chapter 3: Process Concept
Concepts of programming languages
Intra-Domain Routing Jacob Strauss September 14, 2006.
Advanced Operating Systems
Distributed Garbage Collection
Linked Lists.
Threads and Concurrency
Concurrency: Mutual Exclusion and Process Synchronization
Subject : T0152 – Programming Language Concept
Created By: Asst. Prof. Ashish Shah, J.M.Patel College, Goregoan West
Outline Chapter 2 (cont) Chapter 3: Processes Virtual machines
Chapter 3: Process Concept
Remote Backup Systems.
Reference Counting.
Garbage Collection What is garbage and how can we deal with it?
Presentation transcript:

Garbage Collecting the World Presentation: Mark Mastroieni Authors: Bernard Lang, Christian Queinne, Jose Piquer

Presentation Overview The Algorithm: Summary, Advantages The Algorithm: Summary, Advantages Terminology Defined Terminology Defined Details: How it Works Details: How it Works Conclusions Conclusions

Overview of the Algorithm This paper presents: a new distributed GC algorithm which This paper presents: a new distributed GC algorithm which (i) is fault-tolerant, (i) is fault-tolerant, (ii) is largely independent of how a processor garbage collects its own data space, (ii) is largely independent of how a processor garbage collects its own data space, (iii) does not need centralized control nor global stop-the-world synchronization, (iii) does not need centralized control nor global stop-the-world synchronization, (iv) allows for multiple concurrent active GCs, (iv) allows for multiple concurrent active GCs, (v) does not require migrating objects from processor to processor and (v) does not require migrating objects from processor to processor and (vi) eventually reclaims all inaccessible objects including distributed cycles. (vi) eventually reclaims all inaccessible objects including distributed cycles.

How It’s Different The main idea: The main idea: –What sets this Garbage Collection (GC) algorithm apart from others is the concept of groups –Processes/Processors are organized into dynamic groups of varying sizes –Each group has its own global Garbage Collector –Each process has its own local GC as well

How Groups Work Group GCs discover and reclaim all unreachable distributed cycles of objects in the group. Group GCs discover and reclaim all unreachable distributed cycles of objects in the group. Multiple overlapping group GCs can be simultaneously active. Multiple overlapping group GCs can be simultaneously active. When a processor or a communication link fails to cooperate, the groups within which it lies are reorganized and continue their work. When a processor or a communication link fails to cooperate, the groups within which it lies are reorganized and continue their work. Eventually all distributed clusters of unreachable objects will belong to a group that reclaims these clusters when it finishes its associated GC. Eventually all distributed clusters of unreachable objects will belong to a group that reclaims these clusters when it finishes its associated GC.

Advantages Multiple active GCs can detect more dead loops Multiple active GCs can detect more dead loops Allows for failure of nodes (dynamic changes in groups) Allows for failure of nodes (dynamic changes in groups) Needs no centralized control Needs no centralized control Works with almost any kind of (pre- existing) local GC Works with almost any kind of (pre- existing) local GC

Standard GC Terminology Nodes are processes able to manage their own memory space Nodes are processes able to manage their own memory space Cells are chunks of memory in nodes, which may contain references to cells in the same or other nodes Cells are chunks of memory in nodes, which may contain references to cells in the same or other nodes Roots are all nodes known by a mutator (e.g. in registers or in an execution stack) Roots are all nodes known by a mutator (e.g. in registers or in an execution stack) Cells reachable from a root are live, else they’re dead Cells reachable from a root are live, else they’re dead

New Terminology Specific Terms: Specific Terms: A remote reference to a cell y is represented by a reference to an exit item on the same node, which references an entry item on another node, which itself references locally the cell y (see next slide). A remote reference to a cell y is represented by a reference to an exit item on the same node, which references an entry item on another node, which itself references locally the cell y (see next slide).

Exit/Entry Items y Node P Node Q entry item exit item references cell y

Basic Algorithm (Single Group) – Initialization 1. group negotiation: A node finds/joins a group (solely for the group GC). 1. group negotiation: A node finds/joins a group (solely for the group GC). 2. initial marking: All the entry items of nodes within the group are marked w.r.t. the group – are they referenced from inside or outside the group? 2. initial marking: All the entry items of nodes within the group are marked w.r.t. the group – are they referenced from inside or outside the group? 3. local propagation: Local GCs propagate the marks of the entry items towards the exit items. 3. local propagation: Local GCs propagate the marks of the entry items towards the exit items. 4. global propagation: The group GC propagates the marks of the exit items towards the entry items they reference, when within the group. 4. global propagation: The group GC propagates the marks of the exit items towards the entry items they reference, when within the group.

Basic Algorithm – Finalization 5. stabilization: The preceding two steps are repeated until marks of entry or exit items of the group no longer evolve. 5. stabilization: The preceding two steps are repeated until marks of entry or exit items of the group no longer evolve. 6. dead cycles removal: The group GC breaks the unreachable cycles in the group. 6. dead cycles removal: The group GC breaks the unreachable cycles in the group. 7. group disbanding: The work is now finished and the group may be disbanded. 7. group disbanding: The work is now finished and the group may be disbanded.

Details – Marking Items The algorithm works by giving each entry/exit item a mark: marks are either hard or soft. The algorithm works by giving each entry/exit item a mark: marks are either hard or soft. After stabilization, all entry items in the group are marked: After stabilization, all entry items in the group are marked: –hard whenever they are reachable from a cell outside the group or from a root belonging to the group. –soft only if they’re part of inaccessible cycles local to the group and can thus be safely reclaimed.

Taking Out the Trash… Our algorithm simply modifies soft entry items to reference null… Our algorithm simply modifies soft entry items to reference null… …and lets the local GC go to work! …and lets the local GC go to work! Actual reclamation of resources is delayed – but has the advantage of implementation-independence. Actual reclamation of resources is delayed – but has the advantage of implementation-independence.

…For Local GC to Pick Up Each node in the group modifies its soft entry items to now reference nil rather than a local cell. Each node in the group modifies its soft entry items to now reference nil rather than a local cell. The former offspring of these entry items, not otherwise accessible, will be reclaimed by the next local GC. The former offspring of these entry items, not otherwise accessible, will be reclaimed by the next local GC. Similarly the exit items that were kept alive exclusively by these entries will be reclaimed by the next local GC. Similarly the exit items that were kept alive exclusively by these entries will be reclaimed by the next local GC. The reclamation of such an exit item causes the sending of a decrement message to the entry item it references. The entry item’s reference counter decreases to 0 and it is reclaimed by the normal reference counting mechanism. The reclamation of such an exit item causes the sending of a decrement message to the entry item it references. The entry item’s reference counter decreases to 0 and it is reclaimed by the normal reference counting mechanism.

Aftermath Groups can be disbanded, or optionally kept around for future use. Groups can be disbanded, or optionally kept around for future use. If a node fails during GC, most often the group is simply reorganized into one or more new groups, and the algorithm starts over. If a node fails during GC, most often the group is simply reorganized into one or more new groups, and the algorithm starts over.

Global View Several group GCs take place simultaneously, and a local GC on a node can contribute to several of them. Several group GCs take place simultaneously, and a local GC on a node can contribute to several of them. Entry and exit items can then be common to all group GCs, though they must keep separate marks for each group. Entry and exit items can then be common to all group GCs, though they must keep separate marks for each group. However, overlap slows down the process, since both groups are relying on the one local GC to propagate their marks, etc. However, overlap slows down the process, since both groups are relying on the one local GC to propagate their marks, etc.

Conclusions Does what it claims: Does what it claims: –Cleans all garbage eventually –Tolerates failures –Low overhead (relies on local GCs, etc.) Very scalable (due to hierarchical structure, lack of centralized control) Very scalable (due to hierarchical structure, lack of centralized control) Sidebar: Paper leaves a number of options open for actual implementation Sidebar: Paper leaves a number of options open for actual implementation

Questions?