CS1104 – Computer Organization

Slides:



Advertisements
Similar presentations
So far Binary numbers Logic gates Digital circuits process data using gates – Half and full adder Data storage – Electronic memory – Magnetic memory –
Advertisements

Bus arbitration Processor and DMA controllers both need to initiate data transfers on the bus and access main memory. The device that is allowed to initiate.
Chapter 8 Interfacing Processors and Peripherals.
1 Lecture 22: I/O, Disk Systems Todays topics: I/O overview Disk basics RAID Reminder: Assignment 8 due Tue 11/21.
I/O InterfaceCS510 Computer ArchitecturesLecture Lecture 17 I/O Interfaces and I/O Busses.
Computer Buses Ref: Burd, Chp – 220 Englander, Chp 7 p
IT253: Computer Organization
System Integration and Performance
Digital Computer Fundamentals
CS61C L16 Disks © UC Regents 1 CS161 Lecture 25 - Disks Laxmi Bhuyan
Disk Storage SystemsCSCE430/830 Disk Storage Systems CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U. Maine) Fall,
I/O Chapter 8. Outline Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
CS224 Spring 2011 Computer Organization CS224 Chapter 6A: Disk Systems With thanks to M.J. Irwin, D. Patterson, and J. Hennessy for some lecture slide.
Chapter 4 Device Management and Disk Scheduling DEVICE MANAGEMENT Content I/O device overview I/O device overview I/O organization and architecture I/O.
CSE431 Chapter 6A.1Irwin, PSU, 2008 Chapter 6A: Disk Systems Mary Jane Irwin ( ) [Adapted from Computer Organization.
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.
I/O Organization popo.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Lecture 21Comp. Arch. Fall 2006 Chapter 8: I/O Systems Adapted from Mary Jane Irwin at Penn State University for Computer Organization and Design, Patterson.
COMP3221 lec29-io-examples-I.1 Saeid Nooshabadi COMP 3221 Microprocessors and Embedded Systems Lectures 29: I/O Interfacing Examples - I
1 IKI20210 Pengantar Organisasi Komputer Kuliah No. 19: I/O, Interupsi 20 November 2002 Bobby Nazief Johny Moningka
1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.
CS61C L13 I/O © UC Regents 1 CS 161 Chapter 8 - I/O Lecture 17.
CPE 442 io.1 Introduction To Computer Architecture CpE 442 I/O Systems.
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
CSCE 212 Chapter 8 Storage, Networks, and Other Peripherals Instructor: Jason D. Bakos.
EE30332 Ch8 DP – 1 Ch 8 Interfacing Processors and Peripherals Buses °Fundamental tool for designing and building computer systems divide the problem into.
Interfacing Processors and Peripherals Andreas Klappenecker CPSC321 Computer Architecture.
Review of Mem. HierarchyCSCE430/830 Review of Memory Hierarchy CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U.
11/18/2004Comp 120 Fall November 3 classes to go No class on Tuesday 23 November Last 2 classes will be survey and exam review Interconnect and.
1  1998 Morgan Kaufmann Publishers Chapter 8 Interfacing Processors and Peripherals.
Prof. John Nestor ECE Department Lafayette College Easton, Pennsylvania ECE Computer Organization Lecture 22 - Input/Output.
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.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
I/0 devices.
Lecture 12 Today’s topics –CPU basics Registers ALU Control Unit –The bus –Clocks –Input/output subsystem 1.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
CPU BASICS, THE BUS, CLOCKS, I/O SUBSYSTEM Philip Chan.
 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,
CHAPTER 2: COMPUTER-SYSTEM STRUCTURES Computer system operation Computer system operation I/O structure I/O structure Storage structure Storage structure.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
CS2100 Computer Organisation Input/Output (AY2010/2011) Semester 2 Adapted from.
2.1 Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General.
Lecture 35: Chapter 6 Today’s topic –I/O Overview 1.
August 1, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 9: I/O Devices and Communication Buses * Jeremy R. Johnson Wednesday,
Computer System Internal components - The processor - Main memory - I / O controllers - Buses External components (peripherals). These include: - keyboard.
Computer Organization. This module surveys the physical resources of a computer system.  Basic components  CPU  Memory  Bus  I/O devices  CPU structure.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
Csci 136 Computer Architecture II – IO and Storage Systems Xiuzhen Cheng
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.
بسم الله الرحمن الرحيم MEMORY AND I/O.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 26 Bus Interconnect May 7,
Chapter 3 System Buses.  Hardwired systems are inflexible  General purpose hardware can do different tasks, given correct control signals  Instead.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
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.
Mohamed Younis CMCS 411, Computer Architecture 1 CMCS Computer Architecture Lecture 25 I/O Systems May 2,
Chapter 2: Computer-System Structures
Operating Systems (CS 340 D)
Computer Architecture
Input-output I/O is very much architecture/system dependent
Presentation transcript:

CS1104 – Computer Organization http://www.comp.nus.edu.sg/~cs1104 Aaron Tan Tuck Choy School of Computing National University of Singapore

Lecture 15: I/O Devices and Buses Anatomy of a Computer Device Examples and Speeds Magnetic Disks Disk Device Terminology Disk Device Performance Disk Transfer Data Rate Synchronizing Processor and I/O Devices Polling Cost of Polling Alternative to Polling Summary CS1104-15 Lecture 15: I/O Devices and Buses

Lecture 15: I/O Devices and Buses Introduction Advantages of Buses Disadvantages of Buses General Organization of a Bus Master versus Slave CS1104-15 Lecture 15: I/O Devices and Buses

I/O: Anatomy of a Computer Five components. Disk (where programs, data live when not running) Processor (active) Computer Control (“brain”) Datapath (“brawn”) Memory (passive) (where data live when running) Devices Input Output Keyboard, Mouse Display, Printer CS1104-15 I/O: Anatomy of a Computer

I/O: Device Examples and Speeds I/O Speed: bytes transferred per second (from mouse to display: million-to-1) Device Behavior Partner Data Rate (Kbytes/sec) Keyboard Input Human 0.01 Mouse Input Human 0.02 Line Printer Output Human 1.00 Floppy disk Storage Machine 50.00 Laser Printer Output Human 100.00 Optical Disk Storage Machine 500.00 Magnetic Disk Storage Machine 10,000.00 Network-LAN I or O Machine 10,000.00 Graphics Display Output Human 30,000.00 CS1104-15 I/O: Device Examples and Speeds

I/O: Magnetic Disks Purpose: Long-term, nonvolatile, inexpensive storage for files Large, inexpensive, slow level in the memory hierarchy Arm Head Actuator Platters CS1104-15 I/O: Magnetic Disks

I/O: 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) Outer Track Inner Sector Actuator moves head (end of arm,one/surface) over track (“seek”), select surface, wait for sector rotate under head, then read or write. Actuator Head Arm Platters Cylinder: all tracks under heads. CS1104-15 I/O: Disk Device Terminology

I/O: Disk Device Performance Access time = Seek Time + Rotation Time + Transfer Time + Controller Overhead Seek Time? Depends no. tracks move arm, seek speed of disk Rotation Time? Depends on speed disk rotates, how far sector is from head Transfer Time? Depends on data rate (bandwidth) of disk, size of request Platters Outer Track Inner Sector Actuator Head Arm CS1104-15 I/O: Disk Device Performance

I/O: Disk Transfer Data Rate To keep things simple, originally kept same number of sectors per track Since outer track longer, lower bits per inch As competition grew, decided to keep BPI (“constant bit density”) the same for all tracks More capacity per disk more of sectors per track towards edge Since disk spins at constant speed, outer track has faster data rate 1.5X outer track vs. inner track! CS1104-15 I/O: Disk Transfer Data Rate

I/O: Synchronizing Processor and I/O Devices 500 MHz microprocessor can execute a 500 million load or store instructions per second, or 200,000 KB/s data rate. I/O devices from 0.01 KB/s to 30,000 KB/s. Input device may not be ready to send data as fast as the processor loads it. Output device may not be ready to accept data as fast as processor stores it . What to do? CS1104-15 I/O: Synchronizing Processor and I/O Devices

I/O: Polling Processor checks status before acting. Path to device generally has 2 registers: 1 register says its OK to read/write (I/O ready), often called Control Register. 1 register to contain data, often called Data Register. Processor reads from Control Register in loop, waiting for device to set Ready bit in Control Register to say its OK. Processor then loads from (input) or writes to (output) data register. Load from device/Store into Data Register resets Ready bit of Control Register. CS1104-15 I/O: Polling

I/O: Cost of Polling Assume for a processor with a 500-MHz clock, it takes 400 clock cycles for a polling operation (call polling routine, accessing the device, and returning). Determine % of processor time for polling. Mouse: polled 30 times/sec so as not to miss user movement. Floppy disk: transfers data in 2-byte units and has a data rate of 50 KB/second. No data transfer can be missed. “Hard” disk: transfers data in 16-byte chunks and can transfer at 4 MB/second. Again, no transfer can be missed. CS1104-15 I/O: Cost of Polling

I/O: Cost of Polling Mouse Polling Clocks/sec = 30 * 400 = 12000 clocks/sec % Processor for polling: 12*103/500*106 = 0.002%  Polling mouse little impact on processor Times Polling Floppy/sec = 50 KB/s /2B = 25K polls/sec Floppy Polling Clocks/sec = 25K * 400 = 10,000,000 clocks/sec % Processor for polling: 10*106/500*106 = 2%  OK if not too many I/O devices CS1104-15 I/O: Cost of Polling

I/O: Cost of Polling Times Polling Disk/sec = 4 MB/s /16B = 250K polls/sec Disk Polling Clocks/sec = 250K * 400 = 100,000,000 clocks/sec % Processor for polling: 100*106/500*106 = 20%  Unacceptable CS1104-15 I/O: Cost of Polling

I/O: Alternative to Polling Wasteful to have processor spend most of its time “spin-waiting” for I/O to be ready. Wish we could have an unplanned procedure call that would be invoked only when I/O device is ready. Interrupt program when I/O ready, return when done with data transfer. CS1104-15 I/O: Alternative to Polling

I/O: Summary I/O gives computers their 5 senses. I/O speed range is million to one. Processor speed means must synchronize with I/O devices before use. Polling works, but expensive. Interrupts works, but more complex. CS1104-15 I/O: Summary

Bus: Introduction Transit Link bus? A bunch of wires... Shared communication link. Single set of wires used to connect multiple subsystems. A bus is also a fundamental tool for composing large, complex systems. Control Datapath Memory Processor Input Output CS1104-15 Bus: Introduction

Bus: Advantages of Buses Memory Processor I/O Device Versatility: New devices can be added easily Peripherals can be moved between computer systems that use the same bus standard Low Cost: A single set of wires is shared in multiple ways Manage complexity by partitioning the design CS1104-15 Bus: Advantages of Buses

Bus: Disadvantages of Buses It creates a communication bottleneck The bandwidth of that bus can limit the maximum I/O throughput The maximum bus speed is largely limited by: The width of the bus The number of devices on the bus The need to support a range of devices with: Widely varying latencies Widely varying data transfer rates CS1104-15 Bus: Disadvantages of Buses

Bus: General Organization of a Bus Data Lines Control Lines Control lines: Signal requests and acknowledgments Indicate what type of information is on the data lines Data lines carry information between the source and the destination: Data and Addresses CS1104-15 Bus: General Organization of a Bus

Bus: Master versus Slave Master issues command Data can go either way A bus transaction includes two parts: Issuing the command (and address) – request Transferring the data – action Master is the one who starts the bus transaction by: issuing the command (and address) Slave is the one who responds to the address by: Sending data to the master if the master ask for data Receiving data from the master if the master wants to send data CS1104-15 Bus: Master versus Slave

End of segment