CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 20: Networks and Distributed Systems

Similar documents
CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 19: Networks and Distributed Systems

Networks and Distributed Systems. Sarah Diesburg Operating Systems CS 3430

CS162 Operating Systems and Systems Programming Lecture 20. Distributed Systems, Networking. Page 1. Goals for Today

CS162 Operating Systems and Systems Programming Lecture 21. Networking

CS162 Operating Systems and Systems Programming Lecture 21. Networking

Page 1. CS194-3/CS16x Introduction to Systems. Lecture 20. Networking I. Goals for Today. Distributed Systems Networking

Lecture 15 Networking Fundamentals. Today s Plan

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

CMSC 611: Advanced. Interconnection Networks

CS162 Operating Systems and Systems Programming Lecture 21. Networking

ECE 158A: Lecture 13. Fall 2015

Reminder: Datalink Functions Computer Networking. Datalink Architectures

CS162 Operating Systems and Systems Programming Lecture 21. Networking

Growth. Individual departments in a university buy LANs for their own machines and eventually want to interconnect with other campus LANs.

Principles behind data link layer services

CS162 Operating Systems and Systems Programming Lecture 20. Reliability and Access Control / Distributed Systems

Principles behind data link layer services:

Principles behind data link layer services:

Interface The exit interface a packet will take when destined for a specific network.

Outline: Connecting Many Computers

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

Medium Access Protocols

Summary of MAC protocols

Extending the LAN. Context. Info 341 Networking and Distributed Applications. Building up the network. How to hook things together. Media NIC 10/18/10

Computer Network Protocols: Myths, Missteps, and Mysteries. Dr. Radia Perlman, Intel Fellow

Local Area Networks (LANs): Packets, Frames and Technologies Gail Hopkins. Part 3: Packet Switching and. Network Technologies.

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

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

Adaptors Communicating. Link Layer: Introduction. Parity Checking. Error Detection. Multiple Access Links and Protocols

416 Distributed Systems. Networks review; Day 1 of 2 Jan 5 + 8, 2018

Lecture 5 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Switching and Forwarding Reading: Chapter 3 1/30/14 1

Data Link Layer. Our goals: understand principles behind data link layer services: instantiation and implementation of various link layer technologies

19: Networking. Networking Hardware. Mark Handley

CS 126 Lecture S5: Networking

CS 126 Lecture S5: Networking

STEVEN R. BAGLEY PACKETS

Layer 2 functionality bridging and switching

Lecture 6 The Data Link Layer. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Sharing Channels CS 118

Lecture 9: Bridging. CSE 123: Computer Networks Alex C. Snoeren

Local Area Network Overview

Distributed Systems. Why use distributed systems? What is a distributed system? Intro to Distributed Systems and Networks.

CS61C : Machine Structures

CS155b: E-Commerce. Lecture 3: Jan 16, How Does the Internet Work? Acknowledgements: S. Bradner and R. Wang

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

ET4254 Communications and Networking 1

Communications Software. CSE 123b. CSE 123b. Spring Lecture 2: Internet architecture and. Internetworking. Stefan Savage

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

Lecture 9: Bridging & Switching"

CSE 123: Computer Networks Alex C. Snoeren. HW 2 due Thursday 10/21!

CSC 4900 Computer Networks: Link Layer (2)

ECE 435 Network Engineering Lecture 11

Cisco Cisco Certified Network Associate (CCNA)

Networking. Melissa Winstanley

Lecture 3: Packet Forwarding

Lecture 12: Aggregation. CSE 123: Computer Networks Alex C. Snoeren

Hubs. twisted pair. hub. 5: DataLink Layer 5-1

CS162 Operating Systems and Systems Programming Lecture 21. Networking. April 8, 2010 Ion Stoica

CS 3640: Introduction to Networks and Their Applications

Lecture 12: Addressing. CSE 123: Computer Networks Alex C. Snoeren

ECE 4450:427/527 - Computer Networks Spring 2017

CCM 4300 Lecture 6 Computer Networks, Wireless and Mobile Communications. Dr Shahedur Rahman. Room: T115

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Computer-to-Computer Networks (cont.)

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Contention Protocols and Networks

CS61C : Machine Structures

CompSci 356: Computer Network Architectures. Lecture 7: Switching technologies Chapter 3.1. Xiaowei Yang

Lecture 10: Internetworking"

Goal and Outline. Computer Networking. What Do We Need? Today s Story Lecture 3: Packet Switched Networks Peter Steenkiste

Async Programming & Networking. CS 475, Spring 2018 Concurrent & Distributed Systems

Link Layer and LANs 안상현서울시립대학교컴퓨터 통계학과.

Review of Topology and Access Techniques / Switching Concepts

Good day. Today we will be talking about Local Internetworking What is Internetworking? Internetworking is the connection of different networks.

2.1 CHANNEL ALLOCATION 2.2 MULTIPLE ACCESS PROTOCOLS Collision Free Protocols 2.3 FDDI 2.4 DATA LINK LAYER DESIGN ISSUES 2.5 FRAMING & STUFFING

CSE/EE 461 Section 2

Introduction to Networks and the Internet

Lecture 28: Networks & Interconnect Architectural Issues Professor Randy H. Katz Computer Science 252 Spring 1996

15-441: Computer Networking. Wireless Networking

1 Connectionless Routing

Internetworking Part 1

Link Layer and Ethernet

Unit A - Connecting to the Network

High Level View. EE 122: Ethernet and Random Access protocols. Medium Access Protocols

Physical and Link Layers. CS144 Review Session 6 November 6 th, 2008 Roger Liao Based on slides by Ben Nham

CSE 461: Multiple Access Networks. This Lecture

CSE/EE 461 The Network Layer. Application Presentation Session Transport Network Data Link Physical

Lecture 12: Interconnection Networks. Topics: communication latency, centralized and decentralized switches, routing, deadlocks (Appendix E)

CS61C : Machine Structures

ELEC / COMP 177 Fall Some slides from Kurose and Ross, Computer Networking, 5 th Edition

CS 3640: Introduction to Networks and Their Applications

CSCI-1680 Link Layer Wrap-Up Rodrigo Fonseca

Chapter 6 Connecting Device

The Link Layer and LANs. Chapter 6: Link layer and LANs

CHAPTER 9: PACKET SWITCHING N/W & CONGESTION CONTROL

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

Network.... communication system for connecting end- systems. End-systems a.k.a. hosts PCs, workstations dedicated computers network components

CS 43: Computer Networks. 27: Media Access Contd. December 3, 2018

Last Time. Internet in a Day Day 2 of 1. Today: TCP and Apps

Transcription:

S 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2003 Lecture 20: Networks and Distributed Systems 20.0 Main Points Motivation for distributed vs. centralized systems Survey of network technologies Technology trends Decade Technology $ per machine Sales volume Users per machine 50 s $10M 100 1000 s 60 s Mainframes $1M 10K 100 s 70 s Mini-computers $100K 1M 10 s 80 s P s $10K 100M 1 90 s Handhelds $100 $1K 10B 1/10 20.1 entralized vs. Distributed Systems Distributed systems: physically separate computers working together Why do we need distributed systems? heaper and easier to build lots of simple computers Easier to add power incrementally Principle of bureaucracy avoidance The added promise of distributed systems: Higher availability one machine goes down, use another Better reliability store data in multiple locations More security each piece easier to make secure Reality has been disappointing: Worse availability depend on every machine being up Worse reliability can lose data if any machine crashes Worse security anyone in world can break into system Key idea: oordination is more difficult, because we have to coordinate multiple copies of shared state information. (using only the network). What would be easy in a centralized system becomes a lot more difficult. 20.2 Goals: Transparencies and ilities One important goal behind much distributed systems design is Transparency. That is, distributed systems are complex, so you would like to shield the user from much of this complexity. (Or would you???). Various types of transparency are: Location an t tell where resources are located Migration Resources may move throughout the system without the user knowing. Replication an t tell how many copies of a resource exist. oncurrency an t tell how many users there are Parallelism System may be able to speed up large jobs by splitting them into smaller pieces that run at the same time. Failure System may hide various things that go wrong in the system. In addition, there are certain properties that are desirable of a distributed system. These include: Availability what is the probability of the system being able to accept and process requests? Reliability This is usually stronger than simply availability. It means not only is the system up, but that it is working correctly. Thus, it includes availability, security and fault tolerance. Performance (not really an ility but should be) various metrics here: latency, throughput, type to first byte, time to last byte, scalability, etc. The key to performance in a distributed system is to avoid bottlenecks. Possible bottlenecks include: centralized components, centralized state (e.g., system tables), centralized control, limited connectivity, and need for consistent global state. Manageability Flexibility A great example of a system that meets many of these criteria is the Internet as it has evolved into its current form. 20.3 Definitions Network: physical connection that allows two computers to communicate. S 162 Spring 2003 Lecture 20 1/10 S 162 Spring 2003 Lecture 20 2/10

20.4.1 Delivery When you broadcast a packet, how does receiver know who it is for? PU Network PU Put header on front of packet: Destination Packet For example, header would contain unique machine # (network address) of target. Everyone gets packet, discards if not the target. In Ethernet, this check is done in hardware; no OS interrupt if not for you. Packet: unit of transfer, sequence of bits carried over network Network carries packets from one PU to another. Destination gets interrupt when packet arrives. Protocol: agreement between two parties as to how information is to be transmitted. 20.4 Broadcast Networks Broadcast networks: shared communication medium. For example, shared medium can be a wire all hosts listen to wire. Inside a computer, this is called a bus a shared set of wires between the PU and the memory modules Ethernet is an example broadcast network (10 Mbits/sec 1Gbit/s) More examples: cellular phones, Metricom packet radios (10Kbit/s 100Kbit/sec). This is an example of layering: we re going to build up complex network protocols by layering more and more stuff on top of the packet. 20.4.2 Arbitration How do your machines arbitrate for use of shared medium? Aloha network (70 s) packet radio between Hawaiian islands Arbitration: blind broadcast, with checksum at end of packet. If received ok (not garbled), send back an acknowledgement. If not received ok, discard. Need checksum anyway, in case airplane flies overhead (or maybe a surfer goes by), and packet gets garbled. Sender waits for a while, and if doesn t get an acknowledgement, re-transmits. So if two senders try to send at same time, both get garbled, both simply re-send later. Problem: stability. What if load increases? Ethernet early 80 s, first practical local area network (Xerox PAR). 10 Mb/s. Most common LAN for UNIX environments, becoming more common in P s. What we have in the department. S 162 Spring 2003 Lecture 20 3/10 S 162 Spring 2003 Lecture 20 4/10

Used wire instead of radio, but still broadcast: all machines tap into single wire, listen to all packets. Key advance was in a new way to do arbitration called SMA/D: arrier sense multiple access/ collision detection. Three pieces: 1. arrier sense don t send unless idle 2. ollision detect sender checks if packet is trampled. If so, abort, wait, and retry. How long should I wait, after trying to send and failing? What if everyone waits the same length of time? We d all keep colliding forever. Also, what if load increases? More likely to get collisions. 3. Adaptive randomized waiting strategy if try to send, and get collision, means there are a number of people trying to send, so pick bigger mean wait time. If collide again, pick even bigger wait. 20.5 Point-to-point networks Here s a different way of thinking about all this why have a shared bus for Ethernet at all, why not simplify and only have point-to-point links, plus routers/switches? entral idea behind ATM (asynchronous transfer mode), the first commercial point-to-point LAN. Inspiration for ATM taken from telephone network. A bunch of advantages: 1. Higher link performance can drive point-to-point connection faster than broadcast link 2. Greater aggregate bandwidth than single link 3. an add capacity incrementally add more links/switches to get more capacity 4. Better fault tolerance (as in Internet) 5. Lower latency (no need for arbitration to send, although you do need a buffer in the switch) Disadvantage: more expensive than having everyone share one bus. But, technology has been relentlessly driving the costs down! As a result, point-to-point communications are starting to be used in everything from workstations, to local area networks, to the Internet. Workstations: In a few years, open up a workstation, will see its PU connected to memory and graphics engine by a switched network, instead of a bus. Multiprocessors are already connected by hooking together lots of small-scale switches. For instance, in a 2-D mesh, or in a hypercube. In LAN s, not only ATM, but now a version of Ethernet called switched Ethernet uses same packet format, analog signaling as Ethernet, but only one machine on each Ethernet. 20.5.1 Issues in point-to-point networks Switches look just like computers: inputs, memory, and outputs. buffers r o s s b a r buffers Switch What if everyone sends to the same output? ongestion. What happens when buffers fill up? Option 1: no flow control. Packets get dropped if they arrive and there s no space. S 162 Spring 2003 Lecture 20 5/10 S 162 Spring 2003 Lecture 20 6/10

If I send a lot, I ll grab the buffers, and then everyone else is hosed. Option 2: flow control between switches. Don t send me more, unless I have room. Put machine that straddles both networks. Lots of different words for this function: router, gateway, bridge, repeater. But basically, acts like a switch. Machine watches all packets on each Ethernet, and if packet is for machine on other one, then copies packet over. Problem: cross-traffic. What if path from source to destination is completely unused, but goes through some switch that has buffers filled up with unrelated traffic? A, B A B,, D D Ethernet Ethernet Option 3: per flow flow control. Allocate a separate set of buffers to each end-toend stream, and use don t send me more on each separate end-to-end stream. The Internet is just a generalization of this. Internet = interconnecting local area networks. Problem: fairness aaaaa ababab acbcacbc dadcdbdc Local networks can be anything Ethernet, AppleTalk, FDDI, even phone company wires, but building blocks are machines that straddle two or more networks. bbbb cccccc ddddd MU Ethernets AT&T AT&T Throughput of each stream is entirely dependent on topology, and relationship to bottleneck. 20.6 The Internet What happens if you need more bandwidth than a single Ethernet? For example, SUN has > 10000 workstations. Berkeley Ethernets MIT Ethernets Buy two Ethernets? If so, how do machines on each network talk to each other? S 162 Spring 2003 Lecture 20 7/10 S 162 Spring 2003 Lecture 20 8/10

20.6.1 Routing How do packets get to their destination? Simple if there s a single machine that straddles all networks, but that won t work in the Internet! A B If packet has to go several hops before it gets to destination, and router straddles several networks, how do routers know how to forward packets? To answer this, some definitions: Name Mom, Soda Address phone #, network address Route how do we get there from here D E Internet solution: routing tables. Each router looks at packet header, does table lookup to decide which link to use to get it closer to destination. F G Also, all machines on the same local area network, have common portion of address/machine id. Routing table contains: Destination LAN > output link that gets closer to destination Note that since the Internet is made up of many individual networks, it s routing is similar but more complicated. Basically these types of algorithms are performed at different levels of the network, such as within a subnet and then among the routers that route between the subnets. H How do you set up the table? Internet has no centralized state! No single machine knows entire topology, and topology is constantly changing! Instead: 1. Routing table has cost number of hops to destination (in practice, also considers how heavily used each link is) 2. Neighbors periodically exchange routing tables 3. If neighbor has cheaper route, use that one So: Initially, routers don t know about any destination Loop Get routing table from neighbors Update routing table S 162 Spring 2003 Lecture 20 9/10 S 162 Spring 2003 Lecture 20 10/10