What is Distributed shared memory and its advantages
DSM 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.
Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.
Types of Distributed shared 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.
- 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.
- 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.
Apart from the above-mentioned advantages, DSM has furthermore advantages like:
- Less expensive when compared to using a multiprocessor system.
- No bottlenecks in data access.
- Scalability i.e. Scales are pretty good with a large number of nodes.