Computer System Structures

Slides:



Advertisements
Similar presentations
MICROPROCESSOR BASED SYSTEM DESIGN
Advertisements

Accessing I/O Devices Processor Memory BUS I/O Device 1 I/O Device 2.
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Lecture Objectives: 1)Explain the limitations of flash memory. 2)Define wear leveling. 3)Define the term IO Transaction 4)Define the terms synchronous.
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Input and Output Computer Organization and Assembly Language: Module 9.
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.
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
CS 342 – Operating Systems Spring 2003 © Ibrahim Korpeoglu Bilkent University1 Input/Output CS 342 – Operating Systems Ibrahim Korpeoglu Bilkent University.
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.
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.
L/O/G/O Input Output Chapter 4 CS.216 Computer Architecture and Organization.
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.
Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower than CPU.
Input Output Techniques Programmed Interrupt driven Direct Memory Access (DMA)
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
Computer Organization and Architecture + Networks Lecture 6 Input/Output.
1 بسم الله الرحمن الرحيم MEMORY AND I/O. Introduction to 8086 Microprocessor 8086 Pin Configuration Pin Configuration 8086 Architecture & Modes 2.
Digital Logic Design Alex Bronstein
I/O Systems Shmuel Wimer prepared and instructed by
Lecture 2. A Computer System for Labs
Computer Organization
OPERATING SYSTEM CONCEPT AND PRACTISE
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Chapter 2: Computer-System Structures(Hardware)
Chapter 2: Computer-System Structures
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
Computer System Structures
Operating Systems (CS 340 D)
Chapter 7.2 Computer Architecture
I/O Memory Interface Topics:
Input/Output.
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
Introduction of microprocessor
Chapter 3 Top Level View of Computer Function and Interconnection
E3165 DIGITAL ELECTRONIC SYSTEM
Microcomputer Architecture
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 2: Computer-System Structures Computer System Operation I/O Structure Storage.
An Introduction to Microprocessor Architecture using intel 8085 as a classic processor
Computer Architecture
BIC 10503: COMPUTER ARCHITECTURE
Interfacing Memory Interfacing.
CSCI 315 Operating Systems Design
Computer System Overview
Microprocessor & Assembly Language
Module 2: Computer-System Structures
ECEG-3202 Computer Architecture and Organization
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Md. Mojahidul Islam Lecturer Dept. of Computer Science & Engineering
Computer Architecture and Assembly Language
Created by Vivi Sahfitri
Module 2: Computer-System Structures
Chapter 8 I/O.
Chapter 5 Computer Organization
Chapter 2: Computer-System Structures
Chapter 2: Computer-System Structures
Module 2: Computer-System Structures
Jazan University, Jazan KSA
Chapter 13: I/O Systems.
A CCESSING I/O DEVICES. I/O devices accessed through I/O interface. Requirements for I/O interface: –CPU communication –Device communication –Data buffering.
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:

Computer System Structures I/O structure I/O hardware Isolated I/O ports Memory mapped I/O    Textbook Silberschatz, Chapter 2

General Purpose Computer System I/O Structure General Purpose Computer System Memory Controller A modern, general-purpose computer system consists of CPU number of device controllers They are connected through a common bus BUS also provides access to shared memory

Device Controllers The device controller is responsible for moving the data between the peripheral devices that it controls and the BUS. Each device controller is in charge of a specific type of device Many same type of devices can be connected through the same controller (SCSI, USB)

Information exchange The CPU and the device controllers can communicate directly and exchange information Between Device Controller and CPU registers. The CPU and the device controllers can execute concurrently, competing for memory access (Direct Memory Access to Memory by Device Controller). Memory controller’s function is to synchronize access to the memory.

The System Bus consists of buses Peripherial The system bus consists of 3 main groups of lines: Address Bus: Transfers the memory address or the device I/O port address Data Bus: Transfers the data between CPU registers, Memory and Device Controllers’ Registers. The data is accompanied with the Address. Control Bus: Signals on these lines show the availability or the direction of sending the Data or the Address. Many lines show the Availability or Absence of some events in the system.

I/O Hardware I/O methods Despite the incredible variety of I/O devices we need only a few concepts to understand how the devices are attached and how the software can control the hardware. There are two ways of information exchange between the host and I/O devices: Through the Isolated I/O ports Through the Memory Mapped I/O Ports Mainframes Use I/O special processors (Channels) The information exchange could be done using one of below methods by the software: Polling or programmed I/O Interrupts

I/O Ports How can the processor give commands and data to a controller to accomplish an I/O transfer ? The controller has one or more registers for data and for control signals. These registers (we call them I/O ports) could be accessed by unique addresses – I/O port addresses. The processor communicates with the controller by reading and writing bit patterns in these registers

General map of Isolated I/O Ports addresses for PCs

I/O Ports Data and Control An I/O port typically consists of 4 registers, called the (1) status, (2) control, (3) data-in (4) data-out

I/O Ports Control Register The Control Register can be written by the host to start a command or to change the mode of a device one of the bits could define the full-duplex or half-duplex communication another bit parity checking a third bit sets the word length to 7 or 8 bits other bits select one of the speeds supported by the serial port Put display in Alphanumeric or Graphical mode.

I/O Ports Status Register The Status Register contains bits that can be read by the host. These bits indicate states, such as whether the current command has completed, whether a byte is available to be read from the data-in register, and whether a device error has occurred.

I/O Ports Data Registers The Data-Input Register is read by the host to get the input data. f.e. the pressed key’s value from the keyboard   The Data-Output Register is written by the host to send output data. (f.e. LED’s value of keyboard – NumLock, ScrollLock, CapsLock.)

Isolated I/O Ports One way in which this communication can occur is through the use of special I/O instructions in al, 64h ;Read keyboard status register from 0x64 port. out 60h, al ;send the command to keyboard to port 0x60

Memory Mapped I/O The device-controller registers are mapped into the address space of the processor. The CPU executes I/O requests using the standard data-transfer (memory access) instructions to read and write the device-controller registers. The graphics controller has I/O ports for basic control operations but the controller has also a large memory mapped region to hold screen contents. The controller generates the screen image based on the contents of this memory.

Separate Video RAM Separate VRAM The address space is the same (main RAM’s address space But physically the Video RAM is placed in the Video Controller Does not take any amount of memory from the existing RAM Not Separated VRAM – You have 2GB memory – 0.5 GB is lost for VRAM Separated VRAM – You have 2GB memory + 0.5 GB VRAM

Dual Ported Video RAM Dual Ported Most forms of video RAM are dual-ported, which means that while the processor is writing a new image to video RAM the display is reading from video RAM to refresh its current display content.

MIPS Memory Mapped I/O 0xffff0000 input control register (only the two LSB’s are used) 0xffff0004 input data register (holds one byte) 0xffff0008 output control register (only the two LSB’s are used) 0xffff000c output data register (holds one byte)

MIPS Memory Mapped I/O Read and Write Data lui $t0, 0xffff lw $s2, 4( $t0) lui $t0, 0xffff sw $s2, 12( $t0 )

Memory Mapped I/O Advantage: This technique is simple and convenient to use. Moreover, writing millions of bytes to the graphics memory is faster than issuing millions of I/O instructions. Disadvantage: Because a common type of software fault is a write through an incorrect pointer to an unintended region of memory, a memory-mapped device register is vulnerable to accidental modification. Of course, protected memory helps to reduce this risk.