Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #3178

Re: What's the deal with deadlocks

From Lew <noone@lewscanon.com>
Newsgroups comp.lang.java.programmer, comp.lang.c++
Subject Re: What's the deal with deadlocks
Date 2011-04-21 00:29 -0400
Organization albasani.net
Message-ID <ioobqi$dcv$1@news.albasani.net> (permalink)
References (4 earlier) <ioi731$pc3$1@dont-email.me> <913q7eFpdlU3@mid.individual.net> <7c038630-5773-4ef1-8b59-1a0d6fa9acd5@z7g2000prh.googlegroups.com> <iolias$lf8$1@news.albasani.net> <1c19dce4-211f-4092-93e9-e580397b9ddd@q40g2000prh.googlegroups.com>

Cross-posted to 2 groups.

Show all headers | View raw


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.

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-17 09:15 -0700
  Re: What's the deal with deadlocks markspace <-@.> - 2011-04-17 09:35 -0700
    Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-17 13:14 -0400
  Re: What's the deal with deadlocks Patricia Shanahan <pats@acm.org> - 2011-04-17 09:45 -0700
  Re: What's the deal with deadlocks Robert Klemme <shortcutter@googlemail.com> - 2011-04-17 19:30 +0200
  Re: What's the deal with deadlocks Paavo Helde <myfirstname@osa.pri.ee> - 2011-04-17 15:35 -0500
    Re: What's the deal with deadlocks Ian Collins <ian-news@hotmail.com> - 2011-04-18 08:41 +1200
    Re: What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-18 11:59 -0700
      Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-18 16:22 -0400
        Re: What's the deal with deadlocks "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-04-18 22:32 +0200
          Re: What's the deal with deadlocks Ian Collins <ian-news@hotmail.com> - 2011-04-19 09:53 +1200
            Re: What's the deal with deadlocks "Alf P. Steinbach /Usenet" <alf.p.steinbach+usenet@gmail.com> - 2011-04-19 01:21 +0200
            Re: What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-19 14:10 -0700
              Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-19 23:01 -0400
                Re: What's the deal with deadlocks Joe Snodgrass <joe.snod@yahoo.com> - 2011-04-20 17:00 -0700
                Re: What's the deal with deadlocks Lew <noone@lewscanon.com> - 2011-04-21 00:29 -0400
              Re: What's the deal with deadlocks Patricia Shanahan <pats@acm.org> - 2011-04-19 21:18 -0700
        Re: What's the deal with deadlocks Tom Anderson <twic@urchin.earth.li> - 2011-04-19 00:50 +0100
  Re: What's the deal with deadlocks Roedy Green <see_website@mindprod.com.invalid> - 2011-04-17 14:01 -0700
  Re: What's the deal with deadlocks Noah Roberts <dont@email.me> - 2011-04-18 16:59 -0700

csiph-web