From owner-freebsd-hackers Thu Nov 12 09:18:23 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id JAA29447 for freebsd-hackers-outgoing; Thu, 12 Nov 1998 09:18:23 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from scully.tamu.edu (unix.tamu.edu [128.194.103.31]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id JAA29442 for ; Thu, 12 Nov 1998 09:18:19 -0800 (PST) (envelope-from s0k9955@unix.tamu.edu) Received: from localhost by scully.tamu.edu (8.9.0/8.9.0) with SMTP id LAA02089; Thu, 12 Nov 1998 11:17:41 -0600 (CST) Date: Thu, 12 Nov 1998 11:17:40 -0600 (CST) From: Shafia Kausar To: Mike Smith cc: FreeBSD Hackers , shafiak@ee.tamu.edu Subject: Re: Timer Granularity In-Reply-To: <199810300504.VAA00773@dingo.cdrom.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I need a kernel clock of granularity 1ms or less, for some experiments. Which version of FreeBsd supports this granularity, other than the 3.0 version? There is a mention of the resolution depending on the clock sources in use. Which source gives me the best resolution?? Thanks in advance -Shafia On Thu, 29 Oct 1998, Mike Smith wrote: > > > > I am confused, On basis of which parameters is the kernel clock > > granularity defined?? especially when multiple clocks are available. > > At which release level? 2.1.x, 2.2.x or 3.x? > > As a general rule, the best available clock is used. The techniques > used to determine which clock is best, and to ensure accurate counts > vary from release to release, with a general trend towards better. > > > > > On Thu, 29 Oct 1998, Mike Smith wrote: > > > > > > I am new to the FreeBSD OS. I have a few questions for which I could not > > > > find answers on the webpages. > > > > > > > > I am using the FreeBSD version 2.1.5 Relase #2. What is the kernel clock > > > > granularity in this version? > > > > > > 10ms, if I remember correctly. > > > > > > > > > There are a number of clocks being used in FreeBSD. Which clock is used > > > > for real time kernel processing? Is this accessible to the users? > > > > > > No clocks are "accessible to the users". User applications obtain time > > > values from the system. > > > > > > > Has the timer granularity improved in the releases following this release? > > > > > > Yes. Timer support now offers nanosecond resolution, dependant on the > > > particular clock source(s) in use. > > > > > > > In the /sys/kern/kern_clock.c file the variable time_precision has been > > > > initialised to 1microsec, but it has been stated that the resolution > > > > decreases depending on whether the external clock is working or not. > > > > What is the range of the variation in the resolutuion? > > > > > > It depends on the hardware in use. On some systems the Pentium TSC is > > > available as a time source, in which case time resolution is one CPU > > > cycle. The i8254 timecounter generally has an operating frequency > > > around 1.19MHz, giving a resolution of approximately 1us. > > > > > > -- > > > \\ Sometimes you're ahead, \\ Mike Smith > > > \\ sometimes you're behind. \\ mike@smith.net.au > > > \\ The race is long, and in the \\ msmith@freebsd.org > > > \\ end it's only with yourself. \\ msmith@cdrom.com > > > > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-hackers" in the body of the message > > > > -- > \\ Sometimes you're ahead, \\ Mike Smith > \\ sometimes you're behind. \\ mike@smith.net.au > \\ The race is long, and in the \\ msmith@freebsd.org > \\ end it's only with yourself. \\ msmith@cdrom.com > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-hackers" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message