Question

In: Computer Science

What are the pros and cons of data exchange using pipes/sockets vs data exchange using shared...

  1. What are the pros and cons of data exchange using pipes/sockets vs data exchange using shared memory.

Solutions

Expert Solution

Inter-Process communication can take place via pipes, sockets or shared memory.

A pipe is a unidirectional communication mechanism that permits serial transfer of bytes from the writing process to the reading process. Typically, a pipe is used for communication between two threads of a process or between a parent and child process.

A socket is a bidirectional communication mechanism that can be used to communicate with another process on the same machine or on a different machine.

Shared memory allows two or more processes to access the same memory region, which is mapped onto the address space of all participating processes.

Pros and cons are listed below:

Pipes, Sockets

Simple and controlled. Can be extended to network sockets as necessary with little or no modification. Programming model requires serialization, which in turn requires you to think about what data actually gets transferred from A to B. Synchronization is necessarily built-in to the communication mechanism; no other synchronization necessary.

Shared Memory

Does not necessarily require a syscall (therefore potentially faster). Sharing does not explicitly require data to be transferred -- data can be made available that the recipient does not retrieve (bandwidth does not have to be wasted transferring data that the recipient won't use). No serialization/deserialization step means no time spent on communication overhead.


Related Solutions

What are the pros and cons of data exchange using pipes/sockets vs data exchange using shared...
What are the pros and cons of data exchange using pipes/sockets vs data exchange using shared memory.
What are the pros and cons of using monoclonal antibodies vs polyclonal antibodies? If you had...
What are the pros and cons of using monoclonal antibodies vs polyclonal antibodies? If you had a protein expressed at low levels that you were trying to isolate, which would you use?
Discuss the pros and cons of qualitative vs. quantitative techniques in data collection.
Discuss the pros and cons of qualitative vs. quantitative techniques in data collection.
What are the pros and cons of using technology and quantitative data to trace, monitor, and...
What are the pros and cons of using technology and quantitative data to trace, monitor, and address human rights violations? Overall, do you think that the pros outweigh the cons or not? Why? Use specific examples from the slides and the book. Answer this prompt in at least two or three paragraphs, clearly stating your argument and supporting the argument with evidence.
Outline the pros and cons for rules vs discretion.
Outline the pros and cons for rules vs discretion.
what are the pros and cons of the systems vs. a project approach comparing to Salesforces...
what are the pros and cons of the systems vs. a project approach comparing to Salesforces enterprise management software? can you type the answer
What are the pros and cons of the organizational learning vs. professional learning as outlined in...
What are the pros and cons of the organizational learning vs. professional learning as outlined in the case? How can the two be kept complementary? Based on case 5 from Implementing Continuous Quality Improvement in Health Care
What is Taylor rule? What are pros and cons of using it?
What is Taylor rule? What are pros and cons of using it?
What are the pros and cons of each exchange rate regime? If a country uses a...
What are the pros and cons of each exchange rate regime? If a country uses a fixed exchange rate, what limitations are placed on its monetary policy or international capital flows (the Impossible Trinity)? Why? Do you think the US should remain on a flexible exchange rate system or move to a pegged system? If the latter, which currency should the US dollar be pegged to?
What are the pros and cons of using 98%confidence intervals?
What are the pros and cons of using 98%confidence intervals?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT