I have read his seminal paper, Self-stabilizing systems in spite of distributed control. However, I don’t quite get how the self-stabilizing algorithm works. I am most interested in his, ‘solution’ of k-state machines. The density of the paper is quite intense and I can’t make much sense of it. How does this algorithm work in plain English?
I have read his seminal paper, Self-stabilizing systems in spite of distributed control .
Share
I can try to explain it in plain English…
First you should have a look at the link Jean-Francois Corbett wrote as a comment.
Definition
(from Wikipedia)
Notations
Same as the one on the seminar paper
Self Stabilizing system
In his paper Dijkstra defines a self stabilizing system as follow:
Consider a circle graph with N+1 nodes. (From 0 to N+1)
Each node can be in different states.
Each node can have different privilege. (for example xS = xR can be a privilege)
At each step if in one node a privilege is present we will apply a certain rule :
Legitimate States
He defines a legitimate state to be a state with only one privilege present.
Conclusion
If you apply the different rules in Dijkstra’s paper for the described system you will get a self-stabilizing system. (cf definition.)
i.e. from any state with n privilege presents (even with multiple privileges for one node) you will reach in a finite number of states a state with only one privilege present, and stay in legitimate states after this state. And you will be able to reach any legitimate state.
You can try yourself with a simple example.
Example for the 4 states solution
Let’s take only a bottom node and a top node:
and here is a result for 3 nodes: bottom (0) middle (1) top (2): I start with 2 privileges (not legitimate state, then once I get into a legitimate state I stay in it):
Here is a small Python [<=2.7] code (I am not very good at python so it’s may be ugly) to test the 4 states methods with a system of n nodes, it stops when you find all the legitimate states: