From owner-freebsd-hackers Mon Oct 16 19:15:57 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id TAA04018 for hackers-outgoing; Mon, 16 Oct 1995 19:15:57 -0700 Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id TAA04013 for ; Mon, 16 Oct 1995 19:15:53 -0700 Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id TAA26181; Mon, 16 Oct 1995 19:10:53 -0700 From: Terry Lambert Message-Id: <199510170210.TAA26181@phaeton.artisoft.com> Subject: Re: getdtablesize() broken? To: kaleb@x.org (Kaleb S. KEITHLEY) Date: Mon, 16 Oct 1995 19:10:53 -0700 (MST) Cc: terry@lambert.org, hackers@freefall.freebsd.org In-Reply-To: <199510161939.PAA08113@exalt.x.org> from "Kaleb S. KEITHLEY" at Oct 16, 95 03:39:29 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Length: 1754 Sender: owner-hackers@FreeBSD.org Precedence: bulk > >Poll, anyone? > > >Poll is inferior to select, > > Debatable. Not. 8-). > >both because of the 10ms limit on timeout > >resoloution > > Man pages only say that if the host does not support millisecond > accuracy then the value is rounded up to the nearest legal value > available. 10ms is the argument resoloution. On Solaris, it's 10ms, while select() is till 4uS. select() wins. 8-). > That hasn't been my experience. poll(0, NULL, 10000); waits 10 seconds > on SunOS, all SVR4-en I have here, HPUX, and AIX; however Digital Unix's > poll looses. In fact in SVR4 select(3) is implemented using poll(2). That's a bug in SVR4. SVR4 is broken and bogus in many, many ways. That's why this is "FreeBSD" instead of "FreeSVR4". 8-). Dec's poll() is based on the Mentat streams code. I'm suprised they didn't roll in the fixed Robert Withrow and I put in when writing the Pathworks for VMS (NetWare) server. I had to fix that and several other things, including some DEC Bliss code, to get a working process model. I believe the SAP thread used a poll with a 0 timeout. The final code used Timer Queue Entry AST's, but the effect was the same. > In theory poll could be more efficient because there's less bit > twiddling to do and unless you're polling thousands of files poll > needs to transfer far less data to the kernel address space. Back > in the days of 1.1.5.1 I started to look at what it would take to > add poll. Maybe I'll look again. I agree that it could, though I'd want a timeval struct instead of an integer time value implicitly limited to a 10ms resoloution by its units. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.