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

Unit 3 and Unit 4: Chapter 4 INPUT/OUTPUT ORGANIZATION

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

Organisasi Sistem Komputer

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

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

Unit 5. Memory and I/O System

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)

INPUT/OUTPUT ORGANIZATION

Chapter 5 Input/Output Organization. Jin-Fu Li Department of Electrical Engineering National Central University Jungli, Taiwan

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

INPUT/OUTPUT ORGANIZATION

INPUT-OUTPUT ORGANIZATION

Computer Architecture and Organization (CS-507)

Top-Level View of Computer Organization

STANDARD I/O INTERFACES

Input / Output. School of Computer Science G51CSA

Computer Architecture CS 355 Busses & I/O System

Digital Design Laboratory Lecture 6 I/O

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

Computer Architecture

Chapter 7 : Input-Output Organization

Module 6: INPUT - OUTPUT (I/O)

Input/Output Systems

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

INPUT/OUTPUT ORGANIZATION

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

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

Interconnecting Components

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

Chapter 3 - Top Level View of Computer Function

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

1. Define Peripherals. Explain I/O Bus and Interface Modules. Peripherals: Input-output device attached to the computer are also called peripherals.

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

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

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. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

I/O. Fall Tore Larsen. Including slides from Pål Halvorsen, Tore Larsen, Kai Li, and Andrew S. Tanenbaum)

Module 11: I/O Systems

CS152 Computer Architecture and Engineering Lecture 20: Busses and OS s Responsibilities. Recap: IO Benchmarks and I/O Devices

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

Eastern Mediterranean University School of Computing and Technology INPUT / OUTPUT

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

I/O Systems. Amir H. Payberah. Amirkabir University of Technology (Tehran Polytechnic)

Introduction Electrical Considerations Data Transfer Synchronization Bus Arbitration VME Bus Local Buses PCI Bus PCI Bus Variants Serial Buses

6 Direct Memory Access (DMA)

Introduction I/O 1. I/O devices can be characterized by Behavior: input, output, storage Partner: human or machine Data rate: bytes/sec, transfers/sec

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

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

Module 12: I/O Systems

Digital System Design

EE108B Lecture 17 I/O Buses and Interfacing to CPU. Christos Kozyrakis Stanford University

Chapter 8. A Typical collection of I/O devices. Interrupts. Processor. Cache. Memory I/O bus. I/O controller I/O I/O. Main memory.

Computer Organization

Input Output (IO) Management

Computer System Overview

OPERATING SYSTEMS CS136

Chapter 1 Computer System Overview

Chapter 02: Computer Organization Functional units and components in a computer organization Part 3 Bus Structures

Computer Organization

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

What Operating Systems Do An operating system is a program hardware that manages the computer provides a basis for application programs acts as an int

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

Chapter 13: I/O Systems

Advanced Parallel Architecture Lesson 4 bis. Annalisa Massini /2015

2. System Interconnect Fabric for Memory-Mapped Interfaces

ACCESSING I/O DEVICES

Device-Functionality Progression

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

Chapter 12: I/O Systems

Chapter 13: I/O Systems

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

1. Introduction 2. Methods for I/O Operations 3. Buses 4. Liquid Crystal Displays 5. Other Types of Displays 6. Graphics Adapters 7.

I/O Systems. Jo, Heeseung

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

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

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

Digital Input and Output

Interfacing. Introduction. Introduction Addressing Interrupt DMA Arbitration Advanced communication architectures. Vahid, Givargis

CMSC 313 Lecture 26 DigSim Assignment 3 Cache Memory Virtual Memory + Cache Memory I/O Architecture

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

Chapter 13: I/O Systems

Chapter 13: I/O Systems

SEMICON Solutions. Bus Structure. Created by: Duong Dang Date: 20 th Oct,2010

The von Neuman architecture characteristics are: Data and Instruction in same memory, memory contents addressable by location, execution in sequence.

Module 12: I/O Systems

Unit DMA CONTROLLER 8257

Chapter 6. Storage and Other I/O Topics

Chapter 13: I/O Systems

Silberschatz and Galvin Chapter 12

Microprocessors LCD Parallel Port USB Port

Computer Organization and Structure. Bing-Yu Chen National Taiwan University

OS And Hardware. Computer Hardware Review PROCESSORS. CPU Registers. CPU Registers 02/04/2013

Chapter 13: I/O Systems

Chapter 6. I/O issues

Bus Example: Pentium II

Computer Systems Organization

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

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)

Transcription:

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

Interface for an IO Device: CPU checks I/O module device status I/O module returns status If ready, CPU requests data transfer I/O module gets data from device I/O module transfers data to CPU Programmed I/O CPU has direct control over I/O Sensing status Read/write commands Transferring data CPU waits for I/O module to complete operation Wastes CPU time CPU requests I/O operation I/O module performs operation I/O module sets status bits CPU checks status bits periodically I/O module does not inform CPU directly I/O module does not interrupt CPU CPU may wait or come back later Under programmed I/O data transfer is very like memory access (CPU viewpoint) Each device given unique identifier IO interface circuits: ->task of connecting an IO device to a computer system is greatly eased

By the use of standard ICs known as IO interfacing circuits. -->the simplest interface circuits is a one-word, addressable register that Serves as an I/o port. most basic IO interface circuits are programmable circuits intended to Act as serial or parallel ports.serial ports accommodate many types of slow peripheral Devices ranging from secondary memory units to network connections. I/O Mapping 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 Separate address spaces Need I/O or memory select lines Special commands for I/O Interrupt driven and programmed I/O require active CPU intervention (All data must pass through CPU) Transfer rate is limited by processor's ability to service the device CPU is tied up managing I/O transfer Additional Module (hardware) on bus DMA controller takes over bus from CPU for I/O Waiting for a time when the processor doesn't need bus Cycle stealing seizing bus from CPU Transfer of control through the use of interrupts

An interrupt is an asynchronous signal indicating the need for attention or a synchronous event in software indicating the need for a change in execution. A hardware interrupt causes the processor to save its state of execution and begin execution of an interrupt handler. Software interrupts are usually implemented as instructions in the instruction set, which cause a context switch to an interrupt handler similar to a hardware interrupt. Interrupts are a commonly used technique for computer multitasking, especially in real-time computing. Such a system is said to be interrupt-driven. An act of interrupting is referred to as an interrupt request (IRQ). When there is an interrupt, continuation of the execution of the current program is meaningless. Execution of the Current program needs to be stopped In a computer system, there are many sources of interrupts Needs to prepare interrupt processing routines for each source of interrupts Source of interrupt needs to be identified Needs to initiate execution of the interrupt processing routine associated with the identified interrupt When the interrupt is resolved, the interrupted program needs to be continued for the efficiency reason Needs to resume execution of the interrupted program.

Vectored interrupts In a computer, a vectored interrupt is an I/O interrupt that tells the part of the computer that handles I/O interrupts at the hardware level that a request for attention from an I/O device has been received and and also identifies the device that sent the request. A vectored interrupt is an alternative to a polled interrupt, which requires that the interrupt handler poll or send a signal to each device in turn in order to find out which one sent the interrupt request. PCI interrupts Devices are required to follow a protocol so that the interrupt lines can be shared. The PCI bus includes four interrupt lines, all of which are available to each device. However, they are not wired in parallel as are the other PCI bus lines. PCI bridges (between two PCI buses) map the four interrupt traces on each of their sides in varying ways.the result is that it can be impossible to determine how a PCI device's interrupts will appear to software. PCI interrupt lines are level-triggered. This was chosen over edge-triggering in order to gain an advantage when servicing a shared interrupt line, and for robustness: edge triggered interrupts are easy to miss. PCI Express does not have physical interrupt lines at all. It uses message-signaled interrupts exclusively. pipeline interrupt Interrupt: Hardware signal to switch processor to new instruction stream. When interrupt occurs, state of interrupted process is saved, including PC, registers, and memory Interrupt is precise if the following three conditions hold: All instructions preceding u have been executed, and have modified the state correctly All instructions following u are unexecuted, and have not modified the state If the interrupt was caused by an instruction, it was caused by instruction u, which is either completely executed (e.g.: overflow) or completely unexecuted (e.g: VM page fault).

Precise interrupts are desirable if software is to fix up error that caused interrupt and execution has to be resumed Easy for external interrupts, could be complex and costly for internal Imperative for some interrupts (VM page faults, IEEE FP standard) Direct Memory Access (DMA) Polling or interrupt driven I/O incurs considerable overhead Multiple program instructions Saving program state Incrementing memory addresses Keeping track of word count Transfer large amounts of data at high speed without continuous intervention by the processor Special control circuit required in the I/O device interface, called a DMA controller DMA controller keeps track of memory locations, transfers directly to memory (via the bus) independent of the processor Single Bus, Detached DMA controller Each transfer uses bus twice I/O to DMA then DMA to memory CPU is suspended twice Single Bus, DMA controller integrated into I/O module Controller may support one or more devices Each transfer uses bus once DMA to memory CPU is suspended once Operation of a DMA transfer

DMA Controller Part of the I/O device interface DMA Channels Performs functions that would normally be carried out by the processor Provides memory address Bus signals that control transfer Keeps track of number of transfers Under control of the processor Buses, Bus control, bus interfacing, Bus arbitration Buses: A bus is a subsystem that transfers data between components inside a computer, or between computers. Multiple devices communicating over a single set of wires Only one device can talk at a time or the message is garbled Each line or wire of a bus can at any one time contain a single binary digit. Over time, however, a sequence of binary digits may be transferred These lines may and often do send information in parallel A computer system may contain a number of different buses

Bus Interconnection A bus is a communication pathway connecting two or more device. A key characteristic of a bus is that it is a shared transmission medium. A bus consists of multiple pathways or lines. Each line is capable of transmitting signal representing binary digit (1 or 0 A sequence of bits can be transmit across a single line. Several lines can be used to transmit bits simultaneously (in parallel). A bus that connects major components (CPU,Memory,I/O) is called System Bus. The most common computer interconnection structures are based on the use of one or more system buses. Bus interfacing Synchronous occurrence of events on the bus is determined by a clock (Clock Cycle or Bus Cycle) which includes line upon Asynchronous occurrence of one event follows and depends on the previous event Bus arbitration Centralized bus controller (Arbiter), hardware device,is responsible for allocating time on the bus (daisy chain)

Distributed access control logic in each module act together to share bus INTERFACE CIRCUITS Circuitry required connecting an I/O device to a computer bus Provides a storage buffer for at least one word of data. Contains status flag that can be accessed by the processor. Contains address-decoding circuitry Generates the appropriate timing signals required by the bus control scheme. Performs format conversions Ports Serial port Parallel port

Figure. An example of a computer system using different interface standards.

PCI (Peripheral Component Interconnect) PCI stands for Peripheral Component Interconnect Introduced in 1992 It is a Low-cost bus It is Processor independent It has Plug-and-play capability PCI bus transactions PCI bus traffic is made of a series of PCI bus transactions. Each transaction is made up of an address phase followed by one or more data phases. The direction of the data phases may be from initator to target (write transaction) or vice-versa (read transaction), but all of the data phases must be in the same direction. Either party may pause or halt the data phases at any point. (One common example is a low-performance PCI device that does not support burst transactions, and always halts a transaction after the first data phase.) Any PCI device may initiate a transaction. First, it must request permission from a PCI bus arbiter on the motherboard. The arbiter grant permission to one of the requesting devices. The initiator begins the address phase by broadcasting a 32-bit address plus a 4-bit command code, then waits for a target to respond. All other devices examine this address and one of them responds a few cycles later. 64-bit addressing is done using a 2-stage address phase. The initiator broadcasts the low 32 address bits, accompanied by a special "dual address cycle" command code. Devices which do not support 64-bit addressing can simply not respond to that command code. The next cycle, the initiator transmits the high 32 address bits, plus the real command code. The transaction operates identically from that point on. To ensure compatibility with 32-bit PCI devices, it is forbidden to use a dual address cycle if not necessary, i.e. if the high-order address bits are all zero. While the PCI bus transfers 32 bits per data phase, the initiator transmits a 4-bit byte mask indicating which 8-bit bytes are to be considered significant. In particular, a masked write must affect only the desired bytes in the target PCI device. Arbitration Address phase Address phase timing Data phases Ending transactions Table 4.3. Data transfer signals on the PCI bus.

SCSI Bus Defined by ANSI X3.131 Small Computer System Interface 50, 68 or 80 pins Max. transfer rate 160 MB/s, 320 MB/s. SCSI Bus Signals

USB - Universal Serial Bus Speed Low-speed(1.5 Mb/s) Full-speed(12 Mb/s) High-speed(480 Mb/s) Port Limitation Device Characteristics Plug-and-play

Universal Serial Bus Tree Structure USB (Universal Serial Bus) is a specification to establish communication between devices and a host controller (usually personal computers). USB is intended to replace many varieties of serial and parallel ports. USB can connect computer peripherals such as mice, keyboards, digital cameras, printers, personal media players, flash drives, and external hard drives. For many of those devices, USB has become the standard connection method. USB was designed for personal computers[citation needed], but it has become commonplace on other devices such as smartphones, PDAs and video game consoles, and as a power cord between a device and an AC adapter plugged into a wall plug for charging. As of 2008, there are about 2 billion USB devices sold per year, and approximately 6 billion total sold to date.