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-ArrivalTime: 1993-09-17 13:23:00 PST Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!library.ucla.edu!news.mic.ucla.edu!ucla-cs!ucivax!paris.ics.uci.edu!liege.ics.uci.edu!not-for-mail From: schmidt@liege.ics.uci.edu (Douglas C. Schmidt) Newsgroups: comp.unix.osf.misc Subject: Re: Threads and shared memory Date: 17 Sep 1993 09:21:42 -0700 Organization: University of California at Irvine: ICS Dept. Message-ID: <27co6m$qsg@liege.ics.uci.edu> References: <301@vercors.frec.bull.fr> Reply-To: schmidt@ics.uci.edu (Douglas C. Schmidt) NNTP-Posting-Host: liege.ics.uci.edu Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit In article , Nathaniel Mishkin 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