Interaction Model Distributed algorithm vs. simple algorithm - - PDF document

interaction model
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

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 send receive m1 m

2

2 1 3 4 X Y Z Physical time A m3 receive receive send receive receive receive t1 t2 t3 receive receive m2 m

1

2

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 (Byzantine) Process or channel Process/channel exhibits arbitrary behaviour: it may send/transmit arbitrary messages at arbitrary times, commit omissions; a process may stop or take an incorrect step.

slide-2
SLIDE 2

3

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.

4

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

slide-3
SLIDE 3

5

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

6

Protocol suite/stack

Layer n Layer 2 Layer 1 Message sent Message received Communication medium Sender Recipient

Underlying network Application Network interface Transport Internetwork Internetwork packets Network-specific packets Message Layers Internetwork protocols Underlying network protocols

slide-4
SLIDE 4

7

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

8

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

slide-5
SLIDE 5

9

Internetworking Protocol

Overview

Unreliable, best-effort delivery service: post

  • ffice

Connectionless: datagram

  • transported independently datagrams sent by the

same source to the same destination could arrive out

  • f order

IP address: logical address vs. physical

address

32-bit address (IPv4) Unique and universal Three common notations

  • Binary
  • dotted-decimal
  • hexadecimal

1

IP addressing

Classful addressing Mask Special addresses classless addressing Format of classless address: x.y.z.t/n

7 24 Class A: Network ID Host ID 14 16 Class B: 1 Network ID Host ID 21 8 Class C: 1 1 Network ID Host ID 28 Class D (multicast): 1 1 1 Multicast address 27 Class E (reserved): 1 1 1 1 unused

slide-6
SLIDE 6

1 1

IP routing

An autonomous system is a group of

networks and routers under the authority

  • f a single administration.

Intradomain routing: routing inside an

autonomous system. i.e., RIP, OSPF

Interdomain routing: routing between

autonomous systems, i.e., BGP.

1 2

Routing Information Protocol

Hosts Links

  • r local

networks A D E B C 1 2 5 4 3 6 Routers

Routings from A Routings from B Routings from C To Link Cost To Link Cost To Link Cost A B C D E local 1 1 3 1 1 2 1 2 A B C D E 1 local 2 1 4 1 1 2 1 A B C D E 2 2 local 5 5 2 1 2 1 Routings from D Routings from E To Link Cost To Link Cost A B C D E 3 3 6 local 6 1 2 2 1 A B C D E 4 4 5 6 local 2 1 1 1

slide-7
SLIDE 7

1 3

Routing Information Protocol

Periodic update, and Triggered update

Send: Each t seconds or when Tl changes, send Tl on each non-faulty

  • utgoing 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

defining infinity 1 4

Open Shortest Path First protocol

link state routing method

Border Gateway Protocol

Path vector routing

slide-8
SLIDE 8

1 5

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 6

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

slide-9
SLIDE 9

1 7

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 8

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

slide-10
SLIDE 10

1 9

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

2

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

  • rder

flow--based queuing

slide-11
SLIDE 11

2 1

Congestion control at routers

Warning bit Random Early Detection (RED) Gateway,

[Sally Floyd and Van Jacobson, 1993]

2 2

Congestion control in TCP

Additive Increase/Multiplicative Decrease

(AIMD)

CongestionWindow vs. AdvertisedWindow

slide-12
SLIDE 12

2 3

Congestion control in TCP

Slow start

2 4

Congestion control in TCP

Fast Retransmit

slide-13
SLIDE 13

2 5

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 6

RED Algorithm

The average queue size: low-pass filter with an

exponential weighted moving average

a minimum threshold and a maximum threshold

slide-14
SLIDE 14

2 7 2 8

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.