[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Synchronous Communication = Swap



Hi Adrain and others,

I agree with your remarks.
I'll try to be more precise wrt. CSP (maths).
I think the following holds:
1. Buffered communication (asynchronous) can be modelled in CSP.
2. Buffered communication is (typically) modelled via Processes that perform
   synchronous communication.  The Processes are one-place buffer processes,
   or sequences of those.
3. Those buffers need to be of finite size to apply CSP mathematics.
4. CSP (maths) is not suitable for dealing with infinitely large
   buffers.
5. There is no need for CSP (maths) to be able to perform calculations
   with infinitely large buffers.  To proof anything, you "simply"
   determine a maximum size first.

Adrain wrote:
> 2) A CSP event can involve any number of processes, not just two.
If I remember it correct, if process A, B, and C are all "responsive"
to event "x" then, when performing "x", each of them waits for the others
to also perform "x".

In other words, event "x" is practically some kind of barier
synchronization.

This automatically brings me to the following suggestion:
  1. The barier synchronisation should be the basic CSP-lib primitive.
  2. While synchronizing, data can be exchanged in any direction, so
     in all directions. (the syntactic sugar I would naturally add to
     barier synchronizations)

For example:
	Barier
		synchronise(myDataContribution) RETURNS dataCollection
		
In words:
1. every process contributes its data to the synchronisation.
2. every process receives the collected contribution.

My suggestion of a swap channel is just a special case of this.

What do people think?

	Marcel