Lecture 26 – Input/output, programmed I/O

Slides:



Advertisements
Similar presentations
Buses Three sets of wires connect the CPU to memory and I/O devices:
Advertisements

Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Interrupts Chapter 8 – pp Chapter 10 – pp Appendix A – pp 537 &
Mehmet Can Vuran, Instructor University of Nebraska-Lincoln Acknowledgement: Overheads adapted from those provided by the authors of the textbook.
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
68HC11 Polling and Interrupts
COMP3221: Microprocessors and Embedded Systems Lecture 15: Interrupts I Lecturer: Hui Wu Session 1, 2005.
1 School of Computing Science Simon Fraser University CMPT 300: Operating Systems I Dr. Mohamed Hefeeda.
EET 450 Chapter 2 – How hardware and Software Work Together.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
System for Engine Location Of a Web Train Paul Wimmer and Adam Weintrop Dr. Irwin and Dr. Schertz 2/6/06.
INPUT/OUTPUT ORGANIZATION INTERRUPTS CS147 Summer 2001 Professor: Sin-Min Lee Presented by: Jing Chen.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Composition and Evolution of Operating Systems Introduction to Operating Systems: Module 2.
Interrupts By Ryan Morris. Overview ● I/O Paradigm ● Synchronization ● Polling ● Control and Status Registers ● Interrupt Driven I/O ● Importance of Interrupts.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
13-Nov-15 (1) CSC Computer Organization Lecture 7: Input/Output Organization.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Input-Output Organization
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.
CSCI1600: Embedded and Real Time Software Lecture 9: Input Output Concepts Steven Reiss, Fall 2015.
IT3002 Computer Architecture
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Operating Systems Overview: Using Hardware.
1.1 Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 1: Introduction What Operating Systems Do √ Computer-System Organization.
Introduction to Operating Systems Concepts
Input/Output (I/O) Important OS function – control I/O
Computer Organization
Input/Output Device Drivers
Basic Computer Organization and Design
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Lecture 1: Operating System Services
68HC11 Interrupts & Resets.
Microprocessor Systems Design I
Mon. Oct 2 Announcements Quiz Postponed to Wednesday – still only on 2.a + 2.b Video lecture for 2.a posted Lab 6 experiment extension You must come to.
Lecture 14 – Operand addressing (cont.) Microcode & Modes
CSE 3322 Computer Architecture
Operating Systems (CS 340 D)
Chapter 7.2 Computer Architecture
Computer Architecture
Lecture 11 – Designing a simple computer
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Introduction of microprocessor
Computer System Structures
CS 286 Computer Organization and Architecture
Dr. Michael Nasief Lecture 2
CS703 - Advanced Operating Systems
Microcomputer Architecture
Chapter 8 Input/Output I/O basics Keyboard input Monitor output
Computer Architecture
GEOMATIKA UNIVERSITY COLLEGE CHAPTER 2 OPERATING SYSTEM PRINCIPLES
Computer System Overview
Intro. To Operating Systems
Operating Systems Chapter 5: Input/Output Management
Operating Systems.
COMPUTER PERIPHERALS AND INTERFACES
Chapter 5: I/O Systems.
Overview Last lecture Digital hardware systems Today
Chapter 5 Computer Organization
CS 143A Principles of Operating Systems
COMP3221: Microprocessors and Embedded Systems
A Top-Level View Of Computer Function And Interconnection
Jazan University, Jazan KSA
Chapter 13: I/O Systems.
Lecture 12 Input/Output (programmer view)
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Lecture 26 – Input/output, programmed I/O 2017.07.24 I/O, I/O, so off to work I go. – bumper sticker seen in Silicon Valley © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Announcements Chapters 14-17 Lab 8 this week Homework 6 due Wednesday Due in lab next week Monday/Tuesday Final lab sessions next week 7/31 and 8/1 Homework 6 due Wednesday Homework 7 due Tuesday, 8/1 Final lecture Tuesday 8/1 Final exam Thursday 8/3 8am BRNG 2290 © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Configure then attach requires sys admin knowledge Wiring approach = sys admin knowledge built in Automatic is the third option above, very convenient, but becomes an interface with the Real WorldTM with significant implications for computer security © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

LED example requires op to be specified, could just have separate addresses © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

typically © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Connections created and deleted dynamically by action of “Input” devices © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

– Software services the I/O needs, but hardware initiates the service: the hardware dynamically inserts a “jsr” into the CPU instruction fetch stream – Perhaps “interrupt-triggered I/O” would be a better name, but we will use interrupt-driven I/O © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

– How do we make a processor “wait”? Cheap cheap controller circuit for device and bus – How do we make a processor “wait”? – We code a while loop for it to execute. – Drawback: processor kept 100% busy just waiting; CPU cannot do anything else! (Quelle nightmare.) © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

© 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Array Elements 1 2 3 4 © 2017 by George B. Adams III 1 2 3 4 © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Example of polling to control printer © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Example bus interface for ink-jet printer List of the Control and Status “registers” for the ink-jet printer For code on next slide, assume that Address 0 above (printer-relative) has been assigned physical address 0x110000. © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

C code to poll // Non-zero if printer is on // Device is busy if *(p+6) != 0; proxy for “Load is complete” // Busy now a proxy for “Data is loaded” // This is not an infinite loop if the printer operates correctly // Printer failure requires a system reboot © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Polling code using struct © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

Programmed I/O: What’s to Like? Cheap, bare-bones hardware can do it Cheap, don’t even have need for an O/S Con Programmer must include I/O busy wait loop in app code While waiting on one I/O need, cannot monitor any other I/O © 2017 by George B. Adams III Portions © 2017 Dr. Jeffrey A. Turkstra

– Makes good sense now that hardware is cheaper so that building smarter devices is feasible and since a CPU is wasted with polling (busy wait) © 2017 by George B. Adams III

© 2017 by George B. Adams III

Synchronous with the CPU within the app itself ^ “Asynch” with the CPU System programmer, not every app programmer © 2017 by George B. Adams III