Abstract

Shared memory and message passing are two principal models of concurrent programming. From a programmer's perspective, the shared memory model is the natural way of developing concurrent programs. However, it does not scale up due to physical limitations of multiprocessor architecture and bandwidth restrictions. The message passing model is more flexible but achieves limited concurrency if processes engage in the transmission of long messages. There are four messaging models: sequential, declarative, message passing, and shared states. The sequential model provides only the interleaving execution of concurrent programs, whereas declarative programming relies on exposing concurrency by exploiting implicit control flow. Remote procedure call (RPC), remote method invocation (RMI), and distributed shared memory tools are examples of shared state concurrency. The tools like sockets, RPC, and RMI provide infrastructure for interprocess communication with varying transparency and ease in developing distributed applications. We need a pair of sockets for bidirectional communication. RPC and RMI offer higher-level abstractions to interprocess communication than sockets. However, RPC and RMI require marshaling and unmarshalling of data for interprocess transmission. They work like interprocess function calls. XML-RPC is a cross-platform language-independent tool for RPC. It uses HTTP as the transport vehicle for process communication. Message passing may be synchronous or asynchronous. It allows a great deal of flexibility in interprocess communication. Message passing is implemented through libraries. Therefore, programmers find it easy to use such tools for concurrent programs.

Full Text
Published version (Free)

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call