From owner-freebsd-current Tue Apr 7 15:07:48 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA02104 for freebsd-current-outgoing; Tue, 7 Apr 1998 15:07:48 -0700 (PDT) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from dyson.iquest.net (dyson.iquest.net [198.70.144.127]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA02048 for ; Tue, 7 Apr 1998 15:07:36 -0700 (PDT) (envelope-from toor@dyson.iquest.net) Received: (from root@localhost) by dyson.iquest.net (8.8.8/8.8.8) id RAA00583; Tue, 7 Apr 1998 17:07:08 -0500 (EST) (envelope-from toor) From: "John S. Dyson" Message-Id: <199804072207.RAA00583@dyson.iquest.net> Subject: Re: kernel support for memory semaphores/locks... In-Reply-To: from Michael Hancock at "Apr 8, 98 07:00:07 am" To: michaelh@cet.co.jp (Michael Hancock) Date: Tue, 7 Apr 1998 17:07:08 -0500 (EST) Cc: gurney_j@resnet.uoregon.edu, freebsd-current@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL38 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > On Tue, 7 Apr 1998, John-Mark Gurney wrote: > > > I have writen a memory block based dynamic allocation system (mmalloc).. > > I was planning on using a lock to prevent multiple processes from > > accessing the allocation strutures... but the only real way is using > > SYSV semaphores... > > and these are bad because it's silly to have all the overhead of a syscall > to do locking. > > > so, how do we go about locking on a shared memory areas? > > > > after discussing this with a friend, ther HAS to be a lock based on a > > shared memory location... the problem with storing the SYSV semaphore > > semid is that there isn't an atomic way of obtaining the new semid > > and putting it in a shared location after a machine reboot... > > /usr/src/share/doc/papers/newvm.ascii.gz describes an interface that was > never implemented, but worth reading. > I believe that POSIX has a reasonable scheme. John To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message