Message passing in concurrent C: Synchronous versus asynchronous

Narain H. Gehani · Software Practice and Experience · 1990

Abstract Message‐passing facilities used for interprocess communication fall into two categories: asynchronous and synchronous. Most concurrent programming languages support either synchronous or asynchronous message passing, but not both. Although these two kinds of message passing are equivalent because each can be implemented in terms of the other, programmers seem to have a strong preference for one or the other. Concurrent C is a parallel superset of C that initially provided only synchronous message‐passing facilities. Some users and potential users of Concurrent C indicated a strong preference for asynchronous message‐passing facilities. In response to this feedback, we eventually extended Concurrent C with asynchronous message passing. The issue of synchronous message passing versus asynchronous message passing has been much discussed in the context of operating systems but not in the context of programming languages. In this paper, I will explain the decision to add asynchronous message passing to Concurrent C. I will first summarize and review the pros and cons of synchronous and asynchronous message passing. I will then compare four versions of an example written using synchronous and asynchronous message passing, discuss some details about implementing synchronous and asynchronous message passing facilities, examine the costs involved in using these facilities, and present some experimental results.

Read the paper · More papers on PaperTik