Clock synchronization using servo-clock
  This work was developed within the scope of the Distributed Systems of MIEEC




                                                                      André Costa Lima
                                                                        Hugo Marques
Clock sync – importance
 Medium access control   Synchronized sampling
         TDM
Clock sync – problem & solution
                                         Network nodes have their own clock
                                         • Clocks evolve at their own pace
                                         • There is no coherent notion of time
                                         • Clocks tend to diverge due to local drift




Possible solution
• Master node sends reference clock to slaves
• Not perfect !!
    • Upon reception the reference is late
         • Network induced delay
         • Overheads
Estimating the network delay


Measuring Round-Trip delay
(RTD)
Following the clock reference




       rate    offset
Clock correction with Servo-Clock
Rate correction



Slave clock at time instant t




                                error
Base experimental parameters
Client-Server approach
   • Implementation in Java
   •   TCP sockets
   •   Clock server – master
   •   Client – slave
   •   Periodic clock reference request




Clock generator
   Java Virtual Machine (JVM) high-resolution timer
       • System.nanoTime()
Slower and smoother correction
Unstable behavior
Faster convergence compensating offset errors
Conclusions

Clock synchronization using servo-clock