Application of Distributed Shared Memory

Learn via video courses
Topics Covered

Overview

Distributed shared memory allows the end-user process to access shared data without using inter-process communication. The main purpose of DSM (Distributed shared memory) is to provide transparency between inter-process communication and end-users. In DSM, every node has its memory and has read and write services. All nodes share the virtual address space provided by the shared memory model.

What is Distributed Shared Memory?

DSM is a type of service that manages the memory across multiple nodes so that applications that are running will have the illusion that they are running on shared memory. DSM is used to make inter-process communication transparent to end-users. DSM is supported in hardware and software.

What is Distributed Shared Memory

Distributed Shared Memory(DSM) states that:

  • The variable is shared directly.
  • The process could cause errors by altering the data.

Each node in the DSM should have:

  • It's own memory.
  • Reading and Writing services.
  • Consistency protocols.

From the above figure, we can conclude that the shared memory is accessible to all, and each node has its memory, known as distributed memory. From the combination of shared and distributed memory, we get distributed shared memory.

Types of Distributed Shared Memory

Distributed shared memory(DSM) can be classified as:

  1. On-Chip Memory 1. Bus-Based Multiprocessors
  2. Ring-Based Multiprocessors
  3. Switched Multiprocessor

Now, we will talk about the above DSM types one-by-one in detail.

  1. On-Chip Memory:

    • The `CPU portion of the chip has data also.
    • The address lines are directly connected to the CPU memory so that memory can be accessed easily.
    • It is expensive.
    • Its construction is complicated.
    • It is widely used in automobiles, appliances, and toys. On-Chip Memory
  2. Bus-Based Multiprocessors:

    • In this, the multiprocessor, with its caches, is connected to the main memory through a shared bus.
    • The processor has its cache.
    • With the help of the cache, the network traffic is reduced.
    • To prevent the two CPUs from accessing the same memory simultaneously, we use different prevention algorithms.
    • From the fig, we can see only a single bus is there, so the bus becomes overloaded. Bus-Based Multiprocessors
  3. Ring-Based Multiprocessors

    • The single address space is divided into a private and a shared part.
    • The private part is further divided into regions so that each machine has its stack for unshared data.
    • The shared part is common to all.
    • Shared memory is divided into 32-bit units. It is a unit for transferring data between machines.
    • There is no global centralised memory.
    • These are also known as moments. Ring-Based Multiprocessors
  4. Switched Multiprocessor:

    • When we build multiprocessors with more than 64 processors.
    • Divide memory into modules and connect them to the CPU.
    • This is used to build a system as multiple clusters and connect clusters using an intercluster bus.
    • From the figure, every intersection is a tiny electronic crosspoint switch that can be opened and closed to transfer data. Switched Multiprocessor

Application of Distributed Shared Memory

  • For providing large virtual memory spaces to the nodes.
  • Handling large and complex databases.
  • Use in automobiles, appliances, and modern toys.
  • To reduce the main memory access time of nodes.
  • Reduce the amount of communication and increase the communication capacity.

Advantages of Distributed Shared Memory:

  • This provides a large virtual memory space.
  • It can handle large and `complex databases without sending data to the processor.
  • Protect programmers from receiving and sending primitives.
  • This is less expensive as compared to a multiprocessor system.
  • DSM scales when there are large nodes.
  • DSM programs are portable as they use a common interface.

Disadvantages of Distributed Shared Memory

  • When compared to non-distributed shared memory, distributed shared memory is slower to access.
  • The programmer needs to understand the consistency model to write the correct program.
  • It must protect against shared data, such as locks.
  • Performance is difficult in the case of irregular problems.
  • This could cause a `performance penalty.

Conclusion

Let's conclude our topic application of distributed shared memory.

  • DSM allows the end-user process to access shared data without using inter-process communication.
  • In DSM, every node has its memory and has read and write services.
  • DSM can provide transparency between communication and end-users and it is supported in hardware and software.
  • Distributed shared memory(DSM) can be classified as: On-Chip Memory, Bus-Based Multiprocessors, Ring-Based Multiprocessors, or Switched Multiprocessor.
  • Distributed shared memory provides a large virtual memory space.