Garbage Collecting the World Bernard Lang Christian Queinnec Jose Piquer Presented by Yu-Jin Chia See also: pp 234-237 text.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

CS 542: Topics in Distributed Systems Diganta Goswami.
CS3771 Today: deadlock detection and election algorithms  Previous class Event ordering in distributed systems Various approaches for Mutual Exclusion.
(Chapter 5) Deleting Objects
Lecture 8: Memory Hierarchy Cache Performance Kai Bu
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.
Garbage Collection  records not reachable  reclaim to allow reuse  performed by runtime system (support programs linked with the compiled code) (support.
Distributed Process Management
CPSC 388 – Compiler Design and Construction
Mobile and Wireless Computing Institute for Computer Science, University of Freiburg Western Australian Interactive Virtual Environments Centre (IVEC)
CS 582 / CMPE 481 Distributed Systems
Distributed DBMSPage © 1998 M. Tamer Özsu & Patrick Valduriez Outline Introduction Background Distributed DBMS Architecture Distributed Database.
Distributed Process Management
Computer Science Lecture 11, page 1 CS677: Distributed OS Last Class: Clock Synchronization Logical clocks Vector clocks Global state.
Deadlock Detection with One Resource of Each Type (1)
7: Deadlocks1 DEADLOCKS EXAMPLES: "It takes money to make money". You can't get a job without experience; you can't get experience without a job. BACKGROUND:
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms.
UniProcessor Garbage Collection Techniques Paul R. Wilson University of Texas Presented By Naomi Sapir Tel-Aviv University.
CS4432: Database Systems II
Election Algorithms. Topics r Issues r Detecting Failures r Bully algorithm r Ring algorithm.
Deadlocks in Distributed Systems Deadlocks in distributed systems are similar to deadlocks in single processor systems, only worse. –They are harder to.
Distributed Deadlocks and Transaction Recovery.
Selected topics in distributed computing Shmuel Zaks
Leader Election Algorithms for Mobile Ad Hoc Networks Presented by: Joseph Gunawan.
System Model Deadlock Characterization Methods for Handling Deadlocks Deadlock Prevention, Avoidance, and Detection Recovering from Deadlock Combined Approach.
Computer Science Lecture 12, page 1 CS677: Distributed OS Last Class Vector timestamps Global state –Distributed Snapshot Election algorithms –Bully algorithm.
Distributed Garbage Collection for Network Objects Presented by Olga Convey Systems Research Center © Digital Equipment Corporation Algorithm by Andrew.
Advanced Computer Networks Topic 2: Characterization of Distributed Systems.
DISTRIBUTED ALGORITHMS By Nancy.A.Lynch Chapter 18 LOGICAL TIME By Sudha Elavarti.
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Deadlocks II.
Databases Illuminated
Union-find Algorithm Presented by Michael Cassarino.
Agenda Fail Stop Processors –Problem Definition –Implementation with reliable stable storage –Implementation without reliable stable storage Failure Detection.
File Systems Operating Systems 1 Computer Science Dept Va Tech August 2007 ©2007 Back File Systems & Fault Tolerance Failure Model – Define acceptable.
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.
The read-copy-update mechanism for supporting real-time applications on shared-memory multiprocessor systems with Linux Guniguntala et al.
CS333 Intro to Operating Systems Jonathan Walpole.
Reliable Communication in the Presence of Failures Kenneth P. Birman and Thomas A. Joseph Presented by Gloria Chang.
RIP Routing Protocol. 2 Routing Recall: There are two parts to routing IP packets: 1. How to pass a packet from an input interface to the output interface.
Superstabilizing Protocols for Dynamic Distributed Systems Authors: Shlomi Dolev, Ted Herman Presented by: Vikas Motwani CSE 291: Wireless Sensor Networks.
Antidio Viguria Ann Krueger A Nonblocking Quorum Consensus Protocol for Replicated Data Divyakant Agrawal and Arthur J. Bernstein Paper Presentation: Dependable.
1 Chapter 11 Global Properties (Distributed Termination)
1 Distributed Vertex Coloring. 2 Vertex Coloring: each vertex is assigned a color.
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.
Distributed Systems Lecture 9 Leader election 1. Previous lecture Middleware RPC and RMI – Marshalling 2.
The Principles of Operating Systems Chapter 9 Distributed Process Management.
Distributed Systems Lecture 6 Global states and snapshots 1.
Garbage Collecting the World Presentation: Mark Mastroieni Authors: Bernard Lang, Christian Queinne, Jose Piquer.
Keys and adding, deleting and modifying records in an array ● Record Keys ● Reading and Adding Records ● Partition or Sentinels Marking Space in Use ●
Remote Backup Systems.
Concurrency: Deadlock and Starvation
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.
Naming A name in a distributed system is a string of bits or characters used to refer to an entity. To resolve name a naming system is needed.
Dynamic Routing Protocols part2
Distributed Garbage Collection
Chapter 7 Deadlock.
Outline Introduction Background Distributed DBMS Architecture
EEC 688/788 Secure and Dependable Computing
EEC 688/788 Secure and Dependable Computing
COS 461: Computer Networks
EEC 688/788 Secure and Dependable Computing
Transactions in Distributed Systems
EEC 688/788 Secure and Dependable Computing
Remote Backup Systems.
Transactions, Properties of Transactions
Presentation transcript:

Garbage Collecting the World Bernard Lang Christian Queinnec Jose Piquer Presented by Yu-Jin Chia See also: pp text

Objective Fault Tolerant Processor Independent Non-centralized Non-blocking Multiple instances can run No object passing Complete garbage reclamation

Dynamic Group Structure Processors cooperate to GC the group Works faster with small groups Groups can reorganize dynamically -Scales well. -Works well despite failures or additions. -Suitable for: large heterogeneous networks, distributed symbolic computation, distributed file systems, distributed databases.

Processor Level Can use any kind of local GC scheme (e.g. Mark and Sweep) Use Reference Counters to track remote objects -Terminology: Entry item (a.k.a. ‘skeleton,’ a reference to a local object that’s another node’s remote object), Exit item (a.k.a. ‘proxy,’ a reference to remote object). -Entry items have an RC = # exit items referring to it. -Use a scheme like Generational RC.

Group Negotiation Each node chooses when to join a GC group, and which group to join. Each node in a group is aware of the others. Groups last until the algorithm terminates (a.k.a. a ‘GC cycle’) Any group formation method suffices. Unique identifier for each group and GC cycle.

Initial Marking - Marks are assigned by group, and only meaningful to that group. Similar scheme to ‘tracing in groups’ p. 234 text. Skeleton: soft or hard. Proxy: soft, hard, or none.

Christopher’s Algorithm 1.Copy the RC for each node in the group, for each skeleton. 2.Check all proxies in the group, decrement RCs on corresponding skeletons. 3.When all are done, any skeletons with a positive RC are hard, else soft.

Propagation (2-Phase Marking) Local (inside each node): Set proxy marks to none. Trace from hard skeletons and root nodes, marking all proxies hard. Trace from soft skeletons, changing none to soft. Node Hard or Root Hard Soft

Global Propagation Propagation always occurs within the group under consideration. Upon completion of a GC cycle, a node may start a new one once its proxies have received hard marks. If a new remote reference is created, mark its skeleton hard in advance. Hard: referenced by local hard item or root Hard or root Hard Node A Node B

Stabilization Group Stability: 1.All nodes are ‘stable.’ 2.No messages in transit that would mark a skeleton hard. Stable: 1.No new data that would harden more skeletons in the group. 2.Can be lost if a new proxy is made, or when a skeleton is mobile. Given no node failure and the finite number of skeletons that may be allocated, this will happen eventually.

Dead Cycles Removal Done individually on each node, without group synchronization. 1.Modify soft skeletons to reference nil. 2.Reclaim the related proxies locally. 3.Send decrement messages to skeletons. 4.When a skeleton’s RC hits 0, reclaim. 5.When GC is finished, group may disband.

Failure Detection is done separately. Can either wait for the node to wake up, or reorganize the group. If the latter, keep hard marks, start at skeleton propagation. If multiple failures, multiple groups may form from an old one.

Non-Recoverable Failure 1.What do we do about objects referenced by the failed node? 2.What do we do about references to the failed node? 3.What do we do about objects on the failed node that are possibly recoverable?

#1 Assuming your skeleton RCs are up to date… 1.Run Christopher’s Algorithm on the new group. 2.Those skeletons whose RCs have changed reference the missing node. 3.Do something about it.

A Problem G1 G2 G3

Simultaneous Group Collections Don’t want to run GC at a node multiple times if it’s in more than one GC group. Local GCs can just track the marks for each group GC. Fast if the marks tend to be similar. However, if one group is a subgroup of another, the marks at skeletons may conflict. This can slow down group GC. Nodes in an overlapping area between largely unrelated groups is even worse- 50% performance on average.

Hierarchical Group Cooperation Definitions: Universal Group: The set of all nodes. Level Index: For each group, the number of larger groups for which it is a subgroup. This may change and must be updated. -By definition, at any time for any node, the level indexes uniquely identify the groups to which the node belongs.

Level Indexes Level 0 Level 1 Level 2

Objective Want each local GC to contribute to all GC groups in which it is a part. By previous definitions, if a skeleton is marked hard in one group, it can be safely marked hard in its subgroups. Define Mark x (N) as the mark on level x, which is the lowest level index for which node N is marked hard.

Multi-Phase Marking 1.Propagate Mark() entries to a proxies, which record the lowest level (biggest group) that has a reference to it. 2.The proxies are now hard for this level, and any higher ones. 3.Stability is reached on a node for a particular level when all resident proxies won’t have their marking level reduced to less than or equal that level. 4.When all groups stabilize for a particular level at a node, all resident skeletons with a higher level can be deleted.

Next Cycle For next cycle, reinitialize by checking skeleton references. If there are references external to the group, the marking level is set to that of the group, unless it’s already smaller.

True? “If a skeleton is marked hard in one group, it can be safely marked hard in its subgroups.” Not necessarily. Low markings might be incorrect due to the disappearance of a link from a larger group. Jobs aren’t the only thing being outsourced…

Keeping Reference Counts Avoids re-running Christopher’s Algorithm if groups don’t change. Useful for failure recovery. How? Instead of counting all references at each skeleton, have a global count for the whole network (level 0).

The Equation  i≥1, Diff N [i, x] = Count N [i-1, x] – Count N [i, x] Where N= the node, i = the level, x = the skeleton -Vector of differences between the RC for each skeleton at this level and the next lower level (group and supergroup). -Initial = the smallest i s.t. Diff N [i, x] ≠ 0 (or existing one if smaller). 0 if all are 0. -Fewer updates required- only global count and one difference count with each added proxy. -Counts often smaller than conventional RCs.