From: limes@freeside.eng.3do.COM (Greg Limes)
Subject: Re: Accessing Real Time Clock in workstations (HPs, Suns, Dec Alphas)
Date: 26 Jan 1994 20:07:52 -0800 [thread overview]
Message-ID: <2i7emo$g8l@freeside.eng.3do.COM> (raw)
In-Reply-To: 1994Jan26.005700.2572@icaen.uiowa.edu
barts@cyber.Eng.Sun.COM (Bart Smaalders) writes:
>Gettimeoday(2) is implemented as a fast trap since Solaris 2.2. As a result,
>this call takes about 2->3 microseconds on a SS10 (slightly more on an SS2).
>It returns answers accurate to the resolution of the hardware clock (1 microsecond
>on 4[cmd] platforms).
In article <1994Jan26.005700.2572@icaen.uiowa.edu>,
Doug Siebert <dsiebert@icaen.uiowa.edu> wrote:
>It seems to me it would make a GREAT deal of sense to map things like the
>hardware clock into a process' address space read-only.
> ...
> Is there a reason
>why this isn't done?
Note the "2-3 microseconds". That's a lot better than the cost to get
into and back from a system call, last I heard :-) :-)
The problem is that the hardware clock doesn't give the complete time;
on most suns, you get something indicating the time since the latest
timer tick. Of course, if the kernel kept a data page that was full of
interesting data (like "what time it was a moment ago") then the
library *could* do a gettimeofday without ever passing into system
land. But ... try to generalize that for everything Solaris runs on,
and things start getting sticky.
I'd imagine that HP and DEC have similar issues.
for comp.sys.sun.apps folks ...
SunOS 4.1.[23] Sun-4M easter egg: I left the 64-bit high
resolution timers mapped readable from userland, at 0xFD020000
(you can verify the address by checking for the symbol
"_utimers" in /vmunix).
BTW, using the above is of course "not supported" and will not
work in Solaris 2 ... nor will it work on anything other than
a Sun-4M or compatible hardware.
-- Greg Limes [limes@netcom.com]
Not in any way affiliated with Sun Microsystems
next prev parent reply other threads:[~1994-01-27 4:07 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-01-20 20:40 Accessing Real Time Clock in workstations (HPs, Suns, Dec Alphas) NeoSwami
1994-01-20 21:42 ` Paul Gootherts
1994-01-21 12:23 ` Kell S|nnichsen
1994-01-21 15:48 ` john.j.rushford..jr
1994-01-21 19:25 ` Guy Harris
1994-01-24 17:12 ` Benjamin Z. Goldsteen
1994-01-25 8:08 ` Bart Smaalders
1994-01-25 18:42 ` Bob Manchek
1994-01-26 0:57 ` Doug Siebert
1994-01-26 8:11 ` Casper H.S. Dik
1994-01-27 4:07 ` Greg Limes [this message]
1994-01-29 5:07 ` mark hahn
1994-01-21 16:59 ` Bart Smaalders
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox