Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 Oct 2001 13:15:01 -0700 (PDT)
From:      John Baldwin <jhb@FreeBSD.org>
To:        Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        arch@FreeBSD.ORG, Peter Wemm <peter@wemm.org>, Bakul Shah <bakul@bitblocks.com>
Subject:   Re: 64 bit times revisited..
Message-ID:  <XFMail.011026131501.jhb@FreeBSD.org>
In-Reply-To: <6790.1004125611@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help

On 26-Oct-01 Poul-Henning Kamp wrote:
> In message <200110261914.PAA17908@devonshire.cnchost.com>, Bakul Shah writes:
> 
>>> Decimal computers lost the race and they ain't coming back.  We want
>>> arithmetic on binary computers to be fast and simple.
>>
>>Most everyone uses powers of ten for timing units.  Remember,
>>millisecond, microsecond, nanosecond, picosecond?!  All test
>>equipment time in units of 10s not 2s.  That is also why CPUs
>>have clock rate in multiples of 10^6 Hzs not 2^20.  It is
>>just being practical even if division by a power of 10 is a
>>bit of a pain.
> 
> If you look in sys/kern/kern_tc.c you can see how much extra
> gunk that results in, checking for overruns on the middle part and
> whats not.
> 
> There can be no doubt that the best timestamp representation is
> pure binary, originating at the second, and that is how my proposal
> is constructed:
> 
> <-- 32bit --><-- 32bit --> . <-- 32bit --><-- 32bit -->
>       1            2               3            4

IOW, a fixed-point number.  This is definitely the optimal solution presented
so far for the in-kernel time keeping, IMO.

-- 

John Baldwin <jhb@FreeBSD.org> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!"  -  http://www.FreeBSD.org/

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.011026131501.jhb>