Devices and Device Controllers



Similar documents
Chapter 10: Mass-Storage Systems

File System & Device Drive. Overview of Mass Storage Structure. Moving head Disk Mechanism. HDD Pictures 11/13/2014. CS341: Operating System

Storage and File Systems. Chester Rebeiro IIT Madras

Introduction to I/O and Disk Management

Chapter 11 I/O Management and Disk Scheduling

COS 318: Operating Systems. Storage Devices. Kai Li Computer Science Department Princeton University. (

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 412, University of Maryland. Guest lecturer: David Hovemeyer.

Chapter 12: Mass-Storage Systems

COS 318: Operating Systems. Storage Devices. Kai Li and Andy Bavier Computer Science Department Princeton University

I/O Management. General Computer Architecture. Goals for I/O. Levels of I/O. Naming. I/O Management. COMP755 Advanced Operating Systems 1

Sistemas Operativos: Input/Output Disks

Lecture 16: Storage Devices

Mass Storage Structure

Chapter 12: Secondary-Storage Structure

Disks and RAID. Profs. Bracy and Van Renesse. based on slides by Prof. Sirer

Chapter 9: Peripheral Devices: Magnetic Disks

Timing of a Disk I/O Transfer

COS 318: Operating Systems. I/O Device and Drivers. Input and Output. Definitions and General Method. Revisit Hardware

Operating System Concepts. Operating System 資 訊 工 程 學 系 袁 賢 銘 老 師

1 File Management. 1.1 Naming. COMP 242 Class Notes Section 6: File Management

OS OBJECTIVE QUESTIONS

Chapter 11 I/O Management and Disk Scheduling

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Robert Wagner

11: I/O Device Management

Job Scheduling Model

A Comprehensive Review for Disk Scheduling Algorithms

4.2: Multimedia File Systems Traditional File Systems. Multimedia File Systems. Multimedia File Systems. Disk Scheduling

Price/performance Modern Memory Hierarchy

Far-western University Central Office, Mahendranagar Operating System

Chapter 2: Computer-System Structures. Computer System Operation Storage Structure Storage Hierarchy Hardware Protection General System Architecture

I/O Device and Drivers

Computer Systems Structure Input/Output

Have both hardware and software. Want to hide the details from the programmer (user).

I/O. Input/Output. Types of devices. Interface. Computer hardware

Communicating with devices

Input/output (I/O) I/O devices. Performance aspects. CS/COE1541: Intro. to Computer Architecture. Input/output subsystem.

University of Dublin Trinity College. Storage Hardware.

Storage. The text highlighted in green in these slides contain external hyperlinks. 1 / 14

CPU Scheduling. Basic Concepts. Basic Concepts (2) Basic Concepts Scheduling Criteria Scheduling Algorithms Batch systems Interactive systems

Computer-System Architecture

Computer Peripherals

Computer Organization & Architecture Lecture #19

Chapter Introduction. Storage and Other I/O Topics. p. 570( 頁 585) Fig I/O devices can be characterized by. I/O bus connections

Storage in Database Systems. CMPSCI 445 Fall 2010

Data Storage - I: Memory Hierarchies & Disks

Computer Architecture Prof. Mainak Chaudhuri Department of Computer Science and Engineering Indian Institute of Technology, Kanpur

Page 1 of 5. IS 335: Information Technology in Business Lecture Outline Operating Systems

1. Computer System Structure and Components

Solid State Drive Architecture

Secondary Storage. Any modern computer system will incorporate (at least) two levels of storage: magnetic disk/optical devices/tape systems

CS 464/564 Introduction to Database Management System Instructor: Abdullah Mueen

Fastboot Techniques for x86 Architectures. Marcus Bortel Field Application Engineer QNX Software Systems

Operating Systems. 12. Devices. Paul Krzyzanowski. Rutgers University. Spring /9/ Paul Krzyzanowski

Operating System Structures

Data Storage - II: Efficient Usage & Errors

Big Picture. IC220 Set #11: Storage and I/O I/O. Outline. Important but neglected

Chapter 11: File System Implementation. Chapter 11: File System Implementation. Objectives. File-System Structure

Lecture 9: Memory and Storage Technologies

Read this before starting!

Input / Ouput devices. I/O Chapter 8. Goals & Constraints. Measures of Performance. Anatomy of a Disk Drive. Introduction - 8.1

Chapter 11: File System Implementation. Operating System Concepts with Java 8 th Edition

1 Storage Devices Summary

Chapter 11: Input/Output Organisation. Lesson 06: Programmed IO

Q & A From Hitachi Data Systems WebTech Presentation:

Data Storage and Backup. Sanjay Goel School of Business University at Albany, SUNY

COMPUTER HARDWARE. Input- Output and Communication Memory Systems

TECHNOLOGY BRIEF. Compaq RAID on a Chip Technology EXECUTIVE SUMMARY CONTENTS

Storing Data: Disks and Files. Disks and Files. Why Not Store Everything in Main Memory? Chapter 7

Operating Systems 4 th Class

RAID. RAID 0 No redundancy ( AID?) Just stripe data over multiple disks But it does improve performance. Chapter 6 Storage and Other I/O Topics 29

Programming Interface. for. Bus Master IDE Controller. Revision 1.0

Input / Output and I/O Strategies

Operating System: Scheduling

File System Management

Update: About Apple RAID Version 1.5 About this update

Operating System Tutorial

Storing Data: Disks and Files

OPERATING SYSTEMS STRUCTURES

CSC 2405: Computer Systems II

Lesson Plan. Preparation

Chapter 1 Lesson 3 Hardware Elements in the Embedded Systems Chapter-1L03: "Embedded Systems - ", Raj Kamal, Publs.: McGraw-Hill Education

COMPUTER SCIENCE AND ENGINEERING - Basic Functions and Operational Units - Kevin Skadron, BASIC FUNCTIONS AND OPERATIONAL UNITS

Record Storage and Primary File Organization

Objectives. Chapter 5: Process Scheduling. Chapter 5: Process Scheduling. 5.1 Basic Concepts. To introduce CPU scheduling

HP Smart Array Controllers and basic RAID performance factors

Scheduling. Scheduling. Scheduling levels. Decision to switch the running process can take place under the following circumstances:

Operating Systems Prof. Ashok K Agrawala

Operating Systems OBJECTIVES 7.1 DEFINITION. Chapter 7. Note:

Disk Storage & Dependability

& Data Processing 2. Exercise 2: File Systems. Dipl.-Ing. Bogdan Marin. Universität Duisburg-Essen

Operating Systems, 6 th ed. Test Bank Chapter 7

Disk Geometry: How Data is Organized on a Hard Disk Drive

INPUT/OUTPUT ORGANIZATION

Introduction to Operating Systems. Perspective of the Computer. System Software. Indiana University Chen Yu

Random-Access Memory (RAM) The Memory Hierarchy. SRAM vs DRAM Summary. Conventional DRAM Organization. Page 1

CS 6290 I/O and Storage. Milos Prvulovic

Transcription:

I/O 1 Devices and Device Controllers network interface graphics adapter secondary storage (disks, tape) and storage controllers serial (e.g., mouse, keyboard) sound co-processors...

I/O 2 Bus Architecture Example CPU Cache Bridge Memory PCI bus SCSI controller USB controller Bridge Graphics ISA bus keyboard mouse Modem Sound

I/O 3 Simplified Bus Architecture CPU M K K K Key M: memory K: device controller disk controller other controllers

I/O 4 Device Interactions device registers command, status, and data registers CPU accesses register access via: special I/O instructions memory mapping interrupts used by device for asynchronous notification (e.g., of request completion) handled by interrupt handlers in the operating system

I/O 5 Direct Memory Access (DMA) used for block data transfers between devices (e.g., disk controller) and memory CPU initiates DMA, but can do other work while the transfer occurs 3 1 2 K CPU M (disk) K K 1. CPU issues DMA request to controller 2. controller directs data transfer 3. controller interrupts CPU

I/O 6 Applications and Devices interaction with devices is normally accomplished by device drivers in the OS, so that the OS can control how the devices are used applications see a simplified view of devices through a system call interface (e.g., block vs. character devices in Unix) the OS may provide a system call interface that permits low level interaction between application programs and a device operating system often buffers data that is moving between devices and application programs address spaces benefits: solve timing, size mismatch problems drawback: performance

I/O 7 Logical View of a Disk Drive disk is an array of numbered blocks (or sectors) each block is the same size (e.g., 512 bytes) blocks are the unit of transfer between the disk and memory typically, one or more contiguous blocks can be transferred in a single operation storage is non-volatile, i.e., data persists even when the device is without power

I/O 8 A Disk Platter s Surface Track Sector

I/O 9 Physical Structure of a Disk Drive Sector Shaft Track Cylinder

I/O 10 Simplified Cost Model for Disk Block Transfer moving data to/from a disk involves: seek time: move the read/write heads to the appropriate cylinder rotational latency: wait until the desired sectors spin to the read/write heads transfer time: wait while the desired sectors spin past the read/write heads request service time is the sum of seek time, rotational latency, and transfer time t service = t seek + t rot + t transfer note that there are other overheads but they are typically small relative to these three

I/O 11 Rotational Latency and Transfer Time rotational latency depends on the rotational speed of the disk if the disk spins at ω rotations per second: expected rotational latency: 0 t rot 1 ω t rot = 1 2ω transfer time depends on the rotational speed and on the amount of data transferred if k sectors are to be transferred and there are T sectors per track: t transfer = k T ω

I/O 12 Seek Time seek time depends on the speed of the arm on which the read/write heads are mounted. a simple linear seek time model: t maxseek is the time required to move the read/write heads from the innermost cylinder to the outermost cylinder C is the total number of cylinders if k is the required seek distance (k > 0): t seek (k) = k C t maxseek

I/O 13 Disk Head Scheduling goal: reduce seek times by controlling the order in which requests are serviced disk head scheduling may be performed by the controller, by the operating system, or both for disk head scheduling to be effective, there must be a queue of outstanding disk requests (otherwise there is nothing to reorder) an on-line approach is required: the disk request queue is not static

I/O 14 FCFS Disk Head Scheduling handle requests in the order in which they arrive +: fair, simple -: no optimization of seek times Figure from Operating Systems Concepts, 6th Ed., Silberschatz, Galvin, Gagne. Wiley. 2003

I/O 15 Shortest Seek Time First (SSTF) choose closest request (a greedy approach) +: seek times are reduced -: starvation of distant requests Figure from Operating Systems Concepts, 6th Ed., Silberschatz, Galvin, Gagne. Wiley. 2003

I/O 16 SCAN and LOOK LOOK is the commonly-implemented variant of SCAN. Also known as the elevator algorithm. Under LOOK, the disk head moves in one direction until there are no more requests in front of it, then reverses direction. seek time reduction without starvation SCAN is like LOOK, except the read/write heads always move all the way to the edge of the disk in each direction.

I/O 17 SCAN Example Figure from Operating Systems Concepts, 6th Ed., Silberschatz, Galvin, Gagne. Wiley. 2003

I/O 18 Circular SCAN (C-SCAN) and Circular LOOK (C-LOOK) C-LOOK is the commonly-implemented variant of C-SCAN Under C-LOOK, the disk head moves in one direction until there are no more requests in front of it, then it jumps back and begins another scan in the same direction as the first. C-LOOK avoids bias against edge cylinders

I/O 19 C-LOOK Example Figure from Operating Systems Concepts, 6th Ed., Silberschatz, Galvin, Gagne. Wiley. 2003