Practical Session 12 Input &Output (I/O). I/O Device Input / Output (I/O) devices Input / Output (I/O) devices provide the means to interact with the.

Slides:



Advertisements
Similar presentations
I/O Organization popo.
Advertisements

Categories of I/O Devices
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
INPUT-OUTPUT ORGANIZATION
Input and Output CS 215 Lecture #20.
I/O Unit.
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
Practical Session No. 10 Input &Output (I/O). I/O Devices Input/output (I/O) devices provide the means to interact with the “outside world”. An I/O device.
1 COSC 3P92 Cosc 3P92 Week 11 Lecture slides Violence is the last refuge of the incompetent. Isaac Asimov, Salvor Hardin in "Foundation"
Group 7 Jhonathan Briceño Reginal Etienne Christian Kruger Felix Martinez Dane Minott Immer S Rivera Ander Sahonero.
Copyright ©: Nahrstedt, Angrave, Abdelzaher
INPUT-OUTPUT ORGANIZATION
INPUT/OUTPUT ARCHITECTURE By Truc Truong. Input Devices Keyboard Keyboard Mouse Mouse Scanner Scanner CD-Rom CD-Rom Game Controller Game Controller.
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.
Chapter 8 Input/Output l I/O basics l Keyboard input l Monitor output l Interrupt driven I/O l DMA.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
ITEC 1011 Introduction to Information Technologies 7. Input / Output Chapt. 8.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Input and Output Computer Organization and Assembly Language: Module 9.
Cpr E 308 Input/Output Recall: OS must abstract out all the details of specific I/O devices Today –Block and Character Devices –Hardware Issues – Programmed.
Input/ Output By Mohit Sehgal. What is Input/Output of a Computer? Connection with Machine Every machine has I/O (Like a function) In computing, input/output,
MICROPROCESSOR INPUT/OUTPUT
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.
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.
(More) Interfacing concepts. Introduction Overview of I/O operations Programmed I/O – Standard I/O – Memory Mapped I/O Device synchronization Readings:
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.
Dr Mohamed Menacer College of Computer Science and Engineering Taibah University CE-321: Computer.
Practical Session 11 Computer Architecture and Assembly Language Input &Output (I/O)
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.
Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
Computer System Internal components - The processor - Main memory - I / O controllers - Buses External components (peripherals). These include: - keyboard.
ECEG-3202 Computer Architecture and Organization Chapter 3 Top Level View of Computer Function and Interconnection.
Modes of transfer in computer
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.
7. Peripherals 7.1 Introduction of peripheral devices Computer Studies (AL)
Fall 2000M.B. Ibáñez Lecture 25 I/O Systems. Fall 2000M.B. Ibáñez Categories of I/O Devices Human readable –used to communicate with the user –video display.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
SET 21 OPERATING SYSTEM USE OF ASSEMBLY LANGUAGE.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
IT3002 Computer Architecture
I/O Interface. INTRO TO I/O INTERFACE I/O instructions (IN, INS, OUT, and OUTS) are explained. Also isolated (direct or I/O mapped I/O) and memory-mapped.
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.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
بسم الله الرحمن الرحيم MEMORY AND I/O.
I/O: Input-Output By: Tommy Zeng. What is I/O? I/O – short for “Input – Output” How a computer interacts with its users Input – gets information from.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Amdahl’s Law & I/O Control Method 1. Amdahl’s Law The overall performance of a system is a result of the interaction of all of its components. System.
Practical Session 11 Computer Architecture and Assembly Language Input &Output (I/O)
Computer Organization and Design
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
Operating Systems (CS 340 D)
Input/Output.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Computer Architecture and Assembly Language
Chapter 8 I/O.
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:

Practical Session 12 Input &Output (I/O)

I/O Device Input / Output (I/O) devices Input / Output (I/O) devices provide the means to interact with the “outside world”. – mouse, screen, disks, printer, etc.

“I/O bus” “Bus interface” “CPU bus” or “System bus” CPU-Memory-I/O Architecture CPU I/O module Memory I/O device I/O controller

4 Types of I/O Programmed I/O Interrupt-driven I/O Direct memory access (DMA)

5 Programmed I/O I/O operations are under direct control of software (program) Software initiates the I/O operation Disadvantage: – Slow – Uses a lot of CPU resources Advantage: – Simple

6 Types of I/O Programmed I/O Interrupt-driven I/O Direct memory access (DMA)

7 Interrupt-driven I/O initiated by the device I/O operations are initiated by the device The device, or its I/O module, includes a signal to interrupt the CPU When an interrupt occurs (and is accepted), a special routine executes to service the interrupt

8 Types of I/O Programmed I/O Interrupt-driven I/O Direct memory access (DMA)

9 Used for high-speed block transfers between a device and memory During the transfer, the CPU is not involved The CPU “prepares” the DMA operation by transferring information to a DMA controller (DMAC): Location of the data on the device Location of the data in memory Size of the block to transfer Direction of the transfer When the device is ready to transfer data, the DMAC takes control of the system buses Direct memory access (DMA)

10 to DMA module controller controller I/O controller

I/O Controller I/O controller interface between the system and the I/O device I/O devices are not directly connected to the system bus. Instead, there is usually an I/O controller that acts as an interface between the system and the I/O device.

12 Operating system

I/O Controller I/O Controller has 3 internal registers Typically I/O Controller has 3 internal registers: – Data register – Status register – Command register CPU interacts with an I/O device via the associated I/O controller

I/O device interface to the system

Communication example – character output Check the status register of I/O controller e.g. busy, idle, offline Put data into data register Put command into command register e.g. “send the character in the data register to the printer”

I/O Ports I/O port is the address of a register associated with an I/O controller Two kinds of mapping: – memory-mapped I/O – memory-mapped I/O: writing to an I/O port is similar to writing to a memory address – I/O address space – I/O address space: separated from the memory address space

I/O Mapping 17 Memory mapped I/O 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 Isolated I/O Isolated I/O – Separate address spaces – Need I/O or memory select lines – Special commands for I/O Limited set

I/O Ports and Instructions 64 KB of isolated I/O address space x86 provides 64 KB of isolated I/O address space two instructions to access I/O ports x86 provides two instructions to access I/O ports – in instruction is used to read data from an I/O port: in register, port address (direct address) in register, DX (indirect address) – out instruction is used to write data to an I/O port: out port address, register (direct address) out DX, register (indirect address) – register must be AL, AX, or EAX

Example – Keyboard Driver Use PA input port register at address 60H – PA7 = 0 if a key is depressed – PA7 = 1 if a key is released – PA0–PA6 = key scan code Use busy wait loop – Waits until a key is pressed i.e., until PA7 = 0. – Scan code is read from PA6 to PA0 Pressing the ESC key terminates the program

section.data ESC_KEY EQU 1Bh ; ASCII code for ESC key KB_DATA EQU 60h ; 8255 port PA section.text global _start _start: key_up_loop: ;loop until a key is pressed i.e., until PA7 = 0 in AL, KB_DATA ; read keyboard status & scan code test AL, 80H ; PA7 = 0? (80H= b) jnz key_up_loop ; if not, loop back (busy wait) Example – Keyboard Driver

and AL,7FH ; isolate the scan code..Translate scan code to ASCII code in AL.. cmp AL,0 ; ASCII code of 0 => non-interesting key je key_down_loop cmp AL,ESC_KEY ; ESC key---terminate program je done..Print character in AL to screen.. key_down_loop: in AL,KB_DATA test AL, 80H ; PA7 = 1? jz key_down_loop ; if not, loop back jmp key_up_loop done:..Exit Program.. Example – Keyboard Driver