Thus far, we have focused on fairly simple topologies such as rings and chains. This section demonstrates more interesting regular topologies can be specified. These include bands, Möbius ladders, Kautz graphs, trees, and meshes.
The trouble with our current model is that process types have a fixed input alphabet. That is, processes of the same type must read and write the same number of vari- ables with the same domain sizes (in the same order). In Protocon, this is enforced by defining all processes of the same type to read write the same variable names, differing only by their indices. The parameters of a protocol are used to determine the number of processes of each type and, along with the process indices, determine which variables are accessible.
For example, rings are easy to specify based on a process count parameter N . There is N symmetric processes P0, . . . , PN−1 (or N − 1 of those if the first is distinguished as Bot0), and each process πi accesses variables indexed by i − 1, i, and i + 1.
Unoriented daisy chains take an additional binary parameter Chain that is 1 iff the topology should be a chain instead of a ring. In this case, there are 2·Chain processes named Endiwhere i ∈ {0, N −1} when they exist, and there are N −2·Chain processes
named Pi where i ∈ {Chain, . . . , N − 1 − Chain}. The neighboring processes of a Pi
are j = i − 1 and k = i + 1, and the neighbor of a Endi is computed conditionally as
j = 1 or j = N − 2 based on whether i = 0 or i = N − 1.
Band
A band is a simple extension of a ring, where essentially copy of a ring is placed above itself and the nodes above are connected with the nodes below. We can construct a band of 2 · N processes in the same way, where each process Pi has a variable xi.
Two rings are formed by giving each Pi read access to xi−2 and xi+2, making rings of even-indexed and odd-indexed processes. Processes are then connected pairwise by giving each Pi read access to xi+1−2·(i mod 2), which connects processes Pi and Pj whose
index divided by 2 are equal (⌊i
2⌋ = ⌊
j
2⌋).
Möbius Ladder
A Möbius ladder [107], much like a Möbius strip, adds a single twist to a band topology. This twist can be formed by adding special cases for P0, P1, PN−2, and
PN−1 so that P0 and P2·N −1 read from each other and P1 and P2·N −2 read from each other. This is certainly the most efficient approach since processes are numbered close to each other (it helps with BDD variable ordering). A simpler and less efficient way to connect processes is to give each of the 2 · N processes Pi read access to xi−1, xi+N, and xi+1.
Kautz Graph
Kautz graphs have many applications in peer-to-peer networks due to their constant degree, optimal diameter, and low congestion [147]. In fact, our parallel search al- gorithm from Chapter 4 uses a generalized Kautz graph of degree 4 to disseminate conflicting sets of actions. For simplicity, we focus on Kautz graphs of degree 2, where each process Pi reads from 2 processes and its xi variable is read by 2 other processes.
From [116], a generalized Kautz graph of N vertices with degree d has an arc from vertex j to vertex i iff i = −(2 · j + q + 1) mod N for some q ∈ Zd. This is easy
to compute in reverse for d = 2, where we let each process Pi read xj and xk where
j = −(2 · i + 1) mod N and k = −(2 · i + 2) mod N .
To compute Kautz graphs of degree 2 in the proper direction, we must compute which
j and k vertices have arcs to each vertex i (for any q values). Let j = ⌊N−1−i 2 ⌋ and let k = N − 1 − ⌊i
2⌋. This gives i = −(2 · j + q + 1) mod N for q = (i + 1 + N ) mod 2 and gives i = −(2 · k + q + 1) mod N for q = (i + 1) mod 2.
Kautz graphs may contain self-loop arcs, which can be undesirable. We detect such cases where j = i or k = i and instead use j = k 6= i. This keeps the number of variables read by each Pi the same, which is important for our model.
Tree
Trees are a common network topology since a lack of cycles in the topology removes many possibilities for livelocks in a protocol. A complete binary tree of L ≥ 2 levels (2L− 1 total processes) is easy to specify with 1 root process Root
0, 2L−1− 2 inner processes P1, . . . , P2L−1−2, and 2L−1 leaf processes Leaf2L−1−1, . . . , Leaf2L−2. Each πi
has a variable xi. To form the connections, each process πi with a parent (i ≥ 1) can
read xj where j = ⌊i−12 ⌋, and each process πi with children (i ≤ 2L−1− 2) can read
A more likely scenario is that we have a tree that is not complete and may not even have a defined root. For this case, we have 3 types of processes Endi, Duoi, and
Trii with 1, 2, and 3 neighbors respectively. It is not easy to enumerate instances of
trees, therefore we explicitly encode the connections using the system’s parameters. Let 3 parameters NEnds, NDuos, and NTris denote the numbers of each process. Furthermore, let 3 parameters EndIdcs, DuoIdcs, and TriIdcs be arrays of the indices that processes can read, where the arrays have NEnds, 2·NDuos, and 3·NTris elements respectively. It is also probably desirable to use unoriented processes (Duoi and Trii)
Chapter 6:
Adding Convergence is Hard
In this chapter, we investigate the complexity of adding actions to a protocol in order to achieve convergence, and related properties, to a set of legitimate states. We find that for most fairness assumptions, designing convergence or stabilization is NP-complete in the number of system states. This is not the case for global fairness, where convergence and stabilization can be achieved by simply giving all processes all local transitions that do not break closure [75, 88, 100]. However, we find that stabilization to a subset of legitimate states is a hard property to add, even under global fairness. The same complexity holds for adding nonmasking fault tolerance (see Figure 6.1). Our hardness proofs are based on reductions from the 3-SAT problem [95] to the various problems that involve adding actions to a protocol in order to achieve convergence. Since stabilization is a special case of nonmasking fault tolerance, it follows that, in general, it is unlikely that adding nonmasking fault tolerance to low atomicity programs can be done efficiently (unless P = NP).
No Fairness Weak/Local/Sync Fairness Global Fairness Convergence NP-complete* NP-complete* P Eventually Always NP-complete* NP-complete* NP-complete* Self-Stabilization NP-complete* NP-complete* P Nonmasking
Fault Tolerance NP-complete* NP-complete* NP-complete*
Figure 6.1: The complexity of adding convergence and various related problems.
(∗ denotes the contributions of this chapter).
Organization. In the following sections, we define the various problems under con-
sideration (Section 6.1), give a simple mapping from 3-SAT (Section 6.1), prove NP-
To obtain stronger results, this chapter is a completely rewritten version of A. P. Klinkhamer and A. Ebnenasir. On the Hardness of Adding Nonmasking Fault Tolerance. IEEE Transactions on
completeness for adding the properties of convergence (Section 6.3), self-stabilization (Section 6.4), and nonmasking fault tolerance (Section 6.5).