Return-Path: Delivered-To: apmail-new-httpd-archive@apache.org Received: (qmail 94959 invoked by uid 500); 2 Mar 2001 08:15:20 -0000 Mailing-List: contact new-httpd-help@apache.org; run by ezmlm Precedence: bulk Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list new-httpd@apache.org Received: (qmail 94943 invoked from network); 2 Mar 2001 08:15:18 -0000 X-Authentication-Warning: kurgan.lyra.org: gstein set sender to gstein@lyra.org using -f Date: Fri, 2 Mar 2001 00:15:53 -0800 From: Greg Stein To: new-httpd@apache.org Subject: Re: some reasons why Apache 2.0 threaded is slower than prefork Message-ID: <20010302001553.R2297@lyra.org> Mail-Followup-To: new-httpd@apache.org References: <3A9EB44E.E86E8A39@Golux.Com> <20010301142329.D2297@lyra.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from trawickj@bellsouth.net on Thu, Mar 01, 2001 at 08:58:03PM -0500 X-URL: http://www.lyra.org/greg/ X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N On Thu, Mar 01, 2001 at 08:58:03PM -0500, Jeff Trawick wrote: > Greg Stein writes: > > > I once tried to created a lock-less linked-list for managing some thread > > state stuff in Python. I believe that it finally came to a point where I had > > a simple proof that you just can't implement a read/write linked list in a > > multi-threaded environemnt without a lock. Beats me if I can remember the > > key point, though. > > As long as reasonable restrictions are placed on allowable list > operations (restrictions which are not a problem when the list is used > to maintain a free pool) you can implement a lock-free linked list. > Been there, done that. On S/390 we commonly use a double-word > compare-and-swap operation. Other platforms have this as well. > Different instructions are available on still more platforms. I'm talking about pure C code. Of course you can do it with VAX architecture bit twiddling, or compare-and-swap, or test-and-set, or atomic increments or whatever. But those facilities are not available to "plain old C." Cheers, -g -- Greg Stein, http://www.lyra.org/