COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 10 Input/Output and Stable Storage ©Copyright 2008 Umakishore Ramachandran.

Slides:



Advertisements
Similar presentations
I/O Management and Disk Scheduling
Advertisements

Chapter 6 I/O Systems.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
1 Chapter 11 I/O Management and Disk Scheduling Patricia Roy Manatee Community College, Venice, FL ©2008, Prentice Hall Operating Systems: Internals and.
Chapter 8 Interfacing Processors and Peripherals.
1 Lecture 22: I/O, Disk Systems Todays topics: I/O overview Disk basics RAID Reminder: Assignment 8 due Tue 11/21.
Homework Reading Machine Projects Labs
I/O InterfaceCS510 Computer ArchitecturesLecture Lecture 17 I/O Interfaces and I/O Busses.
Provide data pathways that connect various system components.
Computer Buses Ref: Burd, Chp – 220 Englander, Chp 7 p
IT253: Computer Organization
System Integration and Performance
Disk Storage SystemsCSCE430/830 Disk Storage Systems CSCE430/830 Computer Architecture Lecturer: Prof. Hong Jiang Courtesy of Yifeng Zhu (U. Maine) Fall,
Overview of Mass Storage Structure
Chapter 4 Device Management and Disk Scheduling DEVICE MANAGEMENT Content I/O device overview I/O device overview I/O organization and architecture I/O.
Principles of I/O Hardware I/O Devices Block devices, Character devices, Others Speed Device Controllers Separation of electronic from mechanical components.
I/O Management and Disk Scheduling
Device Management Ankur Saggar Nitin Golait Jason Foos Adam Estabrook.
Slide 5-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 5 5 Device Management.
1 Operating Systems Input/Output Management. 2 What is the I/O System A collection of devices that different sub- systems of a computer use to communicate.
§4.4 Input and Output Devices
Slide 5-1 Copyright © 2004 Pearson Education, Inc. Operating Systems: A Modern Perspective, Chapter 5 5 Device Management.
INPUT-OUTPUT ORGANIZATION
1  1998 Morgan Kaufmann Publishers Interfacing Processors and Peripherals.
Operating Systems Input/Output Devices (Ch , 12.7; , 13.7)
Operating System - Overview Lecture 2. OPERATING SYSTEM STRUCTURES Main componants of an O/S Process Management Main Memory Management File Management.
Figure 1.1 Interaction between applications and the operating system.
1 Input/Output Chapter 3 TOPICS Principles of I/O hardware Principles of I/O software I/O software layers Disks Clocks Reference: Operating Systems Design.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
Operating Systems Input/Output Devices (Ch 5: )
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
I/O Tanenbaum, ch. 5 p. 329 – 427 Silberschatz, ch. 13 p
COMP 1017: Digital Technologies Session 7: Motherboards.
Device Management. So far… We have covered CPU and memory management Computing is not interesting without I/Os Device management: the OS component that.
Chapter 8 Input/Output. Busses l Group of electrical conductors suitable for carrying computer signals from one location to another l Each conductor in.
Stuart Cunningham - Computer Platforms COMPUTER PLATFORMS Input, Output, and Storage & Introduction to Basic Computer Architecture Week 2.
 Design model for a computer  Named after John von Neuman  Instructions that tell the computer what to do are stored in memory  Stored program Memory.
1 CS503: Operating Systems Spring 2014 Dongyan Xu Department of Computer Science Purdue University.
Sistem Operasi IKH311 Masukan Luaran (Input/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.
I/O Example: Disk Drives To access data: — seek: position head over the proper track (8 to 20 ms. avg.) — rotational latency: wait for desired sector (.5.
Input/Output 2 What is I/O? How we get the CPU to communicate with devices From the computer’s point of view, it’s just 1’s and 0’s Gets interpreted.
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.
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.
Chapter 5 Input/Output 5.1 Principles of I/O hardware
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.
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.
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.
Device Management Mark Stanovich Operating Systems COP 4610.
Chapter 9 I/O System. 2 Input/Output System I/O Major objectives are: Take an application I/O request and send it to the physical device. Then, take whatever.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
ECE 456 Computer Architecture Lecture #9 – Input/Output Instructor: Dr. Honggang Wang Fall 2013.
Device Management Andy Wang Operating Systems COP 4610 / CGS 5765.
Chapter 13: I/O Systems Modified by Dr. Neerja Mhaskar for CS 3SH3.
Sarah Diesburg Operating Systems CS 3430
Input/Output Devices ENCE 360
Operating Systems (CS 340 D)
COMP 1321 Digital Infrastructure
CS703 - Advanced Operating Systems
Operating Systems Chapter 5: Input/Output Management
Today’s agenda Hardware architecture and runtime system
Persistence: I/O devices
Andy Wang Operating Systems COP 4610 / CGS 5765
Chapter 5 Input/Output Tanenbaum, Modern Operating Systems 3 e, (c) 2008 Prentice-Hall, Inc. All rights reserved
Presentation transcript:

COMPUTER SYSTEMS An Integrated Approach to Architecture and Operating Systems Chapter 10 Input/Output and Stable Storage ©Copyright 2008 Umakishore Ramachandran and William D. Leahy Jr.

10.1 Communication between the CPU and the I/O devices Device Controller Input/Output Device Computer

Device controller

Memory Mapped I/O CPU Main memory Address Data Data register (address = 5000) Ready 07 IFIE… 07 Keyboard controller Status register (address = 5002)

10.2 Programmed I/O

10.3 DMA Command DMA controller Buffer256 bytes Status Device addressMemory buffer address Count Memory Memory bus CPU Go

10.4 Buses System Bus (or Memory Bus) is key resource in entire design. Functionally, bus has following components: – Address lines – Data lines – Command lines – Interrupt lines – Interrupt acknowledge lines – Bus arbitration lines

10.4 Buses Memory System bus CPU PCI bus Controller Bridge Controller

10.5 I/O Processor Shared Memory System bus CPU I/O bus Controller I/O processor Controller Bridge

10.6 Device Driver

An Example CommandController Action pan(± ɵ )Pan the camera view by ± ɵ tilt(± ɵ )Tilt camera position by ± ɵ zoom(±z)Zoom camera focus by ±z StartStart camera StopStop camera memory buffer(M) Set memory buffer address for data transfer to M number of frames (N) Set number of frames to be captured and transferred to memory to N enable interruptEnable interrupt from the device disable interrupt Disable interrupt from the device start DMAStart DMA data transfer from camera

An Example // device driver: camera // The device driver performs several functions: //control_camera_position; //convey_DMA_parameters; //start/stop data transfer; //interrupt_handler; //error handling and reporting; // Control camera position camera_position_control (angle pan_angle; angle tilt_angle; int z) { pan(pan_angle); tilt(tilt_angle); zoom(z); } // Set up DMA parameters for data transfer camera_DMA_parameters(address mem_buffer;int num_frames) { memory_buffer(mem_buffer); capture_frames(num_frames); }

An Example // Start DMA transfer camera_start_data_transfer() { start_camera(); start_DMA(); } // Stop DMA transfer camera_stop_data_transfer() { // automatically aborts data transfer // if camera is stopped; stop_camera(); } // Enable interrupts from the device camera_enable_interrupt() { enable_interrupt(); } // Disable interrupts from the device camera_disable_interrupt() { disable_interrupt(); }

An Example // Device interrupt handler camera_interrupt_handler() { // This will be coded similar to any // interrupt handler we have seen in // chapter 4. // // The upshot of interrupt handling may // to deliver events to the upper layers // of the system software (see Figure 10.9) // which may be one of the following: //- normal I/O request completion //- device errors for the I/O request // }

10.7 Peripheral Devices DeviceInput/outputHuman in the loop Data rate (circa 2008) PIODMA KeyboardInputYes5-10 bytes/secX MouseInputYes bytes/secX Graphics displayOutputNo MB/secX Disk (hard drive)Input/OutputNo MB/secX Network (LAN)Input/OutputNo1 Gbit/secX ModemInput/OutputNo1-8 Mbit/secX Inkjet printerOutputNo20-40 KB/secXX Laser printerOutputNo KB/secX Voice (microphone/speaker) Input/OutputYes10 bytes/secX Audio (music)OutputNo4-500 KB/secX Flash memoryInput/OutputNo10-50 MB/secX CD-RWInput/OutputNo10-20 MB/secX DVD-RInputNo10-20 MB/secX

10.8 Disk Storage Head Assembly All heads move together Platter Sector Top and bottom Surfaces Head Spindle Track Shaft Arm

10.8 Disk Storage Cylinder X: Track X from all 12 surfaces (2 per platter) Each circle represents two tracks: one for top surface and one for bottom surface

10.8 Disk Storage (a) Normal (Non zoned) recording(b) Zoned recording

Saga of Disk Technology Disk recording: (a) Longitudinal recording; (b) PMR

10.9 Disk Scheduling Algorithms NameNotationUnitsDescription Throughputn/TJobs/secSystem-centric metric quantifying the number of I/O requests n executed in time interval T Avg. Turnaround time (t avg ) (t 1 +t 2 +…+t n )/nSecondsSystem-centric metric quantifying the average time it takes for a job to complete Avg. Waiting time (w avg ) ((t 1 -e 1 ) + (t 2 -e 2 )+ … + (t n -e n ))/n or (w 1 +w 2 + … +w n )/n SecondsSystem-centric metric quantifying the average waiting time that an I/O request experiences Response time/ turnaround time titi SecondsUser-centric metric quantifying the turnaround time for a specific I/O request i NameNotationUnitsDescription Variance in Response time E[(t i – t avg ) 2 ]Seconds 2 User-centric metric that quantifies the statistical variance of the actual response time (t i ) experienced by an I/O request i from the expected value (t avg ) Variance in Wait time E[(w i – w avg ) 2 ]Seconds 2 User-centric metric that quantifies the statistical variance of the actual wait time (w i ) experienced by an I/O request i from the expected value (w avg ) Starvation--User-centric qualitative metric that signifies denial of service to a particular I/O request or a set of I/O request due to some intrinsic property of the I/O scheduler

Assumptions for Disk Scheduling Algorithms Disk has 200 tracks numbered 0 to 199 – (with 0 being outermost and 199 being innermost). Head when in its fully retracted position is on track 0. Head assembly extends to its maximum span from its resting position when it is on track 199.

First-Come First Served t3 t1 t4 t2 head

Shortest Seek Time First t3 t1 t4 t2 head

Scan (elevator algorithm) t3 t1 t4t2 head Outermost track Innermost track t6 t5

C-Scan (Circular Scan) t3 t1 t4t2 head Outermost track Innermost track t6 t5 Retract

Look and C-Look

Disk Scheduling Summary Choice of scheduling algorithm depends on a number of factors including expected layout, storage allocation policy, and electro- mechanical capabilities of disk drive. Typically, some variant of LOOK or C-LOOK is used for disk scheduling. We covered other algorithms more from the point of completeness than as viable choices for implementation in a real system.

Comparison of the Algorithms Requests FCFS Response time SSFT LOOK R1 (cyl 20)37155 R2 (cyl 17) R3 (cyl 55) R4 (cyl 35) R5 (cyl 25)7422 R6 (cyl 78) R7 (cyl 99) Average

10.10 Solid State Drive

10.11 Evolution of I/O Buses and Device Drivers Plug and Play (Solves 3 rd party problem) Parallel Buses (e.g. PCI) Serial Buses – USB (Microsoft/Intel) USB 1.0: 1.5Mb/s USB 2.0: 60Mb/s – Firewire (Apple) 100 Mb/s – Why serial? Smaller Cheaper No cross-talk Serial signaling can be operated faster than parallel (Higher frequencies) Graphics Connections (connecting 3-D graphics controller card to motherboard) – Advanced Graphics Port (AGP) – PCI Express (PCI-e)

Dynamic Loading of Device Drivers Device drivers can be Plug and Play New device is connected, generates interrupt OS looks through its list of device drivers and finds correct one* Dynamically Loads and links driver into memory *If no driver found has to request user supply driver

Putting it all Together

10.12 Summary Mechanisms for communication between processor and I/O devices including programmed I/O and DMA. Device controllers and device drivers. Buses in general and evolution of I/O buses in particular, found in modern computer systems. Disk storage and disk-scheduling algorithms.