Chapter 8: Part II Storage, Network and Other Peripherals.

Slides:



Advertisements
Similar presentations
Chapter 8 Interfacing Processors and Peripherals.
Advertisements

Chapter 7: System Buses Dr Mohamed Menacer Taibah University
Computer Architecture
Digital Computer Fundamentals
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.
1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.
Datorteknik BusInterfacing bild 1 Bus Interfacing Processor-Memory Bus –High speed memory bus Backplane Bus –Processor-Interface bus –This is what we usually.
CSCE 212 Chapter 8 Storage, Networks, and Other Peripherals Instructor: Jason D. Bakos.
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
IOSystems.1 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output  Important metrics for an I/O system l Performance.
EE30332 Ch8 DP – 1 Ch 8 Interfacing Processors and Peripherals Buses °Fundamental tool for designing and building computer systems divide the problem into.
S. Barua – CPSC 440 CHAPTER 8 INTERFACING PROCESSORS AND PERIPHERALS Topics to be covered  How to.
Cache Performance, Interfacing, Multiprocessors CPSC 321 Andreas Klappenecker.
Interfacing Processors and Peripherals Andreas Klappenecker CPSC321 Computer Architecture.
Processor Design 5Z0321 Processor Design 5Z032 Chapter 8 Interfacing Processors and Peripherals Henk Corporaal.
1  1998 Morgan Kaufmann Publishers Chapter 8 Interfacing Processors and Peripherals.
1 CSE SUNY New Paltz Chapters 8 Interfacing Processors and Peripherals.
1  2004 Morgan Kaufmann Publishers Chapters 8 & 9 (partial coverage)
1 Interfacing Processors and Peripherals I/O Design affected by many factors (expandability, resilience) Performance: — access latency — throughput — connection.
University College Cork IRELAND Hardware Concepts An understanding of computer hardware is a vital prerequisite for the study of operating systems.
TECH CH03 System Buses Computer Components Computer Function
1 Lecture 21: Virtual Memory, I/O Basics Today’s topics:  Virtual memory  I/O overview Reminder:  Assignment 8 due Tue 11/21.
I/0 devices.
CPU Chips The logical pinout of a generic CPU. The arrows indicate input signals and output signals. The short diagonal lines indicate that multiple pins.
1 Input/Output (I/O) Devices I/O is the eyes, ears, nose, mouth, hands, legs, etc. of the computer system. Imagine a computer without I/O.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Storage & Peripherals Disks, Networks, and Other Devices.
1chapter 8 Review: Major Components of a Computer Processor Control Datapath Memory Devices Input Output Important metrics for an I/O system –Performance.
1 (Based on text: David A. Patterson & John L. Hennessy, Computer Organization and Design: The Hardware/Software Interface, 3 rd Ed., Morgan Kaufmann,
CHAPTER 3 TOP LEVEL VIEW OF COMPUTER FUNCTION AND INTERCONNECTION
1 Interfacing Processors and Peripherals I/O Design affected by many factors (expandability, resilience) Performance: — access latency — throughput — connection.
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
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.
Top Level View of Computer Function and Interconnection.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent University.
2009 Sep 10SYSC Dept. Systems and Computer Engineering, Carleton University F09. SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices 7.2.
Lecture 35: Chapter 6 Today’s topic –I/O Overview 1.
I/O Computer Organization II 1 Interconnecting Components Need interconnections between – CPU, memory, I/O controllers Bus: shared communication channel.
August 1, 2001Systems Architecture II1 Systems Architecture II (CS ) Lecture 9: I/O Devices and Communication Buses * Jeremy R. Johnson Wednesday,
CSIE30300 Computer Architecture Unit 11: Bus and I/O Systems Hsin-Chou Chi [Adapted from material by and
EEE440 Computer Architecture
Input-Output Organization
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
Chapter 6 Storage and Other I/O Topics. Chapter 6 — Storage and Other I/O Topics — 2 Introduction I/O devices can be characterized by Behaviour: input,
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
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.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
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.
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.
1  2004 Morgan Kaufmann Publishers Page Tables. 2  2004 Morgan Kaufmann Publishers Page Tables.
CSCE 385: Computer Architecture Spring 2014 Dr. Mike Turi I/O.
Department of Computer Science and Engineering
Bus Interfacing Processor-Memory Bus Backplane Bus I/O Bus
Part VI Input/Output and Interfacing
Morgan Kaufmann Publishers Storage and Other I/O Topics
Operating Systems (CS 340 D)
Virtual Memory Main memory can act as a cache for the secondary storage (disk) Advantages: illusion of having more physical memory program relocation protection.
CSC3050 – Computer Architecture
Presentation transcript:

Chapter 8: Part II Storage, Network and Other Peripherals

Performance Analysis: Sync. vs. Async.  Synchronous bus: clock time=50ns, each transaction takes one clock cycle  Asynchronous bus: 40 ns per handshake  Data portion=32 bits  Question: Find the bandwidth of each bus when performing one-word reads from a 200ns memory.

Sync. vs. Async. Buses (I)  For the synchronous bus: 1. Send the address to memory:50 ns 2. Read the memory: 200 ns 3. Send the data to the device: 50 ns Total time= 300 ns, bandwidth=4bytes/300ns=13.3 MB/sec

Sync. vs. Async. Buses (II)  For the asynchronous bus: 1. Step 1: 40 ns 2. Step 2,3,4: max(3x40, 200ns)=200ns 3. Step 5,6,7: 3x40ns = 120ns Total time = 360 ns, maximum bandwidth= 4bytes/360ns = 11.1 MB/s

Increasing Bus Bandwidth  Data bus width  Separate versus multiplexed address and data lines  Block transfers

Performance Analysis of Two Bus Schemes  Given a system with a memory and bus system supporting block access of 4 to 16 words a 64-bit synchronous bus clocked at 200MHz, with each 64-bit transfer taking 1 clock cycle, and 1 clock cycle to send an address to memory two clock cycles needed between each bus operation memory access for first 4 words takes 200ns, each additional set of 4 words requires 20ns

Question  Find the sustained bandwidth and latency for a read of 256 words for transfers using 4-word blocks and 16-word blocks.  Find the effective number of bus transactions for each case.

4-Word Block Transfer  1 clock cycle to send address to memory  200ns/(5ns/cycle) = 40 cycles to read memory  2 cycles to send data from memory  2 idle cycles  Total = 45 cycles  256 words requires 45x64= 2880 cycles

4-Word Block Transfer  Latency = 2880 cycles x 5ns/cycle = ns  Number of bus transactions = 64 x 1s/14400ns = 4.44M transactions/s  Bandwidth = (256x4 bytes)x 1/14400ns = MB/s

16-Word Block Transfer  1 clock cycle to send address to memory  40 cycles to read first 4 words from memory  2 cycles to send data, during which the read of the next 4 words is started.  2 idle cycles between transfers, during which the read of the next block is completed.  Need to repeat the last two steps 3 times to read a total of 16 words.

16-Word Block Transfer  Total cycles required = x(2+2) =57 cycles  256/16=16 transactions are required  Total number of cycles required for 256 word = 16x57 = 912 cycles, latency = 4560 ns  Number of bus transactions = 16 x 1s/4560ns = 3.51M transactions/s  Bandwidth = (256x4 bytes)x 1/4560ns = MB/

Bus Arbitration  Daisy chain arbitration (not very fair)  Centralized arbitration (requires an arbiter), e.g., PCI  Self selection, e.g., NuBus used in Macintosh  Collision detection, e.g., Ethernet

Bus Standards  PCI ( a general purpose backplane bus)  SCSI (Small Computer System Interface)  IEEE 1394 (Firewire)  USB 2.0 CharacteristicFirewire(1394)USB 2.0 Bus width42 Clockingasynchronous Peak bandwidth50MB/s (Firewire 400) 100MB/s (Firewire 800) 0.2 MB/s 1.5 MB/s 60 MB/s Hot pluggableYes Max # of devices63127 Max. Bus length4.5M5M

Interfacing I/O Devices  How is a user I/O request transformed into a device command and communicated to the device?  How is data actually transferred to or from a memory location?  What is the role of the operating system?

Role of the OS  The OS plays a major role in handling I/O, in that: I/O system is shared by multiple programs using the processor I/O system often use interrupts (cause transfer to supervisor mode) low-level control of I/O is complex

Communications between OS and I/O Devices  The OS must be able to give commands to I/O.  The I/O must be able to notify the OS when operation is completed or error has occurred.  Data must be transferred between memory and an I/O device.

Giving Commands to I/O  To give a command, the processor must be able to address the device and to supply command words: memory-mapped I/O: portions of the address space is assigned to I/O devices special I/O: dedicated I/O instructions in the processor.

Communicating with the Processor  Polling  Interrupts  DMA

Polling  Polling: processor periodically checks the status of I/O.  Overhead of polling in an I/O system Example 1: mouse Example 2: floppy disk Example 3: hard disk

Mouse  Assume the number of clock cycles for a polling operation, including transferring to the polling routine, accessing the device, and restarting the user program, is 400, with a 500 MHz clock.  The mouse must be polled 30 times a second to ensure that no user movement is missed.  Fraction of CPU time = 30x400/(500x10^6) = 0.002%

Floppy Disk  The floppy disk transfers data to the processor in 16-bit units and has a data rate of 50KB/s.  Polling rate = (50KB/s)/(2 Bytes/polling) = 25K polling/sec  Fraction of CPU time = 25Kx400/(500x10^6) = 2%

Hard Disk  Transfer in 4-word blocks  transfer rate: 4MB/s  Polling rate = (4MB/s)/(4x4 Bytes/polling) = 250K polling/sec  Fraction of CPU time = 250Kx400/(500x10^6) = 20%

Overhead of Polling  Can do the polling only when the device is active, thus reducing the overhead.  However, the overhead is still significant, resulting in another design called interrupt-driven I/O.

Overhead of Interrupt-Driven I/O  Assume the overhead for each transfer, including the interrupt, is 500 cycles.  Cycles per second for disk = 250Kx500 = 125x10^6 cycles  Fraction of processor consumed = 125x10^6/(500x10^6) = 25%  Assuming disk is transferring data 5% of the time, fraction of CPU on average = 25%x5%=1.25%

Direct Memory Access(DMA)  If disk is transferring data most of the time, the overhead for interrupt-driven I/O is still high.  For high-bandwidth device, let the device controller transfer data directly to or from the memory without involving the processor, known as direct memory access.  Interrupt is used to signal the completion of I/O transfer or error.  Note: How does it affect cache design?

Overhead of I/O Using DMA  Assume initial setup of DMA transfer takes 1000 cycles, handling of interrupt at DMA completion takes 500 cycles, average transfer from disk is 8KB  Each DMA transfer takes 8KB/(4MB/s) = 2x10^-3s  If the disk is constantly transferring data, it requires: ( )/(2x10^-3) = 750x10^3 cycles  Fraction of CPU time= 750x10^3/(500x10^6) = 0.15%

I/O System Design  Latency constraints: ensuring the latency to complete and I/O operation is bounded.  Bandwidth constraints  Performance Analysis techniques: — queuing theory — simulation — analysis

I/O System Design- Example  CPU: 3 BIPS, average 100,000 instructions in the OS per I/O operation  backplane bus transfer rate: 1000 MB/s  SCSI-Ultra 320 controller with transfer rate = 320 MB/s, accommodating up to 7 disks  Disk bandwidth = 75MB/s, seek+rotational latency=6 ms  Workload: 64-KB reads, user program need 200,000 instructions per I/O

Example  Find the maximum sustainable I/O rate the number of disks and SCSI controller required.

Real Stuff: Buses and Network of P4

Intel P4 I/O Chip Sets

A Digital Camera

SoC (System on a chip)