[LEAPSECS] Looking-glass, through

Warner Losh imp at bsdimp.com
Fri Jan 14 11:30:54 EST 2011


On 01/14/2011 03:29, Tony Finch wrote:

> On Thu, 13 Jan 2011, Steve Allen wrote:

>> Alas, 'tis neither normal nor expected by the APIs and the programmers

>> who are implementing systems that deal with time.

> One of the core abstractions provided by operating systems is some

> coherent model of time. And the time labs provide a similar simplified

> model of time to the general public.

>

> Computers are *full* of clocks, including clocks with nanosecond

> resolution. Unfortunately the nanosecond clocks (the CPU cycle counters)

> run at different rates according to the CPU's power saving state. So the

> OS has to provide an abstraction layer on top of them in order to save the

> sanity of the programmer, and to allow the OS to do things like migrate

> threads from one CPU to another without affecting their idea of time.


Older Intel parts had this problem. Same with some older MIPS designs.
Newer designs don't have this issue with the time counters.

Of course, there are other reasons for the OS to provide a time
abstraction that's apart from this...

phk has a good paper on this very topic, since he wrote the basic time
counter stuff in FreeBSD :)


> For more along these lines, see http://www.youtube.com/watch?v=Dj7Y7Rd1Ou0

>

> Tony.




More information about the LEAPSECS mailing list