*
The moose likes Threads and Synchronization and the fly likes time sync Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "time sync " Watch "time sync " New topic
Author

time sync

Alex Balatibat
Greenhorn

Joined: Oct 06, 2012
Posts: 1
Hi everyone! I do have a problem regarding time synchronization. The problem is given n clocks c1, c2, ..., cn, with respective time readings t1, t2, ..., tn, the theoretical solution to the time synchronization problem is when the n clocks provide only one exact time t0 at any given time. However, due to the variabilities inherrent to the n clocks, we can accept a practical solution of an average time t0 with a variance σ. The variance could be set to the desired resolution, e.g., 1ms. Given the above scenario, the Berkeley algorithm provides a way to compute for the average time t0 using the different time readings t1, t2, ..., tn. That is simply, t0 = (t1 + t2 + ...+ tn) × n-1. Given the situation how can i discover the node in the network and assign assume one node that it is the server where all the time will be sync to the other client node. Hope you can help me. Thanks a lot.


Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1753
    
    7

Wouldn't it be simpler to just use the NTP implementation of the operating system to sync with a predetermined set of clock sources?


Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
Ranganathan Kaliyur Mannar
Bartender

Joined: Oct 16, 2003
Posts: 1076
    
  10

and, Welcome to the Ranch!


Ranga.
SCJP 1.4, OCMJEA/SCEA 5.0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: time sync
 
Similar Threads
Threads and DB Access
Suggestion about data structure to be used for piecewise defined functions.
Deadlocks in Threads?
regding Thread.join
testing concurrency and sleeping threads