From: casper@fwi.uva.nl (Casper H.S. Dik)
Subject: Re: Accessing Real Time Clock in workstations (HPs, Suns, Dec Alphas)
Date: 26 Jan 1994 08:11:39 GMT [thread overview]
Message-ID: <2i58jr$8a@mail.fwi.uva.nl> (raw)
In-Reply-To: 1994Jan26.005700.2572@icaen.uiowa.edu
dsiebert@icaen.uiowa.edu (Doug Siebert) writes:
>Could someone explain to me exactly WHY this has to be a system call at all?
>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. Then you don't need
>a system call, or a fast trap, just a simple function call (or perhaps a
>millicode stub on the HP) Many things could benefit here, the whole UAREA of
>a process could be mapped read-only without negative effects, I'd think. Then
>getpid() isn't a system call, getuid() isn't, etc., etc. Is there a reason
>why this isn't done?
Whil for a number of things (getpid(), getppid(), getid()) a
memory mapped area in the process space is a solution, nut
only because those field hardly ever change. I don't
think it is a solution for fast changing things like clocks.
Reading the clock (on one processor) while it's being updated
by another, may lead to confusing times.
And, modern unixes no longer use the tick as granularity of
the clock. The hardware clock is used to interpolate the
missing microsecond resolution. Reading such a device from
userland may be difficult or impossible, and you no
longer have ability to hide the details of the clock chip from
userland (need a different libc.so for each clock chip
you may have, nreaking statically linked programs, or
put special hardware detection code in te gettimeofday call).
Such things are better left to the kernel.
Casper
next prev parent reply other threads:[~1994-01-26 8:11 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 [this message]
1994-01-27 4:07 ` Greg Limes
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