Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 35 – Input / Output 2010-04-21 We’ve merged 3 lectures into 1… See 2008Sp for full.

Slides:



Advertisements
Similar presentations
IT253: Computer Organization
Advertisements

CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan
Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
Section 6.2. Record data by magnetizing the binary code on the surface of a disk. Data area is reusable Allows for both sequential and direct access file.
CS1104 – Computer Organization
CS61C L13 I/O © UC Regents 1 CS 161 Chapter 8 - I/O Lecture 17.
CSCE 212 Chapter 8 Storage, Networks, and Other Peripherals Instructor: Jason D. Bakos.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 36: IO Basics Instructor: Dan Garcia
CS61C L38 Disks (1) Garcia, Spring 2007 © UCB The enabling power of iPod  What can you do with it? View medical images. Record flight data. Watch videos.
CS61C L36 Input / Output (1) Garcia, Spring 2007 © UCB Robson disk $  Intel has a NAND flash-based disk cache which can speed up access for laptops and.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 34 – Input / Output “Arduino is an open-source electronics prototyping.
Review of Mem. HierarchyCSCE430/830 Review of Memory Hierarchy CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U.
Inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 37 – Disks The ST506 was their first drive in 1979 (shown here), weighed.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
CS 430 – Computer Architecture 1 CS 430 – Computer Architecture Input/Output: Polling and Interrupts William J. Taffe using the slides of David Patterson.
CS61C L37 Disks (1) Garcia, Fall 2006 © UCB Lecturer SOE Dan Garcia inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine.
1 Lecture 26: Storage Systems Topics: Storage Systems (Chapter 6), other innovations Final exam stats:  Highest: 95  Mean: 70, Median: 73  Toughest.
CS61C L40 I/O: Disks (1) Garcia, Fall 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L24 Input/Output, Networks I (1) Garcia, Fall 2005 © UCB Lecturer PSOE, new dad Dan Garcia inst.eecs.berkeley.edu/~cs61c.
Computer ArchitectureFall 2008 © November 12, 2007 Nael Abu-Ghazaleh Lecture 24 Disk IO.
Computer ArchitectureFall 2007 © November 7th, 2007 Majd F. Sakr CS-447– Computer Architecture.
CS61C L13 I/O © UC Regents 1 CS61C - Machine Structures Lecture 13 - Input/Output: Polling and Interrupts October 11, 2000 David Patterson
CS 61C L39 I/O (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures.
CS61C L37 I/O (1) Garcia © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture.
COMP381 by M. Hamdi 1 Input/Output Systems. COMP381 by M. Hamdi 2 Motivation: Who Cares About I/O? CPU Performance: 60% per year I/O system performance.
12/3/2004EE 42 fall 2004 lecture 391 Lecture #39: Magnetic memory storage Last lecture: –Dynamic Ram –E 2 memory This lecture: –Future memory technologies.
Cs 61C L12 I/O.1 Patterson Spring 99 ©UCB CS61C Input/Output Lecture 12 February 26, 1999 Dave Patterson (http.cs.berkeley.edu/~patterson) www-inst.eecs.berkeley.edu/~cs61c/schedule.html.
1 CS222: Principles of Database Management Fall 2010 Professor Chen Li Department of Computer Science University of California, Irvine Notes 01.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
CS 61C L41 I/O Disks (1) Garcia, Spring 2004 © UCB Lecturer PSOE Dan Garcia inst.eecs.berkeley.edu/~cs61c CS61C : Machine.
Instructor: Justin Hsia CS 61C: Great Ideas in Computer Architecture Input/Output 8/12/20131Summer Lecture #28.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 39: IO Disks Instructor: Dan Garcia 1.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Lecture on Electronic Memories. What Is Electronic Memory? Electronic device that stores digital information Types –Volatile v. non-volatile –Static v.
Storage & Peripherals Disks, Networks, and Other Devices.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 38: IO and Networking Instructor: Dan Garcia
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
 Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
COT 4600 Operating Systems Fall 2009 Dan C. Marinescu Office: HEC 439 B Office hours: Tu-Th 3:00-4:00 PM.
Chapter 5: Computer Systems Organization Invitation to Computer Science, Java Version, Third Edition.
1 Week 9: Computing Components: PART II READING: Chapter 5.
Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage Structure Storage Hierarchy Hardware Protection Network Structure.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
CS61C L26 IO & Performance I (1) Pearce, Summer 2010 © UCB inst.eecs.berkeley.edu/~cs61c CS61C : Machine Structures Lecture 26 IO Basics, Storage & Performance.
Topic 6: Further System Fundamentals. Fetch-Execute Cycle Review Computer programs are instructions stored in RAM Processor fetches instructions and executes.
Aug CMSC 104, LECT-021 Machine Architecture Some material in this presentation is borrowed form Adrian Ilie From The UNIVERSITY of NORTH CAROLINA.
Computer Organization. This module surveys the physical resources of a computer system.  Basic components  CPU  Memory  Bus  I/O devices  CPU structure.
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
Chapter 5 Input/Output 5.1 Principles of I/O hardware
© GCSE Computing Computing Hardware Starter. Creating a spreadsheet to demonstrate the size of memory. 1 byte = 1 character or about 1 pixel of information.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) Lecture 37: IO Basics Instructor: Dan Garcia
Adapted from Computer Organization and Design, Patterson & Hennessy ECE232: Hardware Organization and Design Part 17: Input/Output Chapter 6
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Processor Memory Processor-memory bus I/O Device Bus Adapter I/O Device I/O Device Bus Adapter I/O Device I/O Device Expansion bus I/O Bus.
1 Ó1998 Morgan Kaufmann Publishers Chapter 8 I/O Systems.
10/15: Lecture Topics Input/Output –Types of I/O Devices –How devices communicate with the rest of the system communicating with the processor communicating.
CS 61C: Great Ideas in Computer Architecture (Machine Structures) More I/O: DMA Vladimir Stojanovic & Nicholas Weaver
1 Components of the Virtual Memory System  Arrows indicate what happens on a lw virtual address data physical address TLB page table memory cache disk.
CSCE 385: Computer Architecture Spring 2014 Dr. Mike Turi I/O.
Chapter 2: Computer-System Structures
Inst.eecs.berkeley.edu/~cs61c UC Berkeley CS61C : Machine Structures Lecture 35 – Input / Output Lecturer SOE Dan Garcia
Computer Architecture
Input-output I/O is very much architecture/system dependent
Operating Systems Chapter 5: Input/Output Management
Chapter 5: Computer Systems Organization
Persistence: I/O devices
CS61C - Machine Structures Lecture 14 - Input/Output
Presentation transcript:

inst.eecs.berkeley.edu/~cs61c UCB CS61C : Machine Structures Lecture 35 – Input / Output We’ve merged 3 lectures into 1… See 2008Sp for full slides (few Qs plz) Chris Harrison has developed a system that allows you to touch your skin and control a computer. He shows examples, combined with a pico projector, of dialing a phone number on your hand, etc. Lecturer SOE Dan Garcia

CS61C L35 Input / Output (3) Garcia, Spring 2008 © UCB Recall : 5 components of any Computer Processor (active) Computer Control (“brain”) Datapath (“brawn”) Memory (passive) (where programs, data live when running) Devices Input Output Keyboard, Mouse Display, Printer Disk, Network Earlier LecturesCurrent Lecture

CS61C L35 Input / Output (4) Garcia, Spring 2008 © UCB Motivation for Input/Output  I/O is how humans interact with computers  I/O gives computers long-term memory.  I/O lets computers do amazing things:  Read pressure of synthetic hand and control synthetic arm and hand of fireman  Control propellers, fins, communicate in BOB (Breathable Observable Bubble)  Computer without I/O like a car w/no wheels; great technology, but gets you nowhere

CS61C L35 Input / Output (5) Garcia, Spring 2008 © UCB  I/O Speed: bytes transferred per second (from mouse to Gigabit LAN: 7 orders of mag!)  DeviceBehaviorPartner Data Rate (KB/s) KeyboardInputHuman0.01 MouseInputHuman0.02 Voice outputOutputHuman5.00 Floppy diskStorageMachine50.00 Laser PrinterOutputHuman Magnetic DiskStorageMachine10, Wireless NetworkI or OMachine 10, Graphics DisplayOutputHuman30, Wired LAN NetworkI or OMachine125, When discussing transfer rates, use 10 x I/O Device Examples and Speeds

CS61C L35 Input / Output (6) Garcia, Spring 2008 © UCB Instruction Set Architecture for I/O  What must the processor do for I/O?  Input: reads a sequence of bytes  Output: writes a sequence of bytes  Some processors have special input and output instructions  Alternative model (used by MIPS):  Use loads for input, stores for output  Called “Memory Mapped Input/Output”  A portion of the address space dedicated to communication paths to I/O devices (no mem there)  Instead, they correspond to registers in I/O devices cntrl reg. data reg. 0 0xFFFFFFFF 0xFFFF0000 address

CS61C L35 Input / Output (7) Garcia, Spring 2008 © UCB Processor-I/O Speed Mismatch  1GHz microprocessor can execute 1 billion load or store instructions per second, or 4,000,000 KB/s data rate  I/O devices data rates range from 0.01 KB/s to 125,000 KB/s  Input: device may not be ready to send data as fast as the processor loads it  Also, might be waiting for human to act  Output: device not be ready to accept data as fast as processor stores it  What to do?

CS61C L35 Input / Output (8) Garcia, Spring 2008 © UCB Processor Checks Status before Acting  Path to device generally has 2 registers:  Control Register, says it’s OK to read/write (I/O ready) [think of a flagman on a road]  Data Register, contains data  Processor reads from Control Register in loop, spins while waiting for device to set Ready bit in Control reg (0  1) to say its OK  Processor then loads from (input) or writes to (output) data register  Load from or Store into Data Register resets Ready bit (1  0) of Control Register  This is called “Polling”

CS61C L35 Input / Output (9) Garcia, Spring 2008 © UCB What is the alternative to polling?  Wasteful to have processor spend most of its time “spin-waiting” for I/O to be ready  Would like an unplanned procedure call that would be invoked only when I/O device is ready  Solution: use exception mechanism to help I/O. Interrupt program when I/O ready, return when done with data transfer

CS61C L35 Input / Output (10) Garcia, Spring 2008 © UCB I/O Interrupt  An I/O interrupt is like overflow exceptions except:  An I/O interrupt is “asynchronous”  More information needs to be conveyed  An I/O interrupt is asynchronous with respect to instruction execution:  I/O interrupt is not associated with any instruction, but it can happen in the middle of any given instruction  I/O interrupt does not prevent any instruction from completion

CS61C L35 Input / Output (11) Garcia, Spring 2008 © UCB Interrupt-Driven Data Transfer (1) I/O interrupt (2) save PC Memory add sub and or user program read store... jr interrupt service routine (3) jump to interrupt service routine (4) perform transfer (5)

CS61C L35 Input / Output (12) Garcia, Spring 2008 © UCB Administrivia  Project 2 graded face-to-face, check web page for scheduling  Project 3 (Cache simulator) out  You may work in pairs for this project  Try the performance competition!  You may work in pairs for this too  Do it for fun!  Do it to shine!  Do it to test your metttle!  Do it for EPA!

CS61C L35 Input / Output (13) Garcia, Spring 2008 © UCB Upcoming Calendar Week #MonWedThu LabFri #13 This week I/O P3 out VMPerformance #14 Last week o’ classes Inter- machine Parallelism Summary, Review, Evaluation Parallel Intra- machine Parallelism( Scott) P3 due #15 RRR Week Perf comp due 11:59pm #16 Finals Week Review Sun May 9 3-6pm 10 Evans Final Exam 8-11am in Hearst Gym

 Founders  JCR Licklider, as head of ARPA, writes on “intergalactic network”  1963 : ASCII becomes first universal computer standard  1969 : Defense Advanced Research Projects Agency (DARPA) deploys 4 UCLA, SRI, Utah, & UCSB  1973 Robert Kahn & Vint Cerf invent TCP, now part of the Internet Protocol Suite  Internet growth rates  Exponential since start! The Internet (1962) en.wikipedia.org/wiki/Internet_Protocol_Suite “Lick” Vint Cerf Revolutions like this don't come along very often

CS61C L35 Input / Output (16) Garcia, Spring 2008 © UCB Why Networks?  Originally sharing I/O devices between computers  E.g., printers  Then communicating between computers  E.g., file transfer protocol  Then communicating between people  E.g.,  Then communicating between networks of computers  E.g., file sharing, www, …

 “System of interlinked hypertext documents on the Internet”  History  1945: Vannevar Bush describes hypertext system called “memex” in article  1989: Tim Berners-Lee proposes, gets system up ’90  ~2000 Dot-com entrepreneurs rushed in, 2001 bubble burst  Wayback Machine  Snapshots of web over time  Today : Access anywhere! The World Wide Web (1989) en.wikipedia.org/wiki/History_of_the_World_Wide_Web Tim Berners- Lee World’s First web server in

CS61C L35 Input / Output (18) Garcia, Spring 2008 © UCB Shared vs. Switched Based Networks  Shared vs. Switched:  Switched: pairs (“point-to- point” connections) communicate at same time  Shared: 1 at a time (CSMA/CD)  Aggregate bandwidth (BW) in switched network is many times shared:  point-to-point faster since no arbitration, simpler interface Node Shared Crossbar Switch Node

CS61C L35 Input / Output (19) Garcia, Spring 2008 © UCB What makes networks work?  links connecting switches to each other and to computers or devices Computer network interface switch ability to name the components and to route packets of information - messages - from a source to a destination Layering, redundancy, protocols, and encapsulation as means of abstraction (61C big idea)

CS61C L35 Input / Output (21) Garcia, Spring 2008 © UCB Magnetic Disk – common I/O device  A kind of computer memory  Information stored by magnetizing ferrite material on surface of rotating disk  similar to tape recorder except digital rather than analog data  Nonvolatile storage  retains its value without applying power to disk.  Two Types  Floppy disks – slower, less dense, removable.  Hard Disk Drives (HDD) – faster, more dense, non-removable.  Purpose in computer systems (Hard Drive):  Long-term, inexpensive storage for files  “Backup” for main-memory. Large, inexpensive, slow level in the memory hierarchy (virtual memory)

CS61C L35 Input / Output (22) Garcia, Spring 2008 © UCB Photo of Disk Head, Arm, Actuator Actuator Arm Head Platters (1-12) { Spindle

CS61C L35 Input / Output (23) Garcia, Spring 2008 © UCB Disk Device Terminology  Several platters, with information recorded magnetically on both surfaces (usually)  Bits recorded in tracks, which in turn divided into sectors (e.g., 512 Bytes)  Actuator moves head (end of arm) over track (“seek”), wait for sector rotate under head, then read or write Outer Track Inner Track Sector Actuator HeadArm Platter

CS61C L35 Input / Output (24) Garcia, Spring 2008 © UCB Disk Device Performance (1/2)  Disk Latency = Seek Time + Rotation Time + Transfer Time + Controller Overhead  Seek Time? depends on no. tracks to move arm, speed of actuator  Rotation Time? depends on speed disk rotates, how far sector is from head  Transfer Time? depends on data rate (bandwidth) of disk (f(bit density,rpm)), size of request Platter Arm Actuator Head Sector Inner Track Outer Track Controller Spindle

CS61C L35 Input / Output (25) Garcia, Spring 2008 © UCB Disk Device Performance (2/2)  Average distance of sector from head?  1/2 time of a rotation  7200 Revolutions Per Minute  120 Rev/sec  1 revolution = 1/120 sec  8.33 milliseconds  1/2 rotation (revolution)  4.17 ms  Average no. tracks to move arm?  Disk industry standard benchmark:  Sum all time for all possible seek distances from all possible tracks / # possible  Assumes average seek distance is random  Size of Disk cache can strongly affect perf!  Cache built into disk system, OS knows nothing

CS61C L35 Input / Output (26) Garcia, Spring 2008 © UCB Where does Flash memory come in?  Microdrives and Flash memory (e.g., CompactFlash) are going head-to-head  Both non-volatile (no power, data ok)  Flash benefits: durable & lower power (no moving parts, need to spin µdrives up/down)  Flash limitations: finite number of write cycles (wear on the insulating oxide layer around the charge storage mechanism). Most ≥ 100K, some ≥ 1M W/erase cycles.  How does Flash memory work?  NMOS transistor with an additional conductor between gate and source/drain which “traps” electrons. The presence/absence is a 1 or 0. en.wikipedia.org/wiki/Flash_memory

CS61C L35 Input / Output (27) Garcia, Spring 2008 © UCB What does Apple put in its iPods? Samsung flash 4, 8GB shuffle, nano, classic, touch Toshiba 1.8-inch HDD 80, 160GB Toshiba flash 1, 2GB en.wikipedia.org/wiki/Ipod Toshiba flash 8, 16, 32GB

CS61C L35 Input / Output (28) Garcia, Spring 2008 © UCB RAID : Redundant Array of Inexpensive Disks  Berkeley (1989)  A multi-billion industry 80% non-PC disks sold in RAIDs  Idea:  Files are “striped” across multiple disks  Redundancy yields high data availability  Disks will still fail  Contents reconstructed from data redundantly stored in the array   Capacity penalty to store redundant info   Bandwidth penalty to update redundant info

CS61C L35 Input / Output (29) Garcia, Spring 2008 © UCB Common RAID configurations RAID 3 Parity drive protects against 1 failure RAID 5 Rotated parity across all drives RAID 0 No redundancy, Fast access RAID 1 Mirror Data, most expensive sol’n

CS61C L35 Input / Output (30) Garcia, Spring 2008 © UCB “And in conclusion…”  I/O gives computers their 5 senses  I/O speed range is 100-million to one  Processor speed means must synchronize with I/O devices before use  Polling works, but expensive  processor repeatedly queries devices  Interrupts works, more complex  devices causes an exception, causing OS to run and deal with the device  I/O control leads to Operating Systems