CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

Similar documents
Computer Networks. Text Book By Larry L Peterson & Bruce S. Davie

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 4021: Networks Discussion. Chapter 1.

CMPE 344 Computer Networks Spring Foundations. Reading: Peterson and Davie,

L1: Introduction. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Housekeeping. Fall /5 CptS/EE 555 1

Overview. Performance metrics - Section 1.5 Direct link networks Hardware building blocks - Section 2.1 Encoding - Section 2.2 Framing - Section 2.

A closer look at network structure:

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Frequently asked questions from the previous class surveys

Lecture 3: Modulation & Layering"

ECE 650 Systems Programming & Engineering. Spring 2018

CSCI Computer Networks

Introductions. Computer Networking Lecture 01. January 16, HKU SPACE Community College. HKU SPACE CC CN Lecture 01 1/36

Computer Network. Direct Link Networks Reliable Transmission. rev /2/2004 1

Module 2 Overview of Computer Networks

Module 2 Overview of. Computer Networks

L3: Building Direct Link Networks I. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

end systems, access networks, links circuit switching, packet switching, network structure

INTRODUCTORY COMPUTER

CSE3213 Computer Network I

Point-to-Point Links. Outline Encoding Framing Error Detection Sliding Window Algorithm. Fall 2004 CS 691 1

CSC 401 Data and Computer Communications Networks

The Network Layer and Routers

Links. CS125 - mylinks 1 1/22/14

Lecture 2 Communication services The Trasport Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Chapter 1. Computer Networks and the Internet

CS3600 SYSTEMS AND NETWORKS

CS 5520/ECE 5590NA: Network Architecture I Spring Lecture 13: UDP and TCP

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [DISTRIBUTED MUTUAL EXCLUSION] Frequently asked questions from the previous class survey

ECE 4450:427/527 - Computer Networks Spring 2017

CS457 Transport Protocols. CS 457 Fall 2014

Chapter 4: network layer. Network service model. Two key network-layer functions. Network layer. Input port functions. Router architecture overview

CS455: Introduction to Distributed Systems [Spring 2018] Dept. Of Computer Science, Colorado State University

Homework 1. Question 1 - Layering. CSCI 1680 Computer Networks Fonseca

Digital Communication Networks

UNIT 2 TRANSPORT LAYER

Computer Communication Networks

L5: Building Direct Link Networks III. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

CS370: Operating Systems [Spring 2016] Dept. Of Computer Science, Colorado State University

Problem Statement. Physical and Data Link Layer Overview. Five Tasks Encoding. Make two computers talk to each other

Basics of datacommunication

Direct Link Networks. Lecture - Encoding & Framing 1. Areas for Discussion. Problems

PLEASE READ CAREFULLY BEFORE YOU START

CS 4390 Computer Networks. Transport Services and Protocols

CS 640 Lecture 4: 09/11/2014

L2: Bandwidth and Latency. Hui Chen, Ph.D. Dept. of Engineering & Computer Science Virginia State University Petersburg, VA 23806

Communication Fundamentals in Computer Networks

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

CS 457 Networking and the Internet. Network Overview (cont d) 8/29/16. Circuit Switching (e.g., Phone Network) Fall 2016 Indrajit Ray

Network Architecture

Priority Traffic CSCD 433/533. Advanced Networks Spring Lecture 21 Congestion Control and Queuing Strategies

Course Outline (1) Fundamentals of Computer Networks ECE 478/578. Introduc)on. Fundamentals of Computer Networks (ECE 478/578)

CS 326: Operating Systems. Networking. Lecture 17

CompSci 356: Computer Network Architectures. Lecture 4: Link layer: Encoding, Framing, and Error Detection Ref. Chap 2.2, 2.3,2.4

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2. Goals for Todayʼs Lecture. Role of Transport Layer

Chapter 2 - Part 1. The TCP/IP Protocol: The Language of the Internet

Chapter I: Introduction

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

CS 640: Introduction to Computer Networks. Today s Lecture. Page 1

IP Packet Switching. Goals of Todayʼs Lecture. Simple Network: Nodes and a Link. Connectivity Links and nodes Circuit switching Packet switching

CMSC 332 Computer Networks Network Layer

CS 428/528 Computer Networks Lecture 01. Yan Wang

CSC 4900 Computer Networks: Network Layer

CS 344/444 Computer Network Fundamentals Final Exam Solutions Spring 2007

ECEN Final Exam Fall Instructor: Srinivas Shakkottai

CS555: Distributed Systems [Fall 2017] Dept. Of Computer Science, Colorado State University

Real-Time Protocol (RTP)

Internet II. CS10 : Beauty and Joy of Computing. cs10.berkeley.edu. !!Senior Lecturer SOE Dan Garcia!!! Garcia UCB!

ECE 653: Computer Networks Mid Term Exam all

Lecture 16: Network Layer Overview, Internet Protocol

NETWORK PROBLEM SET Solution

Today s Agenda. Today s Agenda 9/8/17. Networking and Messaging

CSCI 466 Midterm Networks Fall 2011

Internet Architecture & Performance. What s the Internet: nuts and bolts view

Introduction to Networks

COMPUTER NETWORKS UNIT I. 1. What are the three criteria necessary for an effective and efficient networks?

Chapter 4 Network Layer: The Data Plane

CSCI-1680 Physical Layer Link Layer I Rodrigo Fonseca

PLEASE READ CAREFULLY BEFORE YOU START

PLEASE READ CAREFULLY BEFORE YOU START

Lecture 2: Internet Structure

Chapter 6. What happens at the Transport Layer? Services provided Transport protocols UDP TCP Flow control Congestion control

Problem 7. Problem 8. Problem 9

CS519: Computer Networks

Transport Protocols Reading: Sections 2.5, 5.1, and 5.2

Computer Networks. ENGG st Semester, 2010 Hayden Kwok-Hay So

CS4700/CS5700 Fundamentals of Computer Networks

Packet Switching - Asynchronous Transfer Mode. Introduction. Areas for Discussion. 3.3 Cell Switching (ATM) ATM - Introduction

Networking and Internetworking 1

User Datagram Protocol (UDP):

ECE 650 Systems Programming & Engineering. Spring 2018

Network Management & Monitoring

Data Link Networks. Hardware Building Blocks. Nodes & Links. CS565 Data Link Networks 1

PLEASE READ CAREFULLY BEFORE YOU START

CS 3516: Computer Networks

Data Link Layer Overview

CSCD 433/533 Advanced Networks

Data Networks. Lecture 1: Introduction. September 4, 2008

Links Reading: Chapter 2. Goals of Todayʼs Lecture. Message, Segment, Packet, and Frame

Goals for Today s Class. EE 122: Networks & Protocols. What Global (non-digital) Communication Network Do You Use Every Day?

The Diffie-Hellman Key Exchange

Transcription:

CS 455: INTRODUCTION TO DISTRIBUTED SYSTEMS [NETWORKING] Shrideep Pallickara Computer Science Colorado State University Frequently asked questions from the previous class survey Why not spawn processes per connection server-side? Encoding schemes: Why? Baseline wander: Analogy? Manchester encoding: why does it transition so much? ServerSocket and Socket communications Can we use ServerSockets and Sockets for HW1? How can we program on multiple computers? 3 rd argument (multi-homed hosts) for ServerSocket What if the queue length for incoming connections is breached? Connection refused Is there a limit on the number of socket connections we can open on a computer? Number or range that gives best performance? Laptops and Labs L2.1 L2.2 Topics covered in this lecture Encoding Wrap-up Bandwidth and Latency Multiplexing Network Architecture Encapsulation Manchester encoding and NRZ NRZ 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 0 Manchester Encoding L2.3 January 16, 2018 L2.4 NRZI (Non return to zero inverted) Make a transition from current signal to encode a 1 Stay at current signal to encode a 0 Solves the problem of consecutive 1 s But does nothing for consecutive 0 s 4B/5B encoding Attempts to address inefficiencies in Manchester encoding Without suffering from problems due to extended high/low signals The crux here is to insert extra bits into bitstream Breakup long sequences of 1s or 0s 4 bits of actual data encoded in a 5-bit code 5-bit codes are carefully selected n No more than 1 leading 0 & no more than 2 trailing 0s January 16, 2018 L2.5 January 16, 2018 L2.6 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.1

4B/5B encoding 4B 5B 0000 11110 0001 01001 0010 10100 0011 10101 0100 01010 0110 01110 0111 01111 1000 10010 1001 10011 1010 10110 1011 10111 1100 11010 1101 11011 1110 11100 4B/5B: Rules for the conversion of 4-bit codes to 5- bit codes Objective is to ensure that in each translation there is: No more than one leading 0 No more than two trailing 0 s When sent back-to-back n No pair of 5-bit codes results in more than 3 consecutive 0 s being transmitted 5-bit codes are transmitted using NRZI This is why they are so concerned with consecutive 0 s 1111 11101 January 16, 2018 L2.7 January 16, 2018 L2.8 Expectations that we have of a network NETWORKING lication programmer Error-free and timely delivery of messages Network designer Cost effective design Effective and fair allocation of resources Network provider Easy to administer and manage Isolate faults and account for usage L2.9 L2.10 A network must provide connectivity among a set of computers Physical medium: Link Nodes Multiple access links are limited in size Geographical distances that can be covered Number of nodes that can be connected... Multiple-access L2.11 L2.12 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.2

Connectivity between nodes need not imply a direct physical connection. Otherwise Switched networks: Indirect connectivity among cooperating nodes Networks would be very limited in the number of nodes they could connect Number of wires out the back of a node Unmanageable Very expensive L2.13 L2.14 Switched networks: Indirect connectivity among cooperating nodes Nodes with at least two links Run software that forwards data on one link out on another Types Circuit switched Packet switched Switched networks: Circuit switched networks Establish a dedicated circuit Across a set of links No one else can use this till termination Allows source to send a stream of bits Across circuit to the destination node Employed by the telephone system L2.15 L2.16 Switched networks: Packet switched networks Interconnection of networks Nodes in the network send discrete data blocks to each other Use store-and-forward 1 Receive complete packet over some link 2 Store packet in internal memory 3 Forward complete packet to another node Used by the overwhelming majority of computer networks Cloud Cloud Router/Gateway forwards messages between networks Cloud L2.17 L2.18 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.3

Addressing: A node must be able to say which nodes it wishes to communicate with Assign an address (byte string) to each node Distinguish node from other nodes in the network Source specifies address of the destination node Switches and routers use address to forward messages towards the destination node Routing COST EFFECTIVE RESOURCE SHARING L2.19 L2.20 How do all hosts that want to communicate share the network Data sent by multiple users can be multiplexed over the physical links At the same time? How about sharing links? Hosts want to use it at the same time Multiplexing ANALOGY: Sharing CPU among multiple processes Switch 1 Switch 2 L2.21 L2.22 Multiplexing data onto a physical link Synchronous time division multiplexing (STDM) Divide time into quanta Assign quanta in round-robin fashion Frequency division multiplexing (FDM) Transit data flows at different frequencies Problems with STDM and FDM {Problem-1} Limited to specific situations Max number of flows is fixed Known ahead of time {Problem-2} If one of the flows does not have data? Its share of the physical link remains idle In computer communications: 1 Amount of time a link is idle can be very large 2 Data flows are fluid L2.23 L2.24 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.4

Statistical multiplexing Physical link is shared over time Data is transmitted from each flow on demand Not a predetermined slot When there is only one flow n No need to wait for quantum to come around Limiting transmissions so that other flows can have a turn Upper bound on size of data block that each flow is allowed to transmit Packet Larger application messages Fragmented into several packets Receiver reassembles these Each flow sends packets over the link Decision made on a packet-by-packet basis L2.25 L2.26 Multiplexing packets from multiple sources onto a shared link Deciding which packet to send over a shared link In some cases, decision is made by switches Service packets using FIFO Round robin n Ensure flows receive a certain share of the bandwidth n Maximum threshold for delays for certain packets Switch 1 Networks that allow special treatment of flows Quality of Service L2.27 L2.28 Network performance is measured in two fundamental ways Bandwidth Number of bits transmitted over the network in a given time (e.g., 10 million bits per seconds 10 Mbps) Also called throughput BANDWIDTH AND LATENCY Latency How long it takes for message to go from one end of the network to another? L2.29 L2.30 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.5

Components of latency The Delay x Bandwidth product Speed-of-light propagation delay 3 x 10 8 m/sec in vacuum 2.3 x 10 8 m/sec in cable Amount of time to transmit a unit of data Queuing delays Bandwidth Delay Viewing the Network as a pipe L2.31 L2.32 The Delay x Bandwidth product The product gives us information about how many bits fit in the pipe Transcontinental channel 50 ms one-way latency Bandwidth: 45 Mbps Can hold: 50 x 10-3 seconds x 45 x 10 6 bits/second n 2.25 x 10 6 bits = 280 KB The Delay x Bandwidth product Corresponds to how many bits the sender must send Before first bit arrives at the receiver Bits in the pipe are said to be in flight L2.33 L2.34 Bandwidth and latency improvements are not in lockstep Over past 35-40 years approximately Bandwidth improvements: 220-1200 times Latency improvements: 4-20 times Ethernet 802.3 (1978) 10 Mbps Latency 3 millisecond Ethernet 802.3ae (2003) 10,000 Mbps (1000 times) Latency 0.19 millisecond (15 times) What does not change as the bandwidth increases? Speed of light High-speed does not mean that latency improves at the same rate as bandwidth Transcontinental RTTs 100 ms for n 1-Mbps/1-Gbps link L2.35 L2.36 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.6

Sending 1 MB data over a cross country link. Delay 100 ms 1 Mbps link Pipe: 100 x 10-3 x 10 6 = 100 Kb = 0.1 Mb So you need 80 pipes to transmit 1 MB n 8 Mb/0.1 Mb = 80 1 Gbps Pipe: 100 x 10-3 x 10 9 = 100 Mb n So you need 8 Mb/100 Mb = approx 1/12 th of the pipe is utilized SUPPORT FOR COMMON SERVICES L2.37 L2.38 More accurate to think of network as allowing applications to communicate Processes communicating over an abstract channel When 2 applications need to communicate Lot of things need to happen Beyond just sending messages between the hosts Build all functionality into each app? Host Host Channel Identify and build right set of common services Hide complexity without constraining functionality Host Host L2.39 L2.40 Guarantees provisioned in the channel Guaranteed delivery? Ordered delivery? Thwart eavesdropping? Not just which functionality, but where they will be provided View network as a bit pipe High-level communication semantics provided by end hosts Keeps switches in the middle very simple Alternative: Push functionality onto switches End hosts are dumb devices n Telephones L2.41 L2.42 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.7

Mask failures so that the network appears more reliable than it really is Bit errors Burst errors: Consecutive bits are corrupted Packet failures Discarded because the switch buffer is full n Congested Routing mistakes Node and link failures Route around failed nodes and links NETWORK ARCHITECTURE L2.43 L2.44 All communications in distributed systems based on sending/receiving messages No shared memory Sending message from A to B Build message in A s address space Send message over the network Reconstruct message at B But A and B must agree on the meaning of the bits Signaling 1 s and 0 s What is the last bit of the message? Detect if the message is lost or damaged Respond to problems Representation of data types L2.45 L2.46 Layering and Protocols Start with services provided by hardware Add a sequence of layers Each providing higher level of service Services at higher layers implemented in terms of lower layers Advantages of layering Decomposes problem into manageable components Provides modular design Adding functionality may result only in minor modifications L2.47 L2.48 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.8

Advantages of layering Layered Architectures: Requests go down the hierarchy; results flow upward Each layer can be changed independently of the other Change as technology improves Layer N Component at layer L i can call components at layer L i-1 Request flow Layer N - 1 Response flow Layer 2 Layer 1 L2.49 L2.50 Example of a layered network system lication programs Process-to-process channels Host-to-Host connectivity Hardware Layered system with alternative abstractions at a given layer lication programs Request/Reply Message stream channels channel Host-to-Host connectivity Hardware L2.51 L2.52 Abstract objects that comprise layers of a network system are called protocols Provides a service interface to other objects on the same computer Wishing to use its communication services Defines the form and meaning of messages exchanged by protocol peers Protocol also refers to modules that implement a specification ENCAPSULATION L2.53 L2.54 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.9

Example of a protocol graph Encapsulation File Digital Library Video File Digital Library Video receives a set of bytes to transmit from the application E-mail, integers, images etc MSP MSP is responsible for sending this data to its peer at the other end Must communicate control info to its peer Instruct how to handle the message HHP HHP Host 1 Host 2 L2.55 L2.56 When asked to transmit info, lower level layers add information to the message Attach a header to the message Small data structure Few bytes to several dozen bytes Control info at the end of message: trailer Format is specific to the protocol Data being transmitted: body or payload lication data is said to be encapsulated Encapsulating high-level messages inside low-level messages Host 1 lication lication Host 2 Program Program Data Data HHP HHP Data HHP Data Data L2.57 L2.58 Encapsulation: Some more info Low-level protocol does not interpret message given to it by high-level protocol Cannot extract meaning Low-level protocol may apply simple transformations to the data it is given Compress Encrypt Multiplexing is applicable up-and-down the protocol graph too attaches header to every message that goes through it Header include information to indentify the application n Called demultiplexing key or demux key At the destination host, strips its header Examines demux key Demultiplexes message to correct application L2.59 L2.60 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.10

Demux key is used at all levels of the protocol stack Some use an 8-bit field {TCP (6), UDP (17)} Can support only 2 8 (256) high level protocols Can also be 16/32-bits There could be a single demultiplexing field Same demux key used at both ends There could be a pair of demultiplexing fields Each side uses different key to identify high-level protocol The contents of this slide-set are based on the following references Computer Networks: A Systems roach. Larry Peterson and Bruce Davie. 4th edition. Morgan Kaufmann. ISBN: 978-0-12-370548-8. [Chapters 1 and 2] Distributed Systems: Principles and Paradigms. Andrew S. Tanenbaum and Maarten Van Steen. 2nd Edition. Prentice Hall. ISBN: 0132392275/978-0132392273. [Chapter 4] L2.61 L2.62 SLIDES CREATED BY: SHRIDEEP PALLICKARA L2.11