🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: comp.sys.transputer
10 messages
10 total messages Started by "Phillip M. Hallam-Baker" Tue, 29 Jan 1991 21:35
Re producers and consumers
#1357
Author: "Phillip M. Hallam-Baker"
Date: Tue, 29 Jan 1991 21:35
75 lines
4212 bytes
Dear Net,

>>The following was extracted from the article:
Jaap Hollenberg
"People are getting more comfortable with parallelism" - an interview
....
>> There is a tremendous amount of 
>management function placed on him. In the parallel Fortran paradigm the user
>has very little management requirement, he can write an algorithm that - apart
>from the fact that he must use the number of processors - works very much like
>the programming paradigm he is used to.  ... 

Does anybody have any comments regarding this article ? Particularly, can we say
that occam is a producer-initiated language  and Fortran is a 
consumer-initiated language ?

..... yes I have a comment 

	1	I am unable to understand what it means
	2	I don't agree with the parts I can make out.

The premise of the article apears to be that communication based languages
such as occam are less efficient than parallel fortran. The justification for
this apears to be that interprocess communication involves a lot of copying
of data. 

The first point I would make is that `efficiency' is very much less important
to me than coding clarity. I am quite prepared to sacrifice half my CPU time
if it makes the code easier to maintain. The amount of code I see which has
turned into useless junk because of (frequently misguided) attempts at
`optimisation' is quite depressing. If the code dosen't run fast enough I
would prefer to write a tool to perform the optimisation of the code than
start hacking arround in `parallel fortran'. The clarity of the CSP model and
the simplicity of coding it allows are for me it's most significant 
advantage.

My second point is that I do not beleive that the CSP paradigm is inefficient.
Most communications between processes involve small packets of data. Time taken
to copy the data is then less significant than the time taken to set up the
transfer. I agree that passing data arround a single processor via a common
block may be faster for large amounts of data but that trick is not 
particularly effective between different processors (even with shared memory
). In any case it is a technique allowed in the inmos occam compiler - just
turn off the useage checking. Provided that your synchronisation mechanism 
prevents read/write and write/write ambiguites it should work. If you need
that particular optimisation it is avaliable, however a better alternative
would probably be to reduce the amount of virtual parallelism and rewrite 
a parallel section as a single sequential one. If your problem allows effective
use of parallel common blocks in the manner described it almost certainly
isn't taking advantage of virtual parallelism.

Thirdly what is meant by 
>>>>> In the
>parallel Fortran area (anybody's standard, IBM, PCF) it is a receiver-initiated
>transmission.You can assume that the data is somehow left behind by name by the
>producers (we typically associate that with a storage cell in a shared-memory)
>and the consumer then names the data and retrieves it under its own-initiative
<<<<<
?

Does this mean that in this parallel Fortran there is no synchronisation
provided and therfore there is no need to worry about it?

Fourthly Occam and CSP are neither receiver nor originator oriented. The whole
point is that the communication is symetric. The only exception is the occam
ALT which only allows input guards. However it is simple enough to extend the
model to output guards - the only problem being that you start to lose 
efficiency since you have to provide a global synchronisation between all
pairs of processes which might possibly be engaging either directly or
indirectly in a given guarded communication. 

	Phillip M. Hallam-Baker
	ZEUS Group
	Oxford Dept nuclear Physics.
Re: Re producers and consumers
#1379
Author: zenith
Date: Tue, 05 Feb 1991 17:31
155 lines
8380 bytes


In article <1461.9101292134@prg.oxford.ac.uk> HALLAM@vax1.physics.oxford.ac.uk ("Phillip M. Hallam-Baker") writes:

    from the article:
    Jaap Hollenberg

   "People are getting more comfortable with parallelism" - an interview
   ....  >> There is a tremendous amount of >management function placed
   on him. In the parallel Fortran paradigm the user >has very little
   management requirement, he can write an algorithm that - apart >from
   the fact that he must use the number of processors - works very much
   like >the programming paradigm he is used to.  ...

   Does anybody have any comments regarding this article ? Particularly,
   can we say
   that occam is a producer-initiated language  and Fortran is a 
   consumer-initiated language ?

   ..... yes I have a comment 
	   1	I am unable to understand what it means
           2	I don't agree with the parts I can make out.

   The premise of the article apears to be that communication based
   languages such as occam are less efficient than parallel fortran. The
   justification for this apears to be that interprocess communication
   involves a lot of copying of data.

   The first point I would make is that `efficiency' is very much less
   important to me than coding clarity. I am quite prepared to sacrifice
   half my CPU time if it makes the code easier to maintain. The amount
   of code I see which has turned into useless junk because of
   (frequently misguided) attempts at `optimisation' is quite
   depressing. If the code dosen't run fast enough I would prefer to
   write a tool to perform the optimisation of the code than start
   hacking arround in `parallel fortran'. The clarity of the CSP model
   and the simplicity of coding it allows are for me it's most
   significant advantage.

The premise of the article is probably correct.

I agree that coding clarity is important, but (and this is especially
the case on the transputer since it is so slow) efficiency is important.
Why is this? Well it derives from the fact that anyone writing parallel
code today is almost certainly doing so because they are looking for
high performance.

   My second point is that I do not beleive that the CSP paradigm is
   inefficient.  Most communications between processes involve small
   packets of data. Time taken to copy the data is then less significant
   than the time taken to set up the transfer.

Well, I would like to see a study done of the claim in your second
sentence here - but it's still going to be a few years before parallel
programming has been so common place that a study of programming
practices can produce meaningful results. Your comments are however
counter to my experience with Occam. Many times I received desperate
pleas from INMOS marketing asking me to talk to a customer because the
parallel code running on their shiny new box of 16 transputers only ran
at twice (or at times half :) the speed of their single processor
workstation. The reason almost always was that they were paying a copy
penalty. I see no evidence to support your claim and my experience
suggests otherwise.

Indeed, in your environment, it may seem that processes involve small
packets of data *because* the programmers involved are aware they will
incur a copy penalty if they do otherwise. Programming Language
Semiotics are a big interest of mine - we should talk about such issues
offline.

   I agree that passing data arround a single processor via a common
   block may be faster for large amounts of data but that trick is not
   particularly effective between different processors (even with shared
   memory ). In any case it is a technique allowed in the inmos occam
   compiler - just turn off the useage checking.

Where has your requirement for coding clarity gone? ... Out the window,
that's where ;-)

This just isn't convincing - look, the fact is anyone wanting to write
"efficient", topology specific Occam code does turn the usage checker off.
From what I hear of Occam 3 (Eek) there will now be cludges in the language
which are there essentially in recognition of this fact.

   Thirdly what is meant by >>>>> In the >parallel Fortran area
   (anybody's standard, IBM, PCF) it is a receiver-initiated
   >transmission.You can assume that the data is somehow left behind by
   name by the >producers (we typically associate that with a storage
   cell in a shared-memory) >and the consumer then names the data and
   retrieves it under its own-initiative <<<<<

Most Americans will not understand you're puzzlement or what you mean by
"what is meant by". It seems perfectly clear to me - although it is
written in American English not Oxford English. I'll translate:

* "In parallel Fortran (any standard) we can call communication
*<receiver-initiated>. Data is created by producers and mapped by
*receivers to local names."

Ok, the American original waffles and is imprecise (and it's not clear
that my interpretation is correct) - but come on this is News not IEEE
transactions or an Oxford monograph, and if you want to understand what
people in the USA say you'll have to be less pompous.

   Fourthly Occam and CSP are neither receiver nor originator oriented.
   The whole point is that the communication is symetric. The only
   exception is the occam ALT which only allows input guards. However it
   is simple enough to extend the model to output guards - the only
   problem being that you start to lose efficiency since you have to
   provide a global synchronisation between all pairs of processes which
   might possibly be engaging either directly or indirectly in a given
   guarded communication.

My advice to anyone wanting to write "efficient" Occam programs is
"don't use alt". But anyhow, now you're waffling (and maybe I am too:).

I wish people (and esp. people at Oxford) would stop using CSP and Occam
in the same breath. Occam is, at best, a poor and imperfect copy of CSP.
CSP is a rich and very elegant process mathematics (one of several such
notations around these days) and in its mathematical context it is very
useful to language designers and computer architects like myself.  But,
hey, I wouldn't ever give it to a programmer to write a program in!  To
associate this fine work with Occam continually is to do CSP a
disservice. Occam was a nice try, another step, didn't quite work out, I
think some of us learned a few lessons from it, time to move on.

Hey, have you ever had that Deja vu feeling? I'm almost certain I've
said this before ;-) [for the benefit of comp.parallel readers].

And in answer to the (rephrased) original question (I don't know the
originators id):

   "can we say that occam is ... producer-initiated ... and [the]
   Fortran [model] is a consumer-initiated ..."

No, I don't think we can say this. As Phillip says in his fourth point,
in Occam the synchronization characteristics of input and output are
such that either side can actually "initiate" a data exchange and
semantically the event happens when both processes are ready. I guess we
could use the term "consumer-initiated" (or "receiver-initiated") for
the Fortran model but I'm not sure it is strictly correct or useful to
do so.

Steven
--


--
Steven Ericsson Zenith * Email: zenith@ensmp.fr  *    Fax:(1)64.69.47.09
                       | Francais:(1)64.69.47.08 | Office:(1)64.69.48.52
Center for Research in Computer Science - Centre de Recherche en Informatique
	     CRI - Ecole Nationale Superieure des Mines de Paris
	       35 rue Saint-Honore 77305 Fontainebleau France
    "All see beauty as beauty only because they see ugliness" LaoTzu
Re: Re producers and consumers
#1381
Author: unknown
Date: Tue, 05 Feb 1991 17:45
154 lines
8408 bytes
In article <1461.9101292134@prg.oxford.ac.uk> HALLAM@vax1.physics.oxford.ac.uk ("Phillip M. Hallam-Baker") writes:

    from the article:
    Jaap Hollenberg

   "People are getting more comfortable with parallelism" - an interview
   ....  >> There is a tremendous amount of >management function placed
   on him. In the parallel Fortran paradigm the user >has very little
   management requirement, he can write an algorithm that - apart >from
   the fact that he must use the number of processors - works very much
   like >the programming paradigm he is used to.  ...

   Does anybody have any comments regarding this article ? Particularly,
   can we say
   that occam is a producer-initiated language  and Fortran is a 
   consumer-initiated language ?

   ..... yes I have a comment 
	   1	I am unable to understand what it means
           2	I don't agree with the parts I can make out.

   The premise of the article apears to be that communication based
   languages such as occam are less efficient than parallel fortran. The
   justification for this apears to be that interprocess communication
   involves a lot of copying of data.

   The first point I would make is that `efficiency' is very much less
   important to me than coding clarity. I am quite prepared to sacrifice
   half my CPU time if it makes the code easier to maintain. The amount
   of code I see which has turned into useless junk because of
   (frequently misguided) attempts at `optimisation' is quite
   depressing. If the code dosen't run fast enough I would prefer to
   write a tool to perform the optimisation of the code than start
   hacking arround in `parallel fortran'. The clarity of the CSP model
   and the simplicity of coding it allows are for me it's most
   significant advantage.

The premise of the article is probably correct.

I agree that coding clarity is important, but (and this is especially
the case on the transputer since it is so slow) efficiency is important.
Why is this? Well it derives from the fact that anyone writing parallel
code today is almost certainly doing so because they are looking for
high performance.

   My second point is that I do not beleive that the CSP paradigm is
   inefficient.  Most communications between processes involve small
   packets of data. Time taken to copy the data is then less significant
   than the time taken to set up the transfer.

Well, I would like to see a study done of the claim in your second
sentence here - but it's still going to be a few years before parallel
programming has been so common place that a study of programming
practices can produce meaningful results. Your comments are however
counter to my experience with Occam. Many times I received desperate
pleas from INMOS marketing asking me to talk to a customer because the
parallel code running on their shiny new box of 16 transputers only ran
at twice (or at times half :) the speed of their single processor
workstation. The reason almost always was that they were paying a copy
penalty. I see no evidence to support your claim and my experience
suggests otherwise.

Indeed, in your environment, it may seem that processes involve small
packets of data *because* the programmers involved are aware they will
incur a copy penalty if they do otherwise. Programming Language
Semiotics are a big interest of mine - we should talk about such issues
offline.

   I agree that passing data arround a single processor via a common
   block may be faster for large amounts of data but that trick is not
   particularly effective between different processors (even with shared
   memory ). In any case it is a technique allowed in the inmos occam
   compiler - just turn off the useage checking.

Where has your requirement for coding clarity gone? ... Out the window,
that's where ;-)

This just isn't convincing - look, the fact is anyone wanting to write
"efficient", topology specific Occam code does turn the usage checker off.
>From what I hear of Occam 3 (Eek) there will now be cludges in the language
which are there essentially in recognition of this fact.

   Thirdly what is meant by >>>>> In the >parallel Fortran area
   (anybody's standard, IBM, PCF) it is a receiver-initiated
   >transmission.You can assume that the data is somehow left behind by
   name by the >producers (we typically associate that with a storage
   cell in a shared-memory) >and the consumer then names the data and
   retrieves it under its own-initiative <<<<<

Most Americans will not understand you're puzzlement or what you mean by
"what is meant by". It seems perfectly clear to me - although it is
written in American English not Oxford English. I'll translate:

* "In parallel Fortran (any standard) we can call communication
*<receiver-initiated>. Data is created by producers and mapped by
*receivers to local names."

Ok, the American original waffles and is imprecise (and it's not clear
that my interpretation is correct) - but come on this is News not IEEE
transactions or an Oxford monograph, and if you want to understand what
people in the USA say you'll have to be less pompous.

   Fourthly Occam and CSP are neither receiver nor originator oriented.
   The whole point is that the communication is symetric. The only
   exception is the occam ALT which only allows input guards. However it
   is simple enough to extend the model to output guards - the only
   problem being that you start to lose efficiency since you have to
   provide a global synchronisation between all pairs of processes which
   might possibly be engaging either directly or indirectly in a given
   guarded communication.

My advice to anyone wanting to write "efficient" Occam programs is
"don't use alt". But anyhow, now you're waffling (and maybe I am too:).

I wish people (and esp. people at Oxford) would stop using CSP and Occam
in the same breath. Occam is, at best, a poor and imperfect copy of CSP.
CSP is a rich and very elegant process mathematics (one of several such
notations around these days) and in its mathematical context it is very
useful to language designers and computer architects like myself.  But,
hey, I wouldn't ever give it to a programmer to write a program in!  To
associate this fine work with Occam continually is to do CSP a
disservice. Occam was a nice try, another step, didn't quite work out, I
think some of us learned a few lessons from it, time to move on.

Hey, have you ever had that Deja vu feeling? I'm almost certain I've
said this before ;-) [for the benefit of comp.parallel readers].

And in answer to the (rephrased) original question (I don't know the
originators id):

   "can we say that occam is ... producer-initiated ... and [the]
   Fortran [model] is a consumer-initiated ..."

No, I don't think we can say this. As Phillip says in his fourth point,
in Occam the synchronization characteristics of input and output are
such that either side can actually "initiate" a data exchange and
semantically the event happens when both processes are ready. I guess we
could use the term "consumer-initiated" (or "receiver-initiated") for
the Fortran model but I'm not sure it is strictly correct or useful to
do so.

Steven
--



--
Steven Ericsson Zenith * Email: zenith@ensmp.fr  *    Fax:(1)64.69.47.09
                       | Francais:(1)64.69.47.08 | Office:(1)64.69.48.52
Center for Research in Computer Science - Centre de Recherche en Informatique
	     CRI - Ecole Nationale Superieure des Mines de Paris
	       35 rue Saint-Honore 77305 Fontainebleau France
    "All see beauty as beauty only because they see ugliness" LaoTzu
Re: Re producers and consumers
#1368
Author: Jonathan Greenfield
Date: Wed, 06 Feb 1991 17:29
34 lines
2547 bytes
CSP is a fine theoretical entity, but it surely is not a programming language,
since CSP (as defined in Hoare's book) "programs" are not capable of actually 
doing anything.  (Hoare's definition of parallel composition is inadequate.)

Occam is the rather ugly result of one attempt at including the elegant
concepts of CSP in a practical and efficient programming language.
(Note that, ignoring the procedural/functional differences, the main 
conceptual difference between CSP and occam involves the action of parallel 
composition.)

As far as the debate over the 'copying controversy' goes, let me offer my
own opinions.  Whether one prefers a shared-variable paradigm or a message-
passing paradigm, anyone should recognize that it is just plain ugly to
mix the use of these paradigms.  In the absence of a virtual shared-memory
(in which the underlying message-passing is made invisible to the programmer),
physically distributed memory forces us to accept a message-passing paradigm.

At a purely practical level, the 'copy-penalty' is probably not a real issue
since any program that aspires to efficieny (when compared to sequential
programs) must be coarse-grained enough so as to make the communication
time negligible when compared to the computation time.  When this is the case
the 'copy-penalty' will obviously be negligible also.

Incidentally, the ALT statement in occam is NOT a source of inefficiency for
occam programs.  Since occam channels may be accessed by only two processes,
the system designers were able to implement the ALT statement quite
efficiently.  An ALT process enables all of its inputs, and then deschedules
itself until there is a matching output process for one of the ALT guards.  
Only then does the ALT process get rescheduled.  Since the ALT process does not
consume processor cycles during the waiting period (other processes can be 
executed), ALT execution is quite efficient.


Jonathan
Re: producers and consumers
#1386
Author: Ian Glendinning
Date: Thu, 07 Feb 1991 14:50
34 lines
1944 bytes
In <1991Feb6.122949.8210@rodan.acs.syr.edu> greeny@wotan.top.cis.syr.edu (Jonathan Greenfield) writes:

>CSP is a fine theoretical entity, but it surely is not a programming language,
>since CSP (as defined in Hoare's book) "programs" are not capable of actually 
>doing anything.  (Hoare's definition of parallel composition is inadequate.)

Please explain.  Why is it inadequate?

>Occam is the rather ugly result of one attempt at including the elegant
>concepts of CSP in a practical and efficient programming language.

Ugly?  That's a matter of opinion...

>(Note that, ignoring the procedural/functional differences, the main 
>conceptual difference between CSP and occam involves the action of parallel 
>composition.)

Again, please explain.  I always thought they were the same.

>At a purely practical level, the 'copy-penalty' is probably not a real issue
>since any program that aspires to efficieny (when compared to sequential
>programs) must be coarse-grained enough so as to make the communication
>time negligible when compared to the computation time.  When this is the case
>the 'copy-penalty' will obviously be negligible also.

Agreed.

>Jonathan

Ian
--
I.Glendinning@ecs.soton.ac.uk        Ian Glendinning
Tel: +44 703 593081                  Electronics and Computer Science
Fax: +44 703 593045                  University of Southampton SO9 5NH England
Re: Re producers and consumers
#1377
Author: unknown
Date: Fri, 08 Feb 1991 09:56
23 lines
1786 bytes
In article <1991Feb6.122949.8210@rodan.acs.syr.edu> greeny@wotan.top.cis.syr.edu (Jonathan Greenfield) writes:

   At a purely practical level, the 'copy-penalty' is probably not a real issue
   since any program that aspires to efficieny (when compared to sequential
   programs) must be coarse-grained enough so as to make the communication
   time negligible when compared to the computation time.  When this is the case
   the 'copy-penalty' will obviously be negligible also.

And only true when message passing is not used as the generalized
paradigm (as in Occam) and you're writing topology specific code with a
detailed awareness of the target machine... I agree.

On the other hand ...

Steven
--
Steven Ericsson Zenith * Email: zenith@ensmp.fr  *    Fax:(1)64.69.47.09
                       | Francais:(1)64.69.47.08 | Office:(1)64.69.48.52
Center for Research in Computer Science - Centre de Recherche en Informatique
	     CRI - Ecole Nationale Superieure des Mines de Paris
	       35 rue Saint-Honore 77305 Fontainebleau France
    "All see beauty as beauty only because they see ugliness" LaoTzu
Re: producers and consumers
#1376
Author: Jonathan Greenfield
Date: Fri, 08 Feb 1991 18:24
101 lines
4254 bytes
In article <6591@ecs.soton.ac.uk> igl@ecs.soton.ac.uk (Ian Glendinning) writes:

>> (Hoare's definition of parallel composition is inadequate.)
>
>Please explain.  Why is it inadequate?

A sequential process as defined by Hoare is essentially an automaton that 
defines a language of events (which correspond to messages) in which the
process is capable of interacting.  The parallel composition operator (||)
transforms a pair of sequential processes into an equivalent single sequential
process, defining a language of events in which both processes are capable of
interacting.  Consider the following example from Hoare's book:

  VMCT = coin -> (choc -> VMCT | toffee -> VMCT)
    (a vending machine with chocolate and toffe)
  GRCUST = (toffee -> GRCUST | choc -> GRCUST | coin -> choc -> GRCUST)
    (a greedy customer who tries to get something without paying)

  (GRCUST||VMCT) = coin -> choc -> (GRCUST||VMCT)
    
Note that the parallel composition of the two is, itself, a sequential
process.  Furthermore, together, the greedy customer and the vending machine
can only 'agree' to interact with a sequence of coin, chocolate, coin,
chocolate, ...  However, the parallel composition of these two processes
does not cause an interaction to take place.  (It does not cause the events to
happen.)  It simply defines a new language of interactions.  Hoare's
definition of parallel composition is based upon a 'broadcast' synchronization.
That is if we perform another parallel composition with the example,

  ((GRCUST||VMCT)||VMCT)

then we get the same sequential process defined above. (The name is changed,
the process definition is identical.  Hoare uses a notation that I cannot 
duplicate here, using mu, in order to avoid concern about the names.)

The sequential processes that result are still ready to interact, but Hoare
never introduces an additional notion of parallel composition that allows
these events to ever take place.  As a result, Hoare's parallel composition
of processes defines processes that exist in a vacuum, and can't actually
do anything (except to describe a possible set of events).

>>(Note that, ignoring the procedural/functional differences, the main 
>>conceptual difference between CSP and occam involves the action of parallel 
>>composition.)
>
>Again, please explain.  I always thought they were the same.

If you are familiar with occam, it should be clear that the definition of
the parallel composition operator (PAR) is quite different.  Consider two
occam processes,

  SEQ
    <interact in event>
    x := 1

and

  SEQ
    <interact in event>
    y := 2

(Let us use an <event>, without worrying about channels, communication, and 
other concepts that are not relevant to this discussion 
of parallel composition.)

Now consider the parallel composition of these:

  PAR
    SEQ
      <interact in event>
      x := 1
    SEQ
      <interact in event>
      y := 2

which is equivalent to the occam process:

  x, y := 1, 2

because the <event> actually takes place.  It is an internal event that
is invisible outside of the scope of the PAR operator.  One may prefer
to view this as:

  SEQ
    <event takes place>
    x, y := 1, 2

Notably, the parallel composition is NOT equivalent to:

  SEQ
    <interact in event>
    x, y := 1, 2

which is what one would expect based upon Hoare's notion of parallel
composition.

Fundamentally, when two processes share an event in occam, the event takes
place.  In CSP, it does not.


Jonathan
Re: producers and consumers
#1394
Author: Bryan Carpenter
Date: Mon, 11 Feb 1991 16:11
86 lines
2989 bytes
In <1991Feb8.121349.17501@rodan.acs.syr.edu> greeny@wotan.top.cis.syr.edu (Jonathan Greenfield) writes:

>In article <6591@ecs.soton.ac.uk> igl@ecs.soton.ac.uk (Ian Glendinning) writes:

>>> (Hoare's definition of parallel composition is inadequate.)
>>
>>Please explain.  Why is it inadequate?

>...

>>>(Note that, ignoring the procedural/functional differences, the main 
>>>conceptual difference between CSP and occam involves the action of parallel 
>>>composition.)
>>
>>Again, please explain.  I always thought they were the same.

>If you are familiar with occam, it should be clear that the definition of
>the parallel composition operator (PAR) is quite different.  Consider two
>occam processes,

>  SEQ
>    <interact in event>
>    x := 1

>and

>  SEQ
>    <interact in event>
>    y := 2

>(Let us use an <event>, without worrying about channels, communication, and 
>other concepts that are not relevant to this discussion 
>of parallel composition.)

>Now consider the parallel composition of these:

>  PAR
>    SEQ
>      <interact in event>
>      x := 1
>    SEQ
>      <interact in event>
>      y := 2

>which is equivalent to the occam process:

>  x, y := 1, 2

>because the <event> actually takes place.  It is an internal event that
>is invisible outside of the scope of the PAR operator.  One may prefer
>to view this as:

>  SEQ
>    <event takes place>
>    x, y := 1, 2

>Notably, the parallel composition is NOT equivalent to:

>  SEQ
>    <interact in event>
>    x, y := 1, 2

>which is what one would expect based upon Hoare's notion of parallel
>composition.

>Fundamentally, when two processes share an event in occam, the event takes
>place.  In CSP, it does not.

I don't see what you're getting at really.  The (communication)
event in occam surely does take place.  In occam though
particular events (the only ones supported---communications)
can only be in the alphabets of *two* processes, so their occurence
will only directly effect these two processes.

CSP, of course, has the same ability to limit particular events to
the alphabets of a subset of all processes---I don't see that events are
necessarily all "broadcast" in the way you seem to suggest.

The difference seems to have more to do with how many processes can
share an event (in their alphabets), rather than the nature
of the concurrency.


>Jonathan

Bryan
Re: Re producers and consumers
#1391
Author: Jonathan Greenfield
Date: Mon, 11 Feb 1991 17:16
36 lines
2588 bytes
In article <ZENITH.91Feb8105612@isatis.isatis.ensmp.fr> zenith@isatis.isatis.ensmp.fr (unknown) writes:

>>At a purely practical level, the 'copy-penalty' is probably not a real issue
>>since any program that aspires to efficieny (when compared to sequential
>>programs) must be coarse-grained enough so as to make the communication
>>time negligible when compared to the computation time.  When this is the case
>>the 'copy-penalty' will obviously be negligible also.
>
>And only true when message passing is not used as the generalized
>paradigm (as in Occam)

Are you saying that such languages (as occam) can never be used to write
programs in which the communication time is negligible?  What is the basis for 
saying this?

>and you're writing topology specific code with a detailed awareness of the 
>target machine... I agree.

I'm not sure how this is relevant.  The 'copy-penalty' is only relevant to
synchronization of processes within one physical processor.  If you are
dealing with a system in which processes are automatically mapped to
processors, then you can never assume that two processes reside on a single 
processor.  Therefore, the program could not make use of shared variables
anyway.  (Assuming that the system does not provide a virtual shared memory.)

If you are suggesting that such systems could never support programs in which
the communication time were negligible, then I don't believe your statement to
be fundamentally true.  Systems that support non-topology specific programs 
currently involve large communication overhead, making it difficult (but not 
necessarily impossible) to develop programs in which the communication time is
negligible.  However, this is a result of the current state of technology.  
There is no reason for us to assume that the communication overhead for such 
systems will not see significant reductions in the future.


Jonathan
Re: producers and consumers
#1397
Author: Jonathan Greenfield
Date: Tue, 12 Feb 1991 18:43
62 lines
3282 bytes
In article <6679@ecs.soton.ac.uk> dbc@ecs.soton.ac.uk (Bryan Carpenter) writes:
>I don't see what you're getting at really.  The (communication)
>event in occam surely does take place.  In occam though
>particular events (the only ones supported---communications)
>can only be in the alphabets of *two* processes, so their occurence
>will only directly effect these two processes.
>
>CSP, of course, has the same ability to limit particular events to
>the alphabets of a subset of all processes---I don't see that events are
>necessarily all "broadcast" in the way you seem to suggest.
>
>The difference seems to have more to do with how many processes can
>share an event (in their alphabets), rather than the nature
>of the concurrency.

You are correct in noting that CSP has the ability to exclude certain
processes from interaction in some events (on the basis of their alphabet).
However, the events are all "broadcast" in nature (even when only two
processes share the event).

The problem seems to be the following.  Consider a process

  A = event1 -> SKIP

Hoare tells us that this is a process that engages in event1 and then
terminates (successfully).  The question at hand is does "execution" of
A cause event1 to "occur."  It seems to me that it does not.

If event1 is an input event, say

   event1 = c.v = c?v

and
  
   A = c?v -> SKIP

then what does "execution" of A mean?  Hoare says that process A is initially
prepared to engage in event c.v.  Since it seems to me that an input event can
not be considered to have "occurred" when taken in isolation (as in process
A, which is not composed with any other processes), I cannot interpret the
statement that a process is "prepared to engage in" an event to mean that the
event "occurs."

As a result, it would appear that

   A||B = event1 -> SKIP  (where event1 is just some event)

is a process that is "prepared to engage in event1," and not a process in
which event1 has "occured."

Therefore, CSP processes all strike me as descriptions of possible sequences
of events (and actions).  They do not strike me as descriptions of actual
sequences of events (and actions).


Disclaimer:

    I cannot understand why Hoare would choose to define CSP with such a 
conceptual problem.  Given Hoare's status relative to my own, it is probably 
far, far more likely that I am mistaken in my understanding of the definition, 
rather than that Hoare is mistaken in his definition.  Any insights into an 
error that I may have made will be appreciated.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads