• No se han encontrado resultados

Plano Establecimiento Mar de Vi 81

This chapter has presented several techniques for designing fault-containing self-stabilizing distributed algorithms. The first technique, a transformation based on global synchronization, has scalability problems. As the fault-gap depends on the number of nodes and diameter of the system’s topology, the time between containable faults grows as systems become larger. Moreover, the larger the number of nodes, the higher the probability of faults.

Several attempts to lower the fault-gap, and in particular to make it in- dependent of the number of nodes, have been made: the design of problem- specific solutions, probabilistic fault-containment, and priority scheduling. However, an impossibility result by Ghosh et al. shows that a transforma- tion cannot provide both a fault-gap of O(1) rounds and the stabilization time of T + O(1) rounds, where T is the stabilization time of A in rounds [GGHP96]. Section 5.8 presented a new transformation that utilizes local instead of global synchronization. Its output algorithm AFL combines a

fault-gap of O(1) and a fault-impact of radius 2 with a stabilization time of O(T ). The transformation scales well, as the fault-gap does not depend on the number of nodes or the degree of the nodes. It is therefore suit- able for large networks. Also the small fault-impact radius indicates that most parts of the system continue to operate and are completely unaware of the fault. These results are considerable improvements over the previously known transformation which is based on global synchronization. Also, AFL

does not require any a priori knowledge about n or ∆.

The fault-containment provided by AFLis comparable to that provided by

the problem-specific solutions and the priority scheduling based approach. However, priority scheduling seems to cause a large slow-down and it is an open problem whether it can be the basis of a transformation. The stabi- lization time of AFLdiffers asymptotically from that of the input algorithm

A by a constant slow-down factor of 6 only. We assume that the key aspect of the efficiency of AFL is local synchronization based on stable properties

(see Lemma 5.21). The priority scheduler, however, must ensure that the priority of a neighbor of v never increases while v makes a move. Hence, the entire 2-hop neighborhood of v is prohibited to make a move. Thus a non-constant slow-down may not be avoidable.

Unlike the transformation for 1-strong stabilization discussed in Sec- tion 5.3.2, AFL is correct under the distributed scheduler. This allows

the use of AFL in asynchronous systems without the need for synchroniz-

ers. However, it should be mentioned that even if AFL is executed under

stabilizing under the distributed scheduler. This stems from the fact that the moves of one round of A are spread out over 6 rounds of AFL.

Compared to A, the space required by AFLincreases by a factor of ∆ + 1.

The required space is comparable to the previously known transformation. However, it is still a disadvantage compared to specially designed problem- specific solutions. It can be shown that only 2 backups per node are suffi- cient to repair the state corruption of a single node. Lowering the number of backups from ∆ to 2 yields a new problem: Which neighbors should a node choose to store its backups? Chapter 6 discusses a possible solution to this problem which computes a placement for the backups such that the number of backups stored by each node has minimal variance.

All solutions to fault-containment discussed in this chapter assume that the topology remains unchanged. Fault-containment, i.e., repair of a state corruption in constant time, is discussed in Chapter 7.

Variance

Large-scale distributed systems such as cloud computing networks, peer-to- peer file sharing systems, or sensor networks, often require replication of resources. Replicas are placed on other nodes of the network. There are different reasons to create replicas: reduction of retrieval time (e.g., caching systems), better utilization of computing devices (e.g., load balancing), or the increase of fault tolerance and availability (e.g., backup systems). The placement strategy for the replicated resources significantly impacts perfor- mance in all these cases.

This chapter considers distributed systems where each node wants to place replicas of a resource on k different neighbors. The nature of the resource is of no importance for our discussion. However, it is assumed that all replicas induce the same load. As an example consider the case where each node wants to replicate its own state on k neighbors. The motivation for this stems from the transformation presented in Chapter 5. Adding fault-containment to any silent self-stabilizing protocol can be achieved by creating backups of a node’s local state on k = 2 neighbors.

We pursue the goal of achieving a preferably homogeneous placement of the replicas. There are different measures of homogeneity of a placement, e.g., the Gini coefficient, the standard deviation, or the discrepancy, which is the difference between the maximum and the minimum load among all nodes. In many cases the network topology will not permit having a com- pletely homogeneous placement, i.e., the same load for every node resp. a standard deviation of 0. Therefore, finding a distributed algorithm for this placement problem is a real challenge. The problem is formally defined in Section 6.1. Related problems are discussed in Section 6.2.

The main contribution of this chapter is a silent self-stabilizing distributed algorithm, designed for the unfair distributed scheduler, that computes the placement of k replicated resources on direct neighbors of each node, such that the standard deviation of the number of replicas per node assumes a local minimum. The algorithm is described in Section 6.4. It terminates after O(n∆2) moves or O(n∆) rounds respectively under the distributed

a 1 b 1 c 1 d 2 e 2 f 1 g0 h 0 a 1 b 1 c 1 d 2 e 1 f 1 g1 h 0

Figure 6.1: Two local 1-placements of the same graph

scheduler. This chapter concludes with a sketch of how this algorithm can be integrated with the transformation given in Section 5.8.

6.1 The Local k-Placement Problem

For any given positive constant k ∈ N, a local k-placement selects k neigh- bors per node v that store one of k replicas of a resource of node v. For nodes v ∈ V with less than k neighbors, we restrict the number of replicas to deg(v) and all neighbors are selected. For notational convenience we define k(v) = min(deg(v), k) for all v ∈ V . Consider the following formal definition:

Definition 6.1. A local k-placement is a function β that assigns to each

v ∈ V a set β(v) ⊆ N (v) with |β(v)| = k(v). The load of v with respect to β is denoted by Lβ(v) = # w ∈ N (v) : v ∈ β(w).

Informally, the load of node v is the number of times that node v is se- lected to store a replica for one of its neighbors. Figure 6.1 depicts two different local 1-placements of the same graph. Arrows indicate the place- ment of the replica of each node. The label next to each node indicates its load.

The goal pursued in this chapter is to find a homogeneous distribution of the load among the nodes. There are several expressions to measure the homogeneity of a local k-placement β. We have chosen the standard deviation, or equivalently the variance, which is defined as follows:

var (β) =1 n X v∈V (Lβ(v) − µβ)2 with µβ= 1 n X v∈V Lβ(v).

The lower the value of var (β) the more homogeneous is β. The local 1- placement on the left of Figure 6.1 has a variance of 1/2 while that on the right has variance 1/4.

a 1 b 1 c 1 d 1 a 1 b 1 c 1 d 2 e 0 a 4 b 0 c 0 d 1 e 0

Figure 6.2: Local 1-placements with (global) minimum variance: Line graphs of odd and even length (left) and a star graph (right)

Computing a local k-placement with minimum variance distributedly seems to be a difficult task. This is discussed in more detail in Section 6.3. Therefore, we content ourselves with computing local minima. A local k- placement has local minimum variance if the reassignment of a single replica from one neighbor to another does not lower the variance. The local 1- placement on the left of Figure 6.1 does not have local minimum variance. If node f shifts its replica from node e to g the variance is decreased from

1 2 to

1

4. The result is the local 1-placement shown on the right. This place-

ment has local minimum variance. Note that an optimal local k-placement of this graph has variance 0. Obviously, a variance of 0 is the (global) min- imum in this case. Not all graphs have a local k-placement with variance 0. Examples of such graphs are line graphs with an odd number of nodes and star graphs, see Figure 6.2.