Notes for assignment 4
Hints and answers to frequently asked questions.
- Question 1.
- When determining whether the processors have achieved half consensus,
only the processors that have not failed need to be taken in to account,
on in other words only half of the non-failing processors need to select
the same value.
- Once a processor fails it cannot receive or process messages.
- Question 2.
- Here you must assume that the algorithm from question 1 is modified
so it does not perform f/2 + 1 rounds, but x rounds, where
x is the number that you need to determine.
- Question 3.
- For this question you need to assume that each processor has a finger
table of size 3; one of the entries of the finger table stores the address
of the processor. You need to determine what addresses you shall put in the
other two entries of the finger table so as to minimize the number of
- Note that the size of the ring of identifiers is 2^m
(two to the power m), and this is a vary large value compared to the
number n of processors in the system.
- You must assume that the two hash functions that the consistent
hashing scheme uses distribute values uniformly across the entire ring
of identifiers. This means that if we take any two large segments
s2 of the ring of identifiers of the same size, the number of
processors that are mapped to s1 by the processor hash
function hp is the same as the number of processors that are
mapped to s2.
- Question 4.
- The provided FindFingerTable.java will read the information from the
configuration file and compute three sets stored in three variables:
You can use the code from this class to answer this question.
- localKeys will store the keys that need to be stored locally in
- searchKeys will store the keys that this processor needs to find.
- fingerTable this is an array that stores the processor addresses
in the finger table for this processor
- FindSimpler.java contains an algorithm for finding keys in a P2P system
using the successor addresses only, not the finger tables. Some of you
tried to use this algorithm with network configurations netPeer1.txt and
netPeer2.txt and it did not work because FindSimpler.java did not assume that
information about the finger tables was stored in the configuration
file. I modified FindSimpler.java so it works with the above configuration
files as well. I also fixed a typo in networkPeer1.txt. Please download
the new versions of these files from the course's website.
Study how the program FindSimpler.java works and modify it so it finds information in a P2P
system using the finger tables.
- The underlying network in the P2P system is complete. In the example
configuration files I did not add edges between all pairs of processors to
keep the network clean and not too cluttered when the simulator draws it on
the screen. If you
write your own configuration files, you might add edges between all pairs of
- Question 5.
- Do not email me your code, but submit it through OWL.