Hacker News new | past | comments | ask | show | jobs | submit login
Building a Stratum 1 Time Server for 16 bit DOS (brutman.com)
50 points by zdw 5 months ago | hide | past | favorite | 14 comments



> My target machine was a PCjr with an 8088 CPU designed in 1983, so the 8253 is the only timing hardware available.

As I recall, that was an issue for some games on those systems.


I found it intriguing that time.google.com advertises itself as Stratum 1. I imagined that Stratum 1 servers had to be physically attached to references like atomic clocks, and that the answers from time.google.com are probably served from a layer of devices that are attached by networks to those other hosts. How are the strata actually defined? Is Stratum 1 defined by accuracy or architecture?


Google's NTP servers also feature "leap smear", which skews the clock in order to "smear" a leap second over the course of 24 hours.

This means that on days with a leap second, their servers intentionally return the wrong time, off by up to half a second.

This does make lazy IT people's job easier, but makes their "stratum 1" claim even less correct.


> This does make lazy IT people's job easier

Depends on how lazy you were. If you use a few servers and they don't agree on leap smearing, your leap second day just got a lot more confusing time wise.


I was a little surprised by that too. It is definitely calling itself stratum 1, which is strictly defined to be the computer with the high precision device directly attached to it.

Keep in mind though that strata and accuracy are two different things. Presumably the further away from the high precision time device you are, the less precision you will get. Even though my PCjr is technically a stratum 1 server, the accuracy is miserable compared to real stratum 1 servers that are serving time that is in the microseconds range of accuracy.


You can be stratum 1 if you get your data from GPS, as is the author of the article. So if Google puts hardware with GPS receivers all over the world and routes time.google.com to the nearest machine they have a stratum 1 service without having to put atomic clocks in every data center


Well, they DO have atomic clocks in every datacenter, so that’s not the issue. But their service architecture just isn’t built to direct public user queries to exactly one unique machine in a datacenter, so I’m positive they are not doing exactly that. So I’m curious what they base their stratum claims on.


> So I’m curious what they base their stratum claims on.

The claim is based on gathering as much DNS data as possible, probably?

Google claims an awful lot of things for the express purpose of hopefully directing more Everything their way.


I imagine it has lot less latency between the GPS puck and the PC, with no USB-to-RS232, etc.


You typically use a dedicated GPIO pin to read the PPS signal as the authoritative start-of-second.


If you can, a PPS signal is ideal; sometimes they're not available though (I've got a setup with an LTE modem that includes a GPS signal, but no PPS. Without a PPS signal, and through the many layers, it's kind of meh accuracy, and I wouldn't export its time to anyone, but it's better than nothing when I don't have any external communications.


Ah. They appear to be using the RS232 DCD line for that.


RI can trigger interrupts


This particular machine was the victim of some cost cutting, so there is no RI line. Data Carrier Detect is available and it is usually used for this. (I got my wiring inspiration from other projects.)




Applications are open for YC Summer 2022

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: