1 / 27

Introduction to Distributed Algorithm Part One: Protocols Chapter 3- Communication Protocols

Introduction to Distributed Algorithm Part One: Protocols Chapter 3- Communication Protocols. Teacher: Chun-Yuan Lin. Communication Protocols (1).

harvell
Download Presentation

Introduction to Distributed Algorithm Part One: Protocols Chapter 3- Communication Protocols

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Introduction to Distributed AlgorithmPart One: ProtocolsChapter 3- Communication Protocols Teacher: Chun-Yuan Lin Communication Protocols

  2. Communication Protocols (1) • This chapter discusses two protocols that are used for the reliable exchange of data between two computing stations. (the possibility of communication errors cannot always be ignored) • These errors must be detected and corrected by supplementary mechanisms, traditionally referred to as protocols, implemented in the computing stations. • The main function of these protocols is data transmission, i.e., the accepting of the information at one station and its delivery at the other station. Communication Protocols

  3. Communication Protocols (2) • The necessity of using state information raises the issue of connection management, i.e., the initialization and discarding of state information. • The initialization is called openingthe connection. • its discarding is called closingthe connection. • The protocols discussed in this chapter are designed for different layers in a protocol hierarchy, such as the OSI reference model. • The first protocol is designed for the exchange of data between two stations that have a direct physical connection (data-link layer). • The second protocol is designed to be used by two stations that must communicate via an intermediate network (transport layer). Communication Protocols

  4. Communication Protocols (3) • This difference influences the required functionality of the protocols in the following two ways. • Errors considered. • Connection management. • Garbling of messages • The garbling of a message can be detected by the receiving process. • The garbling of a message in fact causes the message to be lost. Communication Protocols

  5. The Balanced Sliding-window Protocol (1) • In this section a symmetric protocol that allows information to be sent reliably in both directions is studied. • p and q • inp: The input of p consists of the information it must send to q, and is modeled by an infinite array of words. • outp: The output of p consists of the information it receives from q, and is also modeled by an infinite array of words. • Initially the value of outp[i] is undefined and represented by udef for all i. • sp: indicating the lowest numbered word that p still expects to receive from q. Communication Protocols

  6. The Balanced Sliding-window Protocol (2) • The safety property says that each process only outputs the correct data; the liveness property says that all data will eventually be delivered. Communication Protocols

  7. Presentation of the Protocol (1) • Transmission protocols usually rely on the use of acknowledgement messages. • The messages exchanged by the processes are referred to as packets, and they are of the form (pack, w, i), where w is a data word and i a natural number (called the sequence numberof the packet). (w = inp[i] to q ) • Process p can be a fixed number of lppackets "ahead of" q if we postulate that the data packet (pack, w, i) sent by p acknowledges the receipt of the words numbered 0.. i - lpfrom q. (want to send lppackets) Communication Protocols

  8. Presentation of the Protocol (2) • Explanation of the pseudocode • ap : indicate the lowest numbered word for which an acknowledgement has not yet been received by p. Communication Protocols

  9. Presentation of the Protocol (3) (i from q) Communication Protocols

  10. Presentation of the Protocol (4) • Invariant of the protocol • Qp for the packets with destination p and Qq for the packets with destination q. • Assertion P is an invariant. • Lemma 3.1P is an invariant of Algorithm 3.1. Communication Protocols

  11. Correctness Proof of the Protocol • Theorem 3.2 Algorithm 3.1 satisfies the requirement of safe delivery. • Theorem 3.4Algorithm 3.1 satisfies the requirement of eventual delivery. Communication Protocols

  12. Discussion of the Protocol (1) • Bounding the storage in the processes • L = lp+ lq. (Infinite data) • Lemma 3.6P implies that sending (pack, w, i) by p is only applicable for i < ap+ L. • Whenever ap increases, p discards the words that no longer fall in the sending window. • Whenever sp increases, p reads the next words of the sending window from the source that produces the words. Communication Protocols

  13. Discussion of the Protocol (2) Communication Protocols

  14. Discussion of the Protocol (3) • Bounding the sequence numbers • It will be shown that sequence numbers can be bounded if the fifo property of the channels is exploited. Communication Protocols

  15. Discussion of the Protocol (4) • The choice of the parameters (the optimal values of lp,lqdepend on) • the communication time • the round-trip delay • the error probability • The alternating-bit protocol • An interesting special case of the sliding­window protocol is obtained when L = 1. Communication Protocols

  16. A Timer-based Protocol (1) • We shall now study the role of timers in the design and verification of communication protocols by analyzing a simplified form of Fletcher and Wat­son's ∆t-protocol for end-to-end message communication. • This protocol provides not only a mechanism for data transmission but also opens and closes connections. • The state information of the protocol is kept in a data structure called the connection record. Communication Protocols

  17. A Timer-based Protocol (2) • The following four simplifications are made in the protocol. • One direction • The transmission of data is only considered in one direction, namely from p to q. Sometimes p will be referred to as the sender, and q as the receiver. • Single-word receiving window • The receiver does not store any data packets with a higher number than the one it expects. • Simplified timing assumptions • The protocol is expressed using a minimum number of timers. • Single-word packets • The sender may put only a single word in each data packet. Communication Protocols

  18. A Timer-based Protocol (3) • With regard to the time and the timers in the system the following assumptions are made. • Global time • Bounded packet lifetime • The lifetime of a packet is bounded by a constant (the maximum packet lifetime) • Timers Communication Protocols

  19. A Timer-based Protocol (4) • The properties of the protocol that will be proved • No loss. Each word of inpis delivered by q or reported by p (as "possibly lost") within a bounded time after the acceptance of the word by p. • Ordering. The words delivered by q occur in strictly increasing order In inp. Communication Protocols

  20. A Timer-based Protocol (5) Communication Protocols

  21. A Timer-based Protocol (6) Communication Protocols

  22. A Timer-based Protocol (7) Communication Protocols

  23. Presentation of the Protocol (1) Communication Protocols

  24. Presentation of the Protocol (2) Communication Protocols

  25. Presentation of the Protocol (3) Communication Protocols

  26. Discussion of the Protocol (1) • The quality of the protocol • Bounded sequence numbers • The shape of actions and invariants • Inaccurate timers Communication Protocols

  27. Discussion of the Protocol (2) Communication Protocols

More Related