Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 20 Oct 1995 09:10:43 -0400 (EDT)
From:      "Ron G. Minnich" <rminnich@Sarnoff.COM>
To:        Julian Elischer <julian@ref.tfs.com>
Cc:        John Birrell <cimaxp1!jb@werple.net.au>, mira!sdsp.mc.xerox.com!leisner@werple.net.au, hackers@freebsd.org, jb@cimlogic.com.au
Subject:   Re: NetBSD/FreeBSD (pthreads)
Message-ID:  <Pine.SUN.3.91.951020090350.852A-100000@terra>
In-Reply-To: <199510192246.PAA23918@ref.tfs.com>

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





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SUN.3.91.951020090350.852A-100000>