From owner-freebsd-questions Wed Nov 8 4:23:16 2000 Delivered-To: freebsd-questions@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 424A737B4C5; Wed, 8 Nov 2000 04:23:10 -0800 (PST) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id HAA22545; Wed, 8 Nov 2000 07:22:34 -0500 (EST) Date: Wed, 8 Nov 2000 07:22:33 -0500 (EST) From: Daniel Eischen To: Alfred Perlstein Cc: jadream , freebsd-questions@FreeBSD.ORG, deischen@FreeBSD.ORG, jasone@FreeBSD.ORG Subject: Re: Is msgrcv() thread-blocking in 4.x? In-Reply-To: <20001107230204.Q5112@fw.wintelcom.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 7 Nov 2000, Alfred Perlstein wrote: > * Alfred Perlstein [001106 01:51] wrote: > > * jadream [001106 00:11] wrote: > > > Hi ppl! > > > > > > I have two processes both multithreaded with threads from one process > > > comunicating with threads from another using SystemV IPC (msgs & > > > semaphores). > > > That used to work well under Linux as threads there are just same as > > > processes. > > > But when I came to the process-limit in Linux and had to change for > > > freeBSD all comes bad. > > > msgrcv() and semop() are blocking whole processes not appropriate > > > threads and I'm near the point of blowing up. > > Updated patch is here: > > http://people.freebsd.org/~alfred/uthread_sysvipc.diff I'd much rather see it go to sleep for a second or two rather than (possibly) spinning in a tighter loop. If it was the highest priority thread, then it would essentially be blocking. > it's for releng4, it makes the FreeBSD threads library poll on the > semaphores and msgqueues, not very good, but if/when I get a chance > I may try to hook kqueue into some of the sysv IPC stuff so that > we don't need to poll the primatives. This seems a better solution, at least for our current threads library implementation. -- Dan Eischen eischen@vigrid.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message