Communication Management and Distributed Processing, Chapter 13.

Slides:



Advertisements
Similar presentations
Umut Girit  One of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer.
Advertisements

Remote Procedure Call (RPC)
CCNA – Network Fundamentals
Transmission Control Protocol (TCP)
Intermediate TCP/IP TCP Operation.
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
COS 461 Fall 1997 Networks and Protocols u networks and protocols –definitions –motivation –history u protocol hierarchy –reasons for layering –quick tour.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 OSI Transport Layer Network Fundamentals – Chapter 4.
Socket Programming.
Networks 1 CS502 Spring 2006 Network Input & Output CS-502 Operating Systems Spring 2006.
Department of Electronic Engineering City University of Hong Kong EE3900 Computer Networks Transport Protocols Slide 1 Transport Protocols.
CS-3013 & CS-502, Summer 2006 Network Input & Output1 CS-3013 & CS-502, Summer 2006.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
OSI Model 7 Layers 7. Application Layer 6. Presentation Layer
WXES2106 Network Technology Semester /2005 Chapter 8 Intermediate TCP CCNA2: Module 10.
Transport Layer TCP and UDP IS250 Spring 2010
Gursharan Singh Tatla Transport Layer 16-May
OIS Model TCP/IP Model.
1 TCP/IP architecture A set of protocols allowing communication across diverse networks Out of ARPANET Emphasize on robustness regarding to failure Emphasize.
What Can IP Do? Deliver datagrams to hosts – The IP address in a datagram header identify a host IP treats a computer as an endpoint of communication Best.
Process-to-Process Delivery:
TRANSPORT LAYER T.Najah Al-Subaie Kingdom of Saudi Arabia Prince Norah bint Abdul Rahman University College of Computer Since and Information System NET331.
Lect3..ppt - 09/12/04 CIS 4100 Systems Performance and Evaluation Lecture 3 by Zornitza Genova Prodanoff.
1 Transport Layer Computer Networks. 2 Where are we?
The Network Layer. Network Projects Must utilize sockets programming –Client and Server –Any platform Please submit one page proposal Can work individually.
Chapter 17 Networking Dave Bremer Otago Polytechnic, N.Z. ©2008, Prentice Hall Operating Systems: Internals and Design Principles, 6/E William Stallings.
Presentation on Osi & TCP/IP MODEL
Exploring the Packet Delivery Process Chapter
TCP/IP Yang Wang Professor: M.ANVARI.
Huda AL_Omairl - Network 71 Protocols and Network Software.
TCP/IP Essentials A Lab-Based Approach Shivendra Panwar, Shiwen Mao Jeong-dong Ryoo, and Yihan Li Chapter 5 UDP and Its Applications.
Chap 9 TCP/IP Andres, Wen-Yuan Liao Department of Computer Science and Engineering De Lin Institute of Technology
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
University of the Western Cape Chapter 12: The Transport Layer.
SMUCSE 4344 transport layer. SMUCSE 4344 transport layer end-to-end protocols –transport code runs only on endpoint hosts encapsulates network communications.
TCP/IP TCP/IP LAYERED PROTOCOL TCP/IP'S APPLICATION LAYER TRANSPORT LAYER NETWORK LAYER NETWORK ACCESS LAYER (DATA LINK LAYER)
FALL 2005CSI 4118 – UNIVERSITY OF OTTAWA1 Part 2.5 Internetworking Chapter 25 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
1 The Internet and Networked Multimedia. 2 Layering  Internet protocols are designed to work in layers, with each layer building on the facilities provided.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
ECE 526 – Network Processing Systems Design Networking: protocols and packet format Chapter 3: D. E. Comer Fall 2008.
The Transmission Control Protocol (TCP) Application Services (Telnet, FTP, , WWW) Reliable Stream Transport (TCP) Connectionless Packet Delivery.
Chapter 6-2 the TCP/IP Layers. The four layers of the TCP/IP model are listed in Table 6-2. The layers are The four layers of the TCP/IP model are listed.
CCNA 1 v3.0 Module 11 TCP/IP Transport and Application Layers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
Internetworking Internet: A network among networks, or a network of networks Allows accommodation of multiple network technologies Universal Service Routers.
TCP/IP Honolulu Community College Cisco Academy Training Center Semester 2 Version 2.1.
Network Protocols n ISO OSI 7-layer model n TCP/IP suite l TCP/UDP l IP l Ethernet/Token Ring l ICMP.
Networking Basics CCNA 1 Chapter 11.
Lecture 4 Overview. Ethernet Data Link Layer protocol Ethernet (IEEE 802.3) is widely used Supported by a variety of physical layer implementations Multi-access.
Chapter 24 Transport Control Protocol (TCP) Layer 4 protocol Responsible for reliable end-to-end transmission Provides illusion of reliable network to.
1 OSI and TCP/IP Models. 2 TCP/IP Encapsulation (Packet) (Frame)
1 Bus topology network. 2 Data is sent to all computers, but only the destination computer accepts 02608c
Advanced UNIX programming Fall 2002, lecture 16 Instructor: Ashok Srinivasan Acknowledgements: The syllabus and power point presentations are modified.
1. Layered Architecture of Communication Networks: TCP/IP Model
Transport Protocols.
IP1 The Underlying Technologies. What is inside the Internet? Or What are the key underlying technologies that make it work so successfully? –Packet Switching.
1 Kyung Hee University Chapter 11 User Datagram Protocol.
McGraw-Hill Chapter 23 Process-to-Process Delivery: UDP, TCP Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
IST 201 Chapter 11 Lecture 2. Ports Used by TCP & UDP Keep track of different types of transmissions crossing the network simultaneously. Combination.
1 Chapter 24 Internetworking Part 4 (Transport Protocols, UDP and TCP, Protocol Port Numbers)
TCP/IP Transmission Control Protocol / Internet Protocol
Process-to-Process Delivery:
OSI Reference Model Unit II
Process-to-Process Delivery: UDP, TCP
Computer Networks Protocols
OSI Model 7 Layers 7. Application Layer 6. Presentation Layer
Transport Layer 9/22/2019.
Unit – III Network Essentials
Presentation transcript:

Communication Management and Distributed Processing, Chapter 13

Communication components  network: a set of computers connected by communication links  Intranet : local area networks (LAN), in the same administrative domain  Internet: wide area networks (WAN), collection of interconnected networks across administrative domains  System area networks (SAN): distributed systems  Communication rules: protocols

Circuit vs. Packet switching  Circuit switching  example: telephony  resources are reserved and dedicated during the connection  Packet switching  example: internet  entering data divided into packets  packets in network share resources  Virtual circuit: cross between circuit switching and packet switching

Connection vs. Connectionless  connection-oriented services: sender and receiver maintains a connection (using circuit switching for example)  connectionless protocols: sender transmits each message when it is ready (similar to the mail system)  a connection-oriented service can be implemented on top of a packet-switch network

Protocol Architecture  in the network, computers must agree on the syntax (data format) and the semantics (data interpretation) of communication  common approach: protocol functionality is distributed in multiple modules (layers) which are stacked  layer N provides services to layer N+1, and relies on services of layer N-1  communication is achieved by having similar layers at both end-points which understand each other

ISO/OSI protocol stack  “officially”: seven layers  in practice four: application, transport, network, data link / physical application transport network data link/ physical application transport network data link/ physical packet format data data link hdr net hdr transp hdr appl hdr

Application Layer  process-to-process communication  supports application functionality  examples  file transfer protocol (FTP)  simple mail transfer protocol (SMTP)  hypertext transfer protocol (HTTP)  user can add other protocols, for example a distributed shared memory protocol

Transport Layer  transmission control protocol (TCP)  provides reliable byte stream service using retransmission  flow control  congestion control  user datagram protocol (UDP)  provides unreliable unordered datagram service

Network Layer  Internet protocol (IP)  understands the host address  responsible for packet delivery  provides routing function across the network  but can lose or misorder packets

Data Link/Physical Layer  comes from the underlying network  physical layer: transmits 0s and 1s in the wire  data link layer: groups bits into frames and does error control using checksum + retransmission  examples  Ethernet  ATM  Myrinet  phone/modem

Internet hierarchy EthernetATM modem IP TCPUDP FTP HTTP Finger SVM data link layer network layer transport layer application layer

The Network Layer: IP  addressing: how hosts are named  service model: how hosts interact with the network, what is the packet format  routing: how a route from source to destination is chosen

IP Addressing  Addresses  unique 32-bit address for each host (128-bit in IPv6)  dotted-decimal notation:  three address formats: class A, class B and class C  IP to physical address translation  network hardware recognizes physical addresses  Address Resolution Protocol (ARP) to obtain the translation  each host caches a list of IP-to-physical translation which expires after a while

ARP  hosts broadcast a query packet asking for a translation for some IP address  hosts which know the translation reply  each host knows its own IP and physical translation  reverse ARP (RARP) translates physical to IP and it is used to assign IP addresses dynamically

IP packet  IP transmits data in variable size chunks: datagrams  may drop, reorder or duplicate datagrams  each network has a Maximum Transmission Unit (MTU): which is the largest packet it can carry  if packet is bigger than MTU it is broken into fragments which are reassembled at destination  IP packet format:  source and destination addresses (128-bit in IPv6)  time to live: decremented on each hop, packet dropped when TTL=0  fragment information, checksum, other fields

IP routing  each host has a routing table which says where to forward packets for each network, including a default router  how the routing table is maintained:  two-level approach: intra-domain and inter-domain  intra-domain : many approaches, ultimately call ARP  inter-domain: Boundary Gateway Protocol (BGP):  each domain designates a “BGP speaker” to represent it  speakers advertise which domain they can reach  routing cycles avoided

Transport Layer  User Datagram Protocol (UDP): connectionless  unreliable, unordered datagrams  the main difference from IP: IP sends datagrams between hosts, UDP sends datagrams between processes identified as (host, port) pairs  Transmission Control Protocol: connection-oriented  reliable; acknowledgment, timeout and retransmission  byte stream delivered in order (datagrams are hidden)  flow control: slows down sender if receiver overwhelmed  congestion control: slows down sender if network overwhelmed

TCP: Reliable communication  each packet carries a sequence number  sequence number: last byte of data sent before this packet  each packet also carries an acknowledge sequence number: first byte of data not yet received  no distinction between data and ack packets  TCP keeps an average round-trip transmission time (RTT)  timeout if no ack received after twice the estimated RRT and resend data starting from the last ack  possible improvements:  ignore retransmitted packets when estimate RTT  double timeout on retransmission

TCP: Connection Setup  TCP is a connection-oriented protocol  three-way handshake:  client sends a SYN packet: “I want to connect”  server sends back its SYN + ACK: “I accept”  client acks the server’s SYN: “OK”

TCP: Sliding Window  optimum transmission performance requires keeping the pipe full  network capacity is equal to latency-bandwidth product  sliding window: how much data to send without ack  optimum window size is the network capacity  sliding window protocol: agreement between sender and destination on how much data sender can send without waiting for ack such that id doesn’t overrun receiver’s buffer

Sliding Window Protocol  receiver decides how much memory to dedicate to this connection  receiver continuously advertises current window size = allocated memory - unread data  sender stops sending when the unack-ed data = receiver current window size

TCP: Congestion Control  detect network congestion then slow down sending enough to alleviate congestion  detecting congestion: TCP interprets a timeout as a symptom of congestion (can be mistaken in wireless communication)  transmission window size = min( receiver window, congestion window)  Congestion window  when all is well: increases slowly (additively)  when congestion: decrease rapidly (multiplicatively)  slow restart: size =1, multiplicatively until timeout

Distributed computing  so far we looked at TCP/IP protocols  how to use network protocols for distributed computing  client-server model  sockets  remote procedure calls (RPC)  user-level communication

Client-Server Model  typical client-server interaction  server waits for requests from clients  client issues request to server and waits for result  server receives the request and performs the service  sender replies to the client with the result of the service  client resumes the execution using the result  client and server can run as different processes or in the same process  if in the same process: either different threads or client must handle asynchronous requests to act as server

Sockets  communication abstraction in UNIX:  socket system call creates an end-point for communication: TCP or UDP protocol  bind gives an identity to a socket: (host IP, port)  connect : establishes a connection between a local socket (client) and a remote socket (server)  listen and accept are used by a server under TCP to accept connection requests and create a new socket for each connection (see example)  write/read or sendto/recvfrom to transmit data connection-oriented or connectionless via sockets

server socket bind listen accept blocked read write Connection-oriented server client socket connect write read

Connectionless server client socket bind sendto recvfrom server socket bind recvfrom blocked sendto

Remote Procedure Call (RPC)  idea: make communication look like a procedure call  simple abstraction, easy to connect to language mechanisms  interfaces to servers can be specified as a set of named operations with designated types  RPC implementation reduces to reliable, blocking message passing  RPC differs from a local procedure call  how to make RPC fast ?  non-blocking RPC: asynchronous RPC, queued RPC

RPC Structure client program server program client stub server stub callreturn call network

RPC implementation  a stub procedure in the caller’s address space  creates a message that identifies the procedure being called and includes parameters (parameter marshaling)  identifies the location of the server  sends the message and waits for reply  when the reply message arrives return to the calling program providing the returned values  at the server (callee), another stub program which receives the message and calls the corresponding local procedure

Client Stub Example void remote_add(Server s, int *x, int *y, int *z) { s.sendInt(AddProcedure); s.sendInt(*x); s.sendInt(*y); s.flush() status = s.receiveInt(); /* if no errors */ *sum = s.receiveInt(); }

Server Stub Example void serverLoop(Client c) { while (1) { int Procedure = c_receiveInt(); switch (Procedure) { case AddProcedure: int x = c.receiveInt(); int y = c.receiveInt(); int sum; add(*x, *y,*sum); c.sendInt(StatusOK); c.sendInt(sum); break; }

RPC semantics  different from a local procedure call semantics  global variables are not accessible inside the RPC  call-by-copy, not value or reference  communication errors that may leave client uncertain about whether the call really happened  various semantics possible: at-least-once, at-most-once, exactly-once  difference is visible unless the call is idempotent

TCP/IP in LAN  using traditional TCP/IP communication in local area networks is expensive  socket calls are system calls  permission is checked at every send  data is copied both at the sender and at the receiver from user/kernel to kernel/user address spaces  buffer management adds overhead  alternative solutions: user-level communication

User-level communication  basic idea: remove the kernel from the critical path of sending and receiving messages  user-memory to user-memory: zero copy  permission is checked once when the mapping is established  buffer management left to the application  Industry Standards: Virtual Interface Architecture (VIA), InfiniBand  Advantages  low-latency  low overhead  approach raw bandwidth provided by the network

Memory-Mapped communication  receiver exports the receive buffers  sender must import a receive buffer before sending  the permission of sender to write into the receive buffer is checked once when the export/import handshake is performed (usually at the beginning)  sender can directly communicate with the network interface to send data into imported buffers without kernel intervention  at the receiver the network interface stores the received data directly into the exported receive buffer with no kernel intervention  Also called: remote DMA, memory-to-memory comm

Virtual-to-physical address  in order to store data directly into the application address space (exported buffers), the NI must know the virtual to physical translations  one solution is to pin the receive buffers in memory sender receiver int receive_buffer[1024]; exp_id=export(buffer, sender); recv(exp_id); int send_buffer[1024]; recv_id=import(receiver,exp_id); send(recv_id, send_buffer);

Software TLB in network interface  the network interface incorporates a TLB (NI-TLB) which is kept consistent with the virtual memory system  when a message arrives, NI attempts a virtual to physical translation using NI-TLB  if a translation is missing in NI-TLB, the processor is interrupted to bring the page in: the kernel increments the reference count for that page to avoid swapping  when a page entry is evicted from the NI-TLB, the kernel is informed to decrement the reference count  swapping prevented while DMA in progress