0% found this document useful (0 votes)
7 views

UNIT - V (Distributed System) Class1

Uploaded by

Tamil Arasan
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

UNIT - V (Distributed System) Class1

Uploaded by

Tamil Arasan
Copyright
© © All Rights Reserved
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

UNIT - V

P2P &
DISTRIBUTED
SHARED MEMORY
Peer-to-peer computing
Introduction
• Peer-to-peer (P2P) computing is a
distributed application architecture
that partitions tasks or workloads
between peers.
• Peers are equally
privileged, equipotent participants
in the network.
• They are said to form a peer-to-peer
network of nodes.
• A peer-to-peer system is a computer
network which enables peers to
share the network resources,
computational power and data
storage, without relying on a central
authority.
Overlay graphs: Introduction
• An overlay network is a communication network constructed on top of

an another communication network.

• The nodes of the overlay network are interconnected with logical

connections, which form an overlay topology.


Data indexing and overlays
• Data identified by indexing, which allows physical data independence
from apps.
• Centralized indexing-central index architecture organized around clusters
of servers that store direct indices of the files in the system.
• Distributed indexing- Indexes to data scattered across peers. Access data
through mechanisms such as Distributed Hash Tables (DHT).
• Local indexing- Each peer indexes only the local objects. Remote objects
need to be searched for. Used commonly in unstructured overlays (E.g.,
Gnutella) along with flooding search or random walk search.
Another classification:
• Semantic indexing- human readable, e.g., filename, keyword, database
key. Supports keyword searches, range searches, approximate searches.
• Semantic-free indexing- Not human readable. Corresponds to index
obtained by use of hash function.
Chord
• Chord is a protocol and algorithm for a peer-to-peer distributed hash
table.
• A distributed hash table stores key-value pairs by assigning keys to
different computers (known as “nodes”); a node will store the values
for all the keys for which it is responsible.
• Chord specifies how keys are assigned to nodes, and how a node can
discover the value for a given key by first locating the node responsible
for that key.
• Node address as well as object value is mapped to a logical identifier in
a common flat key space using a consistent hash function.
• When a node joins or leaves the network of n nodes, only 1/n keys have
to moved.
• Two steps involved:
I. Map the object value to its key
II. Map the key to the node in the
native address space using
lookup
• Common address space is a
m-bit identifier , and this
space is arranged on a logical
ring mod(2m).
• A key k gets assigned to the
first node such that the node
identifier equals or is greater
than the key identifier k in the
logical space address.
Content addressable networks
• A content-addressable network (CAN) is scalable indexing mechanism

that maps objects to their locations in the network.

• CAN support basic hash table operations on key-value pairs (K,V): insert,

search , delete.

• CAN is composed of individual nodes and each node stores a chunk

(zone) of the hash table.

• CAN is a logical d-dimensional Cartesian coordinate space organized as a

d-torus logical topology, i.e., a virtual overlay d-dimensional mesh with

wrap-around.
• The (k, v) pair is stored at the node that is presently assigned the

region that contains the point p. This means the (k, v) pair is

stored at node i if presently the point p corresponding to (k, v) lies

in region (r, i).

• The three core components of a CAN design are the following:

• 1. Setting up the CAN virtual coordinate space, and partitioning it

among the nodes as they join the CAN.

• 2. Routing in the virtual coordinate space to locate the node that is

assigned the region containing p.

• 3. Maintaining the CAN due to node departures and failures.


Tapestry
• Tapestry is a decentralized distributed system.

• It is an overlay network that implements simple key-based routing.

• Tapestry is a peer-to-peer overlay network which provides a distributed

hash table, routing, and multicasting infrastructure for distributed

applications.

• The Tapestry peer-to-peer system offers efficient, scalable, self-repairing,

location-aware routing to nearby resources.

• Routing and overlay are the terms coined for looking objects and nodes in

any distributed system.


Routing overlays in Tapestry :

•Tapestry implements Distributed Hash Table (DHT) and routes the

messages to the nodes based on GUID associated with resources through

prefix routing.

• Publish (Globally Unique ID-GUID) primitive is issued by the nodes to

make the network aware of its possession of resource.

•Replicated resources also use the same publish primitive with same GUID.

This results in multiple routing entries for the same GUID.

•This offers an advantage that the replica of objects is close to the frequent

users to avoid latency, network load, improve tolerance and host failures.
Distributed shared memory: Abstraction
and advantages
• Distributed Shared Memory is a resource management component of a

distributed operating system that implements the shared memory model in

distributed systems, which have no physically shared memory.

• The shared memory model provides a virtual address space that is shared

among all computers in a distributed system.

• It gives the impression of a single memory. Programmers access the data

across the network using only read and write primitives.

• To provide programmers with the illusion of a single shared address space,

a memory mapping management layer is required to manage the shared

virtual memory space.


Memory consistency models
• A memory consistency model is a set of rules which specify when a written

value by one thread can be read by another thread.

• The memory consistency model defines the set of allowable memory access

orderings.

Sequential Consistency:

• Sequential consistency requires that:

• 1. All instructions are executed in order.

• 2. Every write operation becomes instantaneously visible throughout the

system.
Casual Consistency:

•According to casual consistency model, only that Writes that are causally related
must be seen in that same order by all processors, whereas concurrent Writes may
be seen by different processors in different orders.

Models based on synchronization instructions:


•Synchronization instructions are like run-time library. The synchronization
statements across the various processors must satisfy the consistency conditions;
•i) Weak Consistency- The protocol is said to support weak consistency if:  All
accesses to synchronization variables are seen by all processes (or nodes, processors)
in the same order (sequentially)
•Accesses to critical sections are seen sequentially.

•All other accesses may be seen in different order on different processes (or nodes ,
processors).
•The set of both read and write operations in between different synchronization
operations is the same in each process.
ii) Release Consistency:
• The drawbacks of weak consistency are overcome by: 1. Ensuring that all locally
initiated Writes have been completed, i.e., propagated to all other processes.
• 2. Ensuring that all Writes from other machines have been locally reflected to
differentiate the entering and leaving of CS, release consistency provides acquire and
release operations.

iii) Entry Consistency:


• Entry consistency requires the programmer to use Acquire and Release at the start
and end of each CS, respectively.
• Entry consistency requires each ordinary shared variable to be associated with some
synchronization variable such as a lock or barrier. 
•When an Acquire is performed on a synchronization variable, only access to those
ordinary shared variables that are guarded by that synchronization variable is
regulated.
Shared memory Mutual Exclusion
• Shared Memory Mutual Exclusion model is implemented in operating systems
through semaphores monitors and atomically executable special purpose
hardware.

Lamport’s bakery algorithm


• Lamport proposed the classical bakery algorithm for n-process mutual
exclusion in shared memory systems.
• All process threads must take a number and wait their turn to use a shared
computing resource or to enter their critical section.
• The number can be any of the global variables, and processes with the lowest
number will be processed first.
• A process wanting to enter the critical section picks a token number.
• Processes enter the critical section in the increasing order of the token numbers.
Introduction to Cloud Computing
• Cloud computing is the emerging trend in the field of distributed computing. Cloud
plays an important role in huge organizations in maintaining huge data with limited
resources.
• Cloud also helps in resource sharing through some specific virtual machines provided by
the cloud service provider.
• The main character of cloud computing is in the virtualization, Distribution and
dynamically extendibility.
• A Distributed System consists of multiple autonomous computers that communicate
through a computer network. The computers interact with each other in order to achieve
a common goal.
• Distributed computing also refers to the use of distributed systems to solve
computational problems.
• In distributed computing, a problem is divided into many tasks, each of which is solved
by one or more computers.
• Cloud computing is often considered as merely a new application for classic distributed
systems.
• Cloud computing is a computing paradigm, where a large pool of systems are connected
in private or public networks, to provide dynamically scalable infrastructure for
application, data and file storage.

You might also like