From owner-freebsd-arch Tue Feb 20 13:10:38 2001 Delivered-To: freebsd-arch@freebsd.org Received: from smtp10.phx.gblx.net (smtp10.phx.gblx.net [206.165.6.140]) by hub.freebsd.org (Postfix) with ESMTP id B51A337B401 for ; Tue, 20 Feb 2001 13:10:35 -0800 (PST) (envelope-from tlambert@usr05.primenet.com) Received: (from daemon@localhost) by smtp10.phx.gblx.net (8.9.3/8.9.3) id OAA40810; Tue, 20 Feb 2001 14:10:06 -0700 Received: from usr05.primenet.com(206.165.6.205) via SMTP by smtp10.phx.gblx.net, id smtpdqbhDaa; Tue Feb 20 14:10:02 2001 Received: (from tlambert@localhost) by usr05.primenet.com (8.8.5/8.8.5) id OAA27450; Tue, 20 Feb 2001 14:10:27 -0700 (MST) From: Terry Lambert Message-Id: <200102202110.OAA27450@usr05.primenet.com> Subject: Re: DJBDNS vs. BIND To: rjesup@wgate.com Date: Tue, 20 Feb 2001 21:10:27 +0000 (GMT) Cc: arch@freebsd.org In-Reply-To: from "Randell Jesup" at Feb 20, 2001 11:31:52 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > There's still a synchronization problem, even if the hostname > is in shared memory, even if the write is atomic (a reader may be in the > middle of reading the string). The easiest way to deal with this is to put the access behind an API, to guarantee atomicity. But there is a better way. > Fetching the data out of a kernel service on each access would be > (potentially) a pretty major hit, performance-wise. Some form of > registration of interest in the data would be better. Either something > like the Amiga (get a signal/message/callback/whatever when it changes, > then request the new information), or something that passes the > notification along with the new data. The approach I was thinking of would be to map the pages with the data in them read/write in kernel space, and read-only in all user space programs. The updates could be atomic by way of page replacement, which avoids the "middle of the string" problem. Pages are replaced prior to swap in on the next quantum (late binding). Writes would be by way of a system call API. The obvious one to use is "sysctl". Normal use would mean that this was zero overhead, which is better than getting the data from a file, anyway. Getting back to the system, group, and user logical naming, you could actually push the environment into the kernel; this would break direct references to "environ" (very old code), which is no loss, but it would potentially complicate the heck out of execve(), unless it were done right (stupid POSIX...). Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message