1: \subsection{Successor Pointers}
2: \begin{figure}[t]
3: \centering
4: \includegraphics[height=5.75cm]{w1_trans.eps}
5: \vspace*{-0.25cm}
6: \caption{Changes in $W_1$, the number of wrong (failed or outdated) $s_1$ pointers, due to joins, failures and stabilizations.}
7: \label{fig:w1-trans}
8: \end{figure}
9: %\begin{figure}
10: % \centering
11: % \includegraphics[height=7cm, angle=270]{wd}
12: % \caption{Theory and Simulation for $W_1(r,\alpha)$ and $D_1(r,\alpha)$}
13: % \label{fig:w}
14: %\end{figure}
15: %
16: In order to get a master-equation description
17: which keeps all the details of the system and is still tractable,
18: we make the ansatz that the state of the system is the product of
19: the states of its nodes, which in turn is the product of the states
20: of all its pointers. As we will see this ansatz works very well.
21: Now we need only consider how many kinds of pointers there are
22: in the system and the states these can be in. Consider
23: first the successor pointers.
24:
25: Let $w_k(r,\alpha)$, $d_{k}(r,\alpha)$ denote the fraction of nodes having
26: a \emph{wrong} $k^{th}$ successor pointer or a \emph{failed}
27: one respectively and $W_k(r,\alpha)$, $D_{k}(r,\alpha)$ be the respective
28: {\it numbers} . A \emph{failed} pointer is one
29: which points to a departed node and
30: a \emph{wrong} pointer points either to an
31: incorrect node (alive but not correct) or a dead one.
32: As we will see, both these quantities play a role
33: in predicting lookup consistency and lookup length.
34:
35: By the protocol for stabilizing successors in Chord, a node periodically contacts its first successor,
36: possibly correcting it and reconciling with its successor list. Therefore, the number of wrong $k^{th}$ successor pointers are not independent quantities but depend on the number of wrong first successor pointers. We consider
37: only $s_1$ here. %( We derive similar relations for $s_k, k >1$ in \cite{ansary:analysis}).
38:
39: %Define $P_{nb}$ to be the probability that the network does not break up (i.e. a single node gets disconnected (should we
40: %say from the ring?)). In our analysis, we consider only the case where $P_{nb}=1$. This is achieved by setting the length
41: %of the successors list ${\cal S}$ to $O(\log(N))$.
42: %
43:
44: %We write an equation for $W_1(r,\alpha)$ by accounting (table \ref{tab:wrong}) for all the events that can change it in a micro %event of time $\Delta t$.
45:
46: \begin{table}[t]
47: \centering
48: \begin{tabular}{|l|l|} \hline
49: Change in $W_1(r,\alpha)$ & Rate of Change \\ %\hline
50: $W_1(t+\Delta t) = W_1(t)+1$ & $c_1=(\lambda_j \Delta t) (1-w_1)$ \\ %\hline
51: $W_1(t+\Delta t) = W_1(t)+1$ & $c_2=\lambda_f (1-w_1)^2 \Delta t$ \\ %\hline
52: $W_1(t+\Delta t) = W_1(t)-1$ & $c_3=\lambda_f w_1^2 \Delta t $ \\
53: $W_1(t+\Delta t) = W_1(t)-1$ & $c_4=\alpha\lambda_s w_1 \Delta t $\\ %\hline
54: $W_1(t+\Delta t) = W_1(t)$ & $1 - (c_1 + c_2 + c_3 + c_4)$\\
55: \hline
56: \end{tabular}
57: \vspace*{-0.35cm}
58: \caption{Gain and loss terms for $W_1(r,\alpha)$: the number of wrong first successors
59: as a function of $r$ and $\alpha$.}
60: \label{tab:wrong}
61: \end{table}
62:
63: We write an equation for $W_1(r,\alpha)$ by accounting for all the events that can change it in a micro event of time $\Delta t$. An illustration of the different cases in which changes in $W_1$ take place due to joins, failures and stabilizations is provided in figure \ref{fig:w1-trans}. In some cases $W_1$ increases/decreases while in others it stays unchanged. For each
64: increase/decrease, table \ref{tab:wrong} provides the corresponding probability.
65:
66: By our implementation of the join protocol, a new node $n_y$, joining between two nodes $n_x$ and $n_z$, has its $s_1$ pointer always correct after the join. However the state of $n_x.s_1$ before the join makes a difference. If $n_x.s_1$ was correct (pointing to $n_z$) before the join, then after the join it will be wrong and therefore $W_1$ increases by $1$. If $n_x.s_1$ was wrong before the join, then it will remain wrong after the join and $W_1$ is unaffected. Thus, we need to account for the former case only. The probability that $n_x.s_1$ is correct is $1-w_1$ and from that follows the term $c_1$.
67:
68: For failures, we have $4$ cases. To illustrate them we use nodes $n_x$, $n_y$, $n_z$ and assume that $n_y$ is going to fail.
69: First, if both $n_x.s_1$ and $n_y.s_1$ were correct, then the failure of $n_y$ will make $n_x.s_1$ wrong and hence $W_1$ increases by $1$. Second, if $n_x.s_1$ and $n_y.s_1$ were both wrong, then the failure of $n_y$ will decrease $W_1$ by one,
70: since one wrong pointer disappears. Third, if $n_x.s_1$ was wrong
71: and $n_y.s_1$ was correct, then $W_1$ is unaffected. Fourth, if $n_x.s_1$ was correct and $n_y.s_1$ was wrong, then the wrong pointer of $n_y$ disappeared and $n_x.s_1$ became wrong, therefore $W_1$ is unaffected. For the first case to happen, we need to pick two nodes with correct pointers, the probability of this is $(1-w_1)^2$. For the second case to happen, we need to pick two nodes with wrong pointers, the probability of this is $w^2_1$. From these probabilities follow the terms $c_2$ and $c_3$.
72:
73: Finally, a successor stabilization does not affect $W_1$, unless the stabilizing node had a wrong pointer. The probability of picking such a node is $w_1$. From this follows the term $c_4$.
74:
75: Hence the equation for $W_1(r,\alpha)$ is:
76: \begin{equation}
77: \frac{d W_1}{dt}= \lambda_j (1-w_1) + \lambda_f (1-w_1)^2 - \lambda_f w_1^2 - \alpha\lambda_s w_1 \nonumber
78: \end{equation}
79: Solving for $w_1$ in the steady state and putting $\lambda_j=\lambda_f$, we get:
80: \begin{equation}
81: w_1(r,\alpha) = \frac{2}{3+r\alpha} \approx \frac{2}{r\alpha}
82: \end{equation}
83:
84: This expression matches well with the simulation results as shown in figure \ref{fig:wi}.
85: $d_1(r,\alpha)$ is then $ \approx \frac{1}{2}w_1(r,\alpha)$
86: since when $\lambda_j=\lambda_f$, about half the number of wrong pointers
87: are incorrect and about half point to dead nodes.
88: Thus $ d_1(r,\alpha) \approx \frac{1}{r\alpha}$ which
89: also matches well the simulations as shown in figure \ref{fig:wi}.
90: We can also use the above reasoning to iteratively get $w_k(r,\alpha)$ for
91: any $k$.
92:
93: