ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013.

Slides:



Advertisements
Similar presentations
Computer Architecture
Advertisements

Chapter 12: File System Implementation
I/O Organization popo.
INPUT-OUTPUT ORGANIZATION
CS-334: Computer Architecture
FIU Chapter 7: Input/Output Jerome Crooks Panyawat Chiamprasert
Avishai Wool lecture Introduction to Systems Programming Lecture 8 Input-Output.
Computer Organization (2) تنظيم الحاسب (2)
CS 104 Introduction to Computer Science and Graphics Problems Operating Systems (4) File Management & Input/Out Systems 10/14/2008 Yang Song (Prepared.
Midterm Tuesday October 23 Covers Chapters 3 through 6 - Buses, Clocks, Timing, Edge Triggering, Level Triggering - Cache Memory Systems - Internal Memory.
Common System Components
Input-Output Problems L1 Prof. Sin-Min Lee Department of Mathematics and Computer Science.
Chapter 7 Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats.
INPUT-OUTPUT ORGANIZATION
Input/Output. Input/Output Problems Wide variety of peripherals —Delivering different amounts of data —At different speeds —In different formats All slower.
Chapter 7 Input/Output Luisa Botero Santiago Del Portillo Ivan Vega.
Chapter 10: Input / Output Devices Dr Mohamed Menacer Taibah University
Computers Central Processor Unit. Basic Computer System MAIN MEMORY ALUCNTL..... BUS CONTROLLER Processor I/O moduleInterconnections BUS Memory.
Input/OUTPUT [I/O Module structure].
COMPUTER ORGANIZATIONS CSNB123 NSMS2013 Ver.1Systems and Networking1.
CS 1308 Computer Literacy and the Internet. Introduction  Von Neumann computer  “Naked machine”  Hardware without any helpful user-oriented features.
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems Principles of I/0 hardware.
ECE 456 Computer Architecture
2007 Oct 18SYSC2001* - Dept. Systems and Computer Engineering, Carleton University Fall SYSC2001-Ch7.ppt 1 Chapter 7 Input/Output 7.1 External Devices.
Computer Architecture Lecture10: Input/output devices Piotr Bilski.
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.
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
ECE 456 Computer Architecture
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.
Computer System Internal components - The processor - Main memory - I / O controllers - Buses External components (peripherals). These include: - keyboard.
Organisasi Sistem Komputer Materi VIII (Input Output)
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.
Computer Hardware A computer is made of internal components Central Processor Unit Internal External and external components.
The computer system’s I/O architecture is its interface to the outside world. This architecture provides a systematic means of controlling interaction.
EFLAG Register of The The only new flag bit is the AC alignment check, used to indicate that the microprocessor has accessed a word at an odd.
ECE 456 Computer Architecture Lecture #16 – Exam#2 Review Instructor: Dr. Honggang Wang Fall 2013.
File Systems cs550 Operating Systems David Monismith.
PART 7 CPU Externals CHAPTER 7: INPUT/OUTPUT 1. Input/Output Problems Wide variety of peripherals – Delivering different amounts of data – At different.
1 Lecture 1: Computer System Structures We go over the aspects of computer architecture relevant to OS design  overview  input and output (I/O) organization.
Device Management Introduction  Keeping track of the status of all devices, which requires special mechanisms. One commonly used mechanism.
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
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
File System Department of Computer Science Southern Illinois University Edwardsville Spring, 2016 Dr. Hiroshi Fujinoki CS 314.
W4118 Operating Systems Instructor: Junfeng Yang.
Computer Architecture Chapter (7): Input / Output
Computer Organization and Architecture + Networks Lecture 6 Input/Output.
Computer Organization and Design
I/O SYSTEMS MANAGEMENT Krishna Kumar Ahirwar ( )
Chapter 11: File System Implementation
Operating Systems (CS 340 D)
1 Input-Output Organization Computer Organization Computer Architectures Lab Peripheral Devices Input-Output Interface Asynchronous Data Transfer Modes.
CS703 - Advanced Operating Systems
BIC 10503: COMPUTER ARCHITECTURE
Created by Vivi Sahfitri
Department of Computer Science
Networks & I/O Devices.
Presentation transcript:

ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013

Lecture #9 Memory Lectures L#4-8 (Review) CPU CACHECACHE MAIN MEMORY I/O STORAGE DEVICES Registers Internal Memory External Memory OS level Not real Defer to CPU discussion VIRTUAL MEMORY Memory Hierarchy * Performance Imbalance * Principle of Locality * Error correction (SEC)

Lecture #9 A Computer System (Agenda) Memory Input /Output Central Processing Unit Interconnection Bus Computer history (L#1) Computer architecture = von Neumann architecture + interrupts (L#2) L#4 ~ 8 L#3 L#9, 10 L#11, 13 ~ 22 Parallel organizations: SMP, Clusters, NUMA, Vector/Array Processors L#23 ~ 24

Lecture #9 Topics I/O system structure Virtual I/O

Lecture #9 I/O System Structure (1) Problems with direct connection Wide variety of peripherals –with different operation methods –at different transfer rates (Next Slide) –in different formats Need I/O modules!!

Lecture #9 I/O System Structure (1): problems with direct connection Typical Peripheral Device Data Rates

Lecture #9 I/O System Structure (2) I/O module –interface to CPU and memory –interface to one or more peripherals –other names I/O channel I/O processor I/O controller device controller

Lecture #9 Agenda

Lecture #9 External/Peripheral Devices Human readable –suitable for communicating with users –screen/monitor, printer, keyboard Machine readable –suitable for communicating with equipments –magnetic disk and tape, CD Communication –suitable for communicating with remote devices –modem, network interface card (NIC) External Devices (1)

Lecture #9 External Device Block Diagram Decide function to perform: read/write report status etc. (data converter) External Devices (2) Control device’s operation in response to command from I/O module

Lecture #9 I/O Module Functions (1) Steps involved in the data transfer from a peripheral to the processor –CPU interrogates I/O module to check device status –I/O module returns device status  status reporting –If ready, CPU requests data transfer by issuing a command to I/O module  command decoding –I/O module gets data from device –I/O module transfers data to CPU Functions & Structure of the I/O Module (1)

Lecture #9 I/O Module Functions (2) Control & timing CPU communication –status reporting, command decoding, data, and address recognition Device communication –status, control, and data Data buffering Error detection –mechanical/electrical malfunctions reported by devices –error detecting codes Functions & Structure of the I/O Module (2)

Lecture #9 I/O Module Structure Functions & Structure of the I/O Module (3)

Lecture #9 Agenda

Lecture #9 External I/O Interface (1) Parallel interface –multiple lines connecting the I/O module and the peripheral –multiple bits are transferred simultaneously –requires multiple wires /connectors, shielding to prevent electrical interference; synchronization  costly, short-distance communication

Lecture #9 External I/O Interface (2) Serial interface –only one line connecting the I/O module and the peripheral –one bit is transferred at a time –slower than parallel interfaces, but no shielding & synchronization needed  low cost, long-distance communication

Lecture #9 External I/O Interface (3) - Examples IEEE-1394 Firewire (Ch 7.7) Infiniband (Ch 7.7)

Lecture #9 Agenda

Lecture #9 Virtual I/O (1) OS provides I/O services to user programs in the form of opening, reading, writing, and closing files -- file I/O, virtual I/O A file consists of a sequence of bytes or records written to an I/O device –each file with some particular kind of data –different files with different properties

Lecture #9 Virtual I/O (2): File Properties

Lecture #9 Virtual I/O (3) Virtual I/O (file I/O) is done by system calls –Open (name, mode): open or create a file and return a file descriptor (fd) –Close (fd): close a file indicated by fd –Read (fd, buffer, count): read count bytes of data from the file into a buffer in memory –Write (fd, buffer, count): write count bytes of data from the buffer into the file –Chmod (name, mode): change the protection mode of a file

Lecture #9 Virtual I/O (4) File Implementation Keeping track of which disk blocks go with a file –Continuous allocation –Linked-list allocation –Linked list allocation using an index

Lecture #9 Continuous Allocation Store a file as a continuous block of data on the disk Pros and cons: –simple to implement, simple block administration (the address of the first block) –excellent performance –infeasible if the maximum file size is unknown at the time of creation –fragmentation of the disk Virtual I/O (5) – File Implementation

Lecture #9 Linked-List Allocation Each allocation unit (block) contains the address of its successor Random access is extremely slow Virtual I/O (6) – File Implementation

Lecture #9 Linked-List Allocation Using an Index (1) Virtual I/O (7) – File Implementation

Lecture #9 Linked-List Allocation Using an Index (2) Drawback: huge tables must be maintained in main memory Example: –With a large disk, 16M 1K blocks (16 GB), the table will have 16M entries, each entry will have to be a minimum of 3 bytes. Thus the table will take up 48MB space. –So generally the OS using this mechanism uses large blocks on large disks to avoid the huge index tables. Virtual I/O (8) – File Implementation

Lecture #9 Bit map: each location unit has a bit indicating it is available or not –Size is constant –Easy to update –Hard to find a block of a given size Keep Track of Available Blocks Free list: contains all the holes (continuous allocation units) –Easy to find a hole of a particular length –Size is variable Virtual I/O (9) – File Implementation Track#Sector##of sectors in hole Sector # Track #

Lecture #9 Hands-On Problem For the following Bit Map that indicates the available sectors on a disk, give the corresponding Free List format

Lecture #9 Directory Management Files are grouped into directories Directories are organized into hierarchy A UNIX directory tree Managed via system calls –Create: mkdir –Delete: rmdir –Open: ls –Rename: rename –Etc. Virtual I/O (10)

Lecture #9 Summary of Lecture #9 I/O system structure –External / peripheral devices –Function and structure of I/O modules –External I/O interface between peripheral and I/O module parallel and serial Virtual I/O –File, 3 file storage allocation policies, free list and bit map methods to keep track of available blocks –Directory management

Lecture #9 Things To Do Check out the class website about –lecture notes –reading assignments

Lecture #9 External I/O Interface (3) - Examples IEEE-1394 Firewire (Ch 7.7) Infiniband (Ch 7.7) USB (Universal Serial Bus)