Why did most concurrent programming languages adopt the CSP model, and didn't use CCS or Pi calculus?
-
-
Answer:
I would hesitate to say that "most" concurrent programming languages adopt the CSP model. In Java and C# the underlying concurrency model is that of shared memory using monitors for mutual exclusion รข but one can of course implement notions of message passing on top of this. The most widely used language with message passing is probably Erlang, but its model of interprocess communication is neither CSP nor CCS message passing. Messages are kept in a mailbox (a queue of as yet unconsumed messages).
Hans Hyttel at Quora Visit the source
Other answers
I'll answer the question by asking a new one: why do you think that "most of concurrent programming languages adopted CSP"? To the best of my knowledge, just http://en.wikipedia.org/wiki/Occam_(programming_language) and http://en.wikipedia.org/wiki/Go_(programming_language) adopted and were influenced by CSP. I'd say that most of concurrent languages nowadays were influenced more by the http://en.wikipedia.org/wiki/Actor_model. Regarding the answer, I think it is difficult to say. If you were to implement a new programming language, most probably the concurrent primitives of your choice will shape the language too, and the scope your language is trying to cover. For example, http://en.wikipedia.org/wiki/Erlang_(programming_language) adopted the Actor model, which made it possible to implement distribution in a very natural way, thanks to the inherent asyncronicity of the model. On the other hand, Go went for sinchronous meesage passing derived from CSP, which (despite inital efforts) proved difficult to allow for a naturally distributed system. I'm not saying that you cannot code distributed systems in Go - of course you can -, but you will need to use something else than channels to communicate between nodes, while in erlang you can transparently send messages to local and distributed processes. And yet, that limitation could also be a reason to go for CSP instead of a more complex model: analysing runtime performances of CSP is somewhat easier than in Pi calculus, because you know when context switch will occur (at message sending), and you don't have to think about unbound growth of Actors mailboxes (since communication is synchonous, no mailbox is necessary).
Francesco Zanitti
CSP and the "actor model" are variations on the theme of FSMs with message passing. Hardware description languages are quite good at the FSM piece, but not that good on the message passing, while Erlang is quite good at the communication piece (but ugly otherwise). Any paradigm that is OO and avoids shared memory is a good start. The advantage of CSP is it actually lets you talk about the communication channels, while most other approaches only talk about end-points (e.g. MPI).
Kevin Cameron
Related Q & A:
- What programming languages are 'general purpose' and 'domain specific?Best solution by Programmers
- What are the best programming languages to learn now?Best solution by Software Quality Assurance & Testing
- Why query optimizer doesn't use negative filter index?Best solution by Database Administrators
- Why's everyone on my contact list receiving a link(a virus)that says I sent the message to them but I didn't?Best solution by Yahoo! Answers
- Why didn't CR7 play in the world cup qualifiers against Malta?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.