Page 1. CS162 Operating Systems and Systems Programming Lecture 22. Networking II. Multiple Access Algorithm

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

Hadoop/MapReduce Computing Paradigm

ECE 158A: Lecture 13. Fall 2015

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

EE 122: Ethernet and

Cloud Computing and Hadoop Distributed File System. UCSB CS170, Spring 2018

Reminder: Datalink Functions Computer Networking. Datalink Architectures

Goals of Today s Lecture. Adaptors Communicating

Link Layer and Ethernet

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

Outline: Connecting Many Computers

Link Layer and Ethernet

PARLab Parallel Boot Camp

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

CS 43: Computer Networks Media Access. Kevin Webb Swarthmore College November 30, 2017

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

Clustering Lecture 8: MapReduce

Networks and Distributed Systems. Sarah Diesburg Operating Systems CS 3430

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

CSMA/CD (Collision Detection)

Computer Networks Medium Access Control. Mostafa Salehi Fall 2008

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

Computer Networks Principles LAN - Ethernet

Networking Technologies and Applications

Medium Access Protocols

Computer Network Fundamentals Spring Week 3 MAC Layer Andreas Terzis

CS3600 SYSTEMS AND NETWORKS

RMIT University. Data Communication and Net-Centric Computing COSC 1111/2061/1110. Lecture 8. Medium Access Control Methods & LAN

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

Raj Jain. The Ohio State University Columbus, OH

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

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

CSCI 466 Midterm Networks Fall 2011

THE OSI MODEL. Application Presentation Session Transport Network Data-Link Physical. OSI Model. Chapter 1 Review.

Page 1. CS162 Operating Systems and Systems Programming Lecture 22. Networking III. Automatic Repeat Request

Contention Protocols and Networks

EE-379 Embedded Systems and Applications Introduction to Ethernet

Summary of MAC protocols

Review. Error Detection: CRC Multiple access protocols. LAN addresses and ARP Ethernet. Slotted ALOHA CSMA/CD

Multiple Access and Spanning Tree

The Link Layer II: Ethernet

CS164 Final Exam Winter 2013

Random Access. 1. Aloha. 2. Slotted Aloha 3. CSMA 4. CSMA/CD

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 18

Project 3a is out! Goal: implement a basic network firewall. l We give you the VM & framework. l You implement the firewall logic.

Links. CS125 - mylinks 1 1/22/14

CSCI 466 Midterm Networks Fall 2011

Principles behind data link layer services

Computer Networks. Randomized Multiple Access

King Fahd University of Petroleum and Minerals College of Computer Sciences and Engineering Department of Computer Engineering

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

Topics. Link Layer Services (more) Link Layer Services LECTURE 5 MULTIPLE ACCESS AND LOCAL AREA NETWORKS. flow control: error detection:

ECE 4450:427/527 - Computer Networks Spring 2017

Introduction... xiii Chapter 1: Introduction to Computer Networks and Internet Computer Networks Uses of Computer Networks...

EITF25 Internet Techniques and Applications L4: Network Access. Stefan Höst

Distributed Systems CS6421

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

Networking and Internetworking 1

Lecture 11: Networks & Networking

ECE 158A: Lecture 7. Fall 2015

COMP/ELEC 429/556 Introduction to Computer Networks

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

Lecture 15 Networking Fundamentals. Today s Plan

Communication (III) Kai Huang

Introduction to Networks and the Internet

CS 640 Lecture 4: 09/11/2014

Local Area Network Overview

cs144 Midterm Review Fall 2010

Networks Homework # 2

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

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

ECS 15; Lectures 17 and 18. The Internet. What is the internet, and how does it work? TA feedback

Getting Connected (Chapter 2 Part 4) Networking CS 3470, Section 1 Sarah Diesburg

CS 43: Computer Networks Switches and LANs. Kevin Webb Swarthmore College December 5, 2017

CS 61C: Great Ideas in Computer Architecture. MapReduce

EEC-484/584 Computer Networks

Lecture 9 The Data Link Layer part II. Antonio Cianfrani DIET Department Networking Group netlab.uniroma1.it

Page 1. Review: The Problem" Software System Modularity" Solution: Intermediate Layers"

Your Future?! Links and LANs! Regrading of Homework! Other Announcements! Goals of Todayʼs Lecture! Link-Layer Services!

Message, Segment, Packet, and Frame Link-layer services Encoding, framing, error detection, transmission control Error correction and flow control

CS 349/449 Internet Protocols Midterm Exam Winter /21/2003

Network Protocols - Revision

CS244a: An Introduction to Computer Networks

Hadoop محبوبه دادخواه کارگاه ساالنه آزمایشگاه فناوری وب زمستان 1391

Ethernet. EE 122: Intro to Communication Networks. Fall 2007 (WF 4-5:30 in Cory 277) Vern Paxson TAs: Lisa Fowler, Daniel Killebrew & Jorge Ortiz

Module 16: Distributed System Structures

19: Networking. Networking Hardware. Mark Handley

COMP 361 Computer Communications Networks. Spring Semester Final Examination Solution Key

Operating Systems. 16. Networking. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski

Medium Access Control. CSCI370 Lecture 5 Michael Hutt New York Institute of Technology

Announcements. IP Forwarding & Transport Protocols. Goals of Today s Lecture. Are 32-bit Addresses Enough? Summary of IP Addressing.

COMS Introduction to Computers. Networking

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

Module 15: Network Structures

TCP/IP THE TCP/IP ARCHITECTURE

CHAPTER 7 MAC LAYER PROTOCOLS. Dr. Bhargavi Goswami Associate Professor & Head Department of Computer Science Garden City College

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

LANs. Local Area Networks. via the Media Access Control (MAC) SubLayer. Networks: Local Area Networks

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

CS 416: Operating Systems Design April 11, 2011

Transcription:

Multiple Access Algorithm CS6 Operating Systems and Systems Programming Lecture Networking II April 3, 00 Ion Stoica http://inst.eecs.berkeley.edu/~cs6 Single shared broadcast channel Avoid having multiple nodes speaking at once Otherwise, collisions lead to garbled Multiple access mechanism Distributed algorithm for sharing the channel Algorithm determines which node can transmit Classes of techniques Channel partitioning: divide channel into pieces Taking turns: scheme for trading off who gets to transmit Random access: allow collisions, and then recover» Optimizes for the common case of only one sender Lec. Random Access Protocol: AlohaNet Norm Abramson left Stanford in search of surfing Set up first radio-based communication system connecting the Hawaiian islands Hub at Alohanet HQ (Univ. Hawaii, Oahu) Other sites spread among the islands Had two radio channels: Random access: sites sent on this channel Broadcast: only used by hub to rebroadcast incoming Aloha Transmission Strategy When new arrived at site, send to hub for transmission Site listened to broadcast channel If it heard repeated, knew transmission was rec d If it didn t hear correctly, it assumed a collision If collision, site waited random delay before retransmitting Problem: Stability: what if load increases? More collisions less gets through more resent more load More collisions Unfortunately: some sender may have started in clear, get scrambled without finishing Lec.3 Lec.4 Page

Ethernet Bob Metcalfe, Xerox PARC, visits Hawaii and gets an idea! Shared medium (coax cable) Can sense carrier to see if other nodes are broadcasting at the same time Sensing is subject to timelag Only detect those sending a short while before Monitor channel to detect collisions Once sending, can tell if anyone else is sending too Lec.5 Ethernet s CSMA/CD CSMA: Carrier Sense Multiple Access CD: Collision detection Sense channel, if idle If detect another transmission» Abort, send jam signal» Delay, and try again Else» Send frame Receiver accepts: Frames addressed to its own address Frames addressed to the broadcast address (broadcast) Frames addressed to a multicast address, if it was instructed to listen to that address All frames (promiscuous mode) Lec.6 Ethernet s CSMA/CD (more) Exponential back-off Goal: adapt retransmission attempts to estimated current load Heavy load: random wait will be longer First collision: choose K from {0,}; delay is K x 5 bit transmission times After second collision: choose K from {0,,,3} After ten or more collisions, choose K from {0,,,3,4,,03} Minimum packet size Give a host enough time to detect collisions In Ethernet, minimum packet size = 64 bytes What is the relationship between minimum packet size and the length of the LAN? Lec.7 a) Time = t; Host starts to send frame b) Time = t + d; Host starts to send a frame, just before it hears from host s frame c) Time = t + *d; Host hears Host s frame detects collision Minimum Packet Size (more) Host Host propagation delay (d) propagation delay (d) What about 00 mbps? gbps? 0 gbps? Host Host Host Host propagation delay (d) d = LAN_length/ligh_speed = min_frame_size/(*bandwidth) LAN_length = (min_frame_size)*(light_speed)/(*bandwidth) = = (8*64b)*(.5*0 8 mps)/(*0 7 bps) = 6400m approx Lec.8 Page

Goals for Today Review: Point-to-point networks Networking Network layer Transport layer (start) Reduce primer (project 4) Switch Router Internet Point-to-point network: a network in which every physical wire is connected to only two computers Switch: a bridge that transforms a shared-bus (broadcast) configuration into a point-to-point network. Hub: a multiport device that acts like a repeater broadcasting from each input to every output Router: a device that acts as a junction between two networks to transfer packets among them. Lec.9 Lec.0 Network (IP) Layer IP Routing Deliver a packet to specified network destination Packet forwarding & routing Perform segmentation/reassemble Others: packet scheduling buffer management Each packet is routed individually (like a letter) Packets of same connection may take different paths Host A router router Host C router 3 Host D Packet forwarding: the process of selecting outgoing link (next hop) to forward a packet Usually done based on destination address Routing: the process of computing paths between endpoints and building forwarding tables at routers Host B router 4 router 5 router 6 router 7 Host E Lec. Lec. Page 3

IP Routing Packet Forwarding Each packet is routed individually (like a letter) Packets of same connection may take different paths Host A router router Host C router 5 router 3 Host D IP v4 addresses (3b) Quad notation (bytes separated by dots) x: don t care At each router the packet destination address. Is matched according to longest prefix matching rule. Packet is forwarded to the corresponding output port Router Internet Forwarding table 8.5.xxx.xxx 3 8.5..xxx 6.8.00.xxx Host B router 6 router 4 router 7 Host E Lec.3 6.5.3.0 8.5.. source address destination address interconnection backplane Lec.4 interfaces Internet Routing: Two Level Hierarchy Autonomous system (AS): network owned by one admin. entity (e.g., ATT, Comcast) Intra-domain: routing within an AS e.g., link state, distance vector protocols Inter-domain: use across ASes Border Gateway Protocol (BGP) Interior router BGP router Administrivia I ll be away Wednesday-Friday (Eurosys) Thursday s lecture will be taught by Ben No office hour on Thursday, April 5 Matei and Andy will be away as well Ben will teach the discussion sections of both Matei and Andy No office hours for Andy and Matei next week AS- AS-3 Project 4 Initial design, Wednesday (4/), will give you two discussion sections before deadline Code deadline, Wednesday (5/5), two weeks later AS- Lec.5 Lec.6 Page 4

Transport Layer Demultiplex packets at the receiver: decide to which process to deliver a packet Others: Flow control: protocol to avoid over-running a slow receiver Congestion control: protocol to avoid over-running (congesting) the network Reliability: recover packet losses In-order delivery: deliver packets in the same order they were sent out Examples: UDP (User Datagram Protocol): only demulteplexing TCP (Transport Control Protocol): demultiplexing, flow & congestion control, reliability, in-order delivery Lec.7 Transport Layer: Demultiplexing Ports: end-points at receiver to which packets are delivered 6b in IPv4 Processes bind to ports Proc. A (port 0) Proc. A (port 0) Internet Proc. B (port 7) 6.5.3.0 8.5.. Proc. B (port 7) Transport Network Link 0 0 7 7 6.5.3.0 8.5.. 0 0 7 7 6.5.3.0 8.5.. Transport Network Link Physical Physical 6.5.3.0 Internet 8.5.. Lec.8 What is Cloud Computing? Cloud refers to large Internet services that run on 0,000 s of machines (Google, Yahoo!, etc) More recently, cloud computing refers to services by these companies that let external customers rent cycles Amazon EC: virtual machines at 8.5 /hour, billed hourly Amazon S3: storage at 5 /GB/month Windows Azure: special applications using Azure API Attractive features: Scale: 00 s of nodes available in minutes Fine-grained billing: pay only for what you use Ease of use: sign up with credit card, get root access What is Reduce? Data-parallel programming model for clusters of commodity machines Pioneered by Google Processes 0 PB of per day Popularized by open-source Hadoop project Used by Yahoo!, Facebook, Amazon, Hadoop: open source version of Reduce http://hadoop.apache.org/ Lec.9 Lec.0 Page 5

What is Reduce Used For? At Google: Index building for Google Search Article clustering for Google News Statistical machine translation At Yahoo!: Index building for Yahoo! Search Spam detection for Yahoo! Mail At Facebook: Data mining Ad optimization Spam detection Reduce Goals Scalability to large volumes: Scan 00 TB on node @ 50 MB/s = 4 days Scan on 000-node cluster = 35 minutes Cost-efficiency: Commodity nodes (cheap, but unreliable) Commodity network Automatic fault-tolerance (fewer admins) Easy to use (fewer programmers) Lec. Lec. Typical Hadoop Cluster Challenges Cheap nodes fail, especially if you have many Mean time between failures for node = 3 years MTBF for 000 nodes = day Solution: Build fault-tolerance into system Commodity network = low bandwidth Solution: Push computation to the Programming distributed systems is hard Solution: Users write -parallel map and reduce functions, system handles work distribution and failures Lec.3 Lec.4 Page 6

Hadoop Components Hadoop Distributed File System Distributed file system (HDFS) Single namespace for entire cluster Replicates 3x for fault-tolerance Reduce framework Runs jobs submitted by users Manages work distribution & fault-tolerance Colocated with file system Files split into 8MB blocks Blocks replicated across several nodes (usually 3) Namenode stores meta (file names, locations, etc) Optimized for large files, sequential reads Files are append-only Namenode File 3 4 4 3 4 3 3 4 Datanodes Lec.5 Lec.6 Reduce Programming Model Example: Word Count Data type: key-value records function: (K in, V in ) list(k inter, V inter ) def mapper(line): foreach word in line.split(): output(word, ) Reduce function: (K inter, list(v inter )) list(k out, V out ) def reducer(key, values): output(key, sum(values)) Lec.7 Lec.8 Page 7

Word Count Execution Input Shuf<le & Sort Reduce Output the quick brown fox the fox ate the mouse how now brown cow the, brown, fox, the, fox, the, how, now, brown, ate, mouse, cow, quick, Reduce Reduce brown, fox, how, now, the, 3 ate, cow, mouse, quick, Lec.9 An Optimization: The Combiner Local reduce function for repeated keys produced by same map For associative ops. like sum, count, max Decreases amount of intermediate Example: local counting for Word Count: def combiner(key, values): output(key, sum(values)) Lec.30 Word Count with Combiner Input Shuf<le & Sort Reduce Output the quick brown fox the fox ate the mouse how now brown cow the, brown, fox, the, fox, how, now, brown, ate, mouse, cow, quick, Reduce Reduce brown, fox, how, now, the, 3 ate, cow, mouse, quick, Reduce Execution Details pers preferentially scheduled on same node or same rack as their input block Push computation to, minimize network use pers save outputs to local disk before serving to reducers Allows running more reducers than # of nodes Allows recovery if a reducer crashes Lec.3 Lec.3 Page 8

Conclusion Network layer IP packet forwarding: based on longest-prefix match Transport layer Multiplexing and demultiplexing via port numbers UDP gives simple gram service TCP gives reliable byte-stream service Reduce (Hadoop) Data-parallel programming model for clusters of commodity machines Lec.33 Page 9