0% found this document useful (0 votes)
15 views18 pages

Self Stabilization

Uploaded by

rrk259388
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views18 pages

Self Stabilization

Uploaded by

rrk259388
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 18

Department of Computer Science and

Engineering (RA)
COURSE NAME: PARALLEL &DISTRIBUTED COMPUTING
COURSE CODE: 22CS4106 R

TOPIC: SELF STABILIZATION


INTRODUCTION

• There is a possibility for a distributed system to go into


an illegitimate state, for example, if a message is lost.
• Self-stabilization: regardless of initial state, system is
guaranteed to converge to a legitimate state in a
bounded amount of time without any outside
intervention.
• Problem: nodes do not have a global memory that they
can access instantaneoulsy.
SYSTEM MODEL

• An abstract computer model: state machine.


• A distributed system model comprises of a set of n state
machines called processors that communicate with each
other, which can be represented as a graph.
• Message passing communication model: queue(s) Qij, for
messages from Pi to Pj
• System configuration is set of states, and message
queues.
• In any case it is assumed that the topology remains
connected, i.e., there exists a path between any two nodes.
DEFINITION

• States satisfying P are called legitimate states and those


not satisfying P are called illegitimate states.
• A system S is self-stabilizing with respect to predicate P if
it satisfies the properties of closure and convergence
DIJKSTRA'S SELF-STABILIZING TOKEN RING
SYSTEM
• When a machine has a privilege, it is able to change its current state, which is
referred to as a move.
• A legitimate state must satisfy the following constraints:
• There must be at least one privilege in the system (liveness or no deadlock).

• Every move from a legal state must again put the system into a legal state (closure).

• During an infinite execution, each machine should enjoy a privilege an infinite number of times (no
starvation).

• Given any two legal states, there is a series of moves that change one legal state to the other
(reachability).

Dijkstra considered a legitimate (or legal) state as one in which exactly one
machine enjoys the privilege.
DIJKSTRA'S SYSTEM (CONTD)

• For any machine, we use symbols S, L, and R to denote


its own state, state of the left neighbor and state of the
right neighbor on the ring.
• The exceptional machine:
If L = S then
S = (S+1) mod K;
• All other machines:
If L = S then
S = L;
DIJKSTRA'S SYSTEM (CONTD)
• Note that a privilege of a machine is ability to change its current state on a
Boolean predicate that consists of its current state and the states of its
neighbors. When a machine has a privilege, it is able to change its current state,
which is referred to as a move.
• Second solution (K = 3)
• The bottom machine, machine 0:

If (S+1) mod 3 = R then S = (S−1) mod 3;


• The top machine, machine n−1:

If L = R and (L+1) mod 3 = S then S = (L+1) mod 3;


• The other machines:

If (S+1) mod 3 = L then S = L;


If (S+1) mod 3 = R then S = R;
EXAMPLE
SYSTEMS WITH LESS THAN THREE
STATES PER NODE
GHOSH SYSTEM (CONTD)
UNIFORM VS NON-UNIFORM
• From the examples of the preceding section, we
notice that at least one of the machines (exceptional
machine) had a privilege and executed steps that
were different from other machines.
• The individual processes can be anonymous,
meaning they are indistinguishable and all run the
same algorithm.
CENTRAL AND DISTRIBUTED DAEMONS

• Generally, the presence of a central demon is assumed in


self-stabilizing algorithms.
• Distributed demon is more desirable in distributed
systems.
• The presence of a central demon considerably simplifies
the verification of a weak correctness criterion of a self-
stabilizing algorithm.
REDUCING THE NUMBER OF STATES IN
TOKEN RING

• In a self-stabilizing token ring with a central demon and


deterministic execution, Ghosh showed that a minimum
of three states per machine is required.
• There exists a non-trivial self-stabilizing system with two
states per machine. It requires a high degree of atomicity
in each action.
SHARED MEMORY MODELS

• Two processors, Pi and Pj, are neighbors, then there are


two registers, i and j, between the two nodes. To
communicate, Pi writes to i and reads from j and Pj writes
to j and reads from i.
• Dolev et al. present a dynamic self-stabilizing algorithm
for mutual exclusion. Node failures may cause an illegal
global state, but the system again converges to a legal
state.
MUTUAL EXCLUSION

• In a mutual exclusion algorithm, each process has a


critical section of code. Only one process enters its
critical section at any time, and every process that wants
to enter its critical section, must be able to enter its
critical section in finite time.
• A self-stabilizing mutual exclusion system can be
described in terms of a token system, which has the
processes circulating tokens. Initially, there may be more
than one token in the system, but after a finite time, only
one token exists in the system which is circulated among
the processes
COSTS OF SELF-STABILIZATION

• A study and assessment of cost factors is very important


in any practical implementation.
• Convergence span The maximum number of transitions
that can be executed in a system, starting from an
arbitrary state, before it reaches a safe state.
• Response span The maximum number of transitions
that can be executed in a system to reach a specified
target state, starting from some initial state. The choice
of initial state and target state depends upon the
application.
REFERENCES FOR FURTHER LEARNING OF THE
SESSION

Reference Books:

1. Chapman, Barbara Jost, Gabriele Pas, Ruud van der, Using OpenMP: portable shared
memory parallel programming, 2008, MIT Press.
2. Gadi Taubenfeld - Distributed Computing Pearls (2018, Morgan & Claypool Publishers)
3. Tanenbaum, Andrew S Steen, Maarten van-Distributed systems: principles and
paradigms. Pearson, 4th Edition

17
THANK YOU

A.SANJEEV KUMAR – PARALLEL AND DISTRIBUTED


COMPUTING

18

You might also like