From owner-freebsd-hackers@FreeBSD.ORG Mon Feb 25 14:46:47 2008 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C981416A40A for ; Mon, 25 Feb 2008 14:46:47 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from mail.beenic.net (mail.beenic.net [83.246.72.40]) by mx1.freebsd.org (Postfix) with ESMTP id 926EF13C442 for ; Mon, 25 Feb 2008 14:46:47 +0000 (UTC) (envelope-from wundram@beenic.net) Received: from [192.168.1.38] (a89-182-20-101.net-htp.de [89.182.20.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.beenic.net (Postfix) with ESMTP id C8520A44529 for ; Mon, 25 Feb 2008 15:46:45 +0100 (CET) From: "Heiko Wundram (Beenic)" Organization: Beenic Networks GmbH To: freebsd-hackers@freebsd.org Date: Mon, 25 Feb 2008 15:47:09 +0100 User-Agent: KMail/1.9.7 References: <200802221558.42443.sharadc@in.niksun.com> <200802251039.59767.wundram@beenic.net> <20080225131546.0d9d2f22@gumby.homeunix.com.> In-Reply-To: <20080225131546.0d9d2f22@gumby.homeunix.com.> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200802251547.10068.wundram@beenic.net> Subject: Re: usleep X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Feb 2008 14:46:47 -0000 Am Montag, 25. Februar 2008 14:15:46 schrieb Robert Woolley: > On Mon, 25 Feb 2008 10:39:59 +0100 > "Heiko Wundram (Beenic)" wrote: > > Am Montag, 25. Februar 2008 10:10:56 schrieb Sharad Chandra: > > > So does it mean, freebsd has limitation. sleeping will only work > > > for its value more than 1 milli sec because % of +- error value is > > > comparitivly low? I am curious to know, is there any method which > > > sleeps for few microseconds. Some one please give me link where to > > > look for "select". > > > > No, this does not mean that FreeBSD has a limitation, but rather that > > FreeBSD is not a real-time operating system. You'll see the similar > > behaviour on pretty much any other operating system that is _not_ a > > RTOS > > It's actually not a distinguishing feature of RTOSs. I haven't worked on > them for a few years, but when I did, both pSOS and VxWorks had this > limitation. The important thing is that RTOSs handle interrupts > well. In traditional real-time software, sleeping is something that > happens in non-critical background tasks. When you read what I wrote in detail, I just said that he should expect to see the "sliced sleeping" behaviour on pretty much any operating system that is not an RTOS, but didn't say that for an RTOS he should expect exact sleeping (the old "all Spartans are Greeks, but not all Greeks are Spartans" thingy). At least that's what I wanted to say, but I can see that the first sentence might have been slightly misleading wrt. to my intention. Anyway, as a uni project, I had to implement a minimalistic RTOS for an integrated CPU which had the requirement to sleep more or less exactly (because of timing hardware accesses and sensor data acquisition with the sleeps without having interrupts from the external hardware), but I know that this isn't a distinguishing feature. -- Heiko Wundram Product & Application Development