

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!


CS 425 / ECE 428 / CSE 424: Distributed Systems Spring 2009 Homework 1 - Due on February 10 th , 2009
The following problems are assigned from the 4th edition of CDK. 3rd edition users please check with your classmates for corresponding problem numbers.^1
Problem 1 (5 points). Problem 11.
Problem 2 (10 points). Problem 11.
Problem 3 (15 points). Problem 11.
Problem 4 (5 points). In the symmetric mode of synchronization in NTP, suppose you are given that server A and server B are connected by a symmetric channel, i.e., the channel shows the same (but unknown) message delay both ways, i.e., the A to B delay is the same as B to A delay. Show, using the equations for analyzing the NTP protocol, that under this situation, one can estimate the clock skew accurately (i.e., with an error of 0).
Problem 5 (5 points). Databases-R-Us runs a cluster of three servers A, B, and C, which com- municate with one another. You are told that the current clock skews between server pairs are as follows: A-B: 3 ms; B-C: 1 ms; C-A: -4 ms. Further, you are told that correctness in the database requires that no two server clocks be more than 30 ms apart. If each of the servers has an absolute clock drift of 2 ms per minute, how many minimum (i.e., worst-case) minutes can the cluster go without running a synchronization algorithm among its servers?
Problem 6 (35 points). Please referred to the attached figure for answering this problem
(a)(5 points) Assume that each process maintains a logical clock as a single integer value (i.e. “Lamport clock”). Initial clock values are all initialized to 0. Using LC1 and LC2 rules in section 11.4 (of 4th edition CDK), determine the timestamp of each event shown.
(b)(10 points) Repeat the above problem for vector timestamps, using rules VC1 through VC (from the section listed above) to determine the vector timestamps for each event shown.
(c)(10 points) Are cuts C1 and C2 consistent? Explain your answer.
(d)(10 points) In the attached figure, determine all the events that happened before event e8 (as per Lamport’s Happened Before relation).
Also determine the events that are concurrent with event e8. (^1) Chapter 11 in 4th edition corresponds mostly to Chapter 10 of 3rd edition
Figure 1: Please refer to this figure when answering Problem 6
Problem 7 (10 points). a, b, and c are events and no two events belong to the same process. Prove or disprove (give counter-example) the following:
(a)(5 points) a is concurrent with b and b is before c implies that a is before c
(b)(5 points) a is concurrent with b and b is concurrent with c implies that a is concurrent with c
Problem 8 (15 points). Consider a distributed system consisting of N exactly identical processes, that is, they do not have unique names or identifiers. The communication topology is a completely connected graph. Also suppose that the processes communicate in synchronous rounds (each round i has the following phases at each process: send messages for round i, receive messages from round i from all processes, compute new state of the process based on received message). In this setting, propose an algorithm by executing which the processes acquire unique names.