From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 113dfb,21c6174a3c733dc0 X-Google-Attributes: gid113dfb,public X-Google-Thread: f678f,562d37d12a49893d X-Google-Attributes: gidf678f,public X-Google-ArrivalTime: 1993-09-22 13:41:14 PST Xref: gmd.de comp.os.ms-windows.programmer.win32:9135 comp.unix.osf.misc:517 Newsgroups: comp.os.ms-windows.programmer.win32,comp.unix.osf.misc Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!spool.mu.edu!uwm.edu!cs.utexas.edu!utah-morgan!easy.cs.utah.edu!brian From: brian%easy.cs.utah.edu@cs.utah.edu (Brian Sturgill) Subject: Re: Threads and shared memory Date: 22 Sep 93 14:07:19 MDT Message-ID: <1993Sep22.140719.3484@morgan.cs.utah.edu> Organization: University of Utah Computer Science References: <27fjjd$s41@net1.ics.uci.edu> In article weisman@osf.org (Dave Weisman) writes: >In article <27fjjd$s41@net1.ics.uci.edu> schmidt@net1.ics.uci.edu (Douglas C. Schmidt) writes: > > Out of curiosity, under circumstances where many potential > descriptors/handles may become "signaled" during a "waitfor..." isn't > the WIN 32 approach more likely to end up with more starvation (unless > extra steps are taken to avoid it)? For example, consider the > following canonical use of select() for a network server with many > potential clients, one per descriptor (the poll() approach isn't much > different): > > loop > set relevant fd's in descriptor mask > select () > foreach enabled descriptor loop > handle descriptor > end loop > end loop > > In this approach, when select() returns, the application can handle > all the enabled descriptors in basically any order without (1) > additional intervention with the kernel to determine whether the > descriptor was enabled (hence, probably more efficient) and (2) > without giving preference to any particular descriptor. > >There is also a case (3): when the application needs to give preference to >a particular FD. I recently wrote a real-time application which does a >select() on an arbitrarily large set of descriptors. One particular FD >requires significantly higher service throughput than the N-1 others, else >a hard failure will occur. Because select() returns the complete set of >FDs with pending activity, it's within the application's ability to control >service policy. > >And absolutely yes, the Un*x standards folks should merge the file >descriptor and System V IPC identifiers into a unified, select()able space. >It seems such an obvious, upwardly-compatible enhancement. > >============================================================================ >David Weisman ___ ___ ___ Voice: (617) 621-8944 >DCE Core Components / / /__ /__ Fax: (617) 225-2782 >Open Software Foundation /__/ ___/ / Internet: weisman@osf.org >11 Cambridge Center UUCP: uunet!osf!weisman >Cambridge, MA 02142 BTW, you are aware that select() is present under Windows NT already? Look in the WinSock help file. Brian -- C. Brian Sturgill Want good, low cost, POSIX (Unix-like) tools and University of Utah shell for Windows NT? E-mail hippix-info@hippo.com. Center for Software Science brian@cs.utah.edu Windows family OS info -- ftp to easy.cs.utah.edu.