Presentation is loading. Please wait.

Presentation is loading. Please wait.

Non-Distributed Excercises

Similar presentations


Presentation on theme: "Non-Distributed Excercises"— Presentation transcript:

1 Non-Distributed Excercises
CS60002: Distributed Systems INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

2 Sliding Window Protocol
TRUE OR FALSE (with explanation) In the sliding window protocol, we must use a large window size when the bandwidth of the communication channel is small. In the sliding window protocol, a packet is never re-transmitted by process P after it has been received by the process Q. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

3 Network Routing TRUE OR FALSE (with explanation)
While the distributed version of the Floyd-Warshall algorithm is in execution, temporary cycles may be created in a routing path between some source and destination. NetChange routing algorithm uses an upper-bound on the number of nodes to guarantee termination. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

4 Deadlock Prevention TRUE OR FALSE (with explanation)
Buffer graph for deadlock-free packet switching may have cycles if it has to support two-way communication between a pair of nodes. Forward state controller for deadlock-free packet switching uses fewer buffers than a forward count controller. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

5 Logical Clocks With respect to the space-time diagram given below (where stars indicate local computation events), what would be the Lamport’s logical timestamp and vector clock timestamp of the event a? a P1 P2 P3 INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

6 Logical Clocks With respect to the space-time diagram given below (where stars indicate local computation events), what would be the Lamport’s logical timestamp and vector clock timestamp of the event a? 18 17 1 2 3 4 9 10 14 15 P1 1 2 5 6 7 9 10 11 12 P2 14 4 8 13 1 4 P3 4 5 10 15 16 LAMPORT’S LOGICAL TIMESTAMP INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

7 Logical Clocks With respect to the space-time diagram given below (where stars indicate local computation events), what would be the Lamport’s logical timestamp and vector clock timestamp of the event a? [1,0,0] [2,0,0] [3,0,0] [4,0,0] [5,7,0] [6,7,0] [7,12,4] [8,12,4] [9,13,7] [10,13,7] P1 [0,1,0] [0,2,0] [3,4,0] [3,5,0] [3,6,0] [3,8,0] [3,9,4] [3,10,4] [3,11,4] [3,13,4] P2 [3,3,0] [3,7,0] [3,12,4] P3 [0,0,1] [0,2,2] [0,2,3] [0,2,4] [3,8,5] [3,13,6] [3,13,7] VECTOR CLOCKS INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

8 Suppose in Lamport’s Logical Clock, each node I increments its clock by a fixed positive constant di > 0 on an event (instead of incrementing by 1). Will the clocks work correctly if the di’s are different for different i? Justify your answer. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

9 Global Snapshots Suppose that two processes i an j take five snapshots each of their local states independently at arbitrary times, with no communication for snapshot capture between them (i.e., no explicit snapshot capturing algorithm is run, processes just record their states whenever they want). Channel states are implicitly captured in the process states using message logs. Is it possible to have a scenario in which no pair of snapshots (one taken from i and one taken from j; there are 5*5=25 such pairs) is consistent? Justify your answer with a space-time diagram. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR

10 Distributed Mutual Exclusion
Show the following with an example using space-time diagrams involving two processes only: Why does Lamport’s mutual exclusion algorithm require FIFO channels? Why Raicairol-Carvalho’s mutual exclusion algorithm does not ensure timestamp-ordered entry into the critical section. INDIAN INSTITUTE OF TECHNOLOGY KHARAGPUR


Download ppt "Non-Distributed Excercises"

Similar presentations


Ads by Google