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.

Slides:



Advertisements
Similar presentations
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
Advertisements

Lecture 8: Asynchronous Network Algorithms
Lecture 10: Heap Management CS 540 GMU Spring 2009.
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.
Garbage Collecting the World. --Bernard Lang, Christian and Jose Presented by Shikha Khanna coen 317 Date – May25’ 2005.
MC 2 : High Performance GC for Memory-Constrained Environments - Narendran Sachindran, J. Eliot B. Moss, Emery D. Berger Sowmiya Chocka Narayanan.
Garbage Collection  records not reachable  reclaim to allow reuse  performed by runtime system (support programs linked with the compiled code) (support.
Garbage Collection CSCI 2720 Spring Static vs. Dynamic Allocation Early versions of Fortran –All memory was static C –Mix of static and dynamic.
Hastings Purify: Fast Detection of Memory Leaks and Access Errors.
By Jacob SeligmannSteffen Grarup Presented By Leon Gendler Incremental Mature Garbage Collection Using the Train Algorithm.
1 Accessing nearby copies of replicated objects Greg Plaxton, Rajmohan Rajaraman, Andrea Richa SPAA 1997.
Distributed Garbage Collection Algorithms stefan brunthaler.
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 The Compressor: Concurrent, Incremental and Parallel Compaction. Haim Kermany and Erez Petrank Technion – Israel Institute of Technology.
Distributed Systems Dinesh Bhat - Advanced Systems (Some slides from 2009 class) CS 6410 – Fall 2010 Time Clocks and Ordering of events Distributed Snapshots.
CS 582 / CMPE 481 Distributed Systems
MOSTLY PARALLEL GARBAGE COLLECTION Authors : Hans J. Boehm Alan J. Demers Scott Shenker XEROX PARC Presented by:REVITAL SHABTAI.
Chapter 4 - Self-Stabilizing Algorithms for Model Conservation4-1 Chapter 4: roadmap 4.1 Token Passing: Converting a Central Daemon to read/write 4.2 Data-Link.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
An Authentication Service Against Dishonest Users in Mobile Ad Hoc Networks Edith Ngai, Michael R. Lyu, and Roland T. Chin IEEE Aerospace Conference, Big.
Distributed Systems Fall 2009 Replication Fall 20095DV0203 Outline Group communication Fault-tolerant services –Passive and active replication Highly.
Self-Stabilization An Introduction Aly Farahat Ph.D. Student Automatic Software Design Lab Computer Science Department Michigan Technological University.
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.
Clock Synchronization and algorithm
UniProcessor Garbage Collection Techniques Paul R. Wilson University of Texas Presented By Naomi Sapir Tel-Aviv University.
 Structured peer to peer overlay networks are resilient – but not secure.  Even a small fraction of malicious nodes may result in failure of correct.
SEG Advanced Software Design and Reengineering TOPIC L Garbage Collection Algorithms.
Algorithms for Synchronization and Consistency in Concurrent System Services Anders Gidenstam Distributed Computing and Systems group, Department of Computer.
Hardware Supported Time Synchronization in Multi-Core Architectures 林孟諭 Dept. of Electrical Engineering National Cheng Kung University Tainan, Taiwan,
Ulterior Reference Counting: Fast Garbage Collection without a Long Wait Author: Stephen M Blackburn Kathryn S McKinley Presenter: Jun Tao.
04/18/2005Yan Huang - CSCI5330 Database Implementation – Distributed Database Systems Distributed Database Systems.
 Network Segments  NICs  Repeaters  Hubs  Bridges  Switches  Routers and Brouters  Gateways 2.
Distributed Garbage Collection for Network Objects Presented by Olga Convey Systems Research Center © Digital Equipment Corporation Algorithm by Andrew.
Runtime Environments. Support of Execution  Activation Tree  Control Stack  Scope  Binding of Names –Data object (values in storage) –Environment.
Association Rule Mining in Peer-to-Peer Systems Ran Wolff Assaf Shcuster Department of Computer Science Technion I.I.T. Haifa 32000,Isreal.
ADITH KRISHNA SRINIVASAN
A correction The definition of knot in page 147 is not correct. The correct definition is: A knot in a directed graph is a subgraph with the property that.
Replication (1). Topics r Why Replication? r System Model r Consistency Models – How do we reason about the consistency of the “global state”? m Data-centric.
1 Computer Communication & Networks Lecture 21 Network Layer: Delivery, Forwarding, Routing Waleed.
UniProcessor Garbage Collection Techniques Paul R. Wilson University of Texas Presented By Naomi Sapir Tel-Aviv University.
More Distributed Garbage Collection DC4 Reference Listing Distributed Mark and Sweep Tracing in Groups.
Peer to Peer Network Design Discovery and Routing algorithms
Energy Efficient Data Management for Wireless Sensor Networks with Data Sink Failure Hyunyoung Lee, Kyoungsook Lee, Lan Lin and Andreas Klappenecker †
Wireless Token Ring Protocol Mustafa Ergen, Duke Lee, Roberto Attias, Anuj Puri, Raja Sengupta, Stavros Tripakis, Pravin Varaiya SCI 2002.
Distributed systems. distributed systems and protocols distributed systems: use components located at networked computers use message-passing to coordinate.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
Hazard Pointers: Safe Memory Reclamation for Lock-Free Objects MAGED M. MICHAEL PRESENTED BY NURIT MOSCOVICI ADVANCED TOPICS IN CONCURRENT PROGRAMMING,
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
CS412/413 Introduction to Compilers and Translators April 21, 1999 Lecture 30: Garbage collection.
1 Plaxton Routing. 2 History Greg Plaxton, Rajmohan Rajaraman, Andrea Richa. Accessing nearby copies of replicated objects, SPAA 1997 Used in several.
Reference Counting. Reference Counting vs. Tracing Advantages ✔ Immediate ✔ Object-local ✔ Overhead distributed ✔ Very simple Trivial implementation for.
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.
Runtime Environments Chapter 7. Support of Execution  Activation Tree  Control Stack  Scope  Binding of Names –Data object (values in storage) –Environment.
Chord: A Scalable Peer-to-Peer Lookup Service for Internet Applications * CS587x Lecture Department of Computer Science Iowa State University *I. Stoica,
EEC 688/788 Secure and Dependable Computing Lecture 10 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Garbage Collecting the World Presentation: Mark Mastroieni Authors: Bernard Lang, Christian Queinne, Jose Piquer.
Advanced Computer Networks
Concepts of programming languages
Garbage Collection Modern programming languages provide garbage collection mechanisms for reclaiming the memory locations that are no longer used by programs.
Distributed Garbage Collection
Cycle Tracing Chapter 4, pages , From: "Garbage Collection and the Case for High-level Low-level Programming," Daniel Frampton, Doctoral Dissertation,
Ulterior Reference Counting Fast GC Without The Wait
DHT Routing Geometries and Chord
Strategies for automatic memory management
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
Reference Counting.
Presentation transcript:

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 of Massachusetts, Amherst, MA 01003, U.S.A. ’ { hudson, Schoo1 of Mathematical and Computational Sciences, University of St Andrews, North Haugh, St Andrews, Fife, KY16 9SS, Scotland (ron, Presented by: Martin Krogel

Outline Goals Assumptions DMOS Collector  Rules  Example  Addressing Objects  Pointer Tracking  Object Substitution Protocol  Car and Train Management  Unwanted Relative Problem  Cleaning up Trains  Safety and Completeness Related Works Conclusion Future Work Questions?

Goals Motivation was to provide garbage collection for distributed systems with the following properties. Safety Completeness Non-disruptiveness Incrementality Scalability Non-blocking

Assumptions Nodes have local storage and only use message passing. Ordered delivery of messages. Nodes appear to operate correctly. No bounds on relative computation rates. Events at a node are totally ordered.

DMOS Collector (Distributed Mature Object Space)‏ Based on MOS and PMOS garbage collection. Uses trains and cars analogy. Also uses relative ages of trains.

Rules 1) Data locally reachable from roots is copied to a younger train. 2) Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.)‏ 3) Data locally reachable from older trains is copied to another car in the current train. 4) Data locally reachable from other cars of the same train is copied to another care of the same train. 5) All remaining data is unreachable and is reclaimed.

Rules (handling cycles)‏ 1) If no object in a train is reachable from outside the train, collect the entire train. 2) Data locally reachable from roots is copied to a younger train. 3) Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.)‏ 4) Data locally reachable from older trains is copied to another car in the current train. 5) Data locally reachable from other cars of the same train is copied to another care of the same train. 6) All remaining data is unreachable and is reclaimed.

Rules (non-local trains)‏ 1) If no object in a train is reachable from outside the train, collect the entire train. 2) Data locally reachable from roots is copied to a younger train. 3) Data locally reachable from younger trains is copies to those trains. (If from multiple trains, any will do.) If the destination train is not represented on this node, then the node should join the train and create a new car in that train. 4) Data locally reachable from older trains is copied to another car in the current train. 5) Data locally reachable from other cars of the same train is copied to another care of the same train. 6) All remaining data is unreachable and is reclaimed.

Example (Step 1)‏

Example (Step 2)‏

Example (Step 3)‏

Example (Step 4)‏

Addressing Objects DMOS objects encode logical address and home node. Car numbers are not reused, or reused very slowly.

Pointer Tracking Events

Node A Sends to Node B a Pointer to o

Ordering of Events any(o, Y, E)‏  Indicates whether Y contains any pointers to o based on information in the given set of events E., but no or, but no. absence(o, E)‏  True if and only if there are no pointers to o at nodes other than o's home node H. any(o, X, E) is false for all nodes X other than H.

Pointer Tracking Optimization Removing the unique numbers from events. Referring fewer events to H. Further reducing the detail required at H. Piggy-backing and compressing messages. Combining events

Object Substitution Protocol When o is substituted by o'  H creates KnownNodes(o) list  H sends move message [m, o, o'] to known nodes  X receives move message  X inserts o  o' in relocation table X receives a pointer to o  Generate received o message  Generate add o' message  Generate remove o message H receives message about o from X  Check KnownNodes(o)‏  If X is not present, add it and send move message. If H'  H  H sends o' pointer to H'  H forwards manipulation messages to H'

Object Substitution Protocol Cleaning up the Tables  Check for absence(o, E)‏  H sends and end of move message [e, o, o'] to X  H removes X from KnownNodes(o)‏  H removes o  o' from relocation table  X removes o  o' from relocation table Multiple Substitutions Opaque Addressing

Car and Train Management Solving completeness  Remembered Sets and Sticky Remembered Sets Basic train management  Identifying  successor(X, n:A)‏  Logical token passing ring  Joining a ring X sends join message [join, X, n:A] X becomes successor of A in ring  Leaving a ring X sends leave message [leave, X, successor(X, n:A), n:A]

Car and Train Management Basic train management  Identifying  successor(X, n:A)‏  Logical token passing ring  Joining a ring X sends join message [join, X, n:A] X becomes successor of A in ring  Leaving a ring X sends leave message [leave, X, successor(X, n:A), n:A]

Car and Train Management How a node X should respond to a leave message [leave, Y, Z, n:A].  Case 1: Y = successor(X, n:A), i.e., X is Y's predecessor: X sets successor(X, n:A) to be Z (Y's successor) and sends the message [left, n:A] to Y.  Case 2: Z = X and X is not in the process of leaving the ring: X sends the message [leave, Y, Z, n:A] to successor(X, n:A).  Case 3: Z = X and X is in the process of leaving the ring: X sends a [leave, Y, successor(X, n:A), n:A] message to successor(X, n:A).

Two Nodes Leave a Train Ring at the Same Time

Car and Train Management Train Reclamation (using Token Passing)‏  Initial state  Starting the token  Receiving the token Rule 1: External pointers in sticky remembered sets for train Rule 2: No external pointers, but “changed bit” is true Rule 3: No external pointers and “changed bit” is false  Special case: If Y receives token with value Y, there are no external pointers to the train, and it can be reclaimed

Illustration of Correctness of Train Reclamation Algorithm Assuming no new objects are added to the train

Unwanted Relative Problem

Rejected solutions  Disallow moving unwanted relatives into n:A  Delay moving relative  Only reclaim oldest trains Accepted solution: Epochs (old/new)‏  When a token is started, all cars are considered old epoch.  Cars added while “changed bit” is false are considered new epoch  Cars added while “changed bit” is false are considered old epoch  If “changed bit” switches from false to true, all cars on train are considered old epoch  “Changed bit” is only set when pointer is detected to old epoch car in the train

Cleaning up Trains X receives the token for n:A with value X. (Old epoch cars are unreachable).  X deletes old epoch cars  X sends [end-of-epoch, X] message. Y receives end-of-epoch message and Y  X.  Y deletes old epoch cars  Y changes new epoch cars to old epoch cars  Y forwards message X receives end-of-epoch message.  X restarts token passing algorithm If train is oldest, there will be no new epoch cars, so the train will be fully collected.

Safety and Completeness Safety  Object substitution  Car / Train reclamation Completeness  Oldest train will eventually be collected

Related Works Migration  Bishop's non-distributed garbage collection algorithm Reference Counting  Bevan's, and Watson & Watson's weighted reference counting.  Reference listing.  Optimized weighted reference counting with background global tracing. Tracing  Hughes' global timestamped live object trace Liskov and Ladin suggest centralized time server  Lang, Queninnec, and Piquer's grouped mark/sweep algorithm.  Ferreira and Shapiro's multiple site segment replication  Maheshwari and Liskov's partitioned garbage collection Garbage Tracing  Vestal's test decrement of suspected cyclic garbage  Lins & Jones' combining weighted reference counting with mark and sweep from deletion points (not roots).  Maeda et al. And Fuchs' tracing potentially cyclic garbage

Conclusion DMOS is a new distributed garbage collection algorithm that satisfy all of the following properties:  Safety  Completeness  Non-disruptiveness  Incrementality  Scalability  Non-blocking

Future Work Implementation and practical evaluation. Algorithmic performance analysis. Extension to tolerate node and communications failures.

Questions?