Ann: Stackless Limbo Dancing Works Fine!
Andrew Henshaw
andrew.henshaw at mail.com
Sat May 25 01:29:13 EDT 2002
Niki Spahiev wrote:
> Hello Fernando,
>
> Tuesday, May 21, 2002, 11:16:19 PM, you wrote:
>
> FP> On 5/21/02 12:07 AM, in article ueji35ihipuee3 at corp.supernews.com,
> "Andrew FP> Henshaw" <andrew.henshaw at mail.com> wrote:
>>> An Occam channel is very simple and was implemented efficiently in the
>>> Transputer's microcode. I suspect that having only a single
>>> transmitting
>>> process and a single receiving process simplifies that task. As I said
>>> before, I believe that this holds for CSP also.
> FP> I can't find my CSP book, but from memory I don't think this is
> correct. FP> Through || (PAR), it is possible for several concurrent
> processes to attempt FP> to read or to write on the same channel. Then the
> channel implementation FP> needs a queue to hold all the blocked processes
> until a complementary event FP> occurs, at which point one of the pending
> requests is matched to the event FP> and the blocked process becomes
> runable.
>
> IIRC transputers had 4 ports and special chip which can be programmed to
> produce channel to any port of any transputer. So channels can't be
> shared.
>
As Fernando points out, this hardware implementation doesn't actually
affect his argument (which I still dispute); however, it actually turns out
that channels can be physically shared between parallel* processes on the
Transputer. As you might expect, on-chip channel communications are
implemented via memory mapping and off-chip channel communications are
implemented with links (the ports you spoke of) which are also memory
mapped. Since the Transputer doesn't have memory protection, promiscuous
processes can access the channels simultaneously*. The Occam compiler will
prevent that behavior; but, when programming with C (with Transputer
libraries for parallel processing), this technique is used, occasionally.
* "parallel" and "simultaneously" are loose terms. The Transputer uses
task switching with a microcoded scheduler; so, in general, computations on
a single Transputer aren't truly simultaneous.
Regards,
Andy Henshaw
More information about the Python-list
mailing list