SlideShare a Scribd company logo
Chapter 1: Introduction
Ajay Kshemkalyani and Mukesh Singhal
Distributed Computing: Principles, Algorithms, and Systems
Cambridge University Press
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 1 / 36
Distributed Computing: Principles, Algorithms, and Systems
Definition
Autonomous processors communicating over a communication network
Some characteristics
I No common physical clock
I No shared memory
I Geographical seperation
I Autonomy and heterogeneity
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 2 / 36
Distributed Computing: Principles, Algorithms, and Systems
Distributed System Model
M memory bank(s)
P
P
P P
P
P
P
M
M M
M
M
M M
Communication network
(WAN/ LAN)
P processor(s)
Figure 1.1: A distributed system connects processors by a communication network.
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 3 / 36
Distributed Computing: Principles, Algorithms, and Systems
Relation between Software Components
protocols
Operating
system
Distributed software
Network
protocol
stack
Transport layer
Data link layer
Application layer
(middleware libraries)
Network layer
Distributed application Extent of
distributed
Figure 1.2: Interaction of the software components at each process.
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 4 / 36
Distributed Computing: Principles, Algorithms, and Systems
Motivation for Distributed System
Inherently distributed computation
Resource sharing
Access to remote resources
Increased performance/cost ratio
Reliability
I availability, integrity, fault-tolerance
Scalability
Modularity and incremental expandability
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 5 / 36
Distributed Computing: Principles, Algorithms, and Systems
Parallel Systems
Multiprocessor systems (direct access to shared memory, UMA model)
I Interconnection network - bus, multi-stage sweitch
I E.g., Omega, Butterfly, Clos, Shuffle-exchange networks
I Interconnection generation function, routing function
Multicomputer parallel systems (no direct access to shared memory, NUMA
model)
I bus, ring, mesh (w w/o wraparound), hypercube topologies
I E.g., NYU Ultracomputer, CM* Conneciton Machine, IBM Blue gene
Array processors (colocated, tightly coupled, common system clock)
I Niche market, e.g., DSP applications
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 6 / 36
Distributed Computing: Principles, Algorithms, and Systems
UMA vs. NUMA Models
M memory
M
P P P
P
P
P M
M M
M
M
M M M M
P
P P P
Interconnection network Interconnection network
(a) (b)
P processor
Figure 1.3: Two standard architectures for parallel systems. (a) Uniform memory
access (UMA) multiprocessor system. (b) Non-uniform memory access (NUMA)
multiprocessor. In both architectures, the processors may locally cache data from
memory.
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 7 / 36
Distributed Computing: Principles, Algorithms, and Systems
Omega, Butterfly Interconnects
3−stage Butterfly network
101
110
111
100
111
110
100
011
010
000
001
P0
P1
P2
P3
P4
P6
P7
101
P5
000
001
M0
M1
010
011
100
101
110
111
M2
M3
M4
M5
M6
M7
000
001
010
011
M0
M1
M2
M3
M4
M5
M6
M7
110
111
011
010
000
001
100
101
P0
P1
P2
P3
P4
P5
P6
P7
(a) 3−stage Omega network (n=8, M=4) (b) (n=8, M=4)
Figure 1.4: Interconnection networks for shared memory multiprocessor systems.
(a) Omega network (b) Butterfly network.
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 8 / 36
Distributed Computing: Principles, Algorithms, and Systems
Omega Network
n processors, n memory banks
log n stages: with n/2 switches of size 2x2 in each stage
Interconnection function: Output i of a stage connected to input j of next
stage:
j =

2i for 0 ≤ i ≤ n/2 − 1
2i + 1 − n for n/2 ≤ i ≤ n − 1
Routing function: in any stage s at any switch:
to route to dest. j,
if s + 1th MSB of j = 0 then route on upper wire
else [s + 1th MSB of j = 1] then route on lower wire
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 9 / 36
Distributed Computing: Principles, Algorithms, and Systems
Interconnection Topologies for Multiprocesors
1101
0110
0100
0000
0001
0010
0111
0011
0101
(b)
(a)
processor + memory
1100
1000
1110
1010
1111
1011
1001
Figure 1.5: (a) 2-D Mesh with wraparound (a.k.a. torus) (b) 3-D hypercube
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 10 / 36
Distributed Computing: Principles, Algorithms, and Systems
Flynn’s Taxonomy
(c) MISD
D D D
I I I
I I
I I
I
I
C C C C
P P P P P
D D
P
C C
I instruction stream
D
P
Control Unit
Processing Unit
data stream
(a) SIMD (b) MIMD
Figure 1.6: SIMD, MISD, and MIMD modes.
SISD: Single Instruction Stream Single Data Stream (traditional)
SIMD: Single Instruction Stream Multiple Data Stream
I scientific applicaitons, applications on large arrays
I vector processors, systolic arrays, Pentium/SSE, DSP chips
MISD: Multiple Instruciton Stream Single Data Stream
I E.g., visualization
MIMD: Multiple Instruction Stream Multiple Data Stream
I distributed systems, vast majority of parallel systems
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 11 / 36
Distributed Computing: Principles, Algorithms, and Systems
Terminology
Coupling
I Interdependency/binding among modules, whether hardware or software (e.g.,
OS, middleware)
Parallelism: T(1)/T(n).
I Function of program and system
Concurrency of a program
I Measures productive CPU time vs. waiting for synchronization operations
Granularity of a program
I Amt. of computation vs. amt. of communication
I Fine-grained program suited for tightly-coupled system
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 12 / 36
Distributed Computing: Principles, Algorithms, and Systems
Message-passing vs. Shared Memory
Emulating MP over SM:
I Partition shared address space
I Send/Receive emulated by writing/reading from special mailbox per pair of
processes
Emulating SM over MP:
I Model each shared object as a process
I Write to shared object emulated by sending message to owner process for the
object
I Read from shared object emulated by sending query to owner of shared object
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 13 / 36
Distributed Computing: Principles, Algorithms, and Systems
Classification of Primitives (1)
Synchronous (send/receive)
I Handshake between sender and receiver
I Send completes when Receive completes
I Receive completes when data copied into buffer
Asynchronous (send)
I Control returns to process when data copied out of user-specified buffer
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 14 / 36
Distributed Computing: Principles, Algorithms, and Systems
Classification of Primitives (2)
Blocking (send/receive)
I Control returns to invoking process after processing of primitive (whether sync
or async) completes
Nonblocking (send/receive)
I Control returns to process immediately after invocation
I Send: even before data copied out of user buffer
I Receive: even before data may have arrived from sender
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 15 / 36
Distributed Computing: Principles, Algorithms, and Systems
Non-blocking Primitive
Send(X, destination, handlek ) //handlek is a return parameter
...
...
Wait(handle1, handle2, . . . , handlek , . . . , handlem) //Wait always blocks
Figure 1.7: A nonblocking send primitive. When the Wait call returns, at least
one of its parameters is posted.
Return parameter returns a system-generated handle
I Use later to check for status of completion of call
I Keep checking (loop or periodically) if handle has been posted
I Issue Wait(handle1, handle2, . . .) call with list of handles
I Wait call blocks until one of the stipulated handles is posted
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 16 / 36
Distributed Computing: Principles, Algorithms, and Systems
Blocking/nonblocking; Synchronous/asynchronous;
send/receive primities
S
Send
The completion of the previously initiated nonblocking operation
duration in which the process issuing send or receive primitive is blocked
primitive issued
primitive issued
Receive
Send
(c) blocking async. Send (d) nonblocking async. Send
S
W
R_C
P, S_C
R_C
P,
(b) nonblocking sync. Send, nonblocking Receive
(a) blocking sync. Send, blocking Receive
P,
S_C
P
R R_C
S_C
processing for completes
Receive
Process may issue to check completion of nonblocking operation
Wait
duration to copy data from or to user buffer
processing for completes
S S_C
process i
buffer_i
kernel_i
process j
buffer_j
kernel_j
S W W
W W
R
R
process i
buffer_i
kernel_i
S S_C W
W
Figure 1.8:Illustration of 4 send and 2 receive primitives
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 17 / 36
Distributed Computing: Principles, Algorithms, and Systems
Asynchronous Executions; Mesage-passing System
internal event send event receive event
P
P
P
P
0
1
2
3
m4
m1 m7
m3 m5
m6
m2
Figure 1.9: Asynchronous execution in a message-passing system
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 18 / 36
Distributed Computing: Principles, Algorithms, and Systems
Synchronous Executions: Message-passing System
round 3
P
P
P
P
3
2
0
1
round 1 round 2
Figure 1.10: Synchronous execution in a message-passing system
In any round/step/phase: (send | internal)∗
(receive | internal)∗
(1) Sync Execution(int k, n) //k rounds, n processes.
(2) for r = 1 to k do
(3) proc i sends msg to (i + 1) mod n and (i − 1) mod n;
(4) each proc i receives msg from (i + 1) mod n and (i − 1) mod n;
(5) compute app-specific function on received values.
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 19 / 36
Distributed Computing: Principles, Algorithms, and Systems
Synchronous vs. Asynchronous Executions (1)
Sync vs async processors; Sync vs async primitives
Sync vs async executions
Async execution
I No processor synchrony, no bound on drift rate of clocks
I Message delays finite but unbounded
I No bound on time for a step at a process
Sync execution
I Processors are synchronized; clock drift rate bounded
I Message delivery occurs in one logical step/round
I Known upper bound on time to execute a step at a process
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 20 / 36
Distributed Computing: Principles, Algorithms, and Systems
Synchronous vs. Asynchronous Executions (2)
Difficult to build a truly synchronous system; can simulate this abstraction
Virtual synchrony:
I async execution, processes synchronize as per application requirement;
I execute in rounds/steps
Emulations:
I Async program on sync system: trivial (A is special case of S)
I Sync program on async system: tool called synchronizer
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 21 / 36
Distributed Computing: Principles, Algorithms, and Systems
System Emulations
S−A
Asynchronous
message−passing(AMP)
Synchronous
shared memory (ASM)
Asynchronous Synchronous
shared memory (SSM)
message−passing (SMP)
SM−MP
MP−SM
SM−MP
MP−SM
A−S
S−A
A−S
Figure 1.11: Sync ↔ async, and shared memory ↔ msg-passing emulations
Assumption: failure-free system
System A emulated by system B:
I If not solvable in B, not solvable in A
I If solvable in A, solvable in B
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 22 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: System Perspective (1)
Communication mechanisms: E.g., Remote Procedure Call (RPC), remote
object invocation (ROI), message-oriented vs. stream-oriented
communication
Processes: Code migration, process/thread management at clients and
servers, design of software and mobile agents
Naming: Easy to use identifiers needed to locate resources and processes
transparently and scalably
Synchronization
Data storage and access
I Schemes for data storage, search, and lookup should be fast and scalable
across network
I Revisit file system design
Consistency and replication
I Replication for fast access, scalability, avoid bottlenecks
I Require consistency management among replicas
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 23 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: System Perspective (2)
Fault-tolerance: correct and efficient operation despite link, node, process
failures
Distributed systems security
I Secure channels, access control, key management (key generation and key
distribution), authorization, secure group management
Scalability and modularity of algorithms, data, services
Some experimental systems: Globe, Globus, Grid
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 24 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: System Perspective (3)
API for communications, services: ease of use
Transparency: hiding implementation policies from user
I Access: hide differences in data rep across systems, provide uniform operations
to access resources
I Location: locations of resources are transparent
I Migration: relocate resources without renaming
I Relocation: relocate resources as they are being accessed
I Replication: hide replication from the users
I Concurrency: mask the use of shared resources
I Failure: reliable and fault-tolerant operation
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 25 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (1)
Useful execution models and frameworks: to reason with and design correct
distributed programs
I Interleaving model
I Partial order model
I Input/Output automata
I Temporal Logic of Actions
Dynamic distributed graph algorithms and routing algorithms
I System topology: distributed graph, with only local neighborhood knowledge
I Graph algorithms: building blocks for group communication, data
dissemination, object location
I Algorithms need to deal with dynamically changing graphs
I Algorithm efficiency: also impacts resource consumption, latency, traffic,
congestion
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 26 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (2)
Time and global state
I 3D space, 1D time
I Physical time (clock) accuracy
I Logical time captures inter-process dependencies and tracks relative time
progression
I Global state observation: inherent distributed nature of system
I Concurrency measures: concurrency depends on program logic, execution
speeds within logical threads, communication speeds
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 27 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (3)
Synchronization/coordination mechanisms
I Physical clock synchronization: hardware drift needs correction
I Leader election: select a distinguished process, due to inherent symmetry
I Mutual exclusion: coordinate access to critical resources
I Distributed deadlock detection and resolution: need to observe global state;
avoid duplicate detection, unnecessary aborts
I Termination detection: global state of quiescence; no CPU processing and no
in-transit messages
I Garbage collection: Reclaim objects no longer pointed to by any process
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 28 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (4)
Group communication, multicast, and ordered message delivery
I Group: processes sharing a context, collaborating
I Multiple joins, leaves, fails
I Concurrent sends: semantics of delivery order
Monitoring distributed events and predicates
I Predicate: condition on global system state
I Debugging, environmental sensing, industrial process control, analyzing event
streams
Distributed program design and verification tools
Debugging distributed programs
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 29 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (5)
Data replication, consistency models, and caching
I Fast, scalable access;
I coordinate replica updates;
I optimize replica placement
World Wide Web design: caching, searching, scheduling
I Global scale distributed system; end-users
I Read-intensive; prefetching over caching
I Object search and navigation are resource-intensive
I User-perceived latency
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 30 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (6)
Distributed shared memory abstraction
I Wait-free algorithm design: process completes execution, irrespective of
actions of other processes, i.e., n − 1 fault-resilience
I Mutual exclusion
F Bakery algorithm, semaphores, based on atomic hardware primitives, fast
algorithms when contention-free access
I Register constructions
F Revisit assumptions about memory access
F What behavior under concurrent unrestricted access to memory?
Foundation for future architectures, decoupled with technology (semiconductor,
biocomputing, quantum . . .)
I Consistency models:
F coherence versus access cost trade-off
F Weaker models than strict consistency of uniprocessors
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 31 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (7)
Reliable and fault-tolerant distributed systems
I Consensus algorithms: processes reach agreement in spite of faults (under
various fault models)
I Replication and replica management
I Voting and quorum systems
I Distributed databases, commit: ACID properties
I Self-stabilizing systems: ”illegal” system state changes to ”legal” state;
requires built-in redundancy
I Checkpointing and recovery algorithms: roll back and restart from earlier
”saved” state
I Failure detectors:
F Difficult to distinguish a ”slow” process/message from a failed process/ never
sent message
F algorithms that ”suspect” a process as having failed and converge on a
determination of its up/down status
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 32 / 36
Distributed Computing: Principles, Algorithms, and Systems
Challenges: Algorithm/Design (8)
Load balancing: to reduce latency, increase throughput, dynamically. E.g.,
server farms
I Computation migration: relocate processes to redistribute workload
I Data migration: move data, based on access patterns
I Distributed scheduling: across processors
Real-time scheduling: difficult without global view, network delays make task
harder
Performance modeling and analysis: Network latency to access resources
must be reduced
I Metrics: theoretical measures for algorithms, practical measures for systems
I Measurement methodologies and tools
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 33 / 36
Distributed Computing: Principles, Algorithms, and Systems
Applications and Emerging Challenges (1)
Mobile systems
I Wireless communication: unit disk model; broadcast medium (MAC), power
management etc.
I CS perspective: routing, location management, channel allocation, localization
and position estimation, mobility management
I Base station model (cellular model)
I Ad-hoc network model (rich in distributed graph theory problems)
Sensor networks: Processor with electro-mechanical interface
Ubiquitous or pervasive computing
I Processors embedded in and seamlessly pervading environment
I Wireless sensor and actuator mechanisms; self-organizing; network-centric,
resource-constrained
I E.g., intelligent home, smart workplace
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 34 / 36
Distributed Computing: Principles, Algorithms, and Systems
Applications and Emerging Challenges (2)
Peer-to-peer computing
I No hierarchy; symmetric role; self-organizing; efficient object storage and
lookup;scalable; dynamic reconfig
Publish/subscribe, content distribution
I Filtering information to extract that of interest
Distributed agents
I Processes that move and cooperate to perform specific tasks; coordination,
controlling mobility, software design and interfaces
Distributed data mining
I Extract patterns/trends of interest
I Data not available in a single repository
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 35 / 36
Distributed Computing: Principles, Algorithms, and Systems
Applications and Emerging Challenges (3)
Grid computing
I Grid of shared computing resources; use idle CPU cycles
I Issues: scheduling, QOS guarantees, security of machines and jobs
Security
I Confidentiality, authentication, availability in a distributed setting
I Manage wireless, peer-to-peer, grid environments
F Issues: e.g., Lack of trust, broadcast media, resource-constrained, lack of
structure
A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 36 / 36

More Related Content

Similar to Distributed Computing

Complete Osi Model Explained
Complete Osi Model ExplainedComplete Osi Model Explained
Complete Osi Model Explained
Vivek chan
 
Developing a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDeveloping a Humanoid Robot Platform
Developing a Humanoid Robot Platform
Dr. Amarjeet Singh
 
IT241_TEST.BANK مرتب (2).pdf
IT241_TEST.BANK مرتب (2).pdfIT241_TEST.BANK مرتب (2).pdf
IT241_TEST.BANK مرتب (2).pdf
SHEHABALYAMANI
 
Distributed clouds — micro clouds
Distributed clouds — micro cloudsDistributed clouds — micro clouds
Distributed clouds — micro clouds
Faculty of Technical Sciences, University of Novi Sad
 
Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism) Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism)
A B Shinde
 
Carbon nanotube
Carbon nanotubeCarbon nanotube
Carbon nanotube
Syam Dayanandan
 
Operating System
Operating SystemOperating System
Operating System
Munazza-Mah-Jabeen
 
Operating system
Operating systemOperating system
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
Munazza-Mah-Jabeen
 
Ds ppt imp.
Ds ppt imp.Ds ppt imp.
Ds ppt imp.
Mayank Jain
 
13. multiprocessing
13. multiprocessing13. multiprocessing
13. multiprocessing
karishmamubeen
 
Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...
Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...
Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...
IJECEIAES
 
Computer organiztion1
Computer organiztion1Computer organiztion1
Computer organiztion1
Umang Gupta
 
Detailed Simulation of Large-Scale Wireless Networks
Detailed Simulation of Large-Scale Wireless NetworksDetailed Simulation of Large-Scale Wireless Networks
Detailed Simulation of Large-Scale Wireless Networks
Gabriele D'Angelo
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
Brenda Debra
 
Acpi and smi handlers some limits to trusted computing
Acpi and smi handlers some limits to trusted computingAcpi and smi handlers some limits to trusted computing
Acpi and smi handlers some limits to trusted computing
UltraUploader
 
A New Chaotic Map for Secure Transmission
A New Chaotic Map for Secure TransmissionA New Chaotic Map for Secure Transmission
A New Chaotic Map for Secure Transmission
TELKOMNIKA JOURNAL
 
Lecture 31.pdf
Lecture 31.pdfLecture 31.pdf
Lecture 31.pdf
AleenaJamil4
 
WSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.pptWSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.ppt
AbyThomas54
 
MODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIP
MODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIPMODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIP
MODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIP
VLSICS Design
 

Similar to Distributed Computing (20)

Complete Osi Model Explained
Complete Osi Model ExplainedComplete Osi Model Explained
Complete Osi Model Explained
 
Developing a Humanoid Robot Platform
Developing a Humanoid Robot PlatformDeveloping a Humanoid Robot Platform
Developing a Humanoid Robot Platform
 
IT241_TEST.BANK مرتب (2).pdf
IT241_TEST.BANK مرتب (2).pdfIT241_TEST.BANK مرتب (2).pdf
IT241_TEST.BANK مرتب (2).pdf
 
Distributed clouds — micro clouds
Distributed clouds — micro cloudsDistributed clouds — micro clouds
Distributed clouds — micro clouds
 
Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism) Pipelining and ILP (Instruction Level Parallelism)
Pipelining and ILP (Instruction Level Parallelism)
 
Carbon nanotube
Carbon nanotubeCarbon nanotube
Carbon nanotube
 
Operating System
Operating SystemOperating System
Operating System
 
Operating system
Operating systemOperating system
Operating system
 
Multiprocessor Systems
Multiprocessor SystemsMultiprocessor Systems
Multiprocessor Systems
 
Ds ppt imp.
Ds ppt imp.Ds ppt imp.
Ds ppt imp.
 
13. multiprocessing
13. multiprocessing13. multiprocessing
13. multiprocessing
 
Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...
Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...
Comparative Study of Neural Networks Algorithms for Cloud Computing CPU Sched...
 
Computer organiztion1
Computer organiztion1Computer organiztion1
Computer organiztion1
 
Detailed Simulation of Large-Scale Wireless Networks
Detailed Simulation of Large-Scale Wireless NetworksDetailed Simulation of Large-Scale Wireless Networks
Detailed Simulation of Large-Scale Wireless Networks
 
Computer System Architecture
Computer System ArchitectureComputer System Architecture
Computer System Architecture
 
Acpi and smi handlers some limits to trusted computing
Acpi and smi handlers some limits to trusted computingAcpi and smi handlers some limits to trusted computing
Acpi and smi handlers some limits to trusted computing
 
A New Chaotic Map for Secure Transmission
A New Chaotic Map for Secure TransmissionA New Chaotic Map for Secure Transmission
A New Chaotic Map for Secure Transmission
 
Lecture 31.pdf
Lecture 31.pdfLecture 31.pdf
Lecture 31.pdf
 
WSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.pptWSN-IEEE-Nov2005-v2.ppt
WSN-IEEE-Nov2005-v2.ppt
 
MODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIP
MODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIPMODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIP
MODELLING AND SIMULATION OF 128-BIT CROSSBAR SWITCH FOR NETWORK -ONCHIP
 

Recently uploaded

An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
ElakkiaU
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
ijseajournal
 
Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...
pvpriya2
 
Accident detection system project report.pdf
Accident detection system project report.pdfAccident detection system project report.pdf
Accident detection system project report.pdf
Kamal Acharya
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
Dwarkadas J Sanghvi College of Engineering
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
upoux
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
Pallavi Sharma
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
sydezfe
 
Ericsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.pptEricsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.ppt
wafawafa52
 
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
OKORIE1
 
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
DharmaBanothu
 
Beckhoff Programmable Logic Control Overview Presentation
Beckhoff Programmable Logic Control Overview PresentationBeckhoff Programmable Logic Control Overview Presentation
Beckhoff Programmable Logic Control Overview Presentation
VanTuDuong1
 
Impartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 StandardImpartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 Standard
MuhammadJazib15
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
VANDANAMOHANGOUDA
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
paraasingh12 #V08
 
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICSUNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
vmspraneeth
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
Indrajeet sahu
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
MadhavJungKarki
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
Atif Razi
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
nedcocy
 

Recently uploaded (20)

An Introduction to the Compiler Designss
An Introduction to the Compiler DesignssAn Introduction to the Compiler Designss
An Introduction to the Compiler Designss
 
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...Call For Paper -3rd International Conference on Artificial Intelligence Advan...
Call For Paper -3rd International Conference on Artificial Intelligence Advan...
 
Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...Determination of Equivalent Circuit parameters and performance characteristic...
Determination of Equivalent Circuit parameters and performance characteristic...
 
Accident detection system project report.pdf
Accident detection system project report.pdfAccident detection system project report.pdf
Accident detection system project report.pdf
 
Introduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.pptIntroduction to Computer Networks & OSI MODEL.ppt
Introduction to Computer Networks & OSI MODEL.ppt
 
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
一比一原版(osu毕业证书)美国俄勒冈州立大学毕业证如何办理
 
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdfSELENIUM CONF -PALLAVI SHARMA - 2024.pdf
SELENIUM CONF -PALLAVI SHARMA - 2024.pdf
 
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
一比一原版(uoft毕业证书)加拿大多伦多大学毕业证如何办理
 
Ericsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.pptEricsson LTE Throughput Troubleshooting Techniques.ppt
Ericsson LTE Throughput Troubleshooting Techniques.ppt
 
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
DESIGN AND MANUFACTURE OF CEILING BOARD USING SAWDUST AND WASTE CARTON MATERI...
 
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
A high-Speed Communication System is based on the Design of a Bi-NoC Router, ...
 
Beckhoff Programmable Logic Control Overview Presentation
Beckhoff Programmable Logic Control Overview PresentationBeckhoff Programmable Logic Control Overview Presentation
Beckhoff Programmable Logic Control Overview Presentation
 
Impartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 StandardImpartiality as per ISO /IEC 17025:2017 Standard
Impartiality as per ISO /IEC 17025:2017 Standard
 
ITSM Integration with MuleSoft.pptx
ITSM  Integration with MuleSoft.pptxITSM  Integration with MuleSoft.pptx
ITSM Integration with MuleSoft.pptx
 
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls ChennaiCall Girls Chennai +91-8824825030 Vip Call Girls Chennai
Call Girls Chennai +91-8824825030 Vip Call Girls Chennai
 
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICSUNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
UNIT 4 LINEAR INTEGRATED CIRCUITS-DIGITAL ICS
 
Open Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surfaceOpen Channel Flow: fluid flow with a free surface
Open Channel Flow: fluid flow with a free surface
 
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
1FIDIC-CONSTRUCTION-CONTRACT-2ND-ED-2017-RED-BOOK.pdf
 
Applications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdfApplications of artificial Intelligence in Mechanical Engineering.pdf
Applications of artificial Intelligence in Mechanical Engineering.pdf
 
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
一比一原版(爱大毕业证书)爱荷华大学毕业证如何办理
 

Distributed Computing

  • 1. Chapter 1: Introduction Ajay Kshemkalyani and Mukesh Singhal Distributed Computing: Principles, Algorithms, and Systems Cambridge University Press A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 1 / 36
  • 2. Distributed Computing: Principles, Algorithms, and Systems Definition Autonomous processors communicating over a communication network Some characteristics I No common physical clock I No shared memory I Geographical seperation I Autonomy and heterogeneity A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 2 / 36
  • 3. Distributed Computing: Principles, Algorithms, and Systems Distributed System Model M memory bank(s) P P P P P P P M M M M M M M Communication network (WAN/ LAN) P processor(s) Figure 1.1: A distributed system connects processors by a communication network. A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 3 / 36
  • 4. Distributed Computing: Principles, Algorithms, and Systems Relation between Software Components protocols Operating system Distributed software Network protocol stack Transport layer Data link layer Application layer (middleware libraries) Network layer Distributed application Extent of distributed Figure 1.2: Interaction of the software components at each process. A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 4 / 36
  • 5. Distributed Computing: Principles, Algorithms, and Systems Motivation for Distributed System Inherently distributed computation Resource sharing Access to remote resources Increased performance/cost ratio Reliability I availability, integrity, fault-tolerance Scalability Modularity and incremental expandability A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 5 / 36
  • 6. Distributed Computing: Principles, Algorithms, and Systems Parallel Systems Multiprocessor systems (direct access to shared memory, UMA model) I Interconnection network - bus, multi-stage sweitch I E.g., Omega, Butterfly, Clos, Shuffle-exchange networks I Interconnection generation function, routing function Multicomputer parallel systems (no direct access to shared memory, NUMA model) I bus, ring, mesh (w w/o wraparound), hypercube topologies I E.g., NYU Ultracomputer, CM* Conneciton Machine, IBM Blue gene Array processors (colocated, tightly coupled, common system clock) I Niche market, e.g., DSP applications A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 6 / 36
  • 7. Distributed Computing: Principles, Algorithms, and Systems UMA vs. NUMA Models M memory M P P P P P P M M M M M M M M M P P P P Interconnection network Interconnection network (a) (b) P processor Figure 1.3: Two standard architectures for parallel systems. (a) Uniform memory access (UMA) multiprocessor system. (b) Non-uniform memory access (NUMA) multiprocessor. In both architectures, the processors may locally cache data from memory. A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 7 / 36
  • 8. Distributed Computing: Principles, Algorithms, and Systems Omega, Butterfly Interconnects 3−stage Butterfly network 101 110 111 100 111 110 100 011 010 000 001 P0 P1 P2 P3 P4 P6 P7 101 P5 000 001 M0 M1 010 011 100 101 110 111 M2 M3 M4 M5 M6 M7 000 001 010 011 M0 M1 M2 M3 M4 M5 M6 M7 110 111 011 010 000 001 100 101 P0 P1 P2 P3 P4 P5 P6 P7 (a) 3−stage Omega network (n=8, M=4) (b) (n=8, M=4) Figure 1.4: Interconnection networks for shared memory multiprocessor systems. (a) Omega network (b) Butterfly network. A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 8 / 36
  • 9. Distributed Computing: Principles, Algorithms, and Systems Omega Network n processors, n memory banks log n stages: with n/2 switches of size 2x2 in each stage Interconnection function: Output i of a stage connected to input j of next stage: j = 2i for 0 ≤ i ≤ n/2 − 1 2i + 1 − n for n/2 ≤ i ≤ n − 1 Routing function: in any stage s at any switch: to route to dest. j, if s + 1th MSB of j = 0 then route on upper wire else [s + 1th MSB of j = 1] then route on lower wire A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 9 / 36
  • 10. Distributed Computing: Principles, Algorithms, and Systems Interconnection Topologies for Multiprocesors 1101 0110 0100 0000 0001 0010 0111 0011 0101 (b) (a) processor + memory 1100 1000 1110 1010 1111 1011 1001 Figure 1.5: (a) 2-D Mesh with wraparound (a.k.a. torus) (b) 3-D hypercube A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 10 / 36
  • 11. Distributed Computing: Principles, Algorithms, and Systems Flynn’s Taxonomy (c) MISD D D D I I I I I I I I I C C C C P P P P P D D P C C I instruction stream D P Control Unit Processing Unit data stream (a) SIMD (b) MIMD Figure 1.6: SIMD, MISD, and MIMD modes. SISD: Single Instruction Stream Single Data Stream (traditional) SIMD: Single Instruction Stream Multiple Data Stream I scientific applicaitons, applications on large arrays I vector processors, systolic arrays, Pentium/SSE, DSP chips MISD: Multiple Instruciton Stream Single Data Stream I E.g., visualization MIMD: Multiple Instruction Stream Multiple Data Stream I distributed systems, vast majority of parallel systems A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 11 / 36
  • 12. Distributed Computing: Principles, Algorithms, and Systems Terminology Coupling I Interdependency/binding among modules, whether hardware or software (e.g., OS, middleware) Parallelism: T(1)/T(n). I Function of program and system Concurrency of a program I Measures productive CPU time vs. waiting for synchronization operations Granularity of a program I Amt. of computation vs. amt. of communication I Fine-grained program suited for tightly-coupled system A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 12 / 36
  • 13. Distributed Computing: Principles, Algorithms, and Systems Message-passing vs. Shared Memory Emulating MP over SM: I Partition shared address space I Send/Receive emulated by writing/reading from special mailbox per pair of processes Emulating SM over MP: I Model each shared object as a process I Write to shared object emulated by sending message to owner process for the object I Read from shared object emulated by sending query to owner of shared object A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 13 / 36
  • 14. Distributed Computing: Principles, Algorithms, and Systems Classification of Primitives (1) Synchronous (send/receive) I Handshake between sender and receiver I Send completes when Receive completes I Receive completes when data copied into buffer Asynchronous (send) I Control returns to process when data copied out of user-specified buffer A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 14 / 36
  • 15. Distributed Computing: Principles, Algorithms, and Systems Classification of Primitives (2) Blocking (send/receive) I Control returns to invoking process after processing of primitive (whether sync or async) completes Nonblocking (send/receive) I Control returns to process immediately after invocation I Send: even before data copied out of user buffer I Receive: even before data may have arrived from sender A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 15 / 36
  • 16. Distributed Computing: Principles, Algorithms, and Systems Non-blocking Primitive Send(X, destination, handlek ) //handlek is a return parameter ... ... Wait(handle1, handle2, . . . , handlek , . . . , handlem) //Wait always blocks Figure 1.7: A nonblocking send primitive. When the Wait call returns, at least one of its parameters is posted. Return parameter returns a system-generated handle I Use later to check for status of completion of call I Keep checking (loop or periodically) if handle has been posted I Issue Wait(handle1, handle2, . . .) call with list of handles I Wait call blocks until one of the stipulated handles is posted A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 16 / 36
  • 17. Distributed Computing: Principles, Algorithms, and Systems Blocking/nonblocking; Synchronous/asynchronous; send/receive primities S Send The completion of the previously initiated nonblocking operation duration in which the process issuing send or receive primitive is blocked primitive issued primitive issued Receive Send (c) blocking async. Send (d) nonblocking async. Send S W R_C P, S_C R_C P, (b) nonblocking sync. Send, nonblocking Receive (a) blocking sync. Send, blocking Receive P, S_C P R R_C S_C processing for completes Receive Process may issue to check completion of nonblocking operation Wait duration to copy data from or to user buffer processing for completes S S_C process i buffer_i kernel_i process j buffer_j kernel_j S W W W W R R process i buffer_i kernel_i S S_C W W Figure 1.8:Illustration of 4 send and 2 receive primitives A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 17 / 36
  • 18. Distributed Computing: Principles, Algorithms, and Systems Asynchronous Executions; Mesage-passing System internal event send event receive event P P P P 0 1 2 3 m4 m1 m7 m3 m5 m6 m2 Figure 1.9: Asynchronous execution in a message-passing system A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 18 / 36
  • 19. Distributed Computing: Principles, Algorithms, and Systems Synchronous Executions: Message-passing System round 3 P P P P 3 2 0 1 round 1 round 2 Figure 1.10: Synchronous execution in a message-passing system In any round/step/phase: (send | internal)∗ (receive | internal)∗ (1) Sync Execution(int k, n) //k rounds, n processes. (2) for r = 1 to k do (3) proc i sends msg to (i + 1) mod n and (i − 1) mod n; (4) each proc i receives msg from (i + 1) mod n and (i − 1) mod n; (5) compute app-specific function on received values. A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 19 / 36
  • 20. Distributed Computing: Principles, Algorithms, and Systems Synchronous vs. Asynchronous Executions (1) Sync vs async processors; Sync vs async primitives Sync vs async executions Async execution I No processor synchrony, no bound on drift rate of clocks I Message delays finite but unbounded I No bound on time for a step at a process Sync execution I Processors are synchronized; clock drift rate bounded I Message delivery occurs in one logical step/round I Known upper bound on time to execute a step at a process A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 20 / 36
  • 21. Distributed Computing: Principles, Algorithms, and Systems Synchronous vs. Asynchronous Executions (2) Difficult to build a truly synchronous system; can simulate this abstraction Virtual synchrony: I async execution, processes synchronize as per application requirement; I execute in rounds/steps Emulations: I Async program on sync system: trivial (A is special case of S) I Sync program on async system: tool called synchronizer A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 21 / 36
  • 22. Distributed Computing: Principles, Algorithms, and Systems System Emulations S−A Asynchronous message−passing(AMP) Synchronous shared memory (ASM) Asynchronous Synchronous shared memory (SSM) message−passing (SMP) SM−MP MP−SM SM−MP MP−SM A−S S−A A−S Figure 1.11: Sync ↔ async, and shared memory ↔ msg-passing emulations Assumption: failure-free system System A emulated by system B: I If not solvable in B, not solvable in A I If solvable in A, solvable in B A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 22 / 36
  • 23. Distributed Computing: Principles, Algorithms, and Systems Challenges: System Perspective (1) Communication mechanisms: E.g., Remote Procedure Call (RPC), remote object invocation (ROI), message-oriented vs. stream-oriented communication Processes: Code migration, process/thread management at clients and servers, design of software and mobile agents Naming: Easy to use identifiers needed to locate resources and processes transparently and scalably Synchronization Data storage and access I Schemes for data storage, search, and lookup should be fast and scalable across network I Revisit file system design Consistency and replication I Replication for fast access, scalability, avoid bottlenecks I Require consistency management among replicas A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 23 / 36
  • 24. Distributed Computing: Principles, Algorithms, and Systems Challenges: System Perspective (2) Fault-tolerance: correct and efficient operation despite link, node, process failures Distributed systems security I Secure channels, access control, key management (key generation and key distribution), authorization, secure group management Scalability and modularity of algorithms, data, services Some experimental systems: Globe, Globus, Grid A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 24 / 36
  • 25. Distributed Computing: Principles, Algorithms, and Systems Challenges: System Perspective (3) API for communications, services: ease of use Transparency: hiding implementation policies from user I Access: hide differences in data rep across systems, provide uniform operations to access resources I Location: locations of resources are transparent I Migration: relocate resources without renaming I Relocation: relocate resources as they are being accessed I Replication: hide replication from the users I Concurrency: mask the use of shared resources I Failure: reliable and fault-tolerant operation A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 25 / 36
  • 26. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (1) Useful execution models and frameworks: to reason with and design correct distributed programs I Interleaving model I Partial order model I Input/Output automata I Temporal Logic of Actions Dynamic distributed graph algorithms and routing algorithms I System topology: distributed graph, with only local neighborhood knowledge I Graph algorithms: building blocks for group communication, data dissemination, object location I Algorithms need to deal with dynamically changing graphs I Algorithm efficiency: also impacts resource consumption, latency, traffic, congestion A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 26 / 36
  • 27. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (2) Time and global state I 3D space, 1D time I Physical time (clock) accuracy I Logical time captures inter-process dependencies and tracks relative time progression I Global state observation: inherent distributed nature of system I Concurrency measures: concurrency depends on program logic, execution speeds within logical threads, communication speeds A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 27 / 36
  • 28. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (3) Synchronization/coordination mechanisms I Physical clock synchronization: hardware drift needs correction I Leader election: select a distinguished process, due to inherent symmetry I Mutual exclusion: coordinate access to critical resources I Distributed deadlock detection and resolution: need to observe global state; avoid duplicate detection, unnecessary aborts I Termination detection: global state of quiescence; no CPU processing and no in-transit messages I Garbage collection: Reclaim objects no longer pointed to by any process A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 28 / 36
  • 29. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (4) Group communication, multicast, and ordered message delivery I Group: processes sharing a context, collaborating I Multiple joins, leaves, fails I Concurrent sends: semantics of delivery order Monitoring distributed events and predicates I Predicate: condition on global system state I Debugging, environmental sensing, industrial process control, analyzing event streams Distributed program design and verification tools Debugging distributed programs A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 29 / 36
  • 30. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (5) Data replication, consistency models, and caching I Fast, scalable access; I coordinate replica updates; I optimize replica placement World Wide Web design: caching, searching, scheduling I Global scale distributed system; end-users I Read-intensive; prefetching over caching I Object search and navigation are resource-intensive I User-perceived latency A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 30 / 36
  • 31. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (6) Distributed shared memory abstraction I Wait-free algorithm design: process completes execution, irrespective of actions of other processes, i.e., n − 1 fault-resilience I Mutual exclusion F Bakery algorithm, semaphores, based on atomic hardware primitives, fast algorithms when contention-free access I Register constructions F Revisit assumptions about memory access F What behavior under concurrent unrestricted access to memory? Foundation for future architectures, decoupled with technology (semiconductor, biocomputing, quantum . . .) I Consistency models: F coherence versus access cost trade-off F Weaker models than strict consistency of uniprocessors A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 31 / 36
  • 32. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (7) Reliable and fault-tolerant distributed systems I Consensus algorithms: processes reach agreement in spite of faults (under various fault models) I Replication and replica management I Voting and quorum systems I Distributed databases, commit: ACID properties I Self-stabilizing systems: ”illegal” system state changes to ”legal” state; requires built-in redundancy I Checkpointing and recovery algorithms: roll back and restart from earlier ”saved” state I Failure detectors: F Difficult to distinguish a ”slow” process/message from a failed process/ never sent message F algorithms that ”suspect” a process as having failed and converge on a determination of its up/down status A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 32 / 36
  • 33. Distributed Computing: Principles, Algorithms, and Systems Challenges: Algorithm/Design (8) Load balancing: to reduce latency, increase throughput, dynamically. E.g., server farms I Computation migration: relocate processes to redistribute workload I Data migration: move data, based on access patterns I Distributed scheduling: across processors Real-time scheduling: difficult without global view, network delays make task harder Performance modeling and analysis: Network latency to access resources must be reduced I Metrics: theoretical measures for algorithms, practical measures for systems I Measurement methodologies and tools A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 33 / 36
  • 34. Distributed Computing: Principles, Algorithms, and Systems Applications and Emerging Challenges (1) Mobile systems I Wireless communication: unit disk model; broadcast medium (MAC), power management etc. I CS perspective: routing, location management, channel allocation, localization and position estimation, mobility management I Base station model (cellular model) I Ad-hoc network model (rich in distributed graph theory problems) Sensor networks: Processor with electro-mechanical interface Ubiquitous or pervasive computing I Processors embedded in and seamlessly pervading environment I Wireless sensor and actuator mechanisms; self-organizing; network-centric, resource-constrained I E.g., intelligent home, smart workplace A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 34 / 36
  • 35. Distributed Computing: Principles, Algorithms, and Systems Applications and Emerging Challenges (2) Peer-to-peer computing I No hierarchy; symmetric role; self-organizing; efficient object storage and lookup;scalable; dynamic reconfig Publish/subscribe, content distribution I Filtering information to extract that of interest Distributed agents I Processes that move and cooperate to perform specific tasks; coordination, controlling mobility, software design and interfaces Distributed data mining I Extract patterns/trends of interest I Data not available in a single repository A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 35 / 36
  • 36. Distributed Computing: Principles, Algorithms, and Systems Applications and Emerging Challenges (3) Grid computing I Grid of shared computing resources; use idle CPU cycles I Issues: scheduling, QOS guarantees, security of machines and jobs Security I Confidentiality, authentication, availability in a distributed setting I Manage wireless, peer-to-peer, grid environments F Issues: e.g., Lack of trust, broadcast media, resource-constrained, lack of structure A. Kshemkalyani and M. Singhal (Distributed Computing) Introduction CUP 2008 36 / 36