Date: Tue, 28 May 1996 07:18:48 EST From: "Kaleb S. KEITHLEY" <kaleb@x.org> To: joerg_wunsch@uriah.heep.sax.de (Joerg Wunsch) Cc: hackers@freefall.FreeBSD.org, chat@freebsd.com, terry@lambert.org Subject: Re: Forgiving select() call. Message-ID: <199605281118.HAA17563@exalt.x.org> In-Reply-To: Your message of Tue, 28 May 1996 08:12:17 EST. <199605280612.IAA03466@uriah.heep.sax.de>
next in thread | previous in thread | raw e-mail | index | archive | help
> (Religious topic, thus moved to chat.) Religious??? Off hand I can't think of why this would be religious. In any event I don't subscribe to chat, and I don't really want to subscribe to yet another list; I already have more than enough to do. > > As Kaleb S. KEITHLEY wrote: > > > And, FWIW, SVR4 select(3) is implemented using poll(2), so select on > > SVR4, in and of itself, isn't going to have any better granularity > > than poll. > > Only very few systems actually implement it as a library function (and > that's perhaps one of the reasons [along with STREAMS] for the > sluggishness of their IP functionality). All the serious ones > implement it as a system call, too. I'm curious about what your definition of "serious" is. On most of the SVR4-en (I did qualify my statement as being about SVR4), there is no select system call -- select is a library routine implemented with poll. In any event I'm reasonably certain that the vendors who ship these versions of SVR4 think of themselves as serious: Solaris 2.x (SVR4) Unixware 1.x, 2.x (SVR4.2) Sony NEWS/OS 6.x (SVR4) NCR (AT&T MP/RAS) 4.0.3 (SVR4) Fujitsu UXP 10.20 (SVR4.2) (SGI's IRIX5 and IRIX6 have both. You'll forgive me if I suggest that they're the exception that proves the rule. :-)) Of the remaining systems that I have here, which have both poll and select system calls, none are SVR4. They are: (SunOS) SCO UNIX HPUX AIX Digital UNIX (OSF/1) SunOS is technically dead, so that makes this list one shorter. It will be interesting to see what the SVR4 incarnation of SCO UNIX will have. HPUX does show signs of heading toward SVR4, we'll have to watch and see. The only vendors with a long term commitment to not go to SVR4 (well, Digital UNIX does have an SVR4 environment in 4.0) are Digital and IBM. In contrast to your statement that "only a few implement (select) as a library function," it looks to me like only a few implement both as system calls, and it seems to me like that list is going to get even shorter. So, getting back to FreeBSD-land. A FreeBSD implementation of poll would not need to be as fundamentally flawed as the SVR4 implementation. What some people would like to have is a new API that takes a struct timeval as an argument instead of an int. This would allow specifying delays with usec instead of msec granularity *and* would also allow delays of longer than MAXINT msec to be specified. As it happens I have added both poll and polltv to my 2.1R system, and if I didn't have so many other demands on my time I might be able to finish it someday and contribute it back. -- Kaleb KEITHLEY
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199605281118.HAA17563>