Professional Documents
Culture Documents
Definition
A collection of independent computers that appears to the users of the system as a single coherent
computer.
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 SIMD 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.
Multiple instruction, multiple data stream(MIMD)
Coupling
The degree of coupling among a set of modules, whether hardware or software, is measured in terms of
the interdependency and binding and/or homogeneity among the modules.
This is a measure of the relative speedup of a specific program, on a given machine. The speedup depends
on the number of processors and the mapping of the code to the processors. It is expressed as the ratio of
the time T(1) with a single processor, to the time T with n processors.
Concurrency of a program
The parallelism/concurrency in a parallel/distributed program can be measured by the ratio of the number
of local (non-communication and non-shared memory access) operations to the total number of
operations, including the communication or shared memory access operations.
Granularity of a program
The ratio of the amount of computation to the amount of communication within the parallel/distributed
program is termed as granularity.
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.
Heterogeneity
Openness
Security
Scalability
Failure Handling
Concurrency
Transparency
Heterogeneity
Heterogeneity means diversity of the distributed systems in terms of hardware, software platform etc.
Heterogeneity and mobile code : The term mobile code is used to refer to program code that can be
transferred from one computer to another and run at the destination – Java applets are an example.
Openness
Scalability
A system is described as scalable if it will remain effective when there is a significant increase in the
number of resources and the number of users.
The design of scalable distributed systems presents the following challenges.
o Controlling the cost of resources.
o Controlling the performance loss.
o Avoiding performance bottlenecks.
Scalability has 3 dimensions:
Size: Number of users and resources to be processed.
Geography: Distance between users and resources.
Administration: As the size of distributed systems increases, many of the system need to be controlled.
Failure Handling
Failure Handling is difficult in distributed system because failure is partial i.e. some components fail
while other continue to function.
Techniques for dealing with failures:
Detecting Failures –Not all failures are detected but some of the failures can be detected. For example:
Corrupted data from file is detected by using checksum.
Mask Failures – failure are hidden or made less severe. For example: Messages are retransmitted.
Tolerating Failures-In the internet, client can be designed to tolerate failures.
Recover from failures – if a server crashes roll back to previous state
Redundancy –Services can be made to tolerate failures. For example: A database can be replicated in
several server.
Concurrency
Distributed systems is usually multi-users environment.
Several clients will access a shared resource at the same time.
Transparency:
Transparency is defined as the concealment from the user.
Distributed systems designers must hide the details of the distributed systems resources.
Some of the transparency in distributed systems are:
1.Communication
This task involves designing suitable communication mechanisms among the various processes in the
networks.
Examples: RPC, RMI
2. Processes
The main challenges involved are: process and thread management at both client and server environments,
migration of code between systems, design of software and mobile agents.
3. Naming
Devising easy to use and robust schemes for names, identifiers, and addresses is essential for locating
resources and processes in a transparent and scalable manner.
4. Synchronization
Mutual exclusion, leader election, deploying physical clocks, global state recording are some
synchronization mechanisms.
7. Fault tolerance
This requires maintenance of fail proof links, nodes, and processes.
Some of the common fault tolerant techniques are resilience, reliable communication, distributed
commit, checkpointing and recovery, agreement and consensus, failure detection, and self-
stabilization.
8. Security
Cryptography, secure channels, access control, key management-generation and distribution,
authorization, and secure group management are some of the security measure that is imposed on
distributed systems.
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.
Causal message ordering is a partial ordering of messages in a distributed computing environment. It is the
delivery of messages to a process in the order in which they were transmitted to that process.
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:
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
Logical clock
Logical clocks are based on capturing chronological and causal relationships of processes and ordering
events based on these relationships.
Scalar clock
Vector clock
Matrix clock
Scalar clock
Scalar time is designed by Lamport to synchronize all the events in distributed systems.
A Lamport logical clock is an incrementing counter maintained in each process.
When a process receives a message, it resynchronizes its logical clock with that sender maintaining
causal relationship.
1.Consistency property:
Scalar clock always satisfies monotonicity. C(ei) < C(ej)
2. Total Reordering:
Scalar clocks order the events in distributed systems.But all the events do not follow a common identical
timestamp. Hence a tie breaking mechanism is essential to order the events. The tie breaking is done
through:
3. Event Counting
Vector clock
Each time a process sends a message, it includes a copy of its own (incremented) vector in the
message.
Each time a process receives a message, it increments its own counter in the vector by one and
updates each element in its vector by
Basic Properties of Vector Clock
1. Isomorphism:
If events in a distributed system are timestamped using a system of vector clocks, we have
the following property.
If two events x and y have timestamps vh and vk, respectively, then
2. Strong consistency
The system of vector clocks is strongly consistent; thus, by examining the vector timestamp of two
events, we can determine if the events are causally related.
3. Event Counting
Fowler–Zwaenepoel direct dependency technique reduces the size of messages by transmitting only a
scalar value in the messages.
How NTP is adopted in physical time synchronization? (or) Discuss about NTP.
Clock synchronization
Clock synchronization is the process of ensuring that physically distributed processors have a common
notion of time.
Basic terminologies
Time: The time of a clock in a machine p is given by the function Cp(t),where Cp(t)= t for a perfect clock.
Offset: Clock offset is the difference between the time reported by a clock and the real time.
Skew: clock skew is defined as the difference between the times on two clocks.
Clock Drift rate: clock drift rate is the difference in precision between a reference clock and physical clock.
Clocking Inaccuracies
Physical clocks are synchronized to an accurate real-time standard like UTC (Universal Coordinated
Time).
Due to the clock inaccuracy, a timer (clock) is said to be working within its specification if:
The Network time Protocol(NTP) which is widely used for clock synchronization on the internet.
NTP is designed as a hierarchical tree of time servers.
The primary sever at the root synchronizes with the UTC.
The next level contains secondary servers, which act as a backup to the primary server.
At the lowest level is the synchronization subnet which has the clients.
Source node cannot accurately estimate the local time on the target node due to varying message
or network delays between the nodes.
Figure shows how NTP timestamps are numbered and exchanged between peers A and B.
Let T1,T2,T3,T4 be the values of the four most recent timestamps .
Assume clocks A and B are stable and running at the same speed.
Let a = T1 − T3 and b = T2 − T4.
If the network delay difference from A to B and from B to A, called differential delay, is small, the
clock offset θ and roundtrip delay δ of B relative to A at time T4 are approximately given by
Clock offset θ= (T1-T3) +(T2-T4)/2
*************************************