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


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

Re: What's the deal with deadlocks

Path csiph.com!x330-a1.tempe.blueboxinc.net!feeder1.hal-mli.net!news.glorb.com!postnews.google.com!z7g2000prh.googlegroups.com!not-for-mail
From Joe Snodgrass <joe.snod@yahoo.com>
Newsgroups comp.lang.java.programmer, comp.lang.c++
Subject Re: What's the deal with deadlocks
Date Tue, 19 Apr 2011 14:10:49 -0700 (PDT)
Organization http://groups.google.com
Lines 64
Message-ID <7c038630-5773-4ef1-8b59-1a0d6fa9acd5@z7g2000prh.googlegroups.com> (permalink)
References <23020668-d86c-489a-988b-7b379f34851c@j13g2000pro.googlegroups.com> <Xns9ECAEFF0160FEmyfirstnameosapriee@216.196.109.131> <575d7b43-51c4-4905-ba16-15fe9b78373e@t16g2000vbi.googlegroups.com> <ioi6hl$bvq$1@news.albasani.net> <ioi731$pc3$1@dont-email.me> <913q7eFpdlU3@mid.individual.net>
NNTP-Posting-Host 76.234.146.179
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
X-Trace posting.google.com 1303247450 4694 127.0.0.1 (19 Apr 2011 21:10:50 GMT)
X-Complaints-To groups-abuse@google.com
NNTP-Posting-Date Tue, 19 Apr 2011 21:10:50 +0000 (UTC)
Complaints-To groups-abuse@google.com
Injection-Info z7g2000prh.googlegroups.com; posting-host=76.234.146.179; posting-account=9QAC6QoAAAAzuHuC9e_PYiXCW3Uf2Pex
User-Agent G2/1.0
X-HTTP-UserAgent Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.16) Gecko/20110319 Firefox/3.6.16 ( .NET CLR 3.5.30729),gzip(gfe)
Xref x330-a1.tempe.blueboxinc.net comp.lang.java.programmer:3148 comp.lang.c++:4031

Cross-posted to 2 groups.

Show key headers only | View raw


On Apr 18, 5:53 pm, Ian Collins <ian-n...@hotmail.com> wrote:
> On 04/19/11 08:32 AM, Alf P. Steinbach /Usenet wrote:
>
>
>
> > * Lew, on 18.04.2011 22:22:
> >>JoeSnodgrasswrote:
> >>> Here's how NASA handles race conditions.
>
> >>>http://tinyurl.com/42p2t5f
>
> >>> I searched Dr. Dobbs J, and got ten pages of matches.
>
> >> That link was worth ten times the expected maximum value for a Usenet link.
>
> >> Not least because it led tohttp://www.usingcsp.com/cspbook.pdf, /Communicating
> >> Sequential Processes/, by C. A. R. "Tony" Hoare, with foreword by Edsger W.
> >> Dijkstra.
>
> > I have that in hardcover.
>
> > Some other interesting old books:
>
> >     Parallell Programming in ANSI Standard ADA  - George W. Cherry
> >     Lucid, the Dataflow Language - William W. Wadge&  Edward A. Ashcroft
> >     OCCAM Programming Manual - INMOS Limited
>
> > OCCAM was sort of a language designed to express more or less directly Hoare's
> > concepts.
>
> Someone else who has used OCCAM in anger?  Wow I thought I was the only
> one left!

Ok, so tell me if this is how it works.

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.

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."

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?

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