Introduction to I/O. April 30, Howard Huang 1

Similar documents
Lectures More I/O

Lecture 23. Finish-up buses Storage

Components of the Virtual Memory System

PC I/O. May 7, Howard Huang 1

Storage Systems. Storage Systems

Module 6: INPUT - OUTPUT (I/O)

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?

Administrivia. CMSC 411 Computer Systems Architecture Lecture 19 Storage Systems, cont. Disks (cont.) Disks - review

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections )

IT 252 Computer Organization and Architecture. Introduction to I/O

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

I/O CANNOT BE IGNORED

Reading and References. Input / Output. Why Input and Output? A typical organization. CSE 410, Spring 2004 Computer Systems

Storage systems. Computer Systems Architecture CMSC 411 Unit 6 Storage Systems. (Hard) Disks. Disk and Tape Technologies. Disks (cont.

I/O CANNOT BE IGNORED

Computer Science 146. Computer Architecture

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

Chapter Seven Morgan Kaufmann Publishers

Readings. Storage Hierarchy III: I/O System. I/O (Disk) Performance. I/O Device Characteristics. often boring, but still quite important

FUNCTIONS OF COMPONENTS OF A PERSONAL COMPUTER

Where We Are in This Course Right Now. ECE 152 Introduction to Computer Architecture Input/Output (I/O) Copyright 2012 Daniel J. Sorin Duke University

Computer Overview. A computer item you can physically see or touch. A computer program that tells computer hardware how to operate.

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

Storage. Hwansoo Han

Introduction to Input and Output

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.

Cache introduction. April 16, Howard Huang 1

Storage. CS 3410 Computer System Organization & Programming

CS152 Computer Architecture and Engineering Lecture 19: I/O Systems

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

CSE 120. Operating Systems. March 27, 2014 Lecture 17. Mass Storage. Instructor: Neil Rhodes. Wednesday, March 26, 14

Chapter 9: Peripheral Devices. By: Derek Hildreth Chad Davis

Computer System Architecture

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

Storage System COSC UCB

Pharmacy college.. Assist.Prof. Dr. Abdullah A. Abdullah

Chapter 6 Storage and Other I/O Topics

Lecture 13. Storage, Network and Other Peripherals

CST 337, Fall 2013 Homework #7

Final Lecture. A few minutes to wrap up and add some perspective

COMP283-Lecture 3 Applied Database Management

Chapter 11. I/O Management and Disk Scheduling

High-Performance Storage Systems

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

Lecture 16. Today: Start looking into memory hierarchy Cache$! Yay!

Introduction To Computer Hardware. Hafijur Rahman

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

Chapter 5A. Large and Fast: Exploiting Memory Hierarchy

ECE232: Hardware Organization and Design

CS 261 Fall Mike Lam, Professor. Memory

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage

Database Systems II. Secondary Storage

Main Parts of Personal Computer

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

Computer Performance

CMSC 424 Database design Lecture 12 Storage. Mihai Pop

Where Have We Been? Ch. 6 Memory Technology

Wednesday, April 25, Discs RAID: Introduction Error detection and correction Error detection: Simple parity Error correction: Hamming Codes

Monday, May 4, Discs RAID: Introduction Error detection and correction Error detection: Simple parity Error correction: Hamming Codes

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

Lecture 25: Interconnection Networks, Disks. Topics: flow control, router microarchitecture, RAID

Today: Secondary Storage! Typical Disk Parameters!

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

BBM371- Data Management. Lecture 2: Storage Devices

The Memory Hierarchy 10/25/16

CIT 668: System Architecture. Computer Systems Architecture

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

Mass-Storage Structure

BUYING A COMPUTER TERM 2 AIT

Appendix D: Storage Systems

CS232: Computer Architecture II

Bits and Bytes. Here is a sort of glossary of computer buzzwords you will encounter in computer use:

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002

Announcement. Computer Architecture (CSC-3501) Lecture 23 (17 April 2008) Chapter 7 Objectives. 7.1 Introduction. 7.2 I/O and Performance

Storage Devices for Database Systems

Mass-Storage Structure

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Chapter 10: Mass-Storage Systems

Input/Output Management

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

Chapter Two. Hardware Basics: Inside the Box

Computer Architecture. Hebrew University Spring Chapter 8 Input/Output. Big Picture: Where are We Now?

CS 31: Intro to Systems Storage and Memory. Kevin Webb Swarthmore College March 17, 2015

UNIT 2 Data Center Environment

RAID SEMINAR REPORT /09/2004 Asha.P.M NO: 612 S7 ECE

Mass-Storage. ICS332 - Fall 2017 Operating Systems. Henri Casanova

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Session: Hardware Topic: Disks. Daniel Chang. COP 3502 Introduction to Computer Science. Lecture. Copyright August 2004, Daniel Chang

About the Presentations

5.11 Parallelism and Memory Hierarchy: Redundant Arrays of Inexpensive Disks 485.e1

HARDWARE AND OPERATING SYSTEMS

CSE 451: Operating Systems Spring Module 12 Secondary Storage. Steve Gribble

Chapter 6. Storage & Other I/O

Disk Scheduling COMPSCI 386

Chapter 6 Part 1 Understanding Hardware

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 6 External Memory

Introduction to I/O and Disk Management

Transcription:

Introduction to I/O Where does the data for our CPU and memory come from or go to? Computers communicate with the outside world via I/O devices. Input devices supply computers with data to operate on. Results of computations can be sent to output devices. Today we ll talk a bit about I/O system issues. I/O performance affects the overall system speed. We ll look at some common devices and estimate their performance. A bus connects different components of a computer system. April 30, 2003 2001-2003 Howard Huang 1

I/O is important! Many tasks involve reading and processing enormous quantities of data. CCSO has two machines and 144GB of storage for a local web cache. Institutions like banks and airlines have huge databases that must be constantly accessed and updated. Celera Genomics is a company that sequences genomes, with the help of computers and 100 trillion bytes of storage! I/O is important for us small people too! People use home computers to edit movies and music. Large software packages may come on multiple compact discs. Everybody and their grandparents surf the web! April 30, 2003 Introduction to I/O 2

I/O is slow! How fast can a typical I/O device supply data to a computer? A fast typist can enter 9-10 characters a second on a keyboard. Common local-area network (LAN) speeds go up to 100 Mbit/s, which is about 12.5MB/s. Today s hard disks provide a lot of storage and transfer speeds around 40MB per second. Unfortunately, this is excruciatingly slow compared to modern processors that can execute a billion instructions per second! I/O performance has not increased as quickly as CPU performance, partially due to neglect and partially to physical limitations. This is slowly changing, with faster networks, better I/O buses, RAID drive arrays, and other new technologies. April 30, 2003 Introduction to I/O 3

I/O speeds often limit system performance Many computing tasks are I/O-bound, and the speed of the input and output devices limits the overall system performance. This is another instance of Amdahl s Law. Improved CPU performance alone has a limited effect on overall system speed. Execution time after improvement = Time affected by improvement Amount of improvement + Time unaffected by improvement An old graph from Apple illustrates this pretty well; a system with two 1 GHz CPUs is just 50% faster than a machine with a single 933 MHz processor. April 30, 2003 Introduction to I/O 4

Measuring I/O performance There are three general performance measurements for I/O systems. An application that accesses large quantities of data will demand high bandwidth or transfer speed. Programs that access small amounts of data in frequent intervals may care more about the latency or delay. Throughput, which is the number of transactions performed per unit time, accounts for latency, bandwidth and overhead times. Home network users can be affected by both bandwidth and latency. If you download large files over Kazaa, bandwidth will be the limiting factor; a 4Mbit/s DSL line will outperform a 56Kbit/s modem. If you send short instant messages, the latency becomes the limiting factor it takes a long time for data to reach Swaziland. April 30, 2003 Introduction to I/O 5

Common I/O devices Hard drives are almost a necessity these days, so their speed has a big impact on system performance. They store all the programs, movies and assignments you crave. Virtual memory systems let a hard disk act as a large (but slow) part of main memory. Networks are also ubiquitous nowadays. They give you access to data from around the world. Hard disks can act as a cache for network data. For example, web browsers often store local copies of recently viewed web pages. April 30, 2003 Introduction to I/O 6

Hard drives Figure 8.4 in the textbook shows the ugly guts of a hard disk. Data is stored on double-sided magnetic disks called platters. Each platter is arranged like a record, with many concentric tracks. Tracks are further divided into individual sectors, which are the basic unit of data transfer. Each surface has a read/write head like the arm on a record player, but all the heads are connected and move together. A 75GB IBM Deskstar has roughly: 5 platters (10 surfaces), 27,000 tracks per surface, 512 sectors per track, and 512 bytes per sector. Platter Platters Tracks Sectors Track April 30, 2003 Introduction to I/O 7

Accessing data on a hard disk Accessing a sector on a track on a hard disk takes a lot of time! Seek time measures the delay for the disk head to reach the track. A rotational delay accounts for the time to get to the right sector. The transfer time is how long the actual data read or write takes. There may be additional overhead for the operating system or the controller hardware on the hard disk drive. Rotational speed, measured in revolutions per minute or RPM, partially determines the rotational delay and transfer time. Tracks Platter Sectors Track April 30, 2003 Introduction to I/O 8

Estimating disk latencies Manufacturers often report average seek times of 8-10ms, but those do not account for common disk access patterns. For example, if the head is already on or near the desired track, then seek time is negligible. In other words, locality is important! Actual average seek times are often just 2-3ms. Rotational delay depends partly on how fast the disk platters spin. We can assume the disk spins halfway on average. average rotational delay = 0.5 rotations rotational speed For example, a 5400 RPM disk has an average rotational delay of: 0.5 rotations (5400 rotations minute) = 5.55ms April 30, 2003 Introduction to I/O 9

Estimating disk times The overall response time is the sum of the seek time, rotational delay, transfer time and overhead. Assume a disk has the following specifications. An average seek time of 9ms A 5400 RPM rotational speed A 10MB/s average transfer rate 2ms of overheads How long does it take to read a 1,024 byte sector? The average rotational delay is 5.55ms. The transfer time will be about (1024 bytes 10 MB/s) = 0.1ms. The response time is then 9ms + 5.55ms + 0.1ms + 2ms = 16.7ms. That s 16,700,000 cycles for a 1GHz processor! One possible measure of throughput would be the number of random sectors that can be read in one second. (1 sector 16.7ms) (1000ms 1s) = 60 sectors/second. April 30, 2003 Introduction to I/O 10

Parallel I/O Many hardware systems use parallelism for increased speed. Pipelined and superscalar processors include extra hardware so they can execute multiple instructions simultaneously. Dividing memory into banks lets us access several words at once. A redundant array of inexpensive disks or RAID system allows access to several hard drives at once, for increased bandwidth. The picture below shows a single data file with fifteen sectors denoted A-O, which are striped across four disks. This is reminiscent of interleaved main memories from last week. April 30, 2003 Introduction to I/O 11

Networks Typical networks have even lower transfer speeds than hard disks. Home PCs with cable modems get around 1-2MB/s, but hard disks can usually transfer at least 10MB/s. People often save long downloads to their local hard disk, so the disk is serving as a cache for the network. Latency is a very important issue in networking. It takes time for bits to travel across states, countries and oceans! >ping www.uiuc.edu Approximate round trip times in milli-seconds: Minimum = 104ms, Maximum = 115ms, Average = 112ms >ping www.stanford.edu Approximate round trip times in milli-seconds: Minimum = 160ms, Maximum = 170ms, Average = 164ms >ping nus.edu.sg Approximate round trip times in milli-seconds: Minimum = 410ms, Maximum = 437ms, Average = 420ms April 30, 2003 Introduction to I/O 12

Network topologies The arrangement of a network affects performance. A linear topology connects machines in sequence. Only one machine at a time may send data. It takes a long time to get to the other end. If one computer or link fails, the entire network goes down. In a star topology, all machines are connected to a central hub. This can reduce the distance between any two computers on the network. It also minimizes the effect of a failed node or link on other machines. April 30, 2003 Introduction to I/O 13

Tree topology A tree topology is also popular. Individual units represent one leaf or one small subtree. Larger subtrees may be complete departments or divisions. The entire organization connects all of these departments. (www.cybergeography.org) April 30, 2003 Introduction to I/O 14

The Internet is just one big graph. The Internet There are many possible paths between any two machines. This redundancy increases reliability, and data can also be sent along multiple paths for higher speed. UIUC accesses the Internet through several vendors, for both increased bandwidth and reliability. (www.caida.org) April 30, 2003 Introduction to I/O 15

Computer buses Coming back to our world, each computer has several small networks inside, called buses, to connect processors, memory, and I/O devices. The simplest kind of bus is linear, as shown below. All devices share the same bus. Only one device at a time may transfer data on the bus. Simple is not always good! With many devices, there might be a lot of contention. The distance from one end of the bus to the other may also be relatively long, increasing latencies. System bus CPU Memory Hard disks CD-ROM Network Display April 30, 2003 Introduction to I/O 16

Hierarchical buses We could split the bus into different segments. Since the CPU and memory need to communicate so often, a shorter and faster processor-memory bus can be dedicated to them. A separate I/O bus would connect the slower devices to each other, and eventually to the processor. CPU Memory Processor-memory bus I/O bus Hard disks CD-ROM Network Display April 30, 2003 Introduction to I/O 17

Synchronous and asynchronous buses A synchronous bus operates with a central clock signal. Bus transactions can be handled easily with finite state machines. However, the clock rate and bus length are inversely proportional; faster clocks mean less time for data to travel. This is one reason why PCs never have more than about five expansion slots. All devices on the bus must run at the same speed, even if they are capable of going faster. An asynchronous bus does not rely on clock signals. Bus transactions rely on complicated handshaking protocols so each device can determine when other ones are available or ready. On the other hand, the bus can be longer and individual devices can operate at different speeds. Many external buses like USB and Firewire are asynchronous. April 30, 2003 Introduction to I/O 18

Basic bus protocols It s convenient to think of I/O operations as memory operations. The CPU reads from input devices like keyboards and CD-ROMs, and writes to output devices like monitors and printers. An address specifies the exact sector, pixel, host, etc. to access. Using these terms, two devices can communicate over a bus as follows. 1. An initiator sends an address and possibly data to a target. 2. The target processes the request by reading or writing data. 3. The target sends a reply over the bus back to the initiator. The bus width limits the number of bits transferred per cycle. (1) (3) System bus CPU Memory Hard disks CD-ROM Network Display (2) April 30, 2003 Introduction to I/O 19

Example bus problems I/O problems always start with some assumptions about a system. A CPU and memory share a 32-bit bus running at 100MHz. The memory needs 50ns to access a 64-bit value from one address. Then, questions generally ask about the latency or throughput. How long does it take to read one address of memory? How many random addresses can be read per second? You need to find the total time for a single transaction. 1. It takes one cycle to send a 32-bit address to the memory. 2. The memory needs 50ns, or 5 cycles, to read a 64-bit value. 3. It takes two cycles to send 64 bits over a 32-bit wide bus. Then you can calculate latencies and throughputs. The time to read from one address is eight cycles or 80ns. You can do 12.5 million reads per second, for an effective bandwidth of (12.5 10 6 reads/second) (8 bytes/read) = 100MB/s. April 30, 2003 Introduction to I/O 20

Summary Peripheral devices are a crucial component of computer systems. They deliver obscene amounts of data to and from a processor. Buses connect devices, the processor and memory together. Unfortunately, I/O is often a bottleneck. Physical limitations and poor designs can drag down a system. Amdahl s law argues in favor of improving I/O performance. I/O performance metrics include bandwidth, latency and throughput. Next week we ll look at some more bus-related issues, drawing examples from current technologies like PCI, USB and Firewire. April 30, 2003 Introduction to I/O 21