report - Kent State University

advertisement
Corona Linearization Analysis
Dianne Foreback
Computer Science Department
Kent State University
Kent, OH 44242
dforebac@kent.edu
Abstract—The authors of “Corona: A Stabilizing
Deterministic Message-Passing Skip List” [1] present a
deterministic, self-stabilizing algorithm for the construction of a
distributed skip list within a structured overlay network. The
algorithm comprises two components, a linearization component
that creates the bottom layer of the skip list and a status decision
component that creates the upper layers of the skip list. This
paper investigates the message complexity of the linearization
component for a network topology of predefined diameters.
I.
The initial graphs are randomly generated using a separate
algorithm. The graph diameters are obtained by connecting
one strongly connected component to another by a single
process as either a right or left neighbor in each component to
obtain the desired diameter. For each strongly connected
component, nodes within the component are connected to each
other either via channels or a right or left neighbor. The
diameter and corresponding number of components and nodes
per component are given in “Fig. 1”. The remaining number of
nodes is evenly distributed over the strongly connected
components.
INTRODUCTION
The distributed Corona Linearization algorithm orders
processes based upon unique identifiers.
Each process
maintains three variables, a right neighbor, a left neighbor, and
a special channel variable containing non-FIFO messages. A
message within the channel contains an id of a process
introducing itself. The system consists of N processes and all
identifiers are known. The goal is to linearize the system; i.e.
for processes to be ordered in lexicographically increasing
order as further explained in the Simulation Model. The
simulation and results are analyzed and presented in this paper.
Additionally, the message complexity of the linearization
component for a network topology of predefined diameters is
detailed in the Simulation Model of this paper. For further
details including the Corona Linearization algorithm, the
reader is referred to [1].
II.
B. Engine
The simulation engine executes as follows. The predefined
diameter graphs are used within the initialization procedure.
Each process is initialized with its left and right neighbor and
messages in its channel. All enabled actions for all process are
placed into a single global structure. While the system is not
linearized, one action with its corresponding process id is
randomly chosen from this structure. Recall, there are two
types of actions: linear and timeout. If a linear action is
selected, it is executed. A global variable counts the number of
times a timeout action is randomly selected. The timeout
action is only executed every 30 times any timeout action is
randomly chosen. This parameter of 30 is used so as not to
inundate channels with repetitive messages. After executing
the randomly chosen action, the global structure is updated to
contain all of the currently enabled actions with the
corresponding process ids and the program continues. Since
the timeout action for processes is always enabled, this global
structure will always contain actions and one action will
eventually be executed.
SIMULATION
A. Model
The simulation model for the Corona Linearization
algorithm consists of 100 processes with the varying data
points defined as the diameter of the initial network topology.
The process identifiers range from 0 to 99. Infinity is defined
as 100 and negative infinity as -1. The diameters range from
10 to 100 with increments of 10. One thousand computations
of the algorithm are executed for each data point; i.e. each
diameter. The average message complexity per linear actions,
timeout actions and combined actions is measured for each data
point. The algorithm terminates when all processes are
linearized. That is, when each process p satisfies p.left = (p.id 1) and p.right = (p.id + 1) where p.left represents the left
neighbor of process p and p.right its right neighbor. Therefore,
process 0 is linearized when 0.left = negative infinity and
0.right = 1 and process 99 is linearized when 0.left = 98 and
99.right = infinity.
III.
RESULTS
The results of running the algorithm against the graphs of
varying diameters created by randomly generated nodes within
the strongly connected components and the sequentially
generated nodes within strongly connected components are
given. As shown in “Fig. 2” for the randomly generated nodes
of the strongly connected components, the number of linear
and timeout actions decrease as the diameter increases. This is
due to having more processes closer to a state of linearization
resulting in faster linearization of the system. Notice that the
average number of linear actions executed by a node ranges
from approximately 2700 at a diameter of 10 down to 44 for a
diameter of 100. Hence, the worst average case is on the order
of n*n as expected.
1
Diameter
Components
Nodes per component
10
5
20
20
10
10
30
15
6 Remainder of 10
40
20
5
50
25
4
60
30
3 Remainder 10
70
35
2 Remainder 30
80
40
2 Remainder 20
90
45
2 Remainder 10
100
100
1
component is needed. Additionally, placing the remaining
nodes into one strongly connected component is not fair.
Hence, distributing these remaining nodes over the number of
strongly connected components is necessary. A separate
program is written to create these graphs.
Another point for consideration is that of how often to
execute the timeout action. When the probability of executing
a timeout and linear action are equal, the message complexity
is not correctly determined. This is due to the repetitive
sending of the same right and left neighbor via timeout action,
hence not permitting enough linear actions to be executed.
Therefore the timeout action should not have equal probability.
To gather conclusive data, the number of computations per
data point (diameter) needs to be relatively large. Results
obtained from 10 computations per data point are not indicative
of the results from 1000 computations. This variance is due to
the randomization of selecting actions, therefore, the number of
computations per data point must be large.
Fig. 1. Nodes per compenent based upon diameter.
V.
FUTURE WORK
Considerations for future experimental work may include
determining how often the timeout action should be executed.
This is of interest because executing this action places
messages in the channels that may already exist in the channel
so being further in the linearization stage may produce better
results.
Additionally, having a varying number of nodes in each
strongly connected component may produce some interesting
results in analyzing additional parameters in determining
message complexity.
Fig. 2. Randomly generated strongly connected graphs.
VI.
CONCLUSION
The simulations in this experiment demonstrate that as the
diameter increases the message complexity decreases. This is
further demonstrated when comparing the results of
sequentially strongly connected graphs where linearization is
further along with the results of the randomly generated
strongly connected graphs where the strongly connected
components contain randomly, not sequentially, chosen
process ids. Overall, the Corona Linearization algorithm leads
to a distributed linearization system that may be used for a base
to build skip graphs.
Fig. 3. Sequentially strongly connected graphs.
From the results of “Fig. 3”, as the diameter increases, the
number of linear actions decreases. This is due to the initial
system state being closer to linearization. However, as the
number of linear actions decrease, the number of timeout
actions increase. This results from fewer messages in the
channel so the timeout action is selected more often.
ACKNOWLEDGMENT
I would like to thank Dr. Mikhail Nesterenko for his idea to
use strongly connected components to generate graphs of
varying diameters and guidance.
REFERENCES
IV.
CHALLENGES
[1]
Challenges overcame while designing this experiment
include the generating the graphs of varying diameters, how
often the timeout action is executed and the number of
computations to gain legitimate results.
In generating the graphs of varying diameter, permitting
just one node to connect to another strongly connected
2
Rizal Mohd Nor, Mikhail Nesterenko, and Christian Scheideler,
“Corona: A stabilizing deterministic message-passing skip list,” in 13th.
International Symposium on Stabilization, Safety and security of
Distributed Systems (SSS) pages 356-370, October 2011c.
Download