From: weisman@osf.org (Dave Weisman)
Subject: Re: Threads and shared memory
Date: 19 Sep 93 19:12:57 [thread overview]
Message-ID: <WEISMAN.93Sep19191257@oxygen.osf.org> (raw)
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
next prev parent reply other threads:[~1993-09-19 23:12 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 [this message]
1993-09-22 20:07 ` Brian Sturgill
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