interaction model
play

Interaction Model Distributed algorithm vs. simple algorithm - PDF document

Interaction Model Distributed algorithm vs. simple algorithm Difficulties Complex Hard to predict: executing rate, transmission rate No general state Performance of communication channels Latency; Bandwidth; Jitter


  1. Interaction Model � Distributed algorithm vs. simple algorithm � Difficulties � Complex � Hard to predict: executing rate, transmission rate � No general state � Performance of communication channels � Latency; Bandwidth; Jitter � Computer clocks � clock drift rate: difference from perfect clock � Correction [ch11] • Time server [Cristian, 1989] • Logical clock send receive receive X 1 m 4 1 m 2 send receive 2 3 Physical Y time receive send Z receive receive m 3 m 1 m 2 A 1 receive receive receive t 1 t 2 t 3 Omission and arbitrary failures Class of failure Affects Description Fail-stop Process Process halts and remains halted. Other processes may detect this state. Crash Process Process halts and remains halted. Other processes may not be able to detect this state. Omission Channel A message inserted in an outgoing message buffer never arrives at the other end’s incoming message buffer. Send-omission Process A process completes a send, but the message is not put in its outgoing message buffer. Receive-omissionProcess A message is put in a process’s incoming message buffer, but that process does not receive it. Arbitrary Process or Process/channel exhibits arbitrary behaviour: it may (Byzantine) channel send/transmit arbitrary messages at arbitrary times, commit omissions; a process may stop or take an incorrect step. 2

  2. Networking and internetworking � Communication subsystem � a collection of hardware and software components that provide the communication facilities for a distributed system � Host; node � Performance � Message transmission time = latency + length/data transfer rate. � Bandwidth. � Packet transmission � Message: a logical unit of information, a sequence of data items of arbitrary length. � Packet: a sequence of binary data of restricted length, with addressing information. 3 Data streaming � Different requirement from packet transmission � real-time display � much higher bandwidth: huge amount of data � guaranteed quality of service: bandwidth, latency, reliability � ATM networks, IPv6 4

  3. Switching schemes � Broadcast � No switching logic, i.e., Ethernet, wireless networks � Circuit switching � Communicate through a number of intervening exchanges, i.e., POTS � Packet switching [1960s] � store-and-forward network � May be lost, vary in latency. A few ten microseconds-a few milliseconds. � short Internet packet takes up to 200 milliseconds to arrive his destination � Frame relay � Video conference: < 50 milliseconds. � Combine the advantages of circuit switching to packet-switching. � Example: ATM 5 Protocol suite/stack Message received Message sent Layer n Layer 2 Layer 1 Communication Sender Recipient medium Message Layers Application Internetwork Transport protocols Internetwork Internetwork packets Network interface Underlying network Network-specific packets protocols Underlying network 6

  4. Some notations � MTU (maximum transfer unit) � Ethernets: 1500 bytes � Ports � process. � Port address: network address + port number � FTP: 21, HTTP: 80 � Well-known ports: 0~1023; Registered ports: 1024~49151; Others: 49152~65535 Routing algorithms � implemented by a program in the network layer at each router node � two responsibilities � route of each incoming packet: hop-by-hop basis � update its knowledge of the network 7 TCP/IP suite � Five layers: � Application layer: Web (HTTP), email (SMTP,POP), Netnews (NNTP), File transfer (FTP), Telnet (telnet) � Transport layer: UDP, TCP, STCP • provides a single virtual network � Network layer: IP � Data link layer � Physical layer 8

  5. Internetworking Protocol � Overview � Unreliable, best-effort delivery service: post office � Connectionless: datagram • transported independently � datagrams sent by the same source to the same destination could arrive out of order � IP address: logical address vs. physical address � 32-bit address (IPv4) � Unique and universal � Three common notations • Binary • dotted-decimal • hexadecimal 9 IP addressing � Classful addressing 7 24 Class A: 0 Network ID Host ID 14 16 Class B: 1 0 Network ID Host ID 21 8 Class C: 1 1 0 Network ID Host ID 28 Class D (multicast): 1 1 1 0 Multicast address 27 Class E (reserved): 1 1 1 1 0 unused � Mask � Special addresses � classless addressing � Format of classless address: x.y.z.t/n 1 0

  6. IP routing � An autonomous system is a group of networks and routers under the authority of a single administration. � Intradomain routing: routing inside an autonomous system. i.e., RIP, OSPF � Interdomain routing: routing between autonomous systems, i.e., BGP. 1 1 Routing Information Protocol A 1 B 2 Hosts Links 4 3 or local C networks 5 D 6 E Routers Routings from A Routings from B Routings from C To Link Cost To Link Cost To Link Cost A local 0 A 1 1 A 2 2 B 1 1 B local 0 B 2 1 C 1 2 C 2 1 C local 0 D 3 1 D 1 2 D 5 2 E 1 2 E 4 1 E 5 1 Routings from D Routings from E To Link Cost To Link Cost A 3 1 A 4 2 B 3 2 B 4 1 C 6 2 C 5 1 D local 0 D 6 1 0 E 6 1 E local 1 2

  7. Routing Information Protocol � Periodic update, and � Triggered update Send: Each t seconds or when Tl changes, send Tl on each non-faulty outgoing link. Receive: Whenever a routing table Tr is received on link n : for all rows Rr in Tr { if ( Rr.link | n ) { Rr.cost = Rr.cost + 1; Rr.link = n ; if ( Rr.destination is not in Tl ) add Rr to Tl; // add new destination to Tl else for all rows Rl in Tl { if ( Rr.destination = Rl.destination and (Rr.cost < Rl.cost or Rl.link = n )) Rl = Rr; // Rr.cost < Rl.cost : remote node has better route // Rl.link = n : remote node is more authoritative } } } � Two-node loop instability � Solution: defining infinity; split horizon � Three-node instability 1 � defining infinity 3 Open Shortest Path First protocol � link state routing method Border Gateway Protocol � Path vector routing 1 4

  8. Transport layer in TCP/IP suite � Transmission Control Protocol (TCP), User Datagram Protocol (UDP), and Stream Control Transmission Protocol (SCTP). � delivery of a message from one process to another process. � Service-point addressing: port address � Segmentation and reassemble � connection mechanism � Flow control � Error control � Congestion control 1 5 Flow control in TCP � segment acknowledgement � Silly window syndrome � Sending application process creates data slowly, i.e., 1 byte at a time. � Nagle’s algorithm � Receiving application process consumes data slowly. � Clark’s solution � Delayed acknowledgment: reduces traffic 1 6

  9. Error control in TCP � Error detection and error correction � Checksum � Acknowledgment � Next sequence number expected � One Ack for every two in-order data segment � One Ack for each out-of-order segment � One Ack for each duplicate segment � time-out � Retransmission 1 7 Congestion, Congestion Control � Congestion: the load on the network is greater than the capacity of the network. � Congestion control: mechanisms that detect, prevent and handle network congestion. � Congestion control vs. flow control 1 8

  10. Congestion Control � Performance of a network � Delay � throughput � Congestion control mechanisms � Open loop techniques � Closed loop mechanisms � Two implementation points � Routers, switches: queuing discipline � End hosts 1 9 Queuing disciplines at routers � First-in, first-out (FIFO), First-come, first-served (FCFS) � advantages � disadvantages � Fair Queuing [J. Nagle, 1987] � WFQ (weighted fair queuing); WF2Q (Worst-case fair weighted fair queuing); and so on. � Objective • each flow has fair access to network resources • prevent a bursty flow from consuming the entire buffer space � Packets are classified into flows: round-robin order � flow--based queuing 2 0

  11. Congestion control at routers � Warning bit � Random Early Detection (RED) Gateway, [Sally Floyd and Van Jacobson, 1993] 2 1 Congestion control in TCP � Additive Increase/Multiplicative Decrease (AIMD) � CongestionWindow vs. AdvertisedWindow 2 2

  12. Congestion control in TCP � Slow start 2 3 Congestion control in TCP � Fast Retransmit 2 4

  13. RED Gateway � The most effective place to detect congestion is in the gateway itself � a congestion avoidance mechanism by controlling the average queue size. � avoidance of global synchronization � avoidance of a bias against bursty traffic � the ability to provide congestion avoidance without cooperation from transport-layer protocols. 2 5 RED Algorithm � The average queue size: low-pass filter with an exponential weighted moving average � a minimum threshold and a maximum threshold 2 6

  14. 2 7 RED Gateway vs. DECbit � DECbit congestion avoidance scheme � a congestion-indication bit in packet headers � the source looks at the fraction of marked packets � Differences � method of computing the average queue size � congestion notification � bursty traffic � global synchronization � Another advantage: implemented gradually in current TCP/IP networks. 2 8

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend