312 views
0 votes
0 votes
In a distributed system two nodes A and B want to synchronize their clocks. The communications delay along the link A to B is 40ms and along B to A is 20 ms.

These delays are unknown to A and B. These nodes use Cristian's algorithm to synchronize their clocks. Node A's clock is 500 ms and B's clock is 632ms. And the node A is initiator. After completion, what is the time that A shows?

1)632   2)692   3)702    4)712

1 Answer

0 votes
0 votes

@Tara33

(3)702 ...

In practice, it is the variance in the delay that is the problem, not the latency...

However, the rule is that you can only see the RTT (Round Trip Time) which is 60ms….

Both sides will assume that the delay is a 30ms/30ms split...

This means that one side will have a clock 10ms too fast and one 10ms too slow...

It's easy to see where the figure comes from, A asks B for the time, the RTT=60, so the reply arrives at 692…

A adjusts it by half the RTT (10) = 702….

(It's 10 because the reply took 20s, but A estimates 30s)….

A tags the time it sent the message (normally in the message itself)…

B replies with a message with it's time, but includes the time the message was sent on A…

A then subtracts the time when the packet arrived, from the time it was sent (and gets 60ms)…

This always works because both times are from A.…

 

 

Related questions

1 votes
1 votes
1 answer
1
0 votes
0 votes
0 answers
2
2 votes
2 votes
1 answer
3
4 votes
4 votes
2 answers
4
makhdoom ghaya asked Aug 2, 2016
5,615 views
Which of the following computing models is not an example of distributed computing environment ?Cloud computingParallel computing Cluster computing Peer-to-peer computing...