Chapter 10: I/O Subsystems (2)
|
|
- Kathryn Edwards
- 6 years ago
- Views:
Transcription
1 ADRIAN PERRIG & TORSTEN HOEFLER ( ) Networks and Operating Systems Chapter 10: I/O Subsystems (2) BE CAREFUL WITH I/O DEVICES!
2 Our Small Quiz True or false (raise hand) Open files are part of the process address-space Unified buffer caches improve the access times A partition table can unify the view of multiple disks Unix enables to bind arbitrary file systems to arbitrary locations The virtual file system interface improves modularity of OS code Programmed I/O is efficient for the CPUs DMA enables devices to access virtual memory of processes IOMMUs enable memory protection for devices IOMMUs improve memory access performance First level interrupt handlers process the whole request from the hardware Software interrupts reduce the request processing latency Deferred procedure calls execute second-level interrupt handlers 2
3 The I/O subsystem spcl.inf.ethz.ch
4 Generic I/O functionality Device drivers essentially move data to and from I/O devices Abstract hardware Manage asynchrony OS I/O subsystem includes generic functions for dealing with this data Such as
5 The I/O Subsystem Caching - fast memory holding copy of data Always just a copy Key to performance Spooling - hold output for a device If device can serve only one request at a time E.g., printing
6 The I/O Subsystem Scheduling Some I/O request ordering via per-device queue Some OSs try fairness Buffering - store data in memory while transferring between devices or memory To cope with device speed mismatch To cope with device transfer size mismatch To maintain copy semantics
7 Naming and Discovery What are the devices the OS needs to manage? Discovery (bus enumeration) Hotplug / unplug events Resource allocation (e.g., PCI BAR programming) How to match driver code to devices? Driver instance driver module One driver typically manages many models of device How to name devices inside the kernel? How to name devices outside the kernel?
8 Matching drivers to devices Devices have unique (model) identifiers E.g., PCI vendor/device identifiers Drivers recognize particular identifiers Typically a list Kernel offers a device to each driver in turn Driver can claim a device it can handle Creates driver instance for it.
9 Naming devices in the Unix kernel (Actually, naming device driver instances) Kernel creates identifiers for Block devices Character devices [ Network devices see later ] Major device number: Class of device (e.g., disk, CD-ROM, keyboard) Minor device number: Specific device within a class
10 Unix Block Devices Used for structured I/O Deal in large blocks of data at a time Often look like files (seekable, mappable) Often use Unix shared buffer cache Mountable: File systems implemented above block devices
11 Character Devices Used for unstructured I/O Byte-stream interface no block boundaries Single character or short strings get/put Buffering implemented by libraries Examples: Keyboards, serial lines, mice Distinction with block devices somewhat arbitrary
12 Naming devices outside the kernel Device files: special type of file Inode encodes <type, major num, minor num> Created with mknod() system call Devices are traditionally put in /dev /dev/sda First SCSI/SATA/SAS disk /dev/sda5 Fifth partition on the above /dev/cdrom0 First DVD-ROM drive /dev/ttys1 Second UART
13 Pseudo-devices in Unix Devices with no hardware! Still have major/minor device numbers. Examples: /dev/stdin /dev/kmem /dev/random /dev/null /dev/loop0 etc.
14 Old-style Unix device configuration All drivers compiled into the kernel Each driver probes for any supported devices System administrator populates /dev Manually types mknod when a new device is purchased! Pseudo devices similarly hard-wired in kernel
15 Linux device configuration today Physical hardware configuration readable from /sys Special fake file system: sysfs Plug events delivered by a special socket Drivers dynamically loaded as kernel modules Initial list given at boot time User-space daemon can load more if required /dev populated dynamically by udev User-space daemon which polls /sys
16 Interface to network I/O spcl.inf.ethz.ch
17 Unix interface to network I/O You already know the data path BSD sockets bind(), listen(), accept(), connect(), send(), recv(), etc. Have not yet seen: Device driver interface Configuration Routing
18 Software routing User space Kernel space Routing protocol messages Routing daemon Protocol stack Routing control FIB (forwarding information base) OS protocol stacks include routing functionality Routing protocols typically in a user-space daemon Non-critical Easier to change Forwarding information typically in kernel Needs to be fast Integrated into protocol stack Network
19 Network stack implementation spcl.inf.ethz.ch
20 Networking stack Probably most important peripheral GPU is increasingly not a peripheral Disk interfaces look increasingly like a network But NO standard OS textbook talks about the network stack! Good references: The 4.4BSD book (for Unix at least) George Varghese: Network Algorithmics (up to a point)
21 Receiving a packet in BSD Application Application Stream socket Datagram socket TCP UDP ICMP IP Receive queue Kernel Network interface
22 Receiving a packet in BSD Application Application Stream socket Datagram socket TCP UDP ICMP IP Kernel Network interface Receive queue 1. Interrupt 1.1 Allocate buffer 1.2 Enqueue packet 1.3 Post s/w interrupt
23 Receiving a packet in BSD Application Application Stream socket Datagram socket TCP UDP ICMP IP Receive queue 2. S/W Interrupt High priority Any process context Defragmentation TCP processing Enqueue on socket Kernel Network interface
24 Receiving a packet in BSD Application Application Stream socket Datagram socket 3. Application Copy buffer to user space Application process context TCP UDP ICMP IP Receive queue Kernel Network interface
25 Sending a packet in BSD Application Application Stream socket Datagram socket TCP UDP ICMP IP Receive queue Kernel Network interface
26 Sending a packet in BSD Application Application Stream socket 1. Application Datagram Copy from user space to buffer socket Call TCP code and process Possible enqueue on socket queue TCP UDP ICMP IP Receive queue Kernel Network interface
27 Sending a packet in BSD Application Application Stream socket Datagram socket TCP UDP ICMP IP Receive queue 2. S/W Interrupt Any process context Remaining TCP processing IP processing Enqueue on i/f queue Kernel Network interface
28 Sending a packet in BSD Application Application Stream socket Datagram socket TCP UDP ICMP IP Kernel Network interface Receive queue 3. Interrupt Send packet Free buffer
29 The TCP state machine Close / FIN SYN_rcvd Closed Passive Open Close Listen SYN / SYNACK SYN / SYNACK ACK Established Close Send / SYN SYNACK / ACK Active open / SYN SYN_sent Close / FIN FIN / ACK FIN_wait_1 FIN / ACK Close_wait ACK Close / FIN FIN_wait_2 Closing Last_Ack FIN / ACK ACK Time_wait Timeout after 2 segment lifetimes ACK Closed
30 OS TCP state machine More complex! Also needs to handle: Congestion control state (window, slow start, etc.) Flow control window Retransmission timeouts Etc. State transitions triggered when: User request: send, recv, connect, close Packet arrives Timer expires Actions include: Set or cancel a timer Enqueue a packet on the transmit queue Enqueue a packet on the socket receive queue Create or destroy a TCP control block
31 In-kernel protocol graph TCP IP UDP ICMP Interfaces can be standard (e.g. X- kernel, Windows) or protocol-specific (e.g. Unix) e.g. Tunneling ARP Ethernet Ethernet device
32 Protocol graphs Graph nodes can be: Per-protocol (handle all flows) Packets are tagged with demux tags Per-connection (instantiated dynamically) Multiple interfaces as well as connections Ethernet Ethernet bridging IP IP IP routing
33 Memory management spcl.inf.ethz.ch
34 Memory management Problem: how to ship packet data around Need a data structure that can: Easily add, remove headers Avoid copying lots of payload Uniformly refer to half-defined packets Fragment large datasets into smaller units Solution: Data is held in a linked list of buffer structures
35 BSD Unix mbufs (Linux equivalent: sk_buffs) next offset length type Data (112 bytes) next object
36 BSD Unix mbufs (Linux equivalent: sk_buffs) next offset length type Next mbuf for this object Type: DATA 36 bytes Data (112 bytes) 24 bytes next object Next object in a list
37 Case Study: Linux 3.x Implementing a simple protocol over Ethernet Why? You want to play with networking equipment (well, RAW sockets are easier) You want to develop specialized protocols E.g., application-specific TCP E.g., for low-latency cluster computing You ll understand how it works!
38 Sending Data in Linux 3.x Socket char* tcp_send_msg struct sk_buff tcp_transmit_skb struct sk_buff, TCP Header ip_queue_xmit ip_fragment ip_route_output_flow dev_queue_xmit Many layers Most use the sk_buf struct ip_forward Driver
39 Register a receive hook Fill packet_type struct:.type = your ethertype.func = your receive function Receive handler recv_hook(...) Gets sk_buff, packet_type, net_device,... Called for each incoming frame Reads skb->data field and processes protocols Receive hook table: 0x0800 IPv4 hdlr. 0x8864 PPPOE hdlr. 0x8915 RoCE hdlr.
40 Interaction with applications Socket Interface Need to implement handlers for connect(), bind(), listen(), etc. Call sock_register(struct net_proto_family*) Register a protocol family Enables user to create socket of this type
41 Anatomy of struct sk_buff Called skb in Linux jargon Allocate via alloc_skb() (or dev_alloc_skb() if in driver) Free with kfree_skb() (dev_kfree_skb()) Use pskb_may_pull(skb, len) to check if data is available skb_pull(skb, len) to advance the data pointer... it even has a webpage!
42 SKB Fields Double-linked list, each skb has.next/.prev.data contains payload (size of data field is set by skb_alloc).sk is the socket this skb is owned by.mac_header,.network_header,.transport_header contain headers of various layers.dev is the device this skb uses member fields total
43 Case Study: TCP Fragmenting Linux <2.0.32: Two fragments: #1 Offset: 0 Length: 100 #2 Offset 100 Length: 100 // Determine the position of this fragment. end = offset + iph->tot_len - ihl; #1: 100, #2: 200 // Check for overlap with preceding fragment, and, if needed, // align things so that any overlaps are eliminated. if (prev!= NULL && offset < prev->end) { i = prev->end - offset; offset += i; /* ptr into datagram */ ptr += i; /* ptr into fragment data */ } // initialize segment structure fp->offset = offset; #1: 0, #2: 100 fp->end = end; #1: 100, #2: 200 fp->len = end - offset; #1: 100, #2: // collect multiple such fragments in queue // process each fragment if(count+fp->len > skb->len) { error_to_big; } memcpy((ptr + fp->offset), fp->ptr, fp->len); count += fp->len; fp = fp->next;
44 Case Study: TCP Fragmenting Linux <2.0.32: Two fragments: #1 Offset: 0 Length: 100 #2 Offset 10 Length: 20 // Determine the position of this fragment. end = offset + iph->tot_len - ihl; #1: 100, #2: 30 // Check for overlap with preceding fragment, and, if needed, // align things so that any overlaps are eliminated. if (prev!= NULL && offset < prev->end) { i = prev->end - offset; #2: =90 offset += i; /* ptr into datagram */ #2: 100 ptr += i; /* ptr into fragment data */ } // initialize segment structure fp->offset = offset; fp->end = end; fp->len = end - offset; #1: 0, #2: 100 #1: 100, #2: 30 #1: 100, #2: // collect multiple such fragments in queue // process each fragment if(count+fp->len > skb->len) { error_to_big; } memcpy((ptr + fp->offset), fp->ptr, fp->len); count += fp->len; fp = fp->next; (size_t)-70 =
45 Case Study: TCP Fragmenting Linux <2.0.32: Two fragments: #1 Offset: 0 Length: 100 #2 Offset 10 Length: 20 // Determine the position of this fragment. end = offset + iph->tot_len - ihl; #1: 100, #2: 30 // Check for overlap with preceding fragment, and, if needed, // align things so that any overlaps are eliminated. if (prev!= NULL && offset < prev->end) { i = prev->end - offset; #2: =90 offset += i; /* ptr into datagram */ #2: 100 ptr += i; /* ptr into fragment data */ } // initialize segment structure #1: 0, #2: 100 fp->offset = offset; fp->end = end; #1: 100, #2: 30 fp->len = end - offset; #1: 100, #2: // collect multiple such fragments in queue // process each fragment if(count+fp->len > skb->len) { error_to_big; } memcpy((ptr + fp->offset), fp->ptr, fp->len); count += fp->len; fp = fp->next; (size_t)-70 =
46 that s so last century! spcl.inf.ethz.ch
47 Performance issues spcl.inf.ethz.ch
48 Life Cycle of an I/O Request Request I/O User process I/O complete Can satisfy request? System call No Yes Send request to driver Block process if needed Issue commands to device Block until interrupted I/O subsystem Unfortunately, this is a bit of a convenient fiction Device driver Transfer data to/from user space, Return completion code Demultiplex I/O complete Determine source of request Return from system call Issue interrupt when I/O completed Interrupt handler Physical device Handle interrupt Signal device driver Interrupt I/O complete Generate Interrupt Time
49 Consider 10 Gb/s Ethernet spcl.inf.ethz.ch
50 At full line rate for 1 x 10Gb port ~1GB (gigabyte) per second ~ 700k full-size Ethernet frames per second At 2GHz, must process a packet in 3000 cycles This includes: IP and TCP checksums TCP window calculations and flow control Copying packet to user space
51 A few numbers L3 cache miss (64-byte lines) 300 cycles At most 10 cache misses per packet Note: DMA ensures cache is cold for the packet! Interrupt latency 500 cycles Kernel entry/exit Hardware access Context switch / DPC Etc.
52 Plus You also have to send packets. Card is full duplex can send at 10Gb/s You have to do something useful with the packets! Can an application can make use of 1.5kB of data every 1000 machine cycles or so? This card has two 10Gb/s ports.
53 And Plus And if you thought that was fast Mellanox 100 Gb/s Adapter Impossible to use without advanced features RDMA SR-IOV TOE Interrupt coalescing
54 What to do? TCP offload (TOE) Put TCP processing into hardware on the card Buffering Transfer lots of packets in a single transaction Interrupt coalescing / throttling Don t interrupt on every packet Don t interrupt at all if load is very high Receive-side scaling Parallelize: direct interrupts and data to different cores
55 Linux New API (NAPI) Mitigate interrupt pressure 1. Each packet interrupts the CPU 2. Vs. CPU polls driver NAPI switches between the two! NAPI-compliant drivers Offer a poll() function Which calls back into the receive path
56 Linux NAPI Balancing Driver enables polling with netif_rx_schedule(struct net_device *dev) Disables interrupts Driver deactivates polling with netif_rx_complete(struct net_device *dev) Re-enable interrupts. but where does the data go???
57 Buffering Key ideas: Decouple sending and receiving Neither side should wait for the other Only use interrupts to unblock host Batch together requests Spread cost of transfer over several packets
58 Producer-consumer buffer descriptor rings Free descriptors Consumer pointer Producer pointer Full descriptors Descriptor format Physical address Size in bytes Misc. flags
59 Buffering for network cards Producer, consumer pointers are NIC registers Transmit path: Host updates producer pointer, adds packets to ring Device updates consumer pointer Receive path: Host updates consumer pointer, adds empty buffers to ring Device updates producer pointer, fills buffers with received packets. More complex protocols are possible
60 Example transmit state machine Sends packet; More packets in descriptor ring Sends last packet; None left in descriptor ring Running Idle Sends packet; Ring occupancy below threshold Host updates producer pointer; Ring now full Host updates producer pointer Running; host blocked Sends packet; Ring still nearly full
61 Transmit interrupts Ring empty all packets sent device going idle Ring occupancy drops host can now send again device continues running Sends packet; More packets in descriptor ring Sends packet; Ring occupancy below threshold Running Sends last packet; None left in descriptor ring Host updates producer pointer; Ring now full Idle Host updates producer pointer Exercise: devise a similar state machine for receive! Running; host blocked Sends packet; Ring still nearly full
62 Buffering summary DMA used twice Data transfer Reading and writing descriptors Similar schemes used for any fast DMA device SATA/SAS interfaces (such as AHCI) USB2/USB3 controllers etc. Descriptors send ownership of memory regions Flexible many variations possible: Host can send lots of regions in advance Device might allocate out of regions, send back subsets Buffers might be used out-of-order Particularly powerful with multiple send and receive queues
63 Receive-side scaling Insight: Too much traffic for one core to handle Cores aren t getting any faster Must parallelize across cores Key idea: handle different flows on different cores But: how to determine flow for each packet? Can t do this on a core: same problem! Solution: demultiplex on the NIC DMA packets to per-flow buffers / queues Send interrupt only to core handling flow
64 Receive-side scaling Received packet Hash of packet header IP src + dest TCP src + dest Etc. Flow table pointer Flow state: Ring buffer Message-signalled interrupt DMA address Core to interrupt
65 Receive-side scaling Can balance flows across cores Note: doesn t help with one big flow! Assumes: n cores processing m flows is faster than one core Hence: Network stack and protocol graph must scale on a multiprocessor. Multiprocessor scaling: topic for later
66 Tomorrow Virtual machines Multiprocessor operating systems
Chapter 10: I/O Subsystems (2)
ADRIAN PERRIG & TORSTEN HOEFLER ( 252-0062-00 ) Networks and Operating Systems Chapter 10: I/O Subsystems (2) BE CAREFUL WITH I/O DEVICES! Our Small Quiz True or false (raise hand) Open files are part
More informationOur Small Quiz. Chapter 10: I/O Subsystems (2) Generic I/O functionality. The I/O subsystem. The I/O Subsystem. The I/O Subsystem
ADRIAN PERRIG & TORSTEN HOEFLER ( 252-0062-00 ) s and Operating Systems Chapter 10: I/O Subsystems (2) BE CAREFUL WITH I/O DEVICES! Our Small Quiz True or false (raise hand) Open files are part of the
More informationOur Small Quiz. Chapter 9: I/O Subsystems (2) Generic I/O functionality. The I/O subsystem. The I/O Subsystem.
ADRIAN PERRIG & TORSTEN HOEFLER ( 252-0062-00 ) s and Operating Systems Chapter 9: I/O Subsystems (2) Our Small Quiz True or false (raise hand) Open files are part of the process address-space Unified
More informationNetworks and Operating Systems ( ) Chapter 10: I/O Subsystems (2)
ADRIAN PERRIG & TORSTEN HOEFLER Networks and Operating Systems (252-0062-00) Chapter 10: I/O Subsystems (2) BE CAREFUL WITH I/O DEVICES! Administrivia If you re an exchange student and very far away from
More informationADRIAN PERRIG & TORSTEN HOEFLER ( ) 10: I/O
ADRIAN PERRIG & TORSTEN HOEFLER s and Operating Systems (252-0062-00) Chapter 10: I/O Subsystems (2) Administrivia If you re an exchange student and very far away from Zurich during the exam period and
More informationNetworks and Operating Systems ( ) Chapter 9: I/O Subsystems
ADRIAN PERRIG & TORSTEN HOEFLER Networks and Operating Systems (252-0062-00) Chapter 9: I/O Subsystems Never underestimate the KISS principle! Cache re-load and a magic trick Last time On-disk data structures
More informationNetworks and Opera/ng Systems Chapter 19: I/O Subsystems
Networks and Opera/ng Systems Chapter 19: I/O Subsystems (252 0062 00) Donald Kossmann & Torsten Hoefler Frühjahrssemester 2013 Systems Group Department of Computer Science ETH Zürich Last /me: File System
More informationOperating Systems. 17. Sockets. Paul Krzyzanowski. Rutgers University. Spring /6/ Paul Krzyzanowski
Operating Systems 17. Sockets Paul Krzyzanowski Rutgers University Spring 2015 1 Sockets Dominant API for transport layer connectivity Created at UC Berkeley for 4.2BSD Unix (1983) Design goals Communication
More informationThe Network Stack. Chapter Network stack functions 216 CHAPTER 21. THE NETWORK STACK
216 CHAPTER 21. THE NETWORK STACK 21.1 Network stack functions Chapter 21 The Network Stack In comparison with some other parts of OS design, networking has very little (if any) basis in formalism or algorithms
More informationAdvanced Computer Networks. End Host Optimization
Oriana Riva, Department of Computer Science ETH Zürich 263 3501 00 End Host Optimization Patrick Stuedi Spring Semester 2017 1 Today End-host optimizations: NUMA-aware networking Kernel-bypass Remote Direct
More informationUser Datagram Protocol
Topics Transport Layer TCP s three-way handshake TCP s connection termination sequence TCP s TIME_WAIT state TCP and UDP buffering by the socket layer 2 Introduction UDP is a simple, unreliable datagram
More informationI/O Handling. ECE 650 Systems Programming & Engineering Duke University, Spring Based on Operating Systems Concepts, Silberschatz Chapter 13
I/O Handling ECE 650 Systems Programming & Engineering Duke University, Spring 2018 Based on Operating Systems Concepts, Silberschatz Chapter 13 Input/Output (I/O) Typical application flow consists of
More informationCSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management
CSE/EE 461 Lecture 13 Connections and Fragmentation Tom Anderson tom@cs.washington.edu Peterson, Chapter 5.2 TCP Connection Management Setup assymetric 3-way handshake Transfer sliding window; data and
More informationSilberschatz and Galvin Chapter 12
Silberschatz and Galvin Chapter 12 I/O Systems CPSC 410--Richard Furuta 3/19/99 1 Topic overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O requests to hardware operations
More information19: Networking. Networking Hardware. Mark Handley
19: Networking Mark Handley Networking Hardware Lots of different hardware: Modem byte at a time, FDDI, SONET packet at a time ATM (including some DSL) 53-byte cell at a time Reality is that most networking
More informationLinux IP Networking. Antonio Salueña
Linux IP Networking Antonio Salueña Preface We will study linux networking for the following case: Intel x86 architecture IP packets Recent stable linux kernel series 2.4.x 2 Overview
More informationModule 12: I/O Systems
Module 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance Operating System Concepts 12.1 Silberschatz and Galvin c
More informationCSCI-GA Operating Systems. Networking. Hubertus Franke
CSCI-GA.2250-001 Operating Systems Networking Hubertus Franke frankeh@cs.nyu.edu Source: Ganesh Sittampalam NYU TCP/IP protocol family IP : Internet Protocol UDP : User Datagram Protocol RTP, traceroute
More informationModule 12: I/O Systems
Module 12: I/O Systems I/O hardwared Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Performance 12.1 I/O Hardware Incredible variety of I/O devices Common
More informationDevice-Functionality Progression
Chapter 12: I/O Systems I/O Hardware I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Incredible variety of I/O devices Common concepts Port
More informationChapter 12: I/O Systems. I/O Hardware
Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations I/O Hardware Incredible variety of I/O devices Common concepts Port
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance I/O Hardware Incredible variety of I/O devices Common
More informationCSE 461 The Transport Layer
CSE 461 The Transport Layer The Transport Layer Focus How do we (reliably) connect processes? This is the transport layer Topics Naming end points UDP: unreliable transport TCP: reliable transport Connection
More informationThe control of I/O devices is a major concern for OS designers
Lecture Overview I/O devices I/O hardware Interrupts Direct memory access Device dimensions Device drivers Kernel I/O subsystem Operating Systems - June 26, 2001 I/O Device Issues The control of I/O devices
More informationComp 204: Computer Systems and Their Implementation. Lecture 18: Devices
Comp 204: Computer Systems and Their Implementation Lecture 18: Devices 1 Today Devices Introduction Handling I/O Device handling Buffering and caching 2 Operating System An Abstract View User Command
More informationSupport for Smart NICs. Ian Pratt
Support for Smart NICs Ian Pratt Outline Xen I/O Overview Why network I/O is harder than block Smart NIC taxonomy How Xen can exploit them Enhancing Network device channel NetChannel2 proposal I/O Architecture
More informationModule 11: I/O Systems
Module 11: I/O Systems Reading: Chapter 13 Objectives Explore the structure of the operating system s I/O subsystem. Discuss the principles of I/O hardware and its complexity. Provide details on the performance
More information[08] IO SUBSYSTEM 1. 1
[08] IO SUBSYSTEM 1. 1 OUTLINE Input/Output (IO) Hardware Device Classes OS Interfaces Performing IO Polled Mode Interrupt Driven Blocking vs Non-blocking Handling IO Buffering & Strategies Other Issues
More informationConnections. Topics. Focus. Presentation Session. Application. Data Link. Transport. Physical. Network
Connections Focus How do we connect processes? This is the transport layer Topics Naming processes Connection setup / teardown Flow control Application Presentation Session Transport Network Data Link
More informationDevices. Today. Comp 104: Operating Systems Concepts. Operating System An Abstract View 05/01/2017. Devices. Devices
Comp 104: Operating Systems Concepts Devices Today Devices Introduction Handling I/O Device handling Buffering and caching 1 2 Operating System An Abstract View User Command Interface Processor Manager
More informationECE 650 Systems Programming & Engineering. Spring 2018
ECE 650 Systems Programming & Engineering Spring 2018 Networking Transport Layer Tyler Bletsch Duke University Slides are adapted from Brian Rogers (Duke) TCP/IP Model 2 Transport Layer Problem solved:
More informationNetworking Subsystem in Linux. Manoj Naik IBM Almaden Research Center
Networking Subsystem in Linux Manoj Naik IBM Almaden Research Center Scope of the talk Linux TCP/IP networking layers Socket interfaces and structures Creating and using INET sockets Linux IP layer Socket
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance Objectives Explore the structure of an operating
More informationby I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS
by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests
More informationI/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)
I/O Systems Amir H. Payberah amir@sics.se Amirkabir University of Technology (Tehran Polytechnic) Amir H. Payberah (Tehran Polytechnic) I/O Systems 1393/9/15 1 / 57 Motivation Amir H. Payberah (Tehran
More informationI/O Systems. 04/16/2007 CSCI 315 Operating Systems Design 1
I/O Systems Notice: The slides for this lecture have been largely based on those accompanying the textbook Operating Systems Concepts with Java, by Silberschatz, Galvin, and Gagne (2007). Many, if not
More informationI/O and Device Drivers
I/O and Device Drivers Minsoo Ryu Real-Time Computing and Communications Lab. Hanyang University msryu@hanyang.ac.kr Topics Covered I/O Components I/O Interface I/O Operations Device Drivers 2 I/O Components
More informationSome slides courtesy David Wetherall. Communications Software. Lecture 4: Connections and Flow Control. CSE 123b. Spring 2003.
CSE 123b Communications Software Spring 2003 Lecture 4: Connections and Flow Control Stefan Savage Some slides courtesy David Wetherall Administrativa Computer accounts have been setup You can use the
More informationThe Network Stack (1)
The Network Stack (1) L41 Lecture 5 Dr Robert N. M. Watson 25 January 2017 Reminder: where we left off last term Long, long ago, but in a galaxy not so far away: Lecture 3: The Process Model (1) Lecture
More informationCS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)
: Computer Networks Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581) TCP as seen from above the socket The TCP socket interface consists of: Commands to start
More informationCSE/EE 461 Lecture 14. Connections. Last Time. This Time. We began on the Transport layer. Focus How do we send information reliably?
CSE/EE 461 Lecture 14 Connections Last Time We began on the Transport layer Focus How do we send information reliably? Topics ARQ and sliding windows Application Presentation Session Transport Network
More informationComputer Network Programming. The Transport Layer. Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University
Computer Network Programming The Transport Layer Dr. Sam Hsu Computer Science & Engineering Florida Atlantic University The Transport Layer The Big Picture Overview of TCP/IP protocols TCP Packet Exchanges
More informationI/O. CS 416: Operating Systems Design Department of Computer Science Rutgers University
I/O Design Department of Computer Science http://www.cs.rutgers.edu/~vinodg/416 I/O Devices So far we have talked about how to abstract and manage CPU and memory Computation inside computer is useful only
More informationTCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018
TCP Review Carey Williamson Department of Computer Science University of Calgary Winter 2018 Credit: Much of this content came courtesy of Erich Nahum (IBM Research) The TCP Protocol Connection-oriented,
More informationToday: I/O Systems. Architecture of I/O Systems
Today: I/O Systems How does I/O hardware influence the OS? What I/O services does the OS provide? How does the OS implement those services? How can the OS improve the performance of I/O? Lecture 20, page
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationChapter 13: I/O Systems. Chapter 13: I/O Systems. Objectives. I/O Hardware. A Typical PC Bus Structure. Device I/O Port Locations on PCs (partial)
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationChe-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University
Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage
More informationEnd-to-End Protocols. End-to-End Protocols
End-to-End Protocols UDP (User Datagram Protocol) (Transport Control Protocol) Connection Establishment/Termination Sliding Window Revisit Flow Control Adaptive Retransmission End-to-End Protocols Limitations
More informationCSCI-1680 Transport Layer I Rodrigo Fonseca
CSCI-1680 Transport Layer I Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Janno< Today Transport Layer UDP TCP Intro Connection Establishment Transport Layer "#$ -##$
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations Streams Performance 13.2 Silberschatz, Galvin
More informationCSE 461 Module 11. Connections
CSE 461 Module 11 Connections This Time More on the Transport Layer Focus How do we connect processes? Topics Naming processes Connection setup / teardown Flow control Application Presentation Session
More informationCSCI-1680 Transport Layer I Rodrigo Fonseca
CSCI-1680 Transport Layer I Rodrigo Fonseca Based partly on lecture notes by David Mazières, Phil Levis, John Jannotti Today Transport Layer UDP TCP Intro Connection Establishment From Lec 2: OSI Reference
More informationLast Class. CSE 123b Communications Software. Today. Naming Processes/Services. Transmission Control Protocol (TCP) Picking Port Numbers.
CSE 123b Communications Software Spring 2002 Lecture 4: Connections and Flow Control Stefan Savage Last Class We talked about how to implement a reliable channel in the transport layer Approaches ARQ (Automatic
More informationI/O AND DEVICE HANDLING Operating Systems Design Euiseong Seo
I/O AND DEVICE HANDLING 2016 Operating Systems Design Euiseong Seo (euiseong@skku.edu) I/O Hardware Incredible variety of I/O devices Common concepts Port Bus (daisy chain or shared direct access) Controller
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems DM510-14 Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS Performance 13.2 Objectives
More informationUDP and TCP. Introduction. So far we have studied some data link layer protocols such as PPP which are responsible for getting data
ELEX 4550 : Wide Area Networks 2015 Winter Session UDP and TCP is lecture describes the two most common transport-layer protocols used by IP networks: the User Datagram Protocol (UDP) and the Transmission
More informationL41 - Lecture 5: The Network Stack (1)
L41 - Lecture 5: The Network Stack (1) Dr Robert N. M. Watson 27 April 2015 Dr Robert N. M. Watson L41 - Lecture 5: The Network Stack (1) 27 April 2015 1 / 19 Introduction Reminder: where we left off in
More informationChapter 13: I/O Systems. Operating System Concepts 9 th Edition
Chapter 13: I/O Systems Silberschatz, Galvin and Gagne 2013 Chapter 13: I/O Systems Overview I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations
More informationMessage Passing Architecture in Intra-Cluster Communication
CS213 Message Passing Architecture in Intra-Cluster Communication Xiao Zhang Lamxi Bhuyan @cs.ucr.edu February 8, 2004 UC Riverside Slide 1 CS213 Outline 1 Kernel-based Message Passing
More informationChapter 13: I/O Systems
COP 4610: Introduction to Operating Systems (Spring 2015) Chapter 13: I/O Systems Zhi Wang Florida State University Content I/O hardware Application I/O interface Kernel I/O subsystem I/O performance Objectives
More informationInput-Output (I/O) Input - Output. I/O Devices. I/O Devices. I/O Devices. I/O Devices. operating system must control all I/O devices.
Input - Output Input-Output (I/O) operating system must control all I/O devices issue commands to devices catch interrupts handle errors provide interface between devices and rest of system main categories
More informationTransport Layer Marcos Vieira
Transport Layer 2014 Marcos Vieira Transport Layer Transport protocols sit on top of network layer and provide Application-level multiplexing ( ports ) Error detection, reliability, etc. UDP User Datagram
More informationChapter 12: I/O Systems
Chapter 12: I/O Systems Chapter 12: I/O Systems I/O Hardware! Application I/O Interface! Kernel I/O Subsystem! Transforming I/O Requests to Hardware Operations! STREAMS! Performance! Silberschatz, Galvin
More informationChapter 13: I/O Systems
Chapter 13: I/O Systems Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS Performance Silberschatz, Galvin and
More informationChapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition
Chapter 12: I/O Systems Silberschatz, Galvin and Gagne 2011 Chapter 12: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem Transforming I/O Requests to Hardware Operations STREAMS
More information3.5.6 TCP Connection Management
02-068 C03 pp4 6/14/02 2:14 PM Page 248 248 CHAPTER 3 Transport Layer of unacknowledged data less than the value of RcvWindow, host A is assured that it is not overflowing the receive buffer at host B.
More informationCMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 9
CMPE 150/L : Introduction to Computer Networks Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 9 1 Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3
More information10 minutes survey (anonymous)
10 minutes survey (anonymous) v Comments/Suggestions to my lecture/lab/ homework/exam v If you like this course, which part do you like? v If you don t like it, which part do you not like? Thanks! Transport
More informationTransport Layer (TCP/UDP)
Transport Layer (TCP/UDP) Where we are in the Course Moving on up to the Transport Layer! Application Transport Network Link Physical CSE 461 University of Washington 2 Recall Transport layer provides
More informationCSEP 561 Connections. David Wetherall
CSEP 561 Connections David Wetherall djw@cs.washington.edu Connections Focus How do we (reliably) connect processes? This is the transport layer Topics Naming processes Connection setup / teardown Sliding
More informationChapter 3 Transport Layer
Chapter 3 Transport Layer A note on the use of these Powerpoint slides: We re making these slides freely available to all (faculty, students, readers). They re in PowerPoint form so you see the animations;
More informationCSC 401 Data and Computer Communications Networks
CSC 401 Data and Computer Communications Networks Transport Layer Connection Oriented Transport: TCP Sec 3.5 Prof. Lina Battestilli Fall 2017 Transport Layer Chapter 3 Outline 3.1 Transport-layer Services
More informationCS 356: Computer Network Architectures. Lecture 17: End-to-end Protocols and Lab 3 Chapter 5.1, 5.2. Xiaowei Yang
CS 356: Computer Network Architectures Lecture 17: End-to-end Protocols and Lab 3 Chapter 5.1, 5.2 Xiaowei Yang xwy@cs.duke.edu Transport protocols Before: How to deliver packet from one host to another
More information6. The Transport Layer and protocols
6. The Transport Layer and protocols 1 Dr.Z.Sun Outline Transport layer services Transmission Control Protocol Connection set-up and tear-down Ports and Well-know-ports Flow control and Congestion control
More informationTCP Overview. Connection-oriented Byte-stream
TCP Overview Connection-oriented Byte-stream app writes bytes TCP sends segments app reads bytes Full duplex Flow control: keep sender from overrunning receiver Congestion control: keep sender from overrunning
More informationNWEN 243. Networked Applications. Layer 4 TCP and UDP
NWEN 243 Networked Applications Layer 4 TCP and UDP 1 About the second lecturer Aaron Chen Office: AM405 Phone: 463 5114 Email: aaron.chen@ecs.vuw.ac.nz Transport layer and application layer protocols
More informationI/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University
I/O Systems Jinkyu Jeong (jinkyu@skku.edu) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Today s Topics Device characteristics Block device vs. Character device Direct I/O vs.
More informationChapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management
Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4 principles of reliable data transfer 3.5 connection-oriented transport: TCP segment
More informationA Client-Server Exchange
Socket programming A Client-Server Exchange A server process and one or more client processes Server manages some resource. Server provides service by manipulating resource for clients. 1. Client sends
More information08:End-host Optimizations. Advanced Computer Networks
08:End-host Optimizations 1 What today is about We've seen lots of datacenter networking Topologies Routing algorithms Transport What about end-systems? Transfers between CPU registers/cache/ram Focus
More informationTCP/IP Networking. Part 4: Network and Transport Layer Protocols
TCP/IP Networking Part 4: Network and Transport Layer Protocols Orientation Application Application protocol Application TCP TCP protocol TCP IP IP protocol IP IP protocol IP IP protocol IP Network Access
More informationIntroduction to Networking. Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved.
Introduction to Networking Operating Systems In Depth XXVII 1 Copyright 2017 Thomas W. Doeppner. All rights reserved. Distributed File Systems Operating Systems In Depth XXVII 2 Copyright 2017 Thomas W.
More informationS 3 : the Small Scheme Stack A Scheme TCP/IP Stack Targeting Small Embedded Applications
S 3 : the Small Scheme Stack A Scheme TCP/IP Stack Targeting Small Embedded Applications Vincent St-Amour Université de Montréal Joint work with Lysiane Bouchard and Marc Feeley Scheme and Functional Programming
More informationLecture 13 Input/Output (I/O) Systems (chapter 13)
Bilkent University Department of Computer Engineering CS342 Operating Systems Lecture 13 Input/Output (I/O) Systems (chapter 13) Dr. İbrahim Körpeoğlu http://www.cs.bilkent.edu.tr/~korpe 1 References The
More informationCS 43: Computer Networks. 18: Transmission Control Protocol October 12-29, 2018
CS 43: Computer Networks 18: Transmission Control Protocol October 12-29, 2018 Reading Quiz Lecture 18 - Slide 2 Midterm topics Abstraction, Layering, End-to-end design HTTP, DNS, Email, BT, etc. (app
More informationComputer Networking Introduction
Computer Networking Introduction Halgurd S. Maghdid Software Engineering Department Koya University-Koya, Kurdistan-Iraq Lecture No.10 Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and
More informationTCP: Transmission Control Protocol RFC 793,1122,1223. Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC
TCP: Transmission Control Protocol RFC 793,1122,1223 Prof. Lin Weiguo Copyleft 2009~2017, School of Computing, CUC Nov. 2017 TCP/IP Protocol Stack Application Layer FTP, Telnet, HTTP, Transport Layer TCP,
More informationOutline. What is TCP protocol? How the TCP Protocol Works SYN Flooding Attack TCP Reset Attack TCP Session Hijacking Attack
Attacks on TCP Outline What is TCP protocol? How the TCP Protocol Works SYN Flooding Attack TCP Reset Attack TCP Session Hijacking Attack TCP Protocol Transmission Control Protocol (TCP) is a core protocol
More informationLecture 3: The Transport Layer: UDP and TCP
Lecture 3: The Transport Layer: UDP and TCP Prof. Shervin Shirmohammadi SITE, University of Ottawa Prof. Shervin Shirmohammadi CEG 4395 3-1 The Transport Layer Provides efficient and robust end-to-end
More informationPacket Sniffing and Spoofing
Some of the slides borrowed from the book Computer Security: A Hands on Approach by Wenliang Du Packet Sniffing and Spoofing Chester Rebeiro IIT Madras Shared Networks Every network packet reaches every
More informationIntroduction to TCP/IP networking
Introduction to TCP/IP networking TCP/IP protocol family IP : Internet Protocol UDP : User Datagram Protocol RTP, traceroute TCP : Transmission Control Protocol HTTP, FTP, ssh What is an internet? A set
More information6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1
6. Transport Layer 6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1 6.1 Internet Transport Layer Architecture The
More informationInput / Output. Kevin Webb Swarthmore College April 12, 2018
Input / Output Kevin Webb Swarthmore College April 12, 2018 xkcd #927 Fortunately, the charging one has been solved now that we've all standardized on mini-usb. Or is it micro-usb? Today s Goals Characterize
More informationOutline Computer Networking. Functionality Split. Transport Protocols
Outline 15-441 15 441 Computer Networking 15-641 Lecture 10: Transport Protocols Justine Sherry Peter Steenkiste Fall 2017 www.cs.cmu.edu/~prs/15 441 F17 Transport introduction TCP connection establishment
More informationNetchannel 2: Optimizing Network Performance
Netchannel 2: Optimizing Network Performance J. Renato Santos +, G. (John) Janakiraman + Yoshio Turner +, Ian Pratt * + HP Labs - * XenSource/Citrix Xen Summit Nov 14-16, 2007 2003 Hewlett-Packard Development
More informationCSE 461 Connections. David Wetherall
CSE 461 Connections David Wetherall djw@cs.washington.edu Connections Focus How do we (reliably) connect processes? This is the transport layer Topics Naming processes TCP / UDP Connection setup / teardown
More informationOperating Systems and Networks. Network Lecture 8: Transport Layer. Where we are in the Course. Recall. Transport Layer Services.
Operating Systems and s Lecture 8: Transport Layer I was going to tell you a joke about UDP, but I wasn t sure if you were going to get it Adrian Perrig Security Group ETH Zürich 2 Where we are in the
More informationOperating Systems and Networks. Network Lecture 8: Transport Layer. Adrian Perrig Network Security Group ETH Zürich
Operating Systems and Networks Network Lecture 8: Transport Layer Adrian Perrig Network Security Group ETH Zürich I was going to tell you a joke about UDP, but I wasn t sure if you were going to get it
More informationChapter 3 Transport Layer
Chapter 3 Transport Layer Part b Connection-Oriented Transport Transport Layer 3-1 Chapter 3 outline 3.1 transport-layer services 3.2 multiplexing and demultiplexing 3.3 connectionless transport: UDP 3.4
More information