Javatpoint Logo
Javatpoint Logo

What is a distributed shared memory? And its advantages

A distributed shared memory (DSM) system is a collection of many nodes/computers which are connected through some network and all have their local memories. The DSM system manages the memory across all the nodes. All the nodes/computers transparently interconnect and process. The DSM also makes sure that all the nodes are accessing the virtual memory independently without any interference from other nodes. The DSM does not have any physical memory, instead, a virtual space address is shared among all the nodes, and the transfer of data occurs among them through the main memory.

What is a distributed shared memory

Let us now discuss some different types of Distributed shared memory:

  1. On-Chip Memory:
    1. All the data are stored in the CPU's chip.
    2. There is a direct connection between Memory and address lines.
    3. The On-Chip Memory DSM is very costly and complicated.
  2. Bus-Based Microprocessor
    1. The connection between the memory and the CPU is established through a number of parallel wires that acts as a bus.
    2. All the computer follows some protocols to access the memory, and an algorithm is implemented to prevent memory access by the systems at the same time.
    3. The network traffic is reduced by the cache memory.
  3. Ring-based Microprocessor
    1. In Ring-based DSM, there is no centralized memory present
    2. All the nodes are connected through some link/network, and accessing of memory is done by the token passing
    3. All the nodes/computers present in the shared area access a single address line in this system

Let us now see some advantages of Distributed Shared Memory system:

  1. Easy Abstraction - Since the address space is the same, data migration is not an issue for programmers, making it simpler to build than RPC.
  2. Easier Potability - Sequential to distributed system migration is made easy by the access protocols employed in DSM. Because they make use of a common programming interface, DSM programmes are portable.
  3. Locality of data - Data that is being fetched in large blocks, or data that is close to the memory address being fetched, may be needed in the future.
  4. Larger memory space - Large virtual memory space is provided, paging operations are decreased, and the total memory size is the sum of the memory sizes of all the nodes.
  5. Better Performance - It speeds up the data access in order to increase the performance of the system.
  6. Flexible communication Environment - There is no requirement for the sender and receiver to be present, thus they can join and leave the DSM system without influencing the others.
  7. Simplified process Migration - Since they all share the same address space, moving one process to a different computer is simple

Some more basic advantages of the distributed shared memory (DSM) system are listed below:

  1. It is less expensive than using multiprocessing systems
  2. Data access is done smoothly
  3. It provides better scalability as several nodes can access the memory.

Now let's see the disadvantages of the distributed shared memory:

  1. Accessing is faster in a non-distributed shared memory system than in a distributed system.
  2. Simultaneous access to data has always been a topic of discussion. It should ensure some additional protection to it.
  3. It generates some programmer control over the actual message
  4. In order to write correct programs, programmers must learn the consistency model
  5. It is not much efficient as the message-passing implementation as it uses the asynchronous message-passing implementations.

Difference between Message Passing and Distributed shared memory:

Distributed shared memory Message Passing
Variables are directly shared Variables are formalized.
Less cost of communication More Costs of communication
Errors may occur by altering the data by the processes. Private address space is associated with the processes which prevents the occurrence of errors.
Processes cannot run simultaneously. Processes may run at the same time.

Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA