0% found this document useful (0 votes)
20 views

Problems with Answers

Distributed system questions and answers

Uploaded by

fazeelanwar.vp
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views

Problems with Answers

Distributed system questions and answers

Uploaded by

fazeelanwar.vp
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

Apanna A Naur

1. Site S1, S2 , s3 contains process as listed below. Rol vo:12


S1:P17,P32,P61,P72
s2: P33, P44, P7

$3: P91,P6,P23,P28

Resources available are R1, R2, R7

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

Alo Cycle enist, 1hugr


thuoe is mo deodlock.

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

Slep 6 Step1 20 step8 2071


075 2
((o)o71o

(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

G) TRACE KTU No.e m e s a 9 p neudad

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

You might also like