From owner-freebsd-smp Tue Jun 4 17:20:46 1996 Return-Path: owner-smp Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id RAA24702 for smp-outgoing; Tue, 4 Jun 1996 17:20:46 -0700 (PDT) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id RAA24697; Tue, 4 Jun 1996 17:20:43 -0700 (PDT) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id RAA27796; Tue, 4 Jun 1996 17:16:09 -0700 From: Terry Lambert Message-Id: <199606050016.RAA27796@phaeton.artisoft.com> Subject: Re: Unix/NT synchronization model (was: SMP progress?) To: gibbs@freefall.freebsd.org (Justin T. Gibbs) Date: Tue, 4 Jun 1996 17:16:08 -0700 (MST) Cc: michaelv@HeadCandy.com, sef@kithrup.com, smp@freebsd.org In-Reply-To: <199606042353.QAA23687@freefall.freebsd.org> from "Justin T. Gibbs" at Jun 4, 96 04:53:02 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-smp@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > >But maybe I'm not stating myself clearly. :-) What I'm really after is > >recommendations on where I should look if I want to see how another > >SMP Unix implements synchronization controls. I just want to find out > >how other people have implemented it. All I know is Windows NT (SMP, > >not in general, of course), and I want to see a contrasting > >implementation. > > Aren't you really asking about thread and process syncronization? This is > an issue regardless of whether the system is SMP. > > I've also only dealt with the NT implementations of critical sections and > mutexes, and unlike the rest of the win32 API, it seems they did a fairly > good job of it (although there are some additional scheduling controls I > wish were provided). Actually, if you look, their semaphoring mechanism allows a particular thread to reenter the kernel to service an async event. Basically, any blocked thread is "fair game" for this. If you expect to run service processes in the kernel (ie: a UFS updated, etc.), then you will need to build a counting semaphore on top of the thread semaphores for reentrancy locking for critical sections. I've been bit in the butt by this under both NT and Windows 95 (which has a similar interface for Ring0 applications -- VxD's). 8-(. The Solaris/SVR4 model is OK -- has anyone seen the Unisys 6000 series SVR4/MP based on the pre-Solaris merge 4.0.2 SVR4 release? Their FS locking in particular, is *very*, *very* well written. It took me about three months to get an FS up in the Solaris multithreaded kernel, where I allowed reentrancy, but it only took me about two weeks on the SVR4/MP box from Unisys. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.