From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f678f,562d37d12a49893d X-Google-Attributes: gidf678f,public X-Google-Thread: 113dfb,21c6174a3c733dc0 X-Google-Attributes: gid113dfb,public X-Google-ArrivalTime: 1993-09-19 16:22:02 PST Xref: gmd.de comp.unix.osf.misc:502 comp.os.ms-windows.programmer.win32:9095 Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!sol.ctr.columbia.edu!news.kei.com!bloom-beacon.mit.edu!paperboy.osf.org!weisman From: weisman@osf.org (Dave Weisman) Newsgroups: comp.unix.osf.misc,comp.os.ms-windows.programmer.win32 Subject: Re: Threads and shared memory Date: 19 Sep 93 19:12:57 Organization: Open Software Foundation Message-ID: References: <301@vercors.frec.bull.fr> <27co6m$qsg@liege.ics.uci.edu> <27fjjd$s41@net1.ics.uci.edu> NNTP-Posting-Host: oxygen.osf.org In-reply-to: schmidt@net1.ics.uci.edu's message of 18 Sep 1993 11:21:33 -0700 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 (All opinions are strictly my own) -- -- Dave