Chapter 18 Self-Stabilization. Introduction Self-stabilization: Tolerate ‘data faults’  Example: Parent pointers in a spanning tree getting corrupted.

Slides:



Advertisements
Similar presentations
Chapter 7. Binary Search Trees
Advertisements

Data Structures ADT List
Chapter 12 Message Ordering. Causal Ordering A single message should not be overtaken by a sequence of messages Stronger than FIFO Example of FIFO but.
Operating Systems Part III: Process Management (Process Synchronization)
Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
UBE529 Distributed Coordination. 2 Leader Election Gerard LeLann posed the Election problem in a famous paper 1977 Many distributed systems are client.
Introduction to Computer Science 2 Lecture 7: Extended binary trees
1 Union-find. 2 Maintain a collection of disjoint sets under the following two operations S 3 = Union(S 1,S 2 ) Find(x) : returns the set containing x.
Tree Data Structures &Binary Search Tree 1. Trees Data Structures Tree  Nodes  Each node can have 0 or more children  A node can have at most one parent.
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
Self-Stabilization in Distributed Systems Barath Raghavan Vikas Motwani Debashis Panigrahi.
Computer Science C++ High School Level By Guillermo Moreno.
Chap 16. Transactions. Transactions Transaction: sequence of operations such that the entire sequence appears as one indivisible operation Indivisibility.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
UBE529 Distributed Algorithms Self Stabilization.
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.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Resource Allocation. Centralized Mutex Algorithm Send requests to Leader Leader maintains a pending queue of events Requests are granted in the order.
CS294, YelickSelf Stabilizing, p1 CS Self-Stabilizing Systems
Liang, Introduction to Java Programming, Sixth Edition, (c) 2007 Pearson Education, Inc. All rights reserved L12 (Chapter 20) Lists, Stacks,
Chapter 11 Detecting Termination and Deadlocks. Motivation – Diffusing computation Started by a special process, the environment environment sends messages.
CS 206 Introduction to Computer Science II 02 / 11 / 2009 Instructor: Michael Eckmann.
Chapter 14 Synchronizers. Synchronizers : Introduction Simulate a synchronous network over an asynchronous underlying network Possible in the absence.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 2 (19/01/2006) Instructor: Haifeng YU.
Selected topics in distributed computing Shmuel Zaks
1 A Mutual Exclusion Algorithm for Ad Hoc Mobile networks Presentation by Sanjeev Verma For COEN th Nov, 2003 J. E. Walter, J. L. Welch and N. Vaidya.
On Probabilistic Snap-Stabilization Karine Altisen Stéphane Devismes University of Grenoble.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
Searching: Binary Trees and Hash Tables CHAPTER 12 6/4/15 Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education,
Binary Trees Chapter Definition And Application Of Binary Trees Binary tree: a nonlinear linked list in which each node may point to 0, 1, or two.
Binary Trees Chapter 10. Introduction Previous chapter considered linked lists –nodes connected by two or more links We seek to organize data in a linked.
UBE529 Resource Allocation. 2 Resource Allocation : Schedule The Critical-Section Problem Synchronization Hardware Semaphores Algorithms Distributed Mutual.
Chapter 9 Global Snapshot. Global state  A set of local states that are concurrent with each other Concurrent states: no two states have a happened before.
Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.
Solving mutual exclusion by using entangled Qbits Mohammad Rastegari proff: Dr.Rahmani.
Defining Programs, Specifications, fault-tolerance, etc.
1 Introduction to trees Instructor: Dimitrios Kosmopoulos.
 Trees Data Structures Trees Data Structures  Trees Trees  Binary Search Trees Binary Search Trees  Binary Tree Implementation Binary Tree Implementation.
Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.
Fault Management in Mobile Ad-Hoc Networks by Tridib Mukherjee.
University of Iowa1 Self-stabilization. The University of Iowa2 Man vs. machine: fact 1 An average household in the developed countries has 50+ processors.
Binary Trees Chapter 10. Introduction Previous chapter considered linked lists –nodes connected by two or more links We seek to organize data in a linked.
CMSC 341 K-D Trees. 8/3/2007 UMBC CSMC 341 KDTrees 2 K-D Tree Introduction  Multiple dimensional data Range queries in databases of multiple keys: Ex.
5-Jan-16 Recursive descent parsing. Some notes on recursive descent The starter code that I gave you did not exactly fit the grammar that I gave you Both.
Self-stabilization. What is Self-stabilization? Technique for spontaneous healing after transient failure or perturbation. Non-masking tolerance (Forward.
1/14/20161 BST Operations Data Structures Ananda Gunawardena.
A Tree Based Algorithm fro Distributed Mutual Exclusion Addy Gronquist 11/19/2003.
CS 542: Topics in Distributed Systems Self-Stabilization.
A: A: double “4” A: “34” 4.
Copyright © 2012 Pearson Education, Inc. Chapter 20: Binary Trees.
Copyright © 2015, 2012, 2009 Pearson Education, Inc., Publishing as Addison-Wesley All rights reserved. Chapter 20: Binary Trees.
Self-stabilization. Technique for spontaneous healing after transient failure or perturbation. Non-masking tolerance (Forward error recovery). Guarantees.
Hwajung Lee.  Technique for spontaneous healing.  Forward error recovery.  Guarantees eventual safety following failures. Feasibility demonstrated.
1 Huffman Codes. 2 ASCII use same size encoding for all characters. Variable length codes can produce shorter messages than fixed length codes Huffman.
ITEC452 Distributed Computing Lecture 15 Self-stabilization Hwajung Lee.
Self-Stabilizing Systems
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 20: Binary Trees.
CSE-591: Term Project Self-stabilizing Network Algorithms by Tridib Mukherjee ASU ID :
Chapter 20: Binary Trees.
Chapter 21: Binary Trees.
Data Structures ADT List
Tree A tree is a data structure in which each node is comprised of some data as well as node pointers to child nodes
CMSC 341 K-D Trees.
CS60002: Distributed Systems
Raymond Exclusive Algorithm
Data Structures ADT List
Lecture 8: Synchronous Network Algorithms
CMSC 341 K-D Trees.
CMSC 341 K-D Trees.
Presentation transcript:

Chapter 18 Self-Stabilization

Introduction Self-stabilization: Tolerate ‘data faults’  Example: Parent pointers in a spanning tree getting corrupted Assume that the code does not get corrupted System state: legal or illegal Faults may result in an illegal system state Self-Stabilizing system: Irrespective of the initial state always reaches a legal state in finite time

Mutual exclusion Legal state: Exactly one machine in the system is ‘privileged’ Assume there are N machines 0 … N-1 Each machine is a K-State machine  Label the possible states from the set {0…K-1} There is one special machine called the bottom machine L, S, R = States of left machine, self, right machine respectively

Algorithm Bottom: Privileged if L=S Other machines: Privileged if L  S

Algorithm: A move by bottom machine

Algorithm: A move by a normal machine

Implementation Each process needs to query its left neighbor Instead of periodic queries use a TOKEN for message efficiency What if the token gets lost ?  Bottom machine maintains a timer  If it does not receive a token for a long time it regenerates the token  Multiple tokens do not affect the correctness of the algorithm

//Program for the bottom node public class StableBottom extends Process implements Lock { int myState = 0; int leftState = 0; int next; Timer t = new Timer(); boolean tokenSent = false; public StableBottom(Linker initComm) { super(initComm); next = (myId + 1) % N; } public synchronized void initiate() { t.schedule(new RestartTask(this), 1000, 1000); } public synchronized void requestCS() { while (leftState != myState) myWait(); } public synchronized void releaseCS() { myState = (leftState + 1) % N; } public synchronized void sendToken() { if (!tokenSent) { sendMsg(next, "token", myState); tokenSent = true; } else tokenSent = false; } public synchronized void handleMsg(Message m, int src, String tag) { if (tag.equals("token") ) { leftState = m.getMessageInt(); notify(); Util.mySleep(1000); sendMsg(next, "token", myState); tokenSent = true; } else if (tag.equals("restart") ) sendToken() }

//Program for a normal node public class StableNormal extends Process implements Lock { int myState = 0; int leftState = 0; public StableNormal(Linker initComm) { super(initComm); } public synchronized void requestCS() { while (leftState == myState) myWait(); } public synchronized void releaseCS() { myState = leftState; sendToken(); } public synchronized void sendToken() { int next = (myId + 1) % N; sendMsg(next, "token", myState); } public synchronized void handleMsg(Message m, int src, String tag) { if (tag.equals("token")) { leftState = m.getMessageInt(); notify(); Util.mySleep(1000); sendToken(); }

Self-stabilizing spanning tree Maintain a spanning tree rooted at the ‘root’ node A data fault may corrupt the ‘parent’ pointer at any node Recalculate parent pointers regularly

Algorithm dist maintains the distance of a node from the root

Algorithm The root periodically sets parent to -1(null) and dist to 0 A non-root reads dist from all neighbors and points its parent to the node with the least distance from the root