1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

How to calculate Clock Skew of nodes in a distributed system

  1. Nov 18, 2015 #1
    A distributed system has 3 nodes ##N_1##, ##N_2## and ##N_3##, each having its own clock. The clocks of nodes ##N_1##, ##N_2## and ##N_3## tick 800, 810 and 795 times/ms. The system uses the external synchronization mechanism, in which all 3 nodes receive the real time every 30 seconds from external time source and readjust their clocks. What is the maximum Clock Skew that will occur in this system ?

    Attempt: Maximum difference would come between ##N_2## and ##N_3## i.e, ##N_2## - ##N_3## = 15 times/ms = 15000 times/s
    Clock Skew = 1/15000 s

    Is it the right way to calculate ...
     
  2. jcsd
  3. Nov 18, 2015 #2

    Svein

    User Avatar
    Science Advisor

    Looking at your numbers and assuming that the nodes know about their tick rates, I see a common factor of 5. This means that the maximum clock skew will be 200μs every ms.

    The only way the 30s would be relevant is that all nodes believe that they have a tick rate of 800/ms. Then the clock skew in 30s will be [itex]\frac{800-810}{810}\cdot 30s = -0.37s [/itex] and [itex] \frac{800-795}{795}\cdot 30s = 0.19s[/itex].
     
  4. Nov 18, 2015 #3
    Can you please elaborate it little bit more How you have calculated clock skew.
    First of all : I think Clock Skew should be 200 ms in place of 200 μs.
    Secondly: By your method, I'm getting maximum clock skew as 0.56 s by considering ##N_2## and ##N_3##
    Thirdly: Can I use this method
    Maximum skew in 1 sec between n2 & n3 = (.810 - .795)
    = .015 sec
    Thus, skew in 30 sec = .015 * 30 = .45 sec
     
    Last edited: Nov 18, 2015
  5. Nov 18, 2015 #4

    Svein

    User Avatar
    Science Advisor

    1. I do not think the clock skew should be 200ms each ms...
    2. If N2 and N3 know that they should use 810 and 795 counts/ms, they would be correct each ms.
    3. If they know their counts, in 200μs N1 will have counted to 160, N2 to 162 and N3 to 159. Therefore they are in sync after 200μs.
    4. Worst case is just before 200μs - but it is maximum 2 counts out of 160: 2.5μs.
    I would not have used that method.
     
  6. Nov 18, 2015 #5
    How do you come up with 200 μs, that's what I'm not getting. Can you please elaborate your procedure.
     
  7. Nov 18, 2015 #6

    Svein

    User Avatar
    Science Advisor

    You specified 800, 810 and 795 counts per millisecond. I see 5 as a common factor, one fifth of a millisecond is 200 μs. One fifth of the counts are 160, 162 and 159 counts.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: How to calculate Clock Skew of nodes in a distributed system
Loading...