0% found this document useful (0 votes)
23 views3 pages

Message Passing Vs Shared Memory

The document compares message passing and shared memory systems for inter-process communication. Message passing is suitable for distributed systems, offering better fault isolation but slower communication, while shared memory systems are faster and more efficient for tightly coupled systems but have higher risks of race conditions and consistency issues. Each method has its own advantages and limitations regarding scalability and design complexity.

Uploaded by

desika1636
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
23 views3 pages

Message Passing Vs Shared Memory

The document compares message passing and shared memory systems for inter-process communication. Message passing is suitable for distributed systems, offering better fault isolation but slower communication, while shared memory systems are faster and more efficient for tightly coupled systems but have higher risks of race conditions and consistency issues. Each method has its own advantages and limitations regarding scalability and design complexity.

Uploaded by

desika1636
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MESSAGE PASSING SYSTEM SHARED MEMORY SYSTEM

Processes communicate by sending Processes communicate by


and receiving messages reading/writing shared variables
directly.
No shared address space; each Common shared memory space is
process has separate memory accessible to all processes.
Good for distributed systems across Good for tightly coupled systems like
different machines. multi-core processors

Uses Send(), Receive(), RPC, RMI, Uses semaphores, mutexes, locks,


MPI, message queues. monitors for synchronization
Slower due to message copying, Faster communication because
buffering, network delay. memory is directly accessed.

Lower chance of race conditions. High chance of race conditions


without proper synchronization
Easier to design in distributed Hard to design in distributed systems
environments. due to consistency issues
High fault isolation; one process Low fault isolation; shared memory
failure doesn't affect others corruption may occur

Scales well across large networks Limited scalability due to memory


access conflicts.

You might also like