Block I/O. 2 Definition Any I/O operation in which the unit of data is several words, not just one word or byte.

Slides:



Advertisements
Similar presentations
Categories of I/O Devices
Advertisements

Chapter 10 Input/Output Organization. Connections between a CPU and an I/O device Types of bus (Figure 10.1) –Address bus –Data bus –Control bus.
1/1/ / faculty of Electrical Engineering eindhoven university of technology Processor support devices Part 1:Interrupts and shared memory dr.ir. A.C. Verschueren.
CS-334: Computer Architecture
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Lecture 7b I/O. I/O devices  Device (mechanical hardware)  Device controller (electrical hardware)  Device driver (software)
Input-output and Communication Prof. Sin-Min Lee Department of Computer Science.
DIRECT MEMORY ACCESS CS 147 Thursday July 5,2001 SEEMA RAI.
© 2006 Pearson Education, Upper Saddle River, NJ All Rights Reserved.Brey: The Intel Microprocessors, 7e Chapter 13 Direct Memory Access (DMA)
6-1 I/O Methods I/O – Transfer of data between memory of the system and the I/O device Most devices operate asynchronously from the CPU Most methods involve.
04/16/2010CSCI 315 Operating Systems Design1 I/O Systems Notice: The slides for this lecture have been largely based on those accompanying an earlier edition.
Chapter 7 Interupts DMA Channels Context Switching.
1 COMP541 Interrupts, DMA, Serial I/O Montek Singh April 24, 2007.
Chapter 7 Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats.
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
Input / Output CS 537 – Introduction to Operating Systems.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
ITEC 1011 Introduction to Information Technologies 7. Input / Output Chapt. 8.
CHAPTER 5 I/O PRINCIPLE Understand the principles of System Bus
3/11/2002CSE Input/Output Input/Output Control Datapath Memory Processor Input Output Memory Input Output Network Control Datapath Processor.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
CPU BASICS, THE BUS, CLOCKS, I/O SUBSYSTEM Philip Chan.
Cis303a_chapt06_exam.ppt CIS303A: System Architecture Exam - Chapter 6 Name: __________________ Date: _______________ 1. What connects the CPU with other.
NETW 3005 I/O Systems. Reading For this lecture, you should have read Chapter 13 (Sections 1-4, 7). NETW3005 (Operating Systems) Lecture 10 - I/O Systems2.
Interrupts and DMA CSCI The Role of the Operating System in Performing I/O Two main jobs of a computer are: –Processing –Performing I/O manage and.
Spring EE 437 Lillevik 437s06-l8 University of Portland School of Engineering Advanced Computer Architecture Lecture 8 Project 3: memory agent Programmed.
1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7. Optical Discs 10/01/20151Input/Output.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
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.
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.
DMA Versus Polling or Interrupt Driven I/O
Input/Output 2 What is I/O? How we get the CPU to communicate with devices From the computer’s point of view, it’s just 1’s and 0’s Gets interpreted.
Computers Internal Communication. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
I/O management is a major component of operating system design and operation Important aspect of computer operation I/O devices vary greatly Various methods.
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.
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
Input/Output Computer component : Input/Output I/O Modules External Devices I/O Modules Function and Structure I/O Operation Techniques I/O Channels and.
MBG 1 CIS501, Fall 99 Lecture 18: Input/Output (I/O): Buses and Peripherals Michael B. Greenwald Computer Architecture CIS 501 Fall 1999.
Spring EE 437 Lillevik 437s06-l9 University of Portland School of Engineering Advanced Computer Architecture Lecture 9 DMA controller design.
CH10 Input/Output DDDData Transfer EEEExternal Devices IIII/O Modules PPPProgrammed I/O IIIInterrupt-Driven I/O DDDDirect Memory.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
12/8/20151 Operating Systems Design (CS 423) Elsa L Gunter 2112 SC, UIUC Based on slides by Roy Campbell, Sam King,
CS2100 Computer Organisation Input/Output – Own reading only (AY2015/6) Semester 1 Adapted from David Patternson’s lecture slides:
Chapter 13 – I/O Systems (Pgs ). Devices  Two conflicting properties A. Growing uniformity in interfaces (both h/w and s/w): e.g., USB, TWAIN.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output – 2 I/O Software CS 342 – Operating Systems Ibrahim Korpeoglu.
IT3002 Computer Architecture
Introduction of Direct Memory Access (DMA). Why is DMA? It is wasteful to feed data into a controller register 1 bytes at a time. (PIO) The DMA unit is.
Copyright © 2007 by Curt Hill Interrupts How the system responds.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
I/O Software CS 537 – Introduction to Operating Systems.
Lecture Overview Shift Register Buffering Direct Memory Access.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Direct Memory Access (DMA) Department of Computer Engineering, M.S.P.V.L. Polytechnic College, Pavoorchatram. A Presentation On.
Peripherals on or near an edge or constituting an outer boundary; the outer area; "Russia's peripheral provinces"; "peripheral suburbs" (computer science)
Input / Output Chapter 9.
Resource Management IB Computer Science.
Linux Details: Device Drivers
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
CS703 - Advanced Operating Systems
Overview Peripheral Devices Input-Output Interface
Computer Architecture
CSCI 315 Operating Systems Design
Operating Systems Chapter 5: Input/Output Management
Linux Details: Device Drivers
Presentation transcript:

Block I/O

2 Definition Any I/O operation in which the unit of data is several words, not just one word or byte.

3 Example Disc I/O is usually done in blocks of 512 bytes (half a Kbyte) If the CPU wants to read from disc, it must tell the disc driver which block it wants. When the disc-read operation is complete, the whole block is available for immediate reading.

4 Usage Block I/O is used for any peripheral that transfers large amounts of data at high speed, e.g. Hard disc CD-ROM/DVD Graphics card Network connection (ethernet)

5 Lots of Block I/O A typical computer does a great deal of block I/O. For example: Loading programs into memory Swapping things in and out of memory Reading and writing data files Network traffic

6 The Problem with Block I/O If all the data has to be transferred by the CPU, then 1.It takes too long 2.The CPU doesn’t do much else In short, bulk data transfer is a bottleneck

7 Programmed Data Transfer Consider the following (hypothetical) code fragment for transferring a block of data from an I/O port to memory: L1:MOV(R1),(R2)+ DECR3 BNEL1 Address of I/O data register Address of 1 st location in memory Number of words (remaining) to be transferred

8 The Problem with Block I/O L1:MOV(R1),(R2)+ DECR3 BNEL1 One iteration of the loop takes (at least) five bus cycles, and transfers only one word Data transfer rate: 0.2 words per cycle

9 Hardware Solution: DMA DMA = Direct Memory Access A DMA controller (DMAC) is a hardware device to which the CPU can delegate the task of doing block data transfers

10 DMA Advantages DMA is the fastest possible solution: transfer rate is 1 word per bus cycle The CPU can (sometimes) do something useful in the meantime Disadvantages DMA hardware is complicated

11 Example DMA Installation (this one dedicated to a single I/O port) CPUmemoryDMAC I/O port High-Bandwidth Peripheral bus

12 DMAC Internal Registers address count control status I/O port Next memory location to access Number of words (or bytes) to transfer Transfer direction (read or write) and other controls e.g. finished or error For DMACs that contain >1 port, which port

13 DMAC Programming Procedure 1.Load the memory start-of-block address into the address register 2.Load the amount to transfer into the count register 3.Specify the transfer direction (read from, or write to, memory) in the control register address count control status I/O port

14 DMAC Programming Procedure 4.Select the I/O port (if there is a choice) 5.Specify interrupt options in the control register (DMACs can be programmed to interrupt when they are finished) 6.Tell the DMAC to start address count control status I/O port

15 What the DMAC does 1.Request permission to take control of the bus (see next slide) 2.When permission is granted, perform one or more data transfer operations, using only one bus cycle per transfer 3.Relinquish control of the bus 4.Go back to 1 if block transfer is not complete NOTE: Exact details are complicated and hardware- specific

16 Getting Control of the Bus A handshake protocol involving two signals: Bus Request and Bus Grant

17 Test Yourself! 1.What is block I/O? Give some examples 2.What are the problems, from the CPU’s point of view, of block I/O? 3.What is the solution? 4.Explain the operation of the DMAC