Garbage Collecting the World. --Bernard Lang, Christian and Jose Presented by Shikha Khanna coen 317 Date – May25’ 2005.

Slides:



Advertisements
Similar presentations
An Implementation of Mostly- Copying GC on Ruby VM Tomoharu Ugawa The University of Electro-Communications, Japan.
Advertisements

Global States.
Impossibility of Distributed Consensus with One Faulty Process
Concurrency: Mutual Exclusion and Synchronization Chapter 5.
1 Overview Assignment 5: hints  Garbage collection Assignment 4: solution.
Lecture 10: Heap Management CS 540 GMU Spring 2009.
Garbage Collecting the World Bernard Lang Christian Queinnec Jose Piquer Presented by Yu-Jin Chia See also: pp text.
Garbage Collection CSCI 2720 Spring Static vs. Dynamic Allocation Early versions of Fortran –All memory was static C –Mix of static and dynamic.
Distributed Process Management
Chapter 18 Distributed Process Management Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and Design.
Mark DURING Sweep rather than Mark then Sweep Presented by Ram Mantsour Authors: Chrisitan Queinnec, Barbara Beaudoing, Jean-Pierre Queille.
Chapter 8 Runtime Support. How program structures are implemented in a computer memory? The evolution of programming language design has led to the creation.
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.
LSRP: Local Stabilization in Shortest Path Routing Hongwei Zhang and Anish Arora Presented by Aviv Zohar.
Distributed Process Management
Prof. Bodik CS 164 Lecture 171 Register Allocation Lecture 19.
Register Allocation (via graph coloring)
Memory Allocation and Garbage Collection. Why Dynamic Memory? We cannot know memory requirements in advance when the program is written. We cannot know.
Register Allocation (via graph coloring). Lecture Outline Memory Hierarchy Management Register Allocation –Register interference graph –Graph coloring.
©Silberschatz, Korth and Sudarshan19.1Database System Concepts Distributed Transactions Transaction may access data at several sites. Each site has a local.
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.
Memory Management Last Update: July 31, 2014 Memory Management1.
Timing-sync Protocol for Sensor Networks (TPSN) Presenter: Ke Gao Instructor: Yingshu Li.
Introduction to Parallel Programming MapReduce Except where otherwise noted all portions of this work are Copyright (c) 2007 Google and are licensed under.
1 Chapter Client-Server Interaction. 2 Functionality  Transport layer and layers below  Basic communication  Reliability  Application layer.
Multiple Processor Systems. Multiprocessor Systems Continuous need for faster and powerful computers –shared memory model ( access nsec) –message passing.
Fault Tolerant Systems
Distributed Garbage Collection for Network Objects Presented by Olga Convey Systems Research Center © Digital Equipment Corporation Algorithm by Andrew.
Locating Mobile Agents in Distributed Computing Environment.
Operating Systems Distributed Coordination. Topics –Event Ordering –Mutual Exclusion –Atomicity –Concurrency Control Topics –Event Ordering –Mutual Exclusion.
Multiprossesors Systems.. What are Distributed Databases ? “ A Logically interrelated collection of shared data ( and a description of this data) physically.
1 Distributed Process Management Chapter Distributed Global States Operating system cannot know the current state of all process in the distributed.
University of Tampere, CS Department Distributed Commit.
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 Client-Server Interaction. 2 Functionality Transport layer and layers below –Basic communication –Reliability Application layer –Abstractions Files.
The Client-Server Model And the Socket API. Client-Server (1) The datagram service does not require cooperation between the peer applications but such.
GLOBAL EDGE SOFTWERE LTD1 R EMOTE F ILE S HARING - Ardhanareesh Aradhyamath.
More Distributed Garbage Collection DC4 Reference Listing Distributed Mark and Sweep Tracing in Groups.
Unit III Bandwidth Utilization: Multiplexing and Spectrum Spreading In practical life the bandwidth available of links is limited. The proper utilization.
CS470 Computer Networking Protocols
Operating Systems (CS 340 D) Dr. Abeer Mahmoud Princess Nora University Faculty of Computer & Information Systems Computer science Department.
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.
Introduction Contain two or more CPU share common memory and peripherals. Provide greater system throughput. Multiple processor executing simultaneous.
1 Chapter 11 Global Properties (Distributed Termination)
Fault Tolerance (2). Topics r Reliable Group Communication.
CS412/413 Introduction to Compilers and Translators April 21, 1999 Lecture 30: Garbage collection.
Chapter - 2 Data strucuters for Language processing.
Parallel Computation of Skyline Queries COSC6490A Fall 2007 Slawomir Kmiec.
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.
WAN Technologies. 2 Large Spans and Wide Area Networks MAN networks: Have not been commercially successful.
The Principles of Operating Systems Chapter 9 Distributed Process Management.
Memory Management CSCI 2720 Spring What is memory management? “the prudent utilization of this scarce resource (memory), whether by conservation,
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Garbage Collecting the World Presentation: Mark Mastroieni Authors: Bernard Lang, Christian Queinne, Jose Piquer.
Computer Network Collection of computers and devices connected by communications channels that facilitates communications among users and allows users.
Operating Systems (CS 340 D)
Dynamic Memory Allocation
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.
Operating Systems (CS 340 D)
Distributed Garbage Collection
Commit Protocols CS60002: Distributed Systems
Closure Representations in Higher-Order Programming Languages
Chapter 12 Memory Management
Concurrency: Mutual Exclusion and Process Synchronization
Created By: Asst. Prof. Ashish Shah, J.M.Patel College, Goregoan West
Abstraction.
Presentation transcript:

Garbage Collecting the World. --Bernard Lang, Christian and Jose Presented by Shikha Khanna coen 317 Date – May25’ 2005

Index Introduction Terminology Basic Algorithm Handling Failures Group Contention Modified marking scheme Conclusion

Introduction Computations performed by collection of processes are more and more common today. Ex - distributed symbolic computations - distributed databases This involves existence of remote references i.e objects at distant node referencing memory in each others address space which leads to unused memory. The paper presents a distributed garbage collection algorithm to remove such unused memory.

Terminology Node – Processor or a process on a processor able to manage its own memory space. Mutator – process that allocates chunks of memory (cells). Cells contain references to cells in same or other nodes. Root – each node contains roots which are references to memory (cells) it considers useful. Ex – all cell references in the cpu registers or in an execution stack are roots. Reachable – cells referenced to by root directly or indirectly through other cells are live. Unreachable – waste or unused memory

Terminology (contd) Local reference – reference to cell (memory) on the same node or processor. Remote reference – reference to cell on another node. Entry & exit items – a remote reference to cell is represented by a reference to an exit item on the same node, which references an entry item on another node.

The basic Algorithm Group Negotiation Initial marking Local propagation Global propagation Stabilization Dead cycles removal Group disbanding

Group Negotiation When a node decides to participate to new group GC, it first determines what group can be set up for that purpose. Why? It could have been idle or its entry items may not have been accessed for a long time or it was not currently involved in any group GC. How? Groups can be created based on geographic distances. Once created, a unique identifier is associated with each group GC and is made known to each of the nodes in the group.

Initial Marking Within each group, entry items have a mark( soft or hard). Hard – entry item referenced outside the group or roots. Soft – referenced from within group. Christopher’s algorithm used for marking – look at reference counter for entry item. Say it is K. If the number of exit items referencing that entry item within the group is K, then entry is marked soft. Else there is a reference from outside the group so mark it as Hard.

Local Propagation Local GC are responsible for propagation of marks from entry items to exit items they reference locally, directly or indirectly. 2 phase marking – Trace from entry items marked hard as well as from root set. Any exit item reached from this tracing is marked hard. – Start from soft entry items and mark all exit items reached by this tracing as soft

Hard marks of exit items are propagated to their corresponding entry items within the group. Global Propagation

Stabilization Group is said to be stable if – Nodes are stable, i.e they have no new data that could justify hardening more entry items locally or elsewhere in the group. – No new messages in transit that request the hardening of some entry item. – How? Group stability can be detected by any node termination detection algorithm.

Dead cycles removal After stabilization, – Remove all entry items marked as soft.

Group disbanding When a group GC is finished, its associated group may be disbanded. All data structures relative to this group can then be reclaimed.

Failure Handling A node can detect failure of other nodes based on acks and time-outs. A node that detect failure can – Decide that it is temporary and wait for failed node to wake up. – Re-organize the group i.e create a new group excluding the failed node.

Failure Handling(2) A transmission link may fail and divide a group into subgroups. These subgroups start independent GC. (result – all dead memory will be cleaned)

Failure Handling(3) When a node has a non-recoverable failure – What happens to entry referenced by failed node? Group G – calculate the number of entries and reference count of each entry. Suppose entry A has 4 references. Group G’ (G – failed node) do the same. Entry A now has 3 references. So A was being referenced by the failed node. Send a decrement message to that entry

Simultaneous Group Collections A node may belong to more than one group. Aim – The results obtained by a local garbage collector on a node can be used in other groups to which the node belongs. i.e markings can be used across the groups. Adv – In a large n/w with variations in network connectivity and communication speed, GC is much more faster and efficient if groups are broken down into sub groups.

Group Contention(1) Consider a subgroup G’ of G. If an entry item is marked hard in G then it can also be marked hard in G’. However some entry items that are soft w.r.t G will be hard w.r.t G’. G G’ x x x x x x x x - GC of any one group can take place at a time. Problem – Markings cannot be used across groups

Group Contention (2) Conversely if a local Garbage Collector works for the group GC of G’, its hard marking cannot be used for G. However soft markings may be used. G G’ x x x x x x x x

Group Contention (3) The situation is worse if a node belongs to overlapping groups. The markings (hard/soft) of local garbage collector with group A or B cannot be used at all for the other. AB

Contd… This necessitates of having strictly hierarchical embedding of groups to avoid contention over the services of local garbage collector.

Hierarchical cooperation of group GCs Soln to the group contention problem by modifying the marking scheme. Groups are organized in a strictly hierarchical order by inclusion. Each group is assigned a level index – number of groups it is strictly embedded in. – Universal group – level index 0

Contd.. In this scheme instead of binary hard and soft marks, we use integer marking scheme. REST OF ALGO REMAINS SAME. Mark for a node entry is the least level for which the entry could be marked hard. For group 3, left side is hard and right side is soft. H s 3 1 2

Marking scheme - Entry at N1 is hard w.r.t G2 - Entry at N1 is soft w.r.t G1 - Marking of entry is 2 N1 g0 g1 g2 g3 X X x

Contd.. Local Propagation – Instead of prop H/S marks levels are prop from entry to exit items. Rest of the algorithm is exactly SAME.

Final GC N1 g0 g1 g2 g3 X X x After prop of all marks, all Entry items With mark > 2, are soft w.r.t G2 hence Garbage collected.

Conclusion Thus we saw a distributed GC algo which is – Fault tolerant. – Does not need a centralized control. – Allows for multiple concurrent active GCs. – Eventually reclaims all inaccessible objects including distributed cycles.