Usenet comp.unix.osf.misc (1992-2004)
 help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <1993Sep22.140719.3484@morgan.cs.utah.edu> (raw)
In-Reply-To: WEISMAN.93Sep19191257@oxygen.osf.org

In article <WEISMAN.93Sep19191257@oxygen.osf.org> 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.


  reply	other threads:[~1993-09-22 20:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-09-16  9:36 Threads and shared memory Bruno.Richoux        
1993-09-17 13:58 ` Nathaniel Mishkin
1993-09-17 13:44   ` David Wright
1993-09-17 16:05   ` Andrew Hastings
1993-09-17 16:21   ` Douglas C. Schmidt
1993-09-17 20:02     ` Nathaniel Mishkin
1993-09-18 18:21       ` Douglas C. Schmidt
1993-09-19 23:12         ` Dave Weisman
1993-09-22 20:07           ` Brian Sturgill [this message]
1993-09-23  1:20             ` Douglas C. Schmidt
1993-09-23 13:09               ` Nathaniel Mishkin
1993-09-27 13:54               ` George J. Carrette
1993-09-17 14:48 ` Dave McCracken
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox