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


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

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-19 23:01 -0400
Organization albasani.net
Message-ID <iolias$lf8$1@news.albasani.net> (permalink)
References (2 earlier) <575d7b43-51c4-4905-ba16-15fe9b78373e@t16g2000vbi.googlegroups.com> <ioi6hl$bvq$1@news.albasani.net> <ioi731$pc3$1@dont-email.me> <913q7eFpdlU3@mid.individual.net> <7c038630-5773-4ef1-8b59-1a0d6fa9acd5@z7g2000prh.googlegroups.com>

Cross-posted to 2 groups.

Show all headers | View raw


Joe Snodgrass wrote:
> Ok, so tell me if this is how it works.

I'm going to respond to your /reductio ad absurdum/ as though you were 
presenting a serious argument.

> You got a concurrent programming project, let's say in C++, and you're
> climbing the walls, because the results are unpredictable, the
> debugger shows nothing and the code looks fine.

The argument breaks down right here.

The code *looks* fine is a function of how one looks, not of the code.  Buying 
OCCAM or MAGICBOOJUM won't fix diddly, because the failure is in the Mark 1 
Eyeball and associated neural control and analysis circuits, not the software 
tools.

"The debugger shows nothing" is useless because debuggers don't diagnose 
concurrency issues until they happen, and then only if you catch them in the 
right place.  But hey, you throw enough shit at the wall and some of it will 
stick, right?

"The results are unpredictable" only because one hasn't gathered enough 
information to make a prediction.  The problem isn't in the results, once 
again.  The failure is in the one gathering the information.

So given the failure in the premises, any correctness in the conclusion will 
be pure coincidence.

> You say to yourself "It's gotta be a race condition, right?  I mean
> I've tried everything else, and the behavior is consistent with that."

Right, because incomplete information gathering combined with lame and 
ridiculously insufficient and misguided analysis should always be followed 
immediately by an baseless leap to an unfounded conclusion, followed by a rush 
to a randomly-chosen and utterly misunderstood ameliorative strategy.

> The solution is to push C++ onto the back burner, whip out your credit
> card and buy a copy of Occam (or Linda, or whatever the kids are using
> these days.)
>
> Your job now becomes to interface Occam into your existing C++ code
> and use the Occam features to find and fix the race condition.  Then
> you go back to C++ and work on whatever the boss says he wants done
> next.
>
> But the key is to give up all hope of ever fixing the race condition
> WITHOUT a language like Occam, because if you don't buy Occam, you're
> gonna be twisting in the wind until you're so far behind schedule that
> the boss fires you.
>
> Am I correct that my description is a highly reliable portrayal of how
> these situations develop?

No.  At least, there's no evidence here that you are.

-- 
Lew
Honi soit qui mal y pense.
http://upload.wikimedia.org/wikipedia/commons/c/cf/Friz.jpg

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