Subject: Re: Clockticks lost, why ?
To: None <port-mac68k@NetBSD.ORG>
From: xiamin <Ingerrn@cris.com>
List: port-mac68k
Date: 01/29/1997 11:57:00
using ntp simply isnt an option for those of use without constant acces to
a network. my only acces is through a 9600 baud modem via SLIP. i dont
know anything about setting up ntp, but i cant keep a connection up all
the time or trust that there will be one when it trys to update the clock.
therefor if you ask me ntp is not the ideal solution.
-xiamin
Technomagus artium occultarum detestibiliumque Nargumm Industries
http://www.cris.com/~ingerrn
http://www.netvirtual.com/iris/simon/art.html
On Wed, 29 Jan 1997, Jason Thorpe wrote:
> On Wed, 29 Jan 1997 11:48:28 +0100 (MET)
> Christoph Ewering <eweri@uni-paderborn.de> wrote:
>
> > > - Access to the RTC is expensive, and
> >
> > Sorry, I don't know how difficult it is to get the time from the RTC and
> > how much processtime is lost.
> > How about a /dev/rtc ? So every process can call the RTC if it is in the
> > need of an exact time.
>
> It's not that it's difficult, per se, but rather it takes a log time
> to do a load from or store to the RTC. Access to the RTC must be
> atomic, which means that you'll go to splhigh() to do the access, which
> means losing more interrupts, etc.
>
> A /dev/rtc for use by processes to get the system time is a bad
> model. For one, it is not how UNIX does this sort of thing, and would
> require changes to lots of code to use it. Two, someone must convery
> the RTC format to something meaningful to a program, and this must be
> atomic (see above).
>
> The correct thing to do if you're seeing clock drift is to discipline
> the clock with NTP.
>
> > Don't know exactly how the RTC works, but i think i have to read a
> > 64bit(?)counter form an adresse in the memory, calculate a little, and
> > update the systemtime.
>
> ...yes, and reading that memory location may staaaaaaaaaal. :-)
>
> Jason R. Thorpe thorpej@nas.nasa.gov
> NASA Ames Research Center Home: 408.866.1912
> NAS: M/S 258-6 Work: 415.604.0935
> Moffett Field, CA 94035 Pager: 415.428.6939
>