DSCC Unit 1 PDF
DSCC Unit 1 PDF
Definition - Relation to computer system components - Message-passing systems versus shared memory
systems - Primitives for distributed communication - Synchronous versus asynchronous executions. A model of
A distributed system is a collection of independent entities that cooperate to solve a problem that
A system is said to be a Parallel System in which multiple processor have direct access to shared memory
which forms a common address space.
Multiprocessor System
Omega network
Unlike the Omega network, the generation of the interconnection pattern between a pair of
adjacent stages depends not only on n but also on the stage number s.
The recursive expression is as follows. Let there be M = n/2 switches per stage, and
stage s ∈[ 0, log2n−1].
A multicomputer parallel system is a parallel system in which the multiple processors do not have direct
access to shared memory. The memory of the multiple processors may or may not form a common address
space. Such computers usually do not have a common clock.
Figure 5(a) shows a wrap-around 4×4 mesh. For a k×k mesh which will contain k2 processors, the maximum
path length between any two processors is 2k/2−1. Routing can be done along the Manhattan grid. Figure
5(b) shows a four-dimensional hypercube. A k-dimensional hypercube has 2k processor-and-memory units.
Each such unit is a node in the hypercube, and has a unique k-bit label. Each of the k dimensions is
associated with a bit position in the label.
Array processor
Array processor uses multiple synchronized arithmetic logic units to achieve spatial parallelism. It is
also called synchronous multiprocessor.
Multiprocessor system consists of several processors some of which may be I/O processors, common,
fast access data local store and common, slow access main store.
These components are interconnected by a common bus for carrying data and control information.
Flynn’s taxonomy
Flynn's taxonomy is a specific classification of parallel computer architectures that are based on the
number of concurrent instruction and data streams available in the architecture.
Flynn's taxonomy based on the number of instruction streams and data streams are the following
Single instruction, single data stream(SISD)
Multiple instruction, single data stream(MISD)
Single instruction, multiple data stream(SIMD)
Multiple instruction, multiple data stream(MIMD)
An MISD system is a multiprocessor machine capable of executing the different instruction on all the CPUs
but operating on same data set.
An SIMD system is a multiprocessor machine capable of executing the same instruction on all the CPUs but
operating on different data streams.
This allows multiple processes to read and write data to the message queue without being
connected to each other.
Messages are stored on the queue until their recipient retrieves them.
Message queues are quite useful for interprocess communication and are used by most operating
systems.
The shared memory is the memory that can be simultaneously accessed by multiple processes. This
is done so that the processes can communicate with each other.
Semaphores and monitors are common synchronization mechanisms on shared memory systems.
Explain primitives for distributed communication.
Message send and message receive communication primitives are done through Send() and
Receive(), respectively.
A Send primitive has two parameters: the destination and the buffer in the user space that holds
the data to be sent.
The Receive primitive also has two parameters: the source from which the data is to be received
and the user buffer into which the data is to be received.
There are two ways of sending data when the Send primitive is
Buffered: The standard option copies the data from the user buffer to the kernel buffer. The data later gets
copied from the kernel buffer onto the network.
Unbuffered: The data gets copied directly from the user buffer onto the network.
Sender and receiver can be blocking or non blocking.Three combinations are possible using blocking and
nonblocking
Bothe sender and receiver are blocked until the message is delivered.
Sender may continue on, the receiver is blocked until the requested message arrives.
In a non-blocking send and non-blocking receive, both the sender and receiver processes can continue
their execution without waiting for the message transfer to complete
Send Operations
Data is copied from user buffer to kernel buffer and sent over the network.
Control returns to the process after the data is copied to the receiver's system buffer
Control returns to the sender immediately after the data copy from user buffer to kernel buffer starts.
The process is blocked until the data is copied from the user's buffer to the kernel buffer
Control returns to the sender as soon as the data transfer from the user buffer to the kernel buffer
starts.
Receive Operations
1. Blocking Receive:
2. Non-Blocking Receive:
A non-blocking receive allows the process to request data and continue executing
Each channel acts as a FIFO message queue and message ordering is preserved by channel.
Non-FIFO (N-FIFO)
A channel acts like a set in which a sender process adds messages and receiver removes messages in
random order.
The “causal ordering” model is based on Lamport’s “happens before” relation. A system that supports
the causal ordering model satisfies the following property:
A Distributed Program
The distributed execution is depicted by a space–time diagram. Figure shows the space–time
diagram of a distributed execution involving three processes. A horizontal line represents the
progress of the process; a dot indicates an event; a slant arrow indicates a message transfer.
The execution of an event takes a finite amount of time. In this figure, for process p1, the
second event is a message send event, the third event is an internal event, and the fourth event
is a message receive event.
Synchronous
Asynchronous
Synchronous
The sender process blocks until the message has been received by the receiver process.
The sender process resumes after the receiver process has accepted the message.
The sender and the receiver processes must synchronize to exchange a message.
Asynchronous
It is non- blocking communication where the sender and the receiver do not
synchronize to exchange a message.
The sender process does not wait for the message to be delivered to the receiver process
Global state
The global state of a distributed system is a collection of the local states of the processes and the
channels.
The state of a process at any time is defined by the contents of processor, registers, stacks, local
memory, etc.
The state of a channel is given by the set of messages in transit in the channel.
Distributed Garbage Collection refers to the process of reclaiming memory occupied by objects that are no
longer needed in a distributed system.
Distributed deadlock detection is the process of identifying deadlocks in a distributed system. A deadlock occurs
when a group of processes is waiting for resources held by other processes, forming a cyclic dependency that
prevents further progress.
Distributed Debugging
Distributed Debugging refers to the process of identifying and resolving issues in a distributed system, where
multiple independent processes or nodes work together.
In the space–time diagram of a distributed computation, a zigzag line joining one arbitrary point on each
process line is termed a cut in the computation.
The set of events in the distributed computation is divided into a PAST and a FUTURE.
The PAST contains all the events to the left of the cut and the FUTURE contains all the events to the right
of the cut.
Consistent cut
A consistent global state corresponds to a cut in which every message received in the PAST of the cut was
sent in the PAST of that cut. Such a cut is known as a consistent cut.
Inconsistent cut
A cut is inconsistent if a message crosses the cut from the FUTURE to the PAST.