Concurrent Computing - Concurrent Interaction and Communication

Concurrent Interaction and Communication

In some concurrent computing systems, communication between the concurrent components is hidden from the programmer (e.g., by using futures), while in others it must be handled explicitly. Explicit communication can be divided into two classes:

Shared memory communication
Concurrent components communicate by altering the contents of shared memory locations (exemplified by Java and C#). This style of concurrent programming usually requires the application of some form of locking (e.g., mutexes, semaphores, or monitors) to coordinate between threads.
Message passing communication
Concurrent components communicate by exchanging messages (exemplified by Scala, Erlang and occam). The exchange of messages may be carried out asynchronously, or may use a rendezvous style in which the sender blocks until the message is received. Asynchronous message passing may be reliable or unreliable (sometimes referred to as "send and pray"). Message-passing concurrency tends to be far easier to reason about than shared-memory concurrency, and is typically considered a more robust form of concurrent programming. A wide variety of mathematical theories for understanding and analyzing message-passing systems are available, including the Actor model, and various process calculi. Message passing can be efficiently implemented on symmetric multiprocessors, with or without shared coherent memory.

Shared memory and message passing concurrency have different performance characteristics. Typically (although not always), the per-process memory overhead and task switching overhead is lower in a message passing system, but the overhead of message passing itself is greater than for a procedure call. These differences are often overwhelmed by other performance factors.

Read more about this topic:  Concurrent Computing

Famous quotes containing the words concurrent and/or interaction:

    I have been too long acquainted with human nature to have great regard for human testimony; and a very great degree of probability, supported by various concurrent circumstances, conspiring in one point, will have much greater weight with me, than human testimony upon oath, or even upon honour; both of which I have frequently seen considerably warped by private views.
    Philip Dormer Stanhope, 4th Earl Chesterfield (1694–1773)

    UG [universal grammar] may be regarded as a characterization of the genetically determined language faculty. One may think of this faculty as a ‘language acquisition device,’ an innate component of the human mind that yields a particular language through interaction with present experience, a device that converts experience into a system of knowledge attained: knowledge of one or another language.
    Noam Chomsky (b. 1928)