Open In App

What is Distributed Shared Memory and its Advantages?

Last Updated : 15 Oct, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Distributed shared memory can be achieved via both software and hardware. Hardware examples include cache coherence circuits and network interface controllers. In contrast, software DSM systems implemented at the library or language level are not transparent and developers usually have to program them differently.

What is Distributed Shared Memory?

It is a mechanism that manages memory across multiple nodes and makes inter-process communications transparent to end-users. The applications will think that they are running on shared memory. DSM is a mechanism of allowing user processes to access shared data without using inter-process communications. In DSM every node has its own memory and provides memory read and write services and it provides consistency protocols. The distributed shared memory (DSM) implements the shared memory model in distributed systems but it doesn't have physical shared memory. All the nodes share the virtual address space provided by the shared memory model. The Data moves between the main memories of different nodes.

Distributed Shared Memory

Types of Distributed Shared Memory

1. On-Chip Memory

  • The data is present in the CPU portion of the chip.
  • Memory is directly connected to address lines.
  • On-Chip Memory DSM is expensive and complex.

2. Bus-Based Multiprocessors

  • A set of parallel wires called a bus acts as a connection between CPU and memory.
  • Accessing of same memory simultaneously by multiple CPUs is prevented by using some algorithms.
  • Cache memory is used to reduce network traffic.

3. Ring-Based Multiprocessors

  • There is no global centralized memory present in Ring-based DSM.
  • All nodes are connected via a token passing ring.
  • In ring-bases DSM a single address line is divided into the shared area.

Advantages of Distributed Shared Memory

  • Simpler Abstraction: Programmer need not concern about data movement, as the address space is the same it is easier to implement than RPC.
  • Easier Portability: The access protocols used in DSM allow for a natural transition from sequential to distributed systems. DSM programs are portable as they use a common programming interface.
  • Locality of Data: Data moved in large blocks i.e. data near to the current memory location that is being fetched, may be needed future so it will be also fetched.
  • On-Demand Data Movement: It provided by DSM will eliminate the data exchange phase.
  • Larger Memory Space: It provides large virtual memory space, the total memory size is the sum of the memory size of all the nodes, paging activities are reduced.
  • Better Performance: DSM improve performance and efficiency by speeding up access to data.
  • Flexible Communication Environment: They can join and leave DSM system without affecting the others as there is no need for sender and receiver to existing,
  • Process Migration Simplified: They all share the address space so one process can easily be moved to a different machine.

Disadvantages of Distributed Shared Memory

  • Accessibility: The data access is slow in DSM as compare to non-distributed.
  • Consistency: When programming is done in DSM systems, programmers need to maintain consistency.
  • Message Passing: DSM use asynchronous message passing and is not efficient as per other message passing implementation.
  • Data Redundancy: DSM allows simultaneous access to data, consistency and data redundancy is common disadvantage.
  • Lower Performance: CPU gets slowed down, even cache memory does not aid the situation.

Conclusion

Distributed shared memory is the concept used in distributed applications to improve performance and resource sharing. The architecture addresses all the issues related to distributed applications. DSM enables user to focus on application logic rather than management of distributed application. This article helps you to understand DSM architecture, its pros and cons as well.


Next Article

Similar Reads