From owner-freebsd-arch Sun Sep 24 11: 8:32 2000 Delivered-To: freebsd-arch@freebsd.org Received: from prism.flugsvamp.com (cb58709-a.mdsn1.wi.home.com [24.17.241.9]) by hub.freebsd.org (Postfix) with ESMTP id CFE8737B424; Sun, 24 Sep 2000 11:08:29 -0700 (PDT) Received: (from jlemon@localhost) by prism.flugsvamp.com (8.11.0/8.11.0) id e8OI8fi18906; Sun, 24 Sep 2000 13:08:41 -0500 (CDT) (envelope-from jlemon) Date: Sun, 24 Sep 2000 13:08:41 -0500 From: Jonathan Lemon To: Alfred Perlstein Cc: arch@FreeBSD.ORG, cp@FreeBSD.ORG, bmilekic@FreeBSD.ORG Subject: Re: need advice, fsetown annoyances and mpsafeness. Message-ID: <20000924130841.A2487@prism.flugsvamp.com> References: <20000924103303.M9141@fw.wintelcom.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <20000924103303.M9141@fw.wintelcom.net> Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Sun, Sep 24, 2000 at 10:33:03AM -0700, Alfred Perlstein wrote: > 2) removing the burden of sigio destruction from the proc/pgrp destruction > routines, instead the proc can just walk the sigios and set a > flag is set such that the sigio is not to be delivered, it is > then entirely up to the object (socket/tty) to free() the sigio. > > the sigio linked list manipulation can be hinged off the process > mutex we will need to add to the proc and pgrp structures. > > if a sigio is going to be changed you must aquire the proc/pgrp lock > of the process/group you are removing the structure from before > doing the unlinking and change otherwise you race against process > exit. > > Option 2 seems a lot clearer to me and it also seems to address all > the problems here without any hackish like solution > > I'm going to be investigating the BSD/os way of handling this, but > it seems that they don't take into account for pid wraparound at > a glance. > > Questions? Comments? kqueue has a similar problem, and resolves this in a similar fashion as above. A knote can be attached to a process, which may exit; in this case, the process just walks down the list and sets a flag, the structure is then destroyed when kevent gets around to examining it. -- Jonathan To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message