1 of 63

UNIT-4

Distributed Shared Memory:

  • Introduction
  • Consistency Models
  • Page-based Distributed shared memory
  • Shared- variable Distributed shared memory
  • Object-based Distributed shared memory.

2 of 63

�� 4.1 Distributed Shared Memory Introduction

  • 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. Which have no physically shared memory.

3 of 63

4 of 63

Example

5 of 63

Distributed Shared Memory(DSM) 

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.

6 of 63

7 of 63

  • 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.

8 of 63

Types of Distributed Shared Memory

Distributed shared memory(DSM) can be classified as:

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

9 of 63

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.

10 of 63

11 of 63

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.

12 of 63

13 of 63

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 centralized memory.
  • These are also known as moments.

14 of 63

15 of 63

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 inter cluster bus.
  • From the figure, every intersection is a tiny electronic crosspoint switch that can be opened and closed to transfer data.

16 of 63

17 of 63

18 of 63

19 of 63

Application of Distributed Shared Memory

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

20 of 63

21 of 63

22 of 63

23 of 63

24 of 63

25 of 63

4.2 Consistency Models

26 of 63

27 of 63

28 of 63

29 of 63

30 of 63

31 of 63

32 of 63

33 of 63

34 of 63

35 of 63

36 of 63

37 of 63

4.3 Page-based Distributed shared memory

38 of 63

39 of 63

40 of 63

41 of 63

42 of 63

43 of 63

44 of 63

45 of 63

46 of 63

47 of 63

48 of 63

49 of 63

50 of 63

51 of 63

�4.4 Shared- variable Distributed shared memory

52 of 63

53 of 63

54 of 63

55 of 63

56 of 63

57 of 63

�5.5 Object-based Distributed shared memory

58 of 63

59 of 63

60 of 63

61 of 63

62 of 63

63 of 63