Message passing in concurrent C: Synchronous versus asynchronous
Narain Gehani
Abstract
Narain Gehani
Abstract
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.
OpenAlex reports 13 citations for this work. Citation counts describe recorded attention and do not establish research quality.
A contribution statement is not available in the OpenAlex record.
Method details are not available in the OpenAlex metadata.
Findings are not separately available in the OpenAlex metadata.
Limitations are not available in the OpenAlex metadata.
Application details are not available in the OpenAlex metadata.
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.
Key concepts: Asynchronous communication, Message passing, Computer science, Synchronizer, Message broker, Concurrency, Context (archaeology), Message switching