0% found this document useful (0 votes)
88 views7 pages

Data Shared System (DSM)

Distributed shared memory (DSM) is a mechanism that manages memory across multiple nodes and makes inter-process communication transparent to users. Each node has its own local memory but they share a virtual address space. Data moves between nodes' main memories. DSM provides simpler abstraction and portability compared to message passing. It allows for locality of data and on-demand data movement. The total memory size is the sum of all nodes' sizes, reducing paging activities.

Uploaded by

venmathimsc482
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views7 pages

Data Shared System (DSM)

Distributed shared memory (DSM) is a mechanism that manages memory across multiple nodes and makes inter-process communication transparent to users. Each node has its own local memory but they share a virtual address space. Data moves between nodes' main memories. DSM provides simpler abstraction and portability compared to message passing. It allows for locality of data and on-demand data movement. The total memory size is the sum of all nodes' sizes, reducing paging activities.

Uploaded by

venmathimsc482
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

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.
Types of Distributed shared memory

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

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

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 Private address space is associated with the processes whic
the processes. prevents the occurrence of errors.

Processes cannot run simultaneously. Processes may run at the same time.

Shared memory is the memory block that can be accessed by more than one
program. A shared memory concept is used to provide a way of communication and
provide less redundant memory management.
Distributed Shared Memory abbreviated as DSM is the implementation of shared
memory concept in distributed systems. The DSM system implements the shared
memory models in loosely coupled systems that are deprived of a local physical shared
memory in the system. In this type of system distributed shared memory provides a
virtual memory space that is accessible by all the system (also known as nodes) of the
distributed hierarchy.
Some common challenges that are to be kept in mind while the implementation of DSM

 Tracking of the memory address (location) of data stored remotely in shared
memory.
 To reduce the communication delays and high overhead associated with the
references to remote data.

 Controlling the concurrent access of the data shared in DSM.


Based on these challenges there are algorithms designed to implement distributed
shared memory. There are four algorithms −

 Central Server Algorithm


 Migration Algorithm
 Read Replication Algorithm
 Full Replication Algorithm

Central Server Algorithm


All shared data is maintained by the central server. Other nodes of the
distributed system request for reading and writing data to the server which serves
the request and updates or provides access to the data along with acknowledgment
messages.
These acknowledgment messages are used to provide the status of the data
request is served by the server. When the data is sent to the calling function, it
acknowledges a number that shows the access sequence of the data to maintain
concurrency. And time-out is returned in case of failure.
For larger distributed systems, there can be more than one server. In this case, the
servers are located using their address or using mapping functions.

Migration Algorithm
As the name suggest the migration algorithm does the work of migration of data
elements. Instead of using a central server serving each request, the block containing
the data requested by a system is migrated to it for further access and processing. It
migrates the data on request.
This algorithm though is good if when a system accesses the same block of data
multiple times and the ability to integrate virtual memory concept, has some
shortcomings that are needed to be addressed.
Only one node is able to access the shared data element at a time and the whole
block is migrated to that node. Also, this algorithm is more prone to thrashing due to
the migration of data items upon request by the node.

Read Replication Algorithm


In the read replication algorithm, the data block that is to be accessed
is replicated and only reading is allowed in all the copies. If a write operation is to be
done, then all read access is put on halt till all the copies are updated.
Overall system performance is improved as concurrent access is allowed. But
write operation is expensive due to the requirement of updating all blocks that are
shared to maintain concurrency. All copies of data element are to be tracked to
maintain consistency.

Full Replication Algorithm


An extension to read the replication algorithm allowing the nodes to perform
both read and write operation on the shared block of concurrently. But this access of
nodes is controlled to maintain its consistency.
To maintain consistency of data on concurrent access of all nodes sequence is
maintained and after every modification that is made in the data a multicast with
modifications is reflected all the data copies.
Types of Distributed shared memory
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.
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.
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.
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.

You might also like