Problems with Answers
Problems with Answers
$3: P91,P6,P23,P28
All process in site 2 is demanding for Resource R7, while R7 is assigned to the first
process in site three. Second process in site 2 is demanding resource held by third
process in site 1. Evaluate the global state scenario and examine whether the resultant
is in a deadlocked condition.
Ri
2. In a ring topology 7 processes are connected with different ID's as shown: P20->P5->P10-
>P18->P3->P16->P9 If process P10 initiates election after how many mtessage passes will
the coordinator be elected and known to all the processes. What modification will take
place to the election message as it passes through all the processes? Caleulate total number
of election messages and coordinator messages
873
Stp1 Step Pas on
(1
(1 87l0 (1
Reppace
5 8
(t
Step3: ste Step 5
R
(1 1871
1S716 )
((8)
o7t8 (t6) 3
18
Reyola ce by 20
(8)
sy 3
Step Step 10 step (1
073
(10207(6 (
TRACE KTU
(1@20
1
(
20 9.07 9
step 12
Cloctien mes ag2= 2
CG
ordinatr menage=7 -/
020 = 6
3. Pid's 0,4,2,1,5,6,3,7, P7 was the initial coordinator and crashed, Illustrate Bully
if P4 initiates election
algorithm,
, Calculate total number of election messages and coordinator
messages
ne epy
ok ()
) (
letion mesaq
T- = 6
Co oy limocto meMa
TRACE KTU
4. Apply ring-based leader election algorithm with 10 processes in the worst-performing case.
Count the number of messages needed.
(10) Raplac by 3
-
372
271
Raplace by 2
4-73
Raplaca by 4
76
Roplate by
576
Raplate
3
574
Replacsbys
ReplacebyS
q 7 a7o
-
Lo7
TRACE KTU(
O
a a
Lo7
lo7 2
, O
( -
-G-
(
(
(07b -
o to7t 07S
(67 7 ((o o7%
(1
No- odterodiond
Apaano. A Nair
uk PI Cso |2
5. Apply spanning tree-based termination detection algorithm in the following scenario. The
nodes are processes 0 to 6. Leaf nodes 3, 4, 5, and 6 are each given tokens T3, T4, T5 and IT6
respectively. Leaf nodes 3,4, 5 and 6 terminate in the order, but before terminating node 5,it
sends a message to node
T3
74 TS T6
TRACE KTU ()
( 6
|T6 T
S- t , 5 , 6 S- 1,5,6
S-1, 6}
Te