From owner-freebsd-hackers Tue Jan 5 14:31:55 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA21413 for freebsd-hackers-outgoing; Tue, 5 Jan 1999 14:31:55 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from xylan.com (postal.xylan.com [208.8.0.248]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA21407 for ; Tue, 5 Jan 1999 14:31:53 -0800 (PST) (envelope-from wes@softweyr.com) Received: from mailhub.xylan.com by xylan.com (8.8.7/SMI-SVR4 (xylan-mgw 2.2 [OUT])) id OAA10787; Tue, 5 Jan 1999 14:30:42 -0800 (PST) Received: from utah.XYLAN.COM by mailhub.xylan.com (SMI-8.6/SMI-SVR4 (mailhub 2.1 [HUB])) id OAA00015; Tue, 5 Jan 1999 14:30:41 -0800 Received: from softweyr.com by utah.XYLAN.COM (SMI-8.6/SMI-SVR4 (xylan utah [SPOOL])) id PAA13142; Tue, 5 Jan 1999 15:30:40 -0700 Message-ID: <36929290.2909A074@softweyr.com> Date: Tue, 05 Jan 1999 15:30:40 -0700 From: Wes Peters Organization: Softweyr LLC X-Mailer: Mozilla 4.5 [en] (X11; U; FreeBSD 2.2.7-RELEASE i386) X-Accept-Language: en MIME-Version: 1.0 To: Terry Lambert CC: bright@hotjobs.com, hackers@FreeBSD.ORG Subject: Re: question about re-entrancy. References: <199901051818.LAA08069@usr02.primenet.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry Lambert wrote: > > > > It's a lot of work, but it's not rocket science. The most > > > complicated piece is the lock manager; to do it right, you need > > > a five dimensional vector relationship (an arc describing the > > > intersection of three two dimensional vectors: the lock list > > > held by a locking entity, the hierarchical list of lockable objects, > > > and the relationship between multiple locking entities within a > > > single process -- threads within a process). > > > > If you wish to see a working example of a microkernel using object > > locks, take a peek at the RTEMS kernel. It's quite portable, and > > supports SMP systems out of the box. See > > > > http://www.oarcorp.com/rtems/rtems.html > > > > for information. > > RTEMS has three unfortunate problems: > > 1) It is not uITRON compliant. There's really no reason to > do an RT system that isn't uITRON compliant. It's the > industry standard, and there is a lot of code (including > embedded browsers) that are available for such systems. Except that out here in the real world uITRON isn't even on the radar screen. I know it's supposed to be big news with the Japanese companies who created it, but the numerous projects being done here in the USA don't even consider it. At all. Ever. > 2) It's GPL'ed. That means that the source code can't be > used to prepare derivative works that have any strategic > value of any kind. I'm really surprised that it was > possible to GPL something supported by a DARPA grant, > given the governments technology transfer requirements > for such grants, but there it is. The problem here is > that embedded OS's are peculiar in that ROM'ing a browser > at the same time you ROM a GPL'ed OS is a little more > than "mere agregation". If you read the RTEMS license page, it is GPL'ed with an exception, and that exception allows you to create and distribute your product, linked with RTEMS, without restraint. In effect, they're using the LGPL with no source distribution clause. The original RTEMS license was much more Berkeley like, but they found a couple of "clients" who were not contributing fixes back and it sorta ticked them off, so they went with this instead. Go figure. > 3) Object locks are the wrong way to address the reentrancy > issue. The problem with object locks is that it puts > objects that don't really need to be in a contention > domain into one in order to satisfy contention in what > are usually very small critical sections having to do > with list manipulation of pointers to the object. This > type of thinking is why most Intel based SMP OS's claim > that scaling past 4 processors is "useless". What they > really mean is that their SMP OS is useless for more > than 4 processors. Yeah, you have to have *some* object > locks for non-reentrant objects (e.g., the I/O bus), but > this is pretty much limited to physical hardware limits, > and isn't really applicable for, for instance, vnodes. Whether this is a problem or not depends on your system architecture. In embedded systems, where the interactions between parts of the architecture are generally both simpler and more limited than in a large, general- purpose computer, contention on the critical objects often is not much of a consideration, because the various system objects have such limited interactions. This is also true of, for instance, I/O processors communicating with a main system processor. RTEMS remains a good example of a working object-locking system that can scale quite easily to a moderate number of processors. -- Where am I, and what am I doing in this handbasket? Wes Peters +1.801.915.2061 Softweyr LLC wes@softweyr.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message