rayaprol@star.ecs.umass.edu (Venu S Rayaprolu) (01/15/91)
I was looking at the man pages for adjtime(2) on a Decstation 3100 and found the following. "Time is incremented in 3.906ms ticks on MIPS and 10ms ticks on VAX. When *adjtime* is called with an argument other than zero, ticks of 9ms or 11ms are used until the time is corrected. A delta .............." The values 11ms and 9ms only make sense for VAX. Could anyone tell me what the corresponding values for MIPS are? Thanks. Venu S Rayaprolu. -- "Time is nature's way of not letting too many things happen, all at once."
mogul@wrl.dec.com (Jeffrey Mogul) (01/16/91)
In article <1446@umvlsi.ecs.umass.edu> rayaprol@star.ecs.umass.edu (Venu S Rayaprolu) writes: >I was looking at the man pages for adjtime(2) on a Decstation 3100 and >found the following. > "Time is incremented in 3.906ms ticks on MIPS and 10ms ticks on > VAX. When *adjtime* is called with an argument other than > zero, ticks of 9ms or 11ms are used until the time is > corrected. A delta .............." >The values 11ms and 9ms only make sense for VAX. Could anyone tell me >what the corresponding values for MIPS are? Thanks. [You asked the same question about the DECStation 5000 on the NTP newsgroup, and I responded there. But since many readers of this newsgroup might not have seen it, here's my response again.] I think this part of the manual page is confused. Basically, once per clock interrupt the time variable is updated (ignoring roundoff error) if (TotalDelta != 0) { time += (1/HZ) + delta; TotalDelta -= delta; } else time += 1/HZ; The adjtime(2) call sets TotalDelta to the amount of correction that you ask for, and sets delta like this if (TotalDelta > bigadj) delta = 10 * tickadj; else delta = tickadj; and then rounds TotalDelta to an exact multiple of delta. So, the interesting parameters are the kernel globals bigadj (defaults to 1 second) and tickadj to 4000/hz == 15 (for RISC) or 1 (for Vax). I really don't know why the RISC and Vax versions are different; the consensus of the NTP community is that "1" is the right value, but 15 seems to work pretty well. (On older Vax/Ultrix systems, tickadj seems to be 4000/hz == 40, as well.) To answer your question, then: System Default increment Fast increment Slow increment RISC 3906 uSec 3921 uSec 3891 uSec VAX 10000 uSec 10001 uSec 9999 uSec assuming that the total adjustment requested is under 1 second (which is always the case with ntpd). -Jeff