• No results found

Exam Distributed Algorithms VU University Amsterdam, 15 December 2014, 12:00-14:45

N/A
N/A
Protected

Academic year: 2021

Share "Exam Distributed Algorithms VU University Amsterdam, 15 December 2014, 12:00-14:45"

Copied!
2
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

Exam Distributed Algorithms

VU University Amsterdam, 15 December 2014, 12:00-14:45

(Answers can be given in English or Dutch. You may use the textbook Distributed Algorithms: An Intuitive Approach. Use of slides, handouts, laptop is not allowed.)

(The exercises in this exam sum up to 90 points; each student gets 10 points bonus.)

1. Let node u initiate a deadlock detection run in which the following wait-for graph is computed.

u

v

w

x

y

Give one possible computation of the Bracha-Toueg deadlock detection algorithm

on this wait-for graph. (12 pts)

2. Consider the following basic computation of a decentralized basic algorithm on an undirected ring of size three, with processes p, q and r, where p and q are the initiators. First, p sends a message to q and r and becomes passive, while q sends a message to r. When q receives p’s message, it also becomes passive.

After reception of the messages from first p and then q, r sends a message to both p and q and becomes passive. After reception of the message from r, p and q send a message to each other, and after reception of these messages both become passive.

Add the Shavit-Francez termination detection algorithm on top of the basic al- gorithm, and extend this basic computation with control messages, to show how

termination is detected. (10 pts)

(2)

3. Consider weighted reference counting, where in case of underflow the reference increases its weight, and tells the object owner to increase its total weight.

Give an example to show that if the process where the weight is increased would not wait for an acknowledgement from the object owner, then the object owner could prematurely mark the object as garbage. (10 pts)

4. In Toueg’s routing algorithm, when a process p 6= r in the sink tree of the pivot r receives the distance values of r, let p first for each process q perform the check whether distp(r) + distr(q) < distp(q). Explain why p needs to forward only those values distr(q) for which this check yields a positive result. (12 pts)

5. Prove, using an acyclic orientation cover, that there exists a deadlock-free con- troller for packet switching on a cube (so consisting of eight nodes) which uses only two buffers in each node and allows packets to be routed via minimum-hop

paths. (12 pts)

6. Give an example to show that if scheduling of messages is not fair, then the Bracha-Toueg k-crash consensus algorithm (with k < N2) may not terminate

with probability one. (10 pts)

7. Apply the Lamport-Shostak-Pease broadcast algorithm to a network with N = 7 and k = 2 where two of the lieutenants are Byzantine. Let the general initially have the value 0. Describe in detail a computation in which the two Byzantine lieutenants in the subcalls where they play the role of the general broadcast the

value 1. (12 pts)

8. Explain in detail why the Carvalho-Roucairol optimization of the Ricart-Agrawala

mutual exclusion algorithm is correct. (12 pts)

Referenties

GERELATEERDE DOCUMENTEN

(Explicitly give all intermediate steps and splitting criteria of the reduction of the original dfa to the resulting minimal dfa.). Page 1 of 2 Continue on the

(At the exam, copies of slides can be used, without handwritten comments. The textbook by Linz, handouts, and laptop are not allowed!).. 1.

Suppose that in the 2-thread consensus protocol using a FIFO queue (Figure 5.7 on page 107), a thread first dequeues an element from the queue, and then writes its value in its slot

Suppose that in case of multiple registers carrying the largest timestamp, reads pick the one with the smallest index in the array.. Explain how read and write

Consider the Gallager-Humblet-Spira algorithm for computing a minimal span- ning tree in a graph in which all edges have a unique weight... Apply the Itai-Rodeh ring size algorithm to

Consider Awerbuch’s depth-first search algorithm (where a node holding the to- ken for the first time does not send the token to its father and to the node it forwards the token

Suppose that Rana’s algorithm is adapted as follows: Only quiet processes that have been quiet from some logical time &lt; t (instead of ≤ t) onward can take part in a wave tagged

Give a scenario (including all messages and message contents) in which first node 5, then node 4, and finally node 2 requests the token, but they receive the token in the