Hwajung Lee. One of the selling points of a distributed system is that the system will continue to perform even if some components / processes fail.

Slides:



Advertisements
Similar presentations
The Transmission Control Protocol (TCP) carries most Internet traffic, so performance of the Internet depends to a great extent on how well TCP works.
Advertisements

1 Data Link Protocols By Erik Reeber. 2 Goals Use SPIN to model-check successively more complex protocols Using the protocols in Tannenbaums 3 rd Edition.
Fault Tolerance. Basic System Concept Basic Definitions Failure: deviation of a system from behaviour described in its specification. Error: part of.
Chapter 8 Fault Tolerance
1 CS 194: Distributed Systems Process resilience, Reliable Group Communication Scott Shenker and Ion Stoica Computer Science Division Department of Electrical.
DISTRIBUTED SYSTEMS II FAULT-TOLERANT BROADCAST Prof Philippas Tsigas Distributed Computing and Systems Research Group.
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
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.
Byzantine Generals Problem: Solution using signed messages.
Faults and fault-tolerance One of the selling points of a distributed system is that the system will continue to perform even if some components / processes.
CS 582 / CMPE 481 Distributed Systems Fault Tolerance.
Distributed systems Module 2 -Distributed algorithms Teaching unit 1 – Basic techniques Ernesto Damiani University of Bozen Lesson 3 – Distributed Systems.
1 Principles of Reliable Distributed Systems Lecture 5: Failure Models, Fault-Tolerant Broadcasts and State-Machine Replication Spring 2005 Dr. Idit Keidar.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
Page 1 Copyright © Alexander Allister Shvartsman CSE 6510 (461) Fall 2010 Selected Notes on Fault-Tolerance (12) Alexander A. Shvartsman Computer.
Composition Model and its code. bound:=bound+1.
R R R Fault Tolerant Computing. R R R Acknowledgements The following lectures are based on materials from the following sources; –S. Kulkarni –J. Rushby.
Error Checking continued. Network Layers in Action Each layer in the OSI Model will add header information that pertains to that specific protocol. On.
Distributed Systems – CS425/CSE424/ECE428 – Fall Nikita Borisov — UIUC1.
1 Transport Layer Computer Networks. 2 Where are we?
Faults and fault-tolerance
Wireless TCP Prasun Dewan Department of Computer Science University of North Carolina
Group Communication A group is a collection of users sharing some common interest.Group-based activities are steadily increasing. There are many types.
Review for Exam 2. Topics included Deadlock detection Resource and communication deadlock Graph algorithms: Routing, spanning tree, MST, leader election.
Group Communication Group oriented activities are steadily increasing. There are many types of groups:  Open and Closed groups  Peer-to-peer and hierarchical.
Byzantine fault-tolerance COMP 413 Fall Overview Models –Synchronous vs. asynchronous systems –Byzantine failure model Secure storage with self-certifying.
Faults and fault-tolerance
Agenda Fail Stop Processors –Problem Definition –Implementation with reliable stable storage –Implementation without reliable stable storage Failure Detection.
CSE 461 University of Washington1 Where we are in the Course Finishing off the Link Layer! – Builds on the physical layer to transfer frames over connected.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
Hwajung Lee. One of the selling points of a distributed system is that the system will continue to perform even if some components / processes fail.
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.
Physical clock synchronization Question 1. Why is physical clock synchronization important? Question 2. With the price of atomic clocks or GPS coming down,
Hwajung Lee.  Models are simple abstractions that help understand the variability -- abstractions that preserve the essential features, but hide the.
SysRép / 2.5A. SchiperEté The consensus problem.
CS 542: Topics in Distributed Systems Self-Stabilization.
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.
A Survey of Fault Tolerance in Distributed Systems By Szeying Tan Fall 2002 CS 633.
Faults and fault-tolerance One of the selling points of a distributed system is that the system will continue to perform even if some components / processes.
1 The utopia protocol  Unrealistic assumptions: –processing time ignored –infinite buffer space available –simplex: data transmitted in one direction.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
Classifying fault-tolerance Masking tolerance. Application runs as it is. The failure does not have a visible impact. All properties (both liveness & safety)
Ch 3. Transport Layer Myungchul Kim
Group Communication A group is a collection of users sharing some common interest.Group-based activities are steadily increasing. There are many types.
Fundamentals of Fault-Tolerant Distributed Computing In Asynchronous Environments Paper by Felix C. Gartner Graeme Coakley COEN 317 November 23, 2003.
Chapter 8 Fault Tolerance. Outline Introductions –Concepts –Failure models –Redundancy Process resilience –Groups and failure masking –Distributed agreement.
Operating System Reliability Andy Wang COP 5611 Advanced Operating Systems.
Chapter 3: The Data Link Layer –to achieve reliable, efficient communication between two physically connected machines. –Design issues: services interface.
Faults and fault-tolerance
CSE 486/586 Distributed Systems Failure Detectors
Faults and fault-tolerance
Operating System Reliability
Operating System Reliability
CSE 486/586 Distributed Systems Failure Detectors
Fault Tolerance In Operating System
CSE 486/586 Distributed Systems Failure Detectors
Faults and fault-tolerance
Alternating Bit Protocol
Faults and fault-tolerance
Operating System Reliability
Operating System Reliability
Faults and fault-tolerance
Operating System Reliability
Physical clock synchronization
CSE 486/586 Distributed Systems Failure Detectors
Error Checking continued
Operating System Reliability
Operating System Reliability
Presentation transcript:

Hwajung Lee

One of the selling points of a distributed system is that the system will continue to perform even if some components / processes fail.

 Study what causes what.  We view the effect of failures at our level of abstraction, and then try to mask it, or recover from it.  Be familiar with the terms MTBF (Mean Time Between Failures) and MTTR (Mean Time To Repair)

Crash failure Omission failure Transient failure Byzantine failure Software failure Temporal failure Security failure

Crash failure is irreversible. In synchronous system, it is easy to detect crash failure (using heartbeat signals and timeout), but in asynchronous systems, it is never accurate, since it is not possible to distinguish between a process that has crashed, and a process that is running very slowly?. Some failures may be complex and nasty. Fail-stop failure is an simple abstraction that mimics crash failure when program execution becomes arbitrary. Implementations help detect which processor has failed. If a system cannot tolerate fail-stop failure, then it cannot tolerate crash.

Message lost in transit. May happen due to various causes, like  Transmitter malfunction  Buffer overflow  Collisions at the MAC layer  Receiver out of range

(Hardware) Arbitrary perturbation of the global state. May be induced by power surge, weak batteries, lightning, radio- frequency interferences etc. (Software) Heisenbugs, are a class of temporary internal faults and are intermittent. They are essentially permanent faults whose conditions of activation occur rarely or are not easily reproducible, so they are harder to detect during the testing phase. Over 99% of bugs in IBM DB2 production code are non- deterministic and transient

Anything goes! Includes every conceivable form of erroneous behavior. Numerous possible causes. Includes malicious behaviors (like a process executing a different program instead of the specified one) too. Most difficult kind of failure to deal with.

 Coding error or human error  Design flaws  Memory leak  Incomplete specification (example Y2K) Many failures (like crash, omission etc) can be caused by software bugs too.

program example1; define x : boolean ( initially x = true); { a, b are messages); do {S}: x  send a {specified action}  {F}: true  send b {faulty action} od a a a a b a a a b b a a a a a a a … (Most faulty behaviors can be modeled as a fault action F over the normal action S. This is for specification purposes only)

F-intolerant vs F-tolerant systems Four types of tolerance: - Masking - Non-masking - Fail-safe - Graceful degradation tolerances faults A system that tolerates failure of type F

P is the invariant of the original fault-free system Q represents the worst possible behavior of the system when failures occur. It is called the fault span. Q is closed under S or F. P Q

Masking tolerance: P = Q (neither safety nor liveness is violated) Non-masking tolerance: P  Q (safety property may be temporarily violated, but not liveness). Eventually safety property is restored P Q

Masking tolerance. Application runs as it is. The failure does not have a visible impact. All properties (both liveness & safety) continue to hold. Non-masking tolerance. Safety property is temporarily affected, but not liveness. Example 1. Clocks lose synchronization, but recover soon thereafter. Example 2. Multiple processes temporarily enter their critical sections, but thereafter, the normal behavior is restored. Backward error-recovery vs. forward error-recovery

Backward error recovery When safety property is violated, the computation rolls back and resumes from a previous correct state. time rollback Forward error recovery Computation does not care about getting the history right, but moves on, as long as eventually the safety property is restored. True for self-stabilizing systems.

Fail-safe tolerance Given safety predicate is preserved, but liveness may be affected Example. Due to failure, no process can enter its critical section for an indefinite period. In a traffic crossing, failure changes the traffic in both directions to red. Graceful degradation Application continues, but in a “degraded” mode. Much depends on what kind of degradation is acceptable. Example. Consider message-based mutual exclusion. Processes will enter their critical sections, but not in timestamp order.

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. Asynchronous systems are more tricky. We first focus on synchronous systems only

Failure can be detected using heartbeat messages (periodic “I am alive” broadcast) and timeout - if processors speed has a known lower bound - channel delays have a known upper bound.

For FIFO channels: Use sequence numbers with messages. Non-FIFO channels and bounded propagation delay - use timeout What about non-FIFO channels for which the upper bound of the delay is not known? Use unbounded sequence numbers and acknowledgments. But acknowledgments may be lost too, causing unnecessary re-transmission of messages :- ( Let us look how a real protocol deals with omission ….

Triple modular redundancy (TMR) for masking any single failure. N-modular redundancy masks up to m failures, when N = 2m +1 Take a vote What if the voting unit fails?

A central issue in networking A B router Routers may drop messages, but reliable end-to-end transmission is an important requirement. This implies, the communication must tolerate Loss, Duplication, and Re-ordering of messages

{program for process S} define ok : boolean; next : integer; initially next = 0, ok = true, both channels are empty; dook  send (m[next], next); ok:= false ÿ (ack, next) is received  ok:= true; next := next + 1  timeout (R,S)  send (m[next], next) od {program for process R} define r : integer; initially r = 0; do(m[ ], s) is received  s = r  accept the message; send (ack, r); r:= r+1  (m[ ], s) is received  s≠r   (ack, r-1) od Sender S Receiver R m[0], 0 ack

Both messages and acks may be lost Q. Why is the last ack reinforced by R when s≠r? A. Needed to guarantee progress. Progress is guaranteed, but the protocol is inefficient due to low throughput. Sender S Receiver R m[0], 0 ack

The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window size.

{program for process S} define next, last, w : integer; initially next = 0, last = -1, w > 0 do last+1 ≤ next ≤ last + w  send (m[next], next); next := next + 1 ÿ (ack, j) is received  if j > last  last := j  j ≤ last  skip fi ÿ timeout (R,S)  next := last+1 {retransmission begins} od {program for process R} define j : integer; initially j = 0; do(m[next], next) is received  if j = next  accept message; send (ack, j); j:= j+1  j ≠ next  send (ack, j-1) fi; od

The sender continues the send action without receiving the acknowledgements of at most w messages (w > 0), w is called the window size.

{program for process S} define next, last, w : integer; initially next = 0, last = -1, w > 0 do last+1 ≤ next ≤ last + w  send (m[next], next); next := next + 1 ÿ (ack, j) is received  if j > last  last := j  j ≤ last  skip fi ÿ timeout (R,S)  next := last+1 {retransmission begins} od {program for process R} define j : integer; initially j = 0; do(m[next], next) is received  if j = next  accept message; send (ack, j); j:= j+1  j ≠ next  send (ack, j-1) fi; od

Lemma. Every message is accepted exactly once. Lemma. m[k] is always accepted before m[k+1]. (Argue that these are true.) Observation. Uses unbounded sequence number. This is bad. Can we avoid it?

If the communication channels are non-FIFO, and the message propagation delays are arbitrarily large, then using bounded sequence numbers, it is impossible to design a window protocol that can withstand the (1) loss, (2) duplication, and (3) reordering of messages.

(m[k],k) ( m’, k) ( m’ ’,k) Retransmitted version of m New message using the same seq number k We want to accept m” but reject m’. How is that possible?

S R ABP is a link layer protocol. Works on FIFO channels only. Guarantees reliable message delivery with a 1-bit sequence number ( this is the t raditional version with window size = 1). Study how this works. m[0],0 ack, 0 m[1],1m[2],0

program ABP; {program for process S} define sent, b : 0 or 1 ; next : integer ; initially next = 0, sent = 1, b = 0, and channels are empty ; do sent ≠b  send (m[next], b); next := next+1; sent := b  (ack, j) is received  if j = b  b := 1-b  j ≠ b  skip fi timeout (R,S)  send (m[next-1], b) od {program for process R} define j : 0 or 1; {initially j = 0}; do (m[ ], b) is received  if j = b  accept the message; send (ack, j); j:= 1 - j  j ≠ b  send (ack, 1-j) fi od S R m[1],1 m[0],0 m[2],0 a,0

Supports end-to-end logical connection between any two computers on the Internet. Basic idea is the same as those of sliding window protocols. But TCP uses bounded sequence numbers! It is safe to re-use a sequence number when it is unique. With a high probability, a random 32 or 64-bit number is unique. Also, current sequence numbers are flushed out of the system after a time = 2d, where d is the round trip delay.

Three-way handshake. Sequence numbers are unique w.h.p. Why is the knowledge of roundtrip delay important? What if the window is too small / too large? What if the timeout period is too small / too large? Adaptive retransmission: receiver can throttle sender and control the window size to save its buffer space.