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
Chapter 1: Introduction Ajay Kshemkalyani and Mukesh Singhal - - PowerPoint PPT Presentation
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
Introduction CUP 2008 1 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ No common physical clock ◮ No shared memory ◮ Geographical seperation ◮ Autonomy and heterogeneity
Introduction CUP 2008 2 / 36
Distributed Computing: Principles, Algorithms, and Systems
Introduction CUP 2008 3 / 36
Distributed Computing: Principles, Algorithms, and Systems
Introduction CUP 2008 4 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ availability, integrity, fault-tolerance
Introduction CUP 2008 5 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Interconnection network - bus, multi-stage sweitch ◮ E.g., Omega, Butterfly, Clos, Shuffle-exchange networks ◮ Interconnection generation function, routing function
◮ bus, ring, mesh (w w/o wraparound), hypercube topologies ◮ E.g., NYU Ultracomputer, CM* Conneciton Machine, IBM Blue gene
◮ Niche market, e.g., DSP applications
Introduction CUP 2008 6 / 36
Distributed Computing: Principles, Algorithms, and Systems
Introduction CUP 2008 7 / 36
Distributed Computing: Principles, Algorithms, and Systems
Introduction CUP 2008 8 / 36
Distributed Computing: Principles, Algorithms, and Systems
Introduction CUP 2008 9 / 36
Distributed Computing: Principles, Algorithms, and Systems
Introduction CUP 2008 10 / 36
Distributed Computing: Principles, Algorithms, and Systems
(c) MISD
C C C C P P P P P
P C C
P Control Unit Processing Unit data stream (a) SIMD (b) MIMD
◮ scientific applicaitons, applications on large arrays ◮ vector processors, systolic arrays, Pentium/SSE, DSP chips
◮ E.g., visualization
◮ distributed systems, vast majority of parallel systems
Introduction CUP 2008 11 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Interdependency/binding among modules, whether hardware or software (e.g.,
◮ Function of program and system
◮ Measures productive CPU time vs. waiting for synchronization operations
◮ Amt. of computation vs. amt. of communication ◮ Fine-grained program suited for tightly-coupled system
Introduction CUP 2008 12 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Partition shared address space ◮ Send/Receive emulated by writing/reading from special mailbox per pair of
◮ Model each shared object as a process ◮ Write to shared object emulated by sending message to owner process for the
◮ Read from shared object emulated by sending query to owner of shared object
Introduction CUP 2008 13 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Handshake between sender and receiver ◮ Send completes when Receive completes ◮ Receive completes when data copied into buffer
◮ Control returns to process when data copied out of user-specified buffer
Introduction CUP 2008 14 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Control returns to invoking process after processing of primitive (whether sync
◮ Control returns to process immediately after invocation ◮ Send: even before data copied out of user buffer ◮ Receive: even before data may have arrived from sender
Introduction CUP 2008 15 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Use later to check for status of completion of call ◮ Keep checking (loop or periodically) if handle has been posted ◮ Issue Wait(handle1, handle2, . . .) call with list of handles ◮ Wait call blocks until one of the stipulated handles is posted
Introduction CUP 2008 16 / 36
Distributed Computing: Principles, Algorithms, and Systems
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
Introduction CUP 2008 17 / 36
Distributed Computing: Principles, Algorithms, and Systems
internal event send event receive event P P P P 1 2 3
m4 m1 m7 m3 m5 m6 m2
Introduction CUP 2008 18 / 36
Distributed Computing: Principles, Algorithms, and Systems
round 3
round 1 round 2
Introduction CUP 2008 19 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ No processor synchrony, no bound on drift rate of clocks ◮ Message delays finite but unbounded ◮ No bound on time for a step at a process
◮ Processors are synchronized; clock drift rate bounded ◮ Message delivery occurs in one logical step/round ◮ Known upper bound on time to execute a step at a process
Introduction CUP 2008 20 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ async execution, processes synchronize as per application requirement; ◮ execute in rounds/steps
◮ Async program on sync system: trivial (A is special case of S) ◮ Sync program on async system: tool called synchronizer
Introduction CUP 2008 21 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ If not solvable in B, not solvable in A ◮ If solvable in A, solvable in B
Introduction CUP 2008 22 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Schemes for data storage, search, and lookup should be fast and scalable
◮ Revisit file system design
◮ Replication for fast access, scalability, avoid bottlenecks ◮ Require consistency management among replicas
Introduction CUP 2008 23 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Secure channels, access control, key management (key generation and key
Introduction CUP 2008 24 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Access: hide differences in data rep across systems, provide uniform operations
◮ Location: locations of resources are transparent ◮ Migration: relocate resources without renaming ◮ Relocation: relocate resources as they are being accessed ◮ Replication: hide replication from the users ◮ Concurrency: mask the use of shared resources ◮ Failure: reliable and fault-tolerant operation
Introduction CUP 2008 25 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Interleaving model ◮ Partial order model ◮ Input/Output automata ◮ Temporal Logic of Actions
◮ System topology: distributed graph, with only local neighborhood knowledge ◮ Graph algorithms: building blocks for group communication, data
◮ Algorithms need to deal with dynamically changing graphs ◮ Algorithm efficiency: also impacts resource consumption, latency, traffic,
Introduction CUP 2008 26 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ 3D space, 1D time ◮ Physical time (clock) accuracy ◮ Logical time captures inter-process dependencies and tracks relative time
◮ Global state observation: inherent distributed nature of system ◮ Concurrency measures: concurrency depends on program logic, execution
Introduction CUP 2008 27 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Physical clock synchronization: hardware drift needs correction ◮ Leader election: select a distinguished process, due to inherent symmetry ◮ Mutual exclusion: coordinate access to critical resources ◮ Distributed deadlock detection and resolution: need to observe global state;
◮ Termination detection: global state of quiescence; no CPU processing and no
◮ Garbage collection: Reclaim objects no longer pointed to by any process
Introduction CUP 2008 28 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Group: processes sharing a context, collaborating ◮ Multiple joins, leaves, fails ◮ Concurrent sends: semantics of delivery order
◮ Predicate: condition on global system state ◮ Debugging, environmental sensing, industrial process control, analyzing event
Introduction CUP 2008 29 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Fast, scalable access; ◮ coordinate replica updates; ◮ optimize replica placement
◮ Global scale distributed system; end-users ◮ Read-intensive; prefetching over caching ◮ Object search and navigation are resource-intensive ◮ User-perceived latency
Introduction CUP 2008 30 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Wait-free algorithm design: process completes execution, irrespective of
◮ Mutual exclusion ⋆ Bakery algorithm, semaphores, based on atomic hardware primitives, fast
◮ Register constructions ⋆ Revisit assumptions about memory access ⋆ What behavior under concurrent unrestricted access to memory?
◮ Consistency models: ⋆ coherence versus access cost trade-off ⋆ Weaker models than strict consistency of uniprocessors
Introduction CUP 2008 31 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Consensus algorithms: processes reach agreement in spite of faults (under
◮ Replication and replica management ◮ Voting and quorum systems ◮ Distributed databases, commit: ACID properties ◮ Self-stabilizing systems: ”illegal” system state changes to ”legal” state;
◮ Checkpointing and recovery algorithms: roll back and restart from earlier
◮ Failure detectors: ⋆ Difficult to distinguish a ”slow” process/message from a failed process/ never
⋆ algorithms that ”suspect” a process as having failed and converge on a
Introduction CUP 2008 32 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Computation migration: relocate processes to redistribute workload ◮ Data migration: move data, based on access patterns ◮ Distributed scheduling: across processors
◮ Metrics: theoretical measures for algorithms, practical measures for systems ◮ Measurement methodologies and tools
Introduction CUP 2008 33 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Wireless communication: unit disk model; broadcast medium (MAC), power
◮ CS perspective: routing, location management, channel allocation, localization
◮ Base station model (cellular model) ◮ Ad-hoc network model (rich in distributed graph theory problems)
◮ Processors embedded in and seamlessly pervading environment ◮ Wireless sensor and actuator mechanisms; self-organizing; network-centric,
◮ E.g., intelligent home, smart workplace
Introduction CUP 2008 34 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ No hierarchy; symmetric role; self-organizing; efficient object storage and
◮ Filtering information to extract that of interest
◮ Processes that move and cooperate to perform specific tasks; coordination,
◮ Extract patterns/trends of interest ◮ Data not available in a single repository
Introduction CUP 2008 35 / 36
Distributed Computing: Principles, Algorithms, and Systems
◮ Grid of shared computing resources; use idle CPU cycles ◮ Issues: scheduling, QOS guarantees, security of machines and jobs
◮ Confidentiality, authentication, availability in a distributed setting ◮ Manage wireless, peer-to-peer, grid environments ⋆ Issues: e.g., Lack of trust, broadcast media, resource-constrained, lack of
Introduction CUP 2008 36 / 36