Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 30 Jun 1998 21:58:14 -0400 (EDT)
From:      "David E. Brooks Jr" <dbj@iglou.com>
To:        Terry Lambert <tlambert@primenet.com>
Cc:        hackers@FreeBSD.ORG
Subject:   Re: mlock()/mclear (was Re: Unsupport calls)
Message-ID:  <Pine.BSF.3.96.980630215745.3283B-100000@localhost>
In-Reply-To: <Pine.BSF.3.96.980630190503.929A-100000@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.980630215745.3283B-100000>