Tutorial3 Solutions
Tutorial3 Solutions
1
software clock such that after 8 seconds we can replace the errant clock with
the software clock in good conditions. Let's denote the software clock with S ,
then: S = c(E ; Tskew )+ Tskew , where Tskew = 10 : 27 : 54 and c is to be found.
We know that S = Tskew + 4 when E = Tskew + 8, so: Tskew + 4 = c(Tskew +
8 ; Tskew ), and c = 0:5. We obtain the formula:
S = 0:5(E ; Tskew ) + Tskew (when Tskew E Tskew + 8):
(2 p)
Question 3.3 A client attempts to synchronize with a time server. It records
the round-trip times and timestamps returned by the server in the table bellow.
Which of these times should it use to set its clock? To what time should it set
it? Estimate the accuracy of the setting with respect to the server's clock. If it
is known that the time between sending and receiving a message in the system
concerned is at least 8 ms, do your answers change?
(3 points)
Answer 3.3 The client should choose the minimum round-trip time of 20ms=0.02s.
It then estimates the current time to be 10:54:28.342+0.02/2=10:53:28.352. The
accuracy is +/-10ms. (1 p)
If the minimum message transfer time is known to be 8 ms, then the setting
remains the same but the accuracy improves to +/-2ms. (1p)
Question 3.4 By considering a chain of zero or more messages connecting
events e and e and using induction, show that e ! e ) L(e) < L(e ). (3
0 0 0
points)
Answer 3.4 Induction basis:
If e and e are successive events occuring at the same process, then teh
0
2
are connected in a series of events e1 e2 : : : eN eN +1 occuring at one or more
processes such that e = e1 and e = eN +1 . Then e ! eN and so L(e) < L(e ) by
0 0
the induction hypothesis. By LC1 and LC2 we have L(eN ) < L(e ). Therefore
0