DSA621S
First Exam (continued)
November 2022
Question 1 ..................................................................
[15 points]
Consider a distributed system with five (05) processes (Pi, P2, P3, P4 and Ps).The processes
+ are involved in a synchronous consensus algorithm. After k l rounds the values exchanged
by the processes are as follows:
Pi: {v 6,vL vt ... ,vt+J;
P2 : {V~,V21,V~,... , V~+1};
?3: {Vg,Vt, Vt ... , Vl+1};
P4: {V6,Vf, Vt ... , V!+1};
P5: {Vg,Vf, Vt ... , vi+ 1};
Following the consensus algorithm, what is the decision made by each process? Define the
requirement for an agreement to be reached, assuming that no process fails.
Question 2 ..................................................................
[20 points]
Consider seven (7) processes in a distributed system: Pi, P2, P3, P4 , Ps,P6 and A. Here,
the higher the process identifier, the higher the resources attached to it. As such, process P7
is the current leader. However, P3 just detected that the leader has crashed. It then started
an election algorithm using the Bully algorithm. Describe step-by-step the execution of the
algorithm until the election of a new leader. Note that P2 also crashed during the election
algorithm.
Question 3 ..................................................................
[25 points]
(a) Consider four (04) processes (Pi, P2, P3 and P4) as part of a distributed system. The
[15]
following events (listed in order) have occurred at each process:
P1 : 8 0 , 8 1, 8 2 , 8 3, 8 4 and 8 5
P2 : i 0 , i 1, i 2 , i 3 and i 4
P3: Jo, J1, J2 and J3
P4: fo, f1, €2and f3
In addition, we have the following observations:
• Event 'l1 resulted from a message exchange between Pi and A after event 8 2 ;
• Event 8 4 resulted from a message exchange between P2 and Pi after event i 2;
• Event Jo resulted from a message exchange between P1 and P3 after event 8 1;
• Event i 4 resulted from a message exchange between P3 and A after event J1;
• Event 8 3 resulted from a message exchange between P4 and Pi after event f 0;
• Event f 1 resulted from a message exchange between P,3 and P4 after event J2 ;
• Event e5 resulted from a message exchange between P4 and Pi after event f2 ;
• Event €3 resulted from a message exchange between P3 and P4 after event J3 .
Using a diagram represent the vector clocks corresponding to the logical clock for each
event in the system.
Page 1 of 2
Please turn over to the next page ...