Hwajung Lee.  Models are simple abstractions that help understand the variability -- abstractions that preserve the essential features, but hide the.

Slides:



Advertisements
Similar presentations
Distributed Leader Election Algorithms in Synchronous Ring Networks
Advertisements

Impossibility of Distributed Consensus with One Faulty Process
Communication Networks Recitation 3 Bridges & Spanning trees.
Parallel Processing & Parallel Algorithm May 8, 2003 B4 Yuuki Horita.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty.
Sliding window protocol The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
Distributed Systems and Algorithms Sukumar Ghosh University of Iowa Spring 2014.
Byzantine Generals Problem: Solution using signed messages.
Broadcasting Protocol for an Amorphous Computer Lukáš Petrů MFF UK, Prague Jiří Wiedermann ICS AS CR.
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
1 Complexity of Network Synchronization Raeda Naamnieh.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 3 – Distributed Systems.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
Group Communications Group communication: one source process sending a message to a group of processes: Destination is a group rather than a single process.
CPSC 668Set 16: Distributed Shared Memory1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Set 12: Causality1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
© nCode 2000 Title of Presentation goes here - go to Master Slide to edit - Slide 1 Reliable Communication for Highly Mobile Agents ECE 7995: Term Paper.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CSCI 4550/8556 Computer Networks Comer, Chapter 19: Binding Protocol Addresses (ARP)
1 Principles of Reliable Distributed Systems Lecture 5: Failure Models, Fault-Tolerant Broadcasts and State-Machine Replication Spring 2005 Dr. Idit Keidar.
Impossibility of Distributed Consensus with One Faulty Process Michael J. Fischer Nancy A. Lynch Michael S. Paterson Presented by: Oren D. Rubin.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 4 – Consensus and reliable.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 2 – Distributed Systems.
PRASHANTHI NARAYAN NETTEM.
Gursharan Singh Tatla Transport Layer 16-May
RAM and Parallel RAM (PRAM). Why models? What is a machine model? – A abstraction describes the operation of a machine. – Allowing to associate a value.
Lecture 6: Introduction to Distributed Computing.
1 A Modular Approach to Fault-Tolerant Broadcasts and Related Problems Author: Vassos Hadzilacos and Sam Toueg Distributed Systems: 526 U1580 Professor:
Introduction Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
WAN technologies and routing Packet switches and store and forward Hierarchical addresses, routing and routing tables Routing table computation Example.
Why do we need models? There are many dimensions of variability in distributed systems. Examples: interprocess communication mechanisms, failure classes,
CSE 812. Outline What is a distributed system/program? Program Models Program transformation.
Consensus and Its Impossibility in Asynchronous Systems.
RAM, PRAM, and LogP models
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
The Complexity of Distributed Algorithms. Common measures Space complexity How much space is needed per process to run an algorithm? (measured in terms.
ITEC452 Distributed Computing Lecture 2 – Part 2 Models in Distributed Systems Hwajung Lee.
Sliding window protocol The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window.
Chap 15. Agreement. Problem Processes need to agree on a single bit No link failures A process can fail by crashing (no malicious behavior) Messages take.
Hwajung Lee. Well, you need to capture the notions of atomicity, non-determinism, fairness etc. These concepts are not built into languages like JAVA,
Hwajung Lee. Why do we need these? Don’t we already know a lot about programming? Well, you need to capture the notions of atomicity, non-determinism,
Leader Election (if we ignore the failure detection part)
Several sets of slides by Prof. Jennifer Welch will be used in this course. The slides are mostly identical to her slides, with some minor changes. Set.
Hwajung Lee.  Models are simple abstractions that help understand the variability -- abstractions that preserve the essential features, but hide the.
Hwajung Lee. Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.   i,j  V  i,j are non-faulty ::
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
ITEC452 Distributed Computing Lecture 2 – Part 2 Models in Distributed Systems Hwajung Lee.
Failure detection The design of fault-tolerant systems will be easier if failures can be detected. Depends on the 1. System model, and 2. The type of failures.
Alternating Bit Protocol S R ABP is a link layer protocol. Works on FIFO channels only. Guarantees reliable message delivery with a 1-bit sequence number.
CIS 540 Principles of Embedded Computation Spring Instructor: Rajeev Alur
Ordering of Events in Distributed Systems UNIVERSITY of WISCONSIN-MADISON Computer Sciences Department CS 739 Distributed Systems Andrea C. Arpaci-Dusseau.
Fault tolerance and related issues in distributed computing Shmuel Zaks GSSI - Feb
Introduction to distributed systems description relation to practice variables and communication primitives instructions states, actions and programs synchrony.
Understanding Models. Modeling Communication: A message passing model System topology is a graph G = (V, E), where V = set of nodes ( sequential processes.
Gokul Kishan CS8 1 Inter-Process Communication (IPC)
Distributed Systems and Algorithms Sukumar Ghosh University of Iowa Fall 2011.
ITEC452 Distributed Computing Lecture 2 – Part 3 Models in Distributed Systems Hwajung Lee.
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty ::
Model and complexity Many measures Space complexity Time complexity
Understanding Models.
CS 5620 Distributed Systems and Algorithms
Leader Election (if we ignore the failure detection part)
Alternating Bit Protocol
Data Link Control (DLC) Services
ITEC452 Distributed Computing Lecture 3 Models in Distributed Systems
CS 5620 Distributed Systems and Algorithms
CS 5620 Distributed Systems and Algorithms
Presentation transcript:

Hwajung Lee

 Models are simple abstractions that help understand the variability -- abstractions that preserve the essential features, but hide the implementation details from observers who view the system at a higher level.  Results derived from an abstract model is applicable to a wide range of platforms.

 System topology is a graph G = (V, E), where V = set of nodes (sequential processes) E = set of edges (links or channels, bi/unidirectional)  Four types of actions by a process:  Internal action  Communication action  Input action  Output action

Axiom 1. Message m sent  message m received Axiom 2. Message propagation delay is arbitrary but finite. Axiom 3. m1 sent before m2  m1 received before m2. P Q

Send & receive can be blocking or non-blocking Postal communication is asynchronous: Telephone communication is synchronous Synchronous clocks Physical clocks are synchronized Synchronous processes Lock-step synchrony Synchronous channels Bounded delay Synchronous message-order First-in first-out channels Synchronous communication Communication via handshaking Any restriction defines some form of synchrony …

Address spaces of processes overlap M1M M2M2 Concurrent operations on a shared variable are serialized

State reading model Each process can read the states of its neighbors Link register model Each process can read from and write to adjacent registers. The entire local state is not shared.

 Communication via broadcast  Limited range  Dynamic topology

 Mobile agent  a program code that migrates from one process to another  Can interact with the variables of programs running on the host machine, use its resources, and take autonomous routing decisions.  Strong mobility/weak mobility  Ex.: Dartmouth’s D’Agents, IBM’s Aglets

 Model: (I, P, and B)  I is the agent identifier and is unique for every agent.  P designates the agent program  B is the briefcase and represent the data variables to be used by the agent

One object (or operation) of a strong model = More than one objects (or operations) of a weaker model. Often, weaker models are synonymous with fewer restrictions. One can add layers (additional restrictions) to create a stronger model from weaker one. Examples HLL model is stronger than assembly language model. Asynchronous is weaker than synchronous. Bounded delay is stronger than unbounded delay (channel)

Stronger models - simplify reasoning, but - needs extra work to implement Weaker models - are easier to implement. - Have a closer relationship with the real world “Can model X be implemented using model Y?” is an interesting question in computer science. Sample problems Non-FIFO to FIFO channel Message passing to shared memory Non-atomic broadcast to atomic broadcast Complicated Simple

P Q buffer m1m4m3m2

{Sender process P}{Receiver process Q} var i : integer {initially 0} var k : integer {initially 0} buffer: buffer [0..∞] of msg {initially  k: buffer [k] = empty repeatrepeat {STORE} send m[i],i to Q; receive m[i],i from P; i := i+1 store m[i] into buffer[i]; forever {DELIVER} while buffer[k] ≠ empty do begin deliver content of buffer [k]; buffer [k] := empty; k := k+1; end forever

(a) Needs Unbounded sequence numbers and (b) Unbounded number of buffer slots  Both are bad Now solve the same problem on a model where (a) The propagation delay has a known upper bound of T. (b) The messages are sent per unit time. (c) The messages are received at a rate faster than r.  The buffer requirement drops to (r xT). Thus, Synchrony pays. Question. How to solve the problem using bounded buffer space if the propagation delay is arbitrarily large?

{Read X by process i } : read x[i] {Write X:= v by process i } - x[i] := v ; - Atomically broadcast v to every other process j (j ≠ i); - After receiving broadcast, process j (j ≠ i) sets x[j] to v. Understand the significance of atomic operations. It is not trivial, but is very important in distributed systems This is incomplete. There are more pitfalls here.

Atomic broadcast = either everybody or nobody receives {process i is the sender} for j = 1 to N-1 (j ≠ i) send message m to neighbor[j] (Easy!) Now include crash failure as a part of our model. What if the sender crashes at the middle? Implement atomic broadcast in presence of crash.

Communicates via messengers instead of (or in addition to) messages. What is the lowest Price of an iPod in Radford? Carries both program and data

Reactive vs Transformational systems A reactive system never sleeps (like: a server or servers) A transformational (or non-reactive systems) reaches a fixed point after which no further change occurs in the system (Examples?) Named vs Anonymous systems In named systems, process id is a part of the algorithm. In anonymous systems, it is not so. All are equal. (-) Symmetry breaking is often a challenge. (+) Easy to switch one process by another with no side effect. Saves log N bits.

Many measures o Space complexity o Time complexity o Message complexity o Bit complexity o Round complexity What do these mean? Consider broadcasting in an n-cube (n=3) source

{Process 0} sends m to neighbors {Process i > 0} repeat receive m {m contains the value } ; if m is received for the first time then x[i] := m.value ; send x[i] to each neighbor j > I else discard m end if forever What is the (1) message complexity (2) space complexity per process? Each process j has a variable x[j] initially undefined

{Process 0} x[0] := v {Process i > 0} repeat if  a neighbor j < i : x[i] ≠ x[j] then x[i] := x[j] {this is a step} else skip end if forever What is the time complexity? (i.e. how many steps are needed?) Can be arbitrarily large! WHY? Each process j has a variable x[j] initially undefined

Now, use “large atomicity”, where in one step, a process j reads the states of ALL its neighbors of smaller id, and updates x[j] only when these are equal, and different from x[j]. What is the time complexity? How many steps are needed? The time complexity is now O(n 2 ) Each process j has a variable x[j] initially undefined

Rounds are truly defined for synchronous systems. An asynchronous round consists of a number of steps where every process (including the slowest one) takes at least one step. How many rounds will you need to complete the broadcast using the large atomicity model? Each process j has a variable x[j] initially undefined