Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!uupsi!rodan.acs.syr.edu!wotan.top.cis.syr.edu!greeny From: greeny@wotan.top.cis.syr.edu (Jonathan Greenfield) Newsgroups: comp.sys.transputer Subject: Re: Re producers and consumers Message-ID: <1991Feb6.122949.8210@rodan.acs.syr.edu> Date: 6 Feb 91 17:29:49 GMT References: <1461.9101292134@prg.oxford.ac.uk> Reply-To: greeny@top.cis.syr.edu (Jonathan Greenfield) Organization: CIS Dept., Syracuse University Lines: 34 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