From owner-freebsd-hackers Tue Jun 30 18:57:39 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA27393 for freebsd-hackers-outgoing; Tue, 30 Jun 1998 18:57:39 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from iglou.com (sendmail@iglou2.iglou.com [192.107.41.17]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA27377 for ; Tue, 30 Jun 1998 18:57:21 -0700 (PDT) (envelope-from dbj@iglou.com) Received: from lou-ts6-29.iglou.com ([204.255.238.96] helo=localhost) by iglou.com with smtp (8.7.3/8.6.12) id 0yrC91-0004HC-00; Tue, 30 Jun 1998 21:57:12 -0400 Date: Tue, 30 Jun 1998 21:58:14 -0400 (EDT) From: "David E. Brooks Jr" X-Sender: dbj@localhost To: Terry Lambert cc: hackers@FreeBSD.ORG Subject: Re: mlock()/mclear (was Re: Unsupport calls) In-Reply-To: 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 Tue, 30 Jun 1998, David E. Brooks Jr wrote: [ This is in regards to implementing mlock()/mclear() ] > I haven't gotten very far (I'm re-reading relevant portions of _The > Design and Implementation of 4.4 BSD Operating System_ and lots of > stuff in section 9 right now), but I do have one question right off > the bat. Both mmap(2) and the newvm paper make mention of the > MAP_HASSEMAPHORE flag; Why is (or was) this necessary? All that comes > to mind is multi-processor systems and keeping any copies of that > page of memory synchronized. Hmm, I think I can answer my own question: Mmap() needs to know since any reference counts (for those waiting to lock) to a semaphore structure have to be decremented properly when/if a page containing a semaphore is munmap()-ed from memory (either explicitly or through process termination). -- Dave (Who is now only beginning to realize why nobody has whipped this out before...) -- David E. Brooks Jr dbj@iglou.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message