From owner-freebsd-hackers Fri Aug 11 20: 3:59 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from acl.lanl.gov (acl.lanl.gov [128.165.147.1]) by hub.freebsd.org (Postfix) with ESMTP id AE20337B51F for ; Fri, 11 Aug 2000 20:03:57 -0700 (PDT) (envelope-from rminnich@lanl.gov) Received: from mini.acl.lanl.gov (root@mini.acl.lanl.gov [128.165.147.34]) by acl.lanl.gov (8.8.8/8.8.5) with ESMTP id VAA545802; Fri, 11 Aug 2000 21:03:53 -0600 (MDT) Received: from localhost (rminnich@localhost) by mini.acl.lanl.gov (8.9.3/8.8.8) with ESMTP id VAA06789; Fri, 11 Aug 2000 21:03:53 -0600 X-Authentication-Warning: mini.acl.lanl.gov: rminnich owned process doing -bs Date: Fri, 11 Aug 2000 21:03:53 -0600 (MDT) From: Ronald G Minnich X-Sender: rminnich@mini.acl.lanl.gov To: hackers@FreeBSD.ORG Cc: jonas.bulow@servicefactory.se Subject: Re: IPC, shared memory, syncronization In-Reply-To: <200008120230.TAA60410@vashon.polstra.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, 11 Aug 2000, John Polstra wrote: > In article <39948331.5E83DE1B@servicefactory.se>, > Jonas Bulow wrote: > > Jonas Bulow wrote: > > > > > > What is the "BSD-way" of access to shared memory (mmap:ed) secure (avoid > > > race conditions, etc)? Right now I'm using posix semaphores but I would > > > like to know if there is a substitute like the way kqueue is for > > > select/poll. I don't know about the "bsd" or whatever way. If you're doing real parallel programming and want real performance, you'll use a test-and-set like function that uses the low-level machine instructions for same. I do have one of these (posted to this list about 6 years ago) if you want it. uses any kind of system call or flock for high performance programs will not work well. It's ok if you need to synchronize access every minute or so ... ron To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message