Professional Documents
Culture Documents
DC 1
DC 1
Distributed Computing
Anil Kumar Ghadiyaram
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
ganilkumar@wilp.bits-pilani.ac.in
IMP Note to Self
START RECORDING
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 2 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
IMP Note to Students
● It is important to know that just login to the session does not guarantee the
attendance.
● Once you join the session, continue till the end to consider you as present in
the class.
● IMPORTANTLY, you need to make the class more interactive by responding
to Professors queries in the session.
● Whenever Professor calls your number / name ,you need to respond,
otherwise it will be considered as ABSENT
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 3 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
BITS Pilani
Pilani | Dubai | Goa | Hyderabad
Contact Session – 1
M1 - Introduction to Distributed Computing
References : T1 (Chap.1)
Text and References
R1 Kai Hwang, Geoffrey C. Fox, and Jack J. Dongarra, “Distributed and Cloud
Computing: From Parallel processing to the Internet of Things”, Morgan Kaufmann,
2012 Elsevier Inc.
R2 John F. Buford, Heather Yu, and Eng K. Lua, “P2P Networking and Applications”,
Morgan Kaufmann, 2009 Elsevier Inc.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 5 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Course Outline
• Introduction to Distribution
• Introduction to Distribution Computing/ Procesing
• Introduction to Distribution of Data
• Briefing of Course Handout
• Real life examples
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 6 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Massively Multiplayer Online Games
• Player's login from different parts of the world into a single virtual world
• Different physical times
– Logical clocks (S2)
• Consistent view of the virtual world
– Global state (S3 & S4)
• Player communication
– Causal ordering in group communication (S5)
• Send broadcasts on the network, placement of game servers
– Distributed graph algos (S6)
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 7 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Massively Multiplayer Online Games
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 8 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Module Details
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 9 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Module Details
References : T1 (Chap.1)
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 10 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Topics for today
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 11 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Topics for today
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 12 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
DISTRIBUTED COMPUTING
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 13 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
DISTRIBUTED COMPUTING
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 15 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
RELATION TO COMPUTER SYSTEM COMPONENTS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 16 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
RELATION TO COMPUTER SYSTEM COMPONENTS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 17 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
RELATION TO COMPUTER SYSTEM COMPONENTS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 18 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
RELATION TO COMPUTER SYSTEM COMPONENTS
Complex application directly on network stack has Easier programming where complexity is handled in
to solve distributed computing problems distributed middleware / os services
Networking OS Distributed OS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 19 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Examples of Distributed Systems
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 20 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Topics for today
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 21 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MOTIVATION
The motivation for using a distributed system is some or all of the following
requirements:
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 22 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MOTIVATION
2. Resource sharing
• Resources such as peripherals, complete data sets in databases, special libraries, as
well as data (variable/files) cannot be fully replicated at all the sites because it is
often neither practical nor cost-effective.
• Further, they cannot be placed at a single site because access to that site might
prove to be a bottleneck. Therefore, such resources are typically distributed across
the system.
• For example, distributed databases such as DB2 partition the data sets across
several servers, in addition to replicating them at a few sites for rapid access as well
as reliability.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 23 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MOTIVATION
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 24 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MOTIVATION
4. Enhanced reliability
• A distributed system has the inherent potential to provide increased reliability
because of the possibility of replicating resources and executions, as well as the
reality that geographically distributed resources are not likely to crash or
malfunction at the same time under normal circumstances.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 25 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MOTIVATION
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 26 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MOTIVATION
6. Scalability
• As the processors are usually connected by a wide-area network, adding more
processors does not pose a direct bottleneck for the communication network.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 27 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example Distributed System : Netflix
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 28 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Example Distributed System : Netflix
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 29 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Topics for today
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 30 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
PARALLEL SYSTEMS
1. A multiprocessor system
2. A multicomputer parallel system
3. Array processors
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 31 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTIPROCESSOR SYSTEMS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 32 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTIPROCESSOR SYSTEMS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 33 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTIPROCESSOR SYSTEMS
• All the processors usually run the same operating system, and both the hardware
and software are very tightly coupled.
• The processors are usually of the same type, and are housed within the same
box/container with a shared memory.
• The interconnection network to access the memory may be a bus, although for
greater efficiency, it is usually a multistage switch with a symmetric and regular
design.
• There are two popular interconnection networks
1. The Omega network and
2. The Butterfly network
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 34 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTIPROCESSOR SYSTEMS
• Two popular interconnection networks – the Omega network and the Butterfly
network , each of which is a multi-stage network formed of 2×2 switching elements.
• Each 2×2 switch allows data on either of the two input wires to be switched to the
upper or the lower output wire.
• In a single step, however, only one data unit can be sent on an output wire. So if the
data from both the input wires is to be routed to the same output wire in a single
step, there is a collision.
• Various techniques such as buffering or more elaborate interconnection designs can
address collisions.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 35 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTIPROCESSOR SYSTEMS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 36 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTIPROCESSOR SYSTEMS
Interconnection Networks
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 37 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTICOMPUTER PARALLEL SYSTEM
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 38 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTICOMPUTER PARALLEL SYSTEM
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 39 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTICOMPUTER PARALLEL SYSTEM
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 40 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MULTICOMPUTER PARALLEL SYSTEM
Four-dimensional hypercube.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 41 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ARRAY PROCESSORS
• Array processors belong to a class of parallel computers that are physically co-
located, are very tightly coupled, and have a common system clock (but may not
share memory and communicate by passing data using messages).
• Array processors and systolic arrays that perform tightly synchronized processing
and data exchange in lock-step for applications such as DSP and image processing
belong to this category.
• These applications usually involve a large number of iterations on the data.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 42 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
ARRAY PROCESSORS
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 43 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Flynn’s Taxonomy
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 44 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Some basic concepts
• Coupling
– Tight - SIMD, MISD shared memory systems
– Loose - NOW, distributed systems, no shared memory
• Speedup
– how much faster can a program run when given N processors as opposed to 1 processor — T(N) / T(1)
– Optional reading: Amdahl’s Law, Gustafson’s Law
• Parallelism / Concurrency of program
– Compare time spent in computations to time spent for communication via shared memory or message
passing
• Granularity
– Average number of compute instructions before communication is needed across processors
• Note:
– Coarse granularity —> Distributed systems else use tightly coupled multi-processors/computers
– High concurrency doesn’t lead to high speedup if granularity is too small leading to high overheads
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 45 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Topics for today
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 46 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
REMOTE PROCEDURE CALL (RPC)
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 47 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
REMOTE PROCEDURE CALL (RPC)
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 48 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
REMOTE PROCEDURE CALL (RPC)
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 49 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
MESSAGE QUEUEING
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 50 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
PUBLISH–SUBSCRIBE PATTERN
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 51 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
PUBLISH–SUBSCRIBE PATTERN
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 52 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
PUBLISH–SUBSCRIBE PATTERN
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 53 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
PUBLISH–SUBSCRIBE PATTERN
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 54 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Topics for today
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 55 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
DESIGN ISSUES AND CHALLENGES
The following functions must be addressed when designing and building a distributed system:
Communication
• This task involves designing appropriate mechanisms for communication among the processes in the
network. Some example mechanisms are: remote procedure call (RPC), remote object invocation
(ROI), message-oriented communication versus stream-oriented communication.
Processes
• Some of the issues involved are: management of processes and threads at clients/servers; code
migration; and the design of software and mobile agents.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 56 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
DESIGN ISSUES AND CHALLENGES
Naming
• 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.
Synchronization
• Synchronization Mechanisms for synchronization or coordination among the processes are essential.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 57 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
DESIGN ISSUES AND CHALLENGES
Fault tolerance
• Fault tolerance requires maintaining correct and efficient operation in spite of any failures of links,
nodes, and processes
Security
• Distributed systems security involves various aspects of cryptography, secure channels, access
control, key management – generation and distribution, authorization, and secure group
management.
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 58 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
DESIGN ISSUES AND CHALLENGES
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 59 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
NEW APPLICATIONS POSE NEW CHALLENGES
• Mobile networks
– distributed graph algorithms
• Sensor networks collecting and transmitting physical parameters
– large volume streaming, algorithms for location estimation
• Ubiquitous or Pervasive computing where processors are embedded everywhere to perform
application functions e.g. smart homes
– groups of wireless sensors/actuators connected to Cloud backend
• Peer-to-peer e.g. gaming, content distribution
– object storage/lookup/retrieval/replication, self-organising networks, privacy
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 60 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
NEW APPLICATIONS POSE NEW CHALLENGES
• Publish-subscribe e.g. movie streaming, online trading markets - receive only data of interest
– data streaming systems and filtering / matching algorithms
• Distributed agents or robots e.g. in mobile computing
– swarm algorithms, coordination among agents (like an ant colony)
• Distributed data mining
– e.g. user profiling - Data is spread in many repositories
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 61 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Topics for today
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 62 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
SUMMARY AND ADDITIONAL READING
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 63 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
Next Session
Logical Time :
– How do we logically correlate time across distributed machines with no common
clock
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 64 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956
THANK YOU
SSWT ZG526 - Distributed Computing Dt: 16th April 2023 65 BITS Pilani, Deemed to be University under Section 3 of UGC Act, 1956