Skip to document

CSC8103 2022 Final

The final test of distributed algorithm of 2022/2023
Module

Distributed Algorithms (CSC8103)

7 Documents
Students shared 7 documents in this course
Academic year: 2022/2023
Uploaded by:
Anonymous Student
This document has been uploaded by a student, just like you, who decided to remain anonymous.
Newcastle University

Comments

Please sign in or register to post comments.

Preview text

[Turn Over]

NEWCASTLE UNIVERSITY

DISTRIBUTED ALGORITHMS

Time allowed - 1½ Hours

Instructions to candidates:

Answer ALL questions The total marks available for this exam are 100 Marks shown for sub-sections are indicative only

SEMESTER 1 2022/

Page 2 of 4

Question 1

a) Define a precedence relation by which two events that occur during a distributed computation may be ordered. [6 marks]

b) Consider a system of distributed processes, a, b, c and d, which interact as follows. Process a sends message m a to process b which receives and processes m a and then sends m b to process c. After processing m b, process c sends m c to processes d and a. Process d processes m c and sends m d to process a. (i) Suppose that process a decides after receiving m c and m d. Explain why its decision is correct as per the definition of the wave algorithm. [4 marks] (ii) Find out the earliest instance when process d can decide correctly and explain your answer. [6 marks]

c) Suppose that four distributed processes, namely p, q, r, and s, form a tree with p as the root and execute the wave algorithm. The figure below depicts the tree. Sent messages reach destinations after some arbitrary but finite amounts of time. At some time, say, T, during an execution of the algorithm, the only message that is in transit in the entire system is the token sent by p to r. (The figure below also depicts this situation at time T.)

token message

p

r

s

q

Page 4 of 4

Notations used bear their conventional meaning: - Sig A (Φ) is A’s unique and verifiable signature for Φ; - e K (Φ) is the encryption of Φ with key K; - H() is a one-way and collision-resistant hash function; and, - EOO (Evidence Of Origin) is Sig TTP (A, B, TTP, K). Analyse whether P can be regarded to be fair. If P is not fair, how can it be made to be fair? [18 marks]

c) Consider a transaction involving objects hosted in two servers, S1 and S2. At the end of the transaction, the two- phase commit protocol is executed with client C acting as the coordinator. Suppose that C crashes before it completes its execution of the protocol and that S1 and S2 do not crash. i) Describe an execution in which S2 decides on commit and S1 remains blocked (i., remains undecided) until C recovers from its crash. [8 marks] ii) Describe an execution in which S2 decides without entering the second phase and S1 remains blocked until C recovers from its crash. [6 marks]

d) An execution of the two-phase commit protocol is guaranteed to terminate only if there exists a sufficiently long period in which crashed nodes, if any, recover, and nodes do not crash. Justify this termination requirement by producing an execution in which the coordinator and one server never stop crashing, i., keep crashing after each recovery, and the server never decides. [8 marks]

END

Was this document helpful?

CSC8103 2022 Final

Module: Distributed Algorithms (CSC8103)

7 Documents
Students shared 7 documents in this course
Was this document helpful?
[CSC8103]
[Turn Over]
NEWCASTLE UNIVERSITY
DISTRIBUTED ALGORITHMS
Time allowed - 1½ Hours
Instructions to candidates:
Answer ALL questions
The total marks available for this exam are 100
Marks shown for sub-sections are indicative only
SEMESTER 1 2022/2023