-1

It appears that a lot of software, including low-level system calls, etc., relies on obtaining and being properly synchronized with the correct time in order to properly function. I was wondering if a better method could be implemented in order to avoid this dependency?.. e.g. rely on hardware-genrated fixed cycles (ticks), etc.

Joe R.
  • 2,032
  • 4
  • 36
  • 72
  • 1
    It is not a question of whether you are synchronized with NTP it is a question whether you get the correct time - how you do it is of no importance or rather shouldn't be. – LordDoskias Jul 01 '12 at 18:06
  • thanks for the clarification!.. It is my understanding that a lot of software, including system calls, UDP, etc., have hard-coded NTP dependencies. What would happen if the source which provides official time (atomic clock?) is unavailable?.. I feel we need to create a fail-safe solution for this posibility, or totally rely on another method! – Joe R. Jul 01 '12 at 18:18
  • @bmargulies so if thats not correct, then explain why. – Joe R. Jul 01 '12 at 18:53
  • It's counterfactual. UDP as a protocol has no NTP dependency. I can't think of a system call that has. Why do you think that this is true? – bmargulies Jul 01 '12 at 18:57
  • okay, so I rephrased the question. – Joe R. Jul 01 '12 at 18:59
  • I'd say you demonstrate lack of basic understanding about how the most used transport protocols are used - they rely on the concept of a sequence of events hence the sequence number fields in the protocol frames themselves. I'd suggest you start by reading how UDP/TCP actually work – LordDoskias Jul 02 '12 at 13:00

2 Answers2

2

It's possible to write software without depending on global synchronized time. If you want to learn more, read one of the books on distributed programming, for example this one: http://www.amazon.com/Distributed-Systems-Algorithmic-Approach-Information/dp/1584885645/ref=sr_1_12?ie=UTF8&qid=1341166029&sr=8-12&keywords=distributed+systems

If you don't have time for books, you can take a look at Vector Clocks: http://en.wikipedia.org/wiki/Vector_clock

Konstantin Solomatov
  • 10,252
  • 8
  • 58
  • 88
-1

A. The current leap-second-failure was because of a kernel bug. Nothing more.

B. Most programs do not care about time.

C. There are programs that care about time, but not the actual global time, just some local reference. The contract here is pretty simple pseudocode :

long timeFirst = System.GetTime;

long timeSecond = System.GetTime;

assert (timeFirst <= timeSecond);

D. And yes, there are a few programs/subsystems, where correct, global time is essential, they are usually prepared for problems. (For example: your GPS receiver does a lot of computing finding out the correct time, and it won't show you that you're on the moon if it fails, but will give you some nice error messages.)


To sum it up: time is correctly handled in recent programs/systems. We just had a kernel bug. Don't make some NTP-IS-INHERENTLY-EVIL kind of hype pls. :)

Community
  • 1
  • 1
Gergely Szilagyi
  • 3,813
  • 1
  • 14
  • 12