DSA621S - DISTRIBUTED SYSTEMS AND APPLICATIONS - 1ST OPP - NOV 2022


DSA621S - DISTRIBUTED SYSTEMS AND APPLICATIONS - 1ST OPP - NOV 2022



1 Page 1

▲back to top


nAmtBIA UnlVERSITY
0 F SCIEnCE Ano TECHn OLOGY
FACULTYOF COMPUTING AND INFORMATICS
DEPARTMENT OF COMPUTER SCIENCE
QUALIFICATION: Bachelor of Computer Science
QUALIFICATION CODE: 07BACS
COURSE: Distributed Systems and Applications
DATE: November 2022
DURATION: 3 Hours
LEVEL: 6
COURSECODE: DSA621S
SESSION: 1
MARKS: 100
FIRSTOPPORTUNITY EXAMINATION QUESTION PAPER
EXAMINER:
I Prof. Jose G. Quenum
MODERATOR:
I Prof. Dharm Singh Jat
This paper consists of 3 pages
(excluding this front page)
INSTRUCTIONS
1. This paper contains 5 questions.
2. Answer all questions on the exam paper.
3. Marks/scores are provided at the right end of each question
4. Do not use or bring into the examination venue books, mobile devices and other materials
that may provide you with unfair advantage. Should you be in possession of one right now,
draw the attention of the examiner officer or the invigilator.
5. NUST examination rules and regulations apply.
PERMISSIBLEMATERIALS
Calculator

2 Page 2

▲back to top


3 Page 3

▲back to top


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 ...

4 Page 4

▲back to top


---
-------

5 Page 5

▲back to top


DSA621S
First Exam {continued)
November 2022
{b) In order to capture the global state of the system, P2 records its state after event ·i1.
[10]
Using the Snapshot algorithm define a consistent cut that represents a global state of
the system with i 1 as part of the frontier. For each event in the cut, you will justify why
it is included.
Question 4 ..................................................................
[25 points]
(a) A client application wishes to access the byte range 402718322 - -470718322 from a
[5]
file {file1. <lat) in Google File system {GFS).What chunk index{es) does the byte range
correspond to?
(b) Describe in detail the read operation of the byte range from GFS.
[8]
(c) The byte range how now been modified. Describe in detail the write operation in GFS.
[12]
Question 5 ..................................................................
[15 points]
Two processes Si and S1 are involved in remote invocation with Si acting as the caller, while S1
acts as the callee.
(a) Highlight the underlying request-reply protocol using its primitives.
[6]
(b) The request issued by Si was not replied to on time. Explain the steps taken by both
[9]
processes using the at-least-once semantics.
Page2 of 2
End of Exam

6 Page 6

▲back to top


nAmlBIA
Uonr-t\\s/Ei;R;rSnITr.Yi;Ano
TEl~Hr.OLOGY
P/Bagms
Wi.1dho~
f'AMIBIA
2022-10-18
;:=t,[!JTt Y;_,fCO\\~f\\Frn.!G& !tffORMATI
l)?:'.-'AR.'f,,i:,~TC: O,t.PUTESRCIENCE