Input / Output. School of Computer Science G51CSA

Similar documents
Unit 1. Chapter 3 Top Level View of Computer Function and Interconnection

Computer Organization ECE514. Chapter 5 Input/Output (9hrs)

Computer System Overview. Chapter 1

Input/Output Problems. External Devices. Input/Output Module. I/O Steps. I/O Module Function Computer Architecture

Programmed I/O Interrupt-Driven I/O Direct Memory Access (DMA) I/O Processors. 10/12/2017 Input/Output Systems and Peripheral Devices (02-2)

Computer System Overview

Digital Design Laboratory Lecture 6 I/O

Organisasi Sistem Komputer

Eastern Mediterranean University School of Computing and Technology INPUT / OUTPUT

Computer System Overview OPERATING SYSTEM TOP-LEVEL COMPONENTS. Simplified view: Operating Systems. Slide 1. Slide /S2. Slide 2.

Computer System Overview

Chapter 3. Top Level View of Computer Function and Interconnection. Yonsei University

Lecture 23. I/O, Interrupts, exceptions

Generic Model of I/O Module Interface to CPU and Memory Interface to one or more peripherals

Computer Systems Overview

Today: Computer System Overview (Stallings, chapter ) Next: Operating System Overview (Stallings, chapter ,

Interrupts Peter Rounce - room 6.18

THE CPU SPENDS ALMOST ALL of its time fetching instructions from memory

Module 11: I/O Systems

CSC227: Operating Systems Fall Chapter 1 INTERRUPTS. Dr. Soha S. Zaghloul

Input/Output Systems

I/O Systems. Jo, Heeseung

Chapter 7 : Input-Output Organization

Interrupts Peter Rounce


Chapter 1 Computer System Overview

Modes of Transfer. Interface. Data Register. Status Register. F= Flag Bit. Fig. (1) Data transfer from I/O to CPU

Operating System: Chap13 I/O Systems. National Tsing-Hua University 2016, Fall Semester

Module 6: INPUT - OUTPUT (I/O)

The control of I/O devices is a major concern for OS designers

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

I/O Systems. Jinkyu Jeong Computer Systems Laboratory Sungkyunkwan University

B.H.GARDI COLLEGE OF MASTER OF COMPUTER APPLICATION

PC Interrupt Structure and 8259 DMA Controllers

by I.-C. Lin, Dept. CS, NCTU. Textbook: Operating System Concepts 8ed CHAPTER 13: I/O SYSTEMS

Device-Functionality Progression

Chapter 12: I/O Systems. I/O Hardware

Chapter 1 Computer System Overview

Chapter 3 - Top Level View of Computer Function

Module 12: I/O Systems

Input-Output (I/O) Input - Output. I/O Devices. I/O Devices. I/O Devices. I/O Devices. operating system must control all I/O devices.

I/O AND DEVICE HANDLING Operating Systems Design Euiseong Seo

Chapter 13: I/O Systems

EN1640: Design of Computing Systems Topic 07: I/O

Answer to exercises chap 13.2

6 Direct Memory Access (DMA)

The Embedded Computing Platform

COSC 243. Input / Output. Lecture 13 Input/Output. COSC 243 (Computer Architecture)

Running Applications

An overview of Interrupts ECE3534

CS 134. Operating Systems. April 8, 2013 Lecture 20. Input/Output. Instructor: Neil Rhodes. Monday, April 7, 14

操作系统概念 13. I/O Systems

3. Controtlto specify the mode of transfer such as read or write 4. A control to start the DMA transfer

Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

5.b Principles of I/O Hardware CPU-I/O communication

I/O - input/output. system components: CPU, memory, and bus -- now add I/O controllers and peripheral devices. CPU Cache

Chapter 13: I/O Systems

Chapter 13: I/O Systems. Chapter 13: I/O Systems. Objectives. I/O Hardware. A Typical PC Bus Structure. Device I/O Port Locations on PCs (partial)

(Advanced) Computer Organization & Architechture. Prof. Dr. Hasan Hüseyin BALIK (3 rd Week)

Silberschatz and Galvin Chapter 12

Input Output (IO) Management

CS370 Operating Systems

CS330: Operating System and Lab. (Spring 2006) I/O Systems

Chapter 13: I/O Systems

Bus System. Bus Lines. Bus Systems. Chapter 8. Common connection between the CPU, the memory, and the peripheral devices.

Comp 204: Computer Systems and Their Implementation. Lecture 18: Devices

Devices. Today. Comp 104: Operating Systems Concepts. Operating System An Abstract View 05/01/2017. Devices. Devices

Chapter 13: I/O Systems

ECE331: Hardware Organization and Design

Chapter 12: I/O Systems

Chapter 13: I/O Systems

Chapter 12: I/O Systems. Operating System Concepts Essentials 8 th Edition

William Stallings Computer Organization and Architecture 10 th Edition Pearson Education, Inc., Hoboken, NJ. All rights reserved.

Chapter 13: I/O Systems

QUIZ Ch.6. The EAT for a two-level memory is given by:

CSE 451: Operating Systems Winter I/O System. Gary Kimura

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Computer Organization (Input-output)

[08] IO SUBSYSTEM 1. 1

MICROPROCESSOR MEMORY ORGANIZATION

I/O Management and Disk Scheduling. Chapter 11

Systems Architecture II

Last class: Today: Course administration OS definition, some history. Background on Computer Architecture

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 09, SPRING 2013

Control unit. Input/output devices provide a means for us to make use of a computer system. Computer System. Computer.

INPUT/OUTPUT ORGANIZATION

Introduction. CS3026 Operating Systems Lecture 01

Chapter 1 Computer System Overview

Computer Architecture

Chapter 13: I/O Systems

7/20/2008. What Operating Systems Do Computer-System Organization

INPUT/OUTPUT ORGANIZATION

I/O Management Intro. Chapter 5

HANDLING MULTIPLE DEVICES

Operating Systems 2010/2011

Introduction to Operating. Chapter Chapter

Chapter 13: I/O Systems. Operating System Concepts 9 th Edition

Operating systems and concurrency B02

INPUT/OUTPUT ORGANIZATION

lecture 21 Input / Output (I/O) 3 - system bus and memory (lectures revisited) - system bus and interrupts - exceptions (lecture 12 revisited)

Transcription:

Input / Output 1

Overview J I/O module is the third key element of a computer system. (others are CPU and Memory) J All computer systems must have efficient means to receive input and deliver output J We will look at. I/O module and their interface to the system. I/O mechanisms. Example interfaces 2

I/O modules J Each I/O module interfaces to the system bus and controls one or more peripheral devices. J External devices are generally not connected directly to the bus structure of the computer systems -. Wide variety of devices require different logic interfaces - impractical to expect the CPU to know how to control each device. Mismatch of data rates. Different data representation 3

I/O modules 4

I/O modules J The I/O modules. Not just simple mechanical connectors. Contain intelligence - logic for performing communication functions between the peripherals and the bus.. Provide standard interfaces to the CPU and the bus. Tailored to specific I/O devices and their interfaces requirement. Relieve CPU of the the management of I/O devices. Interfaces consist of. Control. Status and. Data signals 5

I/O Module Diagram Systems Bus Interface External Device Interface Data Lines Data Register Status/Control Register External Device Interface Logic Data Status Control Address Lines Data Lines Input Output Logic External Device Interface Logic Data Status Control 6

Input Output Techniques: Programmed J I/O operation in which the CPU issues the I/O command to the I/O module J CPU is in direct control of the operation. Sensing status,. Read/write commands,. Transferring data 7

Input Output Techniques: Programmed J CPU waits until the I/O operation is completed before it can perform other tasks J Completion indicated by a change in the status bits J CPU must periodically poll the module to check its status bits J The speed of the CPU and peripherals can differ by orders of magnitude, programmed I/O waste huge amount of CPU power J Very inefficient J CPU slowed to the speed of peripherals 8

Input Output Techniques: Programmed Programmed I/O Operation Simple to implement. Requires very little special software or hardware 9

Input Output Techniques: Programmed J Addressing I/O Devices. Under programmed I/O data transfer is very like memory access (CPU viewpoint). Each device given unique identifier. CPU commands contain identifier (address) 10

Input Output Techniques: Programmed J Memory mapped I/O. Devices and memory share an address space. I/O looks just like memory read/write. No special commands for I/O. Large selection of memory access commands available J Isolated I/O. Separate address spaces. Need I/O or memory select lines. Special commands for I/O. Limited set 11

Input Output Techniques: Programmed 12

Input Output Techniques: Programmed 13

Interrupts ( Mechanism by which other modules (e.g. I/O) may interrupt normal sequence of processing ( Program e.g. overflow, division by zero ( Timer Generated by internal processor timer ( I/O from I/O controller ( Hardware failure e.g. memory parity error 14

Interrupt Program Flow 15

Interrupt Cycle J Processor checks for interrupt l Indicated by an interrupt signal (a control signal) J If no interrupt, fetch next instruction J If interrupt pending: l Suspend execution of current program l Save context l Set PC to start address of interrupt handler routine l Process interrupt l Restore context and continue interrupted program 16

Input Output Techniques: Interrupt Driven J To reduce the time spent on I/O operation, the CPU can use an interrupt-driven approach. CPU issues I/O command to the module. CPU continues with its other tasks while the module performs its task. Module signals the CPU when the I/O operation is finished (the interrupt). CPU responds to the interrupt by executing an interrupt service routine and then continues on with its primary task J CPU recognizes and responds to interrupts at the end of an instruction execution cycle J A wide variety devices use interrupt for I/O 17

Input Output Techniques: Interrupt Driven Interrupt driven I/O operation 18

Input Output Techniques: Interrupt Driven CPU s Response to an Interrupt 19

Input Output Techniques: Interrupt Driven Process keyboard Input 20

Input Output Techniques: Interrupt Driven Regulate output flow: Using a print handler interrupt 21

Multiple Interrupts d Disable interrupts. Processor will ignore further interrupts whilst processing one interrupt. Interrupts remain pending and are checked after first interrupt has been processed. Interrupts handled in sequence as they occur g Define priorities. Low priority interrupts can be interrupted by higher priority interrupts. When higher priority interrupt has been processed, processor returns to previous interrupt 22

Multiple Interrupts Disable interrupts Define priorities 23

Input Output Techniques: DMA J DMA - Direct Memory Access J Both programmed and interrupt driven I/O require the continue involvement of the CPU in on going I/O operation J DMA take the CPU out of the task except for the initialization of the process J Large amount of data can be transferred without severely impacting CPU performance 24

Input Output Techniques: DMA J DMA operation require additional hardware - DMA Controller module J DMA process. CPU initializes DMA module. Define read or write operation. I/O device involved. Start address of memory block. Number of words to be transferred. CPU then continues with other work J In practice, DMA uses the bus when the CPU is not using it.. No impact on the CPU performance 25

Input Output Techniques: DMA 26

Input Output Techniques: DMA Transfer a block of data from memory to disk 27