comp.lang.ada
 help / color / mirror / Atom feed
From: sdd.hp.com!spool.mu.edu!cs.umn.edu!sctc.com!stachour@ucsd.edu  (Paul Stac
Subject: Re: re-use and concurrency
Date: 15 Aug 91 13:35:31 GMT	[thread overview]
Message-ID: <1991Aug15.133531.1169@sctc.com> (raw)

brossard@sic.epfl.ch (Alain Brossard EPFL-SIC/SII) writes:
  ... Size of Concurrent versus size of Sequential statements ...
>    Even if we assume that the concurrent version was twice
>the size of the sequential version, we are still looking at
>50'000 lines of Ada vs 20'000 lines of C++.  That means
>30'000 more lines to maintain (not to mention the duplication
>involved in having two versions of each components which is an issue
                   ^^^^^^
>in itself!).  To me it looks like Ada is losing big to C++...

Monsieur Brossard (et autres):

Nope. Not really. What is not widely known in the programming community 
is that there is not just "one" version of non-sequentiality.  In his book,
beginning on page 188, Grady indicates concurrency variations as:
  
    Sequential (serially reusable, hopefully no explanation needed)
    Guarded (where clients are responsible for call in correct context)
    Concurrent (where clients can call "any old time", but where only
        one task is in the "package" as one time)
    Multiple (where multiple clients can be executing the package
        simultaneously, like from multiple CPUs on shared data)

[There are other variants of concurrency, such as non-rexecutable and 
others, but I have shown only Grady's taxonomy to simplify the issue,
and give a generally available reference for others to consult.
The other variants are mostly uninteresting.]

So the right-number is not twice-as-much function, but 4-times-as-many.
And from my own experience, the multiple variant is extremely difficult.

[I have never seen, in any book on concurrency, data-structures, etc.,
written by any compotent author, including Booch, a program (that runs 
on generally available hardware) that implements a multiple-concurrency
doubly-linked list datastructure.  I have seen "solutions" by naive
authors who ignore parts of the multiple concurrency issue that
portend to run correctly; I have found at least one race-condition the
negates the proposed "solution" in every one that I have analyzed.  
Now, I don't therefore assert that it is impossible 
(I have no formal proof), but very hard and maybe not possible.]

And if one wants to ignore the concurrency issues, then software can
get pretty easy (by comparision).  Grady's win is that he defines for
us packages, with similar (and in most cases identical) interfaces for
both sequential and all varieties of concurrency.  Thus, when you discover
that you have a concurrency issue, you are allowed to make the time/
space/correctness tradeoff without having to rewrite gobs of code to
account for the concurrency needs.  

Thanks, Grady, for providing a good taxonomy of concurency for us.
Thanks, Ada, for giving me means to implement and use concurrency well.


...Paul

Paul Stachour          SCTC, 1210 W. County Rd E, Suite 100           
stachour@sctc.com          Arden Hills, MN  55112-3739
                             [1]-(612) 482-7467
-- 
Paul Stachour          SCTC, 1210 W. County Rd E, Suite 100           
stachour@sctc.com          Arden Hills, MN  55112-3739
                             [1]-(612) 482-7467

             reply	other threads:[~1991-08-15 13:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1991-08-15 13:35 sdd.hp.com!spool.mu.edu!cs.umn.edu!sctc.com!stachour [this message]
  -- strict thread matches above, loose matches on Subject: below --
1991-08-28  2:50 re-use and concurrency Robert I. Eachus
1991-08-26 18:00 mintaka!ogicse!hsdndev!encore!jcallen
1991-08-17  4:37 Bob Kitzberger @midnight
1991-08-15  3:23 Jim Showalter
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox