9d9 Subj : Re: recursive mutexes To : comp.programming.threads From : David Butenhof Date : Thu May 19 2005 01:02 pm Uenal Mutlu wrote: >>Sorry, there is no alternative to not use threads in most practical applications of today > > should read: "there is no excuse to not use threads in most practical applications of today" You clearly did not understand what I was saying. When you use recursive mutexes, either: A) You are using them as normal mutexes, but wasting straightline compute time. Fine, but pointless. B) You are commonly operating with recursively locked mutexes, dramatically increasing your average hold-times and therefore radically DECREASING your concurrency. You are, in fact, NOT writing concurrent code; you are using threads strictly as a convenient application structuring mechanism. That you have not run on a multiprocessor, or done any form of scalability measurements, explains a lot. Like why you think "simple" recursive mutexes are a good idea. You simply have no idea what you're talking about. If you're happy in your uniprocessor "ghetto", that's fine with me. Nothing wrong with that at all. But while you can use an airplane as a ground vehicle if you're really determined, and it might even have a few advantages over an automobile, that's not where airplanes are designed to operate, nor where most pilots intend to use them. Uniprocessors, similarly, are not the intended target environment for threaded applications. You can use them; they can even help you out. But driving threads safely and effectively on the ground doesn't prepare you for REAL threading. If you've only been in an airplane while it's on the ground, you're missing just about everything about the real experience... But, OK, you haven't had access to hardware, and it's not your fault. (Still, multiprocessor desktop systems aren't all that terribly expensive, or all that hard to find.) Read what we've been saying to you really carefully. Someone who aspires to fly airplanes but has only rolled a plane down the driveway should listen very carefully to what the experienced pilots have to say. Frankly, your experience and knowledge means just about nothing once you're up in the air; and it's a long way down. -- Dave Butenhof, David.Butenhof@hp.com HP Utility Pricing software, POSIX thread consultant Manageability Solutions Lab (MSL), Hewlett-Packard Company 110 Spit Brook Road, ZK2/3-Q18, Nashua, NH 03062 . 0