From: schmidt@liege.ics.uci.edu (Douglas C. Schmidt)
Subject: Re: Threads and shared memory
Date: 17 Sep 1993 09:21:42 -0700 [thread overview]
Message-ID: <27co6m$qsg@liege.ics.uci.edu> (raw)
In-Reply-To: CDI44s.968@atria.com
In article <CDI44s.968@atria.com>, Nathaniel Mishkin <mishkin@atria.com> wrote:
++ poll() which can be used to wait on
++ Streams-based things but not other things,
As far as I know, poll() in SVR4 can basically wait for the
same class of descriptors that select() can (in fact, I believe
select() is implemented atop poll(), though one must wonder what that
does for select()'s sec/usec timeval accuracy since poll() is
millisecond based...).
++ and semaphores which are in
++ a class of their own.
The main incompatible culprits seem to be the System V IPC
mechanisms (i.e., message queues, semaphores, shared memory). Trying
to write a program that combines message queues with e.g., sockets or
pipes is a nightmare, since message queues aren't "selectable" (ugh).
++ Presumably a real kernel-based threads implementation would get this
++ sort of thing right. Windows NT did _and_ they made a single N-way
++ wait primitive (WaitForMultipleObjects()) as well.
NT also has the interesting (and potentially quite useful)
feature that all objects (e.g., synchronization objects, threads,
files, pipes, processes, etc.) are capable of being waited on.
Unfortunately, WaitForMultipleObjects isn't quite as useful as
select() or poll() since it only reports 1 object of the set of n
objects when it returns (select() and poll() also return the set of
objects that are now "enabled"). Moreover, it remains unclear whether
sockets fit into the WaitForMultipleObjects paradigm. If they
*don't*, then we're basically back to the UNIX morass again...
Doug
--
His life was gentle, and the elements so | Douglas C. Schmidt
Mixed in him that nature might stand up | schmidt@ics.uci.edu
And say to all the world: "This was a man." | ucivax!schmidt
-- In loving memory of Terry Williams (1971-1991)| (714) 856-4101
next prev parent reply other threads:[~1993-09-17 16:21 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 [this message]
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
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