Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!.POSTED!not-for-mail From: Lew Newsgroups: comp.lang.java.programmer,comp.lang.c++ Subject: Re: What's the deal with deadlocks Date: Thu, 21 Apr 2011 00:29:14 -0400 Organization: albasani.net Lines: 66 Message-ID: References: <23020668-d86c-489a-988b-7b379f34851c@j13g2000pro.googlegroups.com> <575d7b43-51c4-4905-ba16-15fe9b78373e@t16g2000vbi.googlegroups.com> <913q7eFpdlU3@mid.individual.net> <7c038630-5773-4ef1-8b59-1a0d6fa9acd5@z7g2000prh.googlegroups.com> <1c19dce4-211f-4092-93e9-e580397b9ddd@q40g2000prh.googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: news.albasani.net Zl8Q3aWVDJKg8SKTBhvAiuz/kLHkUoDw0rCF6dljIsymccP6J1b/hIq5WZMcn5PJ91/tkIzO+YoU5B95GeGvdyuOazOaqp5nmhxeHdvjR4vovf/nljYZhq/XjvvvaieW NNTP-Posting-Date: Thu, 21 Apr 2011 04:29:06 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="IH2PyvitpZYeRcwBaKiAtLcgeg6jdV+6DJ1tFIkWle7RsCVF65gRVHLZwmjUrKMxWDEm/Kfb2Gj0eExu+B8ik8hk6OU6BD3HicfJ/kIprm83/CXrCyaNdUFhbzOmPEoK"; mail-complaints-to="abuse@albasani.net" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 In-Reply-To: <1c19dce4-211f-4092-93e9-e580397b9ddd@q40g2000prh.googlegroups.com> Cancel-Lock: sha1:CElWytY2DABu27R/euUGBIR53AY= Xref: x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3178 comp.lang.c++:4103 Joe Snodgrass wrote: > OK, so two of you have just contradicted me sarcastically, which means > my post must have been wrong. In other words, there ARE ways to find > and fix race conditions with without using a language like Occam. > What are they, and where can I read up on them? Sarcasm for sarcasm - if you set it up, don't be too astonished to receive it back. But the points you raised, as ours, were valid and useful if one is trained to educe the point from Socratic discourse. I interpreted your post as a rather brilliant diatribe against the same sort of rush to judgment I attacked in my response, thus I believe us to be allies in championing an intelligent approach. That is why I introduced my post, "I'm going to respond to your /reductio ad absurdum/ as though you were presenting a serious argument." I feel quite sure you were pointing out exactly the sort of flawed reasoning I attacked in detail. Thus, you are providing the script for the young student, naively thinking Occam will save the day, and I the for the crotchety teacher attempting to impose a more engineering-oriented outlook. That said, the universe of discourse admits of a lot of room besides "Occam is our savior!" and "you can fix everything without Occam". I don't agree to frame the discussion in the terms you propose because the world is not limited to just the options you suggest. You asserted a conclusion that "there ARE [sic] ways" based on the sole premise (and fact) that Occam is not a magic bullet, without showing evidence or a chain of reasoning to link those statements. In fact, there ARE ways to find and fix race conditions, some with and some without Occam; they comprise a whole mess of practices and approaches and mindsets that are and likely always will be active topics of research and discussion among partisans. I shall forebear suggesting http://lmgtfy.com/?q=Java+race+condition+detect+and+cure, choosing instead to follow that link myself and come up with dozens of useful leads that I read with pleasure. I shall not forebear suggesting: http://java.sun.com/docs/books/effective/ http://www.javaconcurrencyinpractice.com/ nor to scan through many of: http://www.ibm.com/search/csass/search/?q=Goetz&Search=Search Also, a scan upthread in this very discussion yields several answers to that very question. I commend to your attention in particular Dr. Patricia Shanahan's responses, which in a few short sentences lay the groundwork for everything you need to know. In one post, she recommends preventing the bugs, which is actually attainable by disciplined practice and thoughtful design. In the other, she limns the essentials of troubleshooting such matters. Your question is excellent, and seminal to the art of programming. If I may rephrase: How can one find, fix [and I'll add, prevent] race conditions, deadlocks, and other such parallel-execution foobars? Indeed, Grasshopper. Indeed. -- Lew His barn burned down, and now he can see the moon.