Computer Networks and Distributed Systems - Solved Homework 2 | CS 425, Assignments of Computer Science

Material Type: Assignment; Class: Distributed Systems; Subject: Computer Science; University: University of Illinois - Urbana-Champaign; Term: Unknown 1989;

Typology: Assignments

Pre 2010

Uploaded on 03/11/2009

koofers-user-s4t
koofers-user-s4t 🇺🇸

4

(1)

10 documents

1 / 2

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS 425: Computer Networks and Distributed Systems
Solutions for Homework Set 2
Problem 1 Ans:
The probability that an individual computer is down is 4/(24*5+4)~0.03.
Assuming failure independence of machines, the availability is therefor 1-0.033 =
0.999973
Problem 2 Ans:
Process
p
must receive a new group view containing only itself and it must
receive the message it sent. The problem is now in what order these events
should be delivered to
p
. If
p
receives the message first, then that would tell
p
that
q
and
r
received the message but the question implies that they did not
receive it so
p
must receive the group view first.
Problem 3 Ans:
The value timestamp reflects the operations that the replica manager has
applied. Replica managers also need to manage operations that they cannot yet
apply. In particular, they need to assign identifiers to new operations and they
need to keep track of which updates they have received in gossip messages,
whether or not that have applied them yet. The replica timestamp reflects
updates that the replica manager has received, whether or not it has applied
them all yet.
Problem 4 Ans:
The replica manager with timestamp (4,6,8) is the only one that can satisfy the
query or incorporate an update because it is the only one that can satisfy the
condition prev != valueTS.
Problem 5 Ans:
(i) The range of latencies for a read is 80-320 ms. A read with only block if all
three replica mangers are down. Therefore, the blocking probability of a
read is P(all replicas are dead) = 0.013.
(ii)The latency of a write is 320 ms. A write will block if any of the replica
mangers is down. Therefore, the blocking probability of a write is 1-P(all
replica managers are alive) = 1-0.993.
pf2

Partial preview of the text

Download Computer Networks and Distributed Systems - Solved Homework 2 | CS 425 and more Assignments Computer Science in PDF only on Docsity!

CS 425: Computer Networks and Distributed Systems Solutions for Homework Set 2 Problem 1 Ans: The probability that an individual computer is down is 4/(24*5+4)~0.03. Assuming failure independence of machines, the availability is therefor 1-0.03^3 =

Problem 2 Ans: Process p must receive a new group view containing only itself and it must receive the message it sent. The problem is now in what order these events should be delivered to p. If p receives the message first, then that would tell p that q and r received the message but the question implies that they did not receive it so p must receive the group view first. Problem 3 Ans: The value timestamp reflects the operations that the replica manager has applied. Replica managers also need to manage operations that they cannot yet apply. In particular, they need to assign identifiers to new operations and they need to keep track of which updates they have received in gossip messages, whether or not that have applied them yet. The replica timestamp reflects updates that the replica manager has received, whether or not it has applied them all yet. Problem 4 Ans: The replica manager with timestamp (4,6,8) is the only one that can satisfy the query or incorporate an update because it is the only one that can satisfy the condition prev != valueTS. Problem 5 Ans: (i) The range of latencies for a read is 80-320 ms. A read with only block if all three replica mangers are down. Therefore, the blocking probability of a read is P(all replicas are dead) = 0.01^3. (ii)The latency of a write is 320 ms. A write will block if any of the replica mangers is down. Therefore, the blocking probability of a write is 1-P(all replica managers are alive) = 1-0.99^3.

Problem 6 Ans: An interleaving of T and U at the replicas assuming that two-phase locks are applied to the replicas: T U x=Read(Ax) lock Ax Write(Bm, 44) lock Bm x=Read(Bm) Wait Write(Bn, 44) lock Bn Commit unlock Ax, Bm, Bn Write(Ax, 55) lock Ax Write(Ay, 55) lock Ay Suppose Bm fails before T locks it. Then U will not be delayed (it will get a lost update). The problem arises because Read can use one of the copies before it fails and then Write can use the other copy. Local validation ensures one copy serializability by checking before it commits that any copy that failed has not yet been recovered. In the case of T, which observed the failure of Bm, Bm should not yet have been recovered, but it has, so T is aborted. Problem 7 Ans: 1)Process r takes the checkpoint at r2 then processes q, s, and t inherit the checkpoint request and should take the checkpoint with r. In turn, p, inherits the request from q and should take the checkpoint with q. 2)Only process p rolls back because this does not create any “received but not sent” conditions. Problem 8 Ans: Each process can only inherit from one process and the initiating process inherits from no other process. Thus, the chain of inheriting processes contains no cycles. Problem 9 Ans: Linearizability requires ordering relative to a real, global clock whereas serializability only requires logical ordering by individual systems. Thus, serializability still maintains the order of operations but does not relate it to a real clock. The lack of need to maintain global clocks makes serializability easier to implement than linearizability. Problem 10 Ans: If a backup replica services a read request, it's possible that the data is due to be updated but simply delayed. Thus, it is not linearizable since a read on a linearizably inconsistent resource occurs but it remains serializably consistent.