From owner-freebsd-hackers Fri Oct 20 06:14:07 1995 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.6.12/8.6.6) id GAA02100 for hackers-outgoing; Fri, 20 Oct 1995 06:14:07 -0700 Received: from terra.Sarnoff.COM (terra.sarnoff.com [130.33.11.203]) by freefall.freebsd.org (8.6.12/8.6.6) with ESMTP id GAA02094 for ; Fri, 20 Oct 1995 06:14:03 -0700 Received: (from rminnich@localhost) by terra.Sarnoff.COM (8.6.12/8.6.12) id JAA00868; Fri, 20 Oct 1995 09:10:43 -0400 Date: Fri, 20 Oct 1995 09:10:43 -0400 (EDT) From: "Ron G. Minnich" To: Julian Elischer cc: John Birrell , mira!sdsp.mc.xerox.com!leisner@werple.net.au, hackers@freebsd.org, jb@cimlogic.com.au Subject: Re: NetBSD/FreeBSD (pthreads) In-Reply-To: <199510192246.PAA23918@ref.tfs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-hackers@freebsd.org Precedence: bulk I implemented a simple version of plan9 rfork() a little while ago (well, a year ago). You could rfork and end up with shared data space and file table. I also implemented a very simple lock/unlock primitive that was far more efficient than system v semaphores, since in the common case (no contention for a lock) there's no jump to the kernel to wake up other procs when you acquire or free a lock. Between these two things you can do a lot: share data, share locked structures, share open files, etc. I can do all of what i commonly do with kernel threads on, e.g., Irix. In fact I implemented a simple user-space distributed shared memory with these basic parts: on sgi's i used their kernel threads/kernel mutex code, on freebsd i used rfork/lock code i built. For my money this is about as good as kernel threads. There's not the additional complexity in the kernel (have you ever seen what LWP did to sunos? No? good.). This code has been available gratis for a year. I can't convince anyone to pull it into core for netbsd or freebsd, but I'll make the offer again: you want it, let me know. The code, btw, is less than 100 lines for each change. In fact the fastlock code is something like 25 lines. I've implemented them as LKMs and directly as part of the kernel. ron Ron Minnich |Like a knife through Daddy's heart: rminnich@earth.sarnoff.com |"Don't make fun of Windows, daddy! It takes care (609)-734-3120 | of all my files and it's reliable and I like it".