CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002

Similar documents
Lecture S3: File system data layout, naming

FFS. CS380L: Mike Dahlin. October 9, Overview of file systems trends, future. Phase 1: Basic file systems (e.g.

Some material adapted from Mohamed Younis, UMBC CMSC 611 Spr 2003 course slides Some material adapted from Hennessy & Patterson / 2003 Elsevier

CS 471 Operating Systems. Yue Cheng. George Mason University Fall 2017

CPS104 Computer Organization and Programming Lecture 18: Input-Output. Outline of Today s Lecture. The Big Picture: Where are We Now?

CS152 Computer Architecture and Engineering Lecture 19: I/O Systems

ECE232: Hardware Organization and Design

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

CS143: Disks and Files

Where Have We Been? Ch. 6 Memory Technology

Module 1: Basics and Background Lecture 4: Memory and Disk Accesses. The Lecture Contains: Memory organisation. Memory hierarchy. Disks.

COS 318: Operating Systems. Storage Devices. Vivek Pai Computer Science Department Princeton University

Monday, May 4, Discs RAID: Introduction Error detection and correction Error detection: Simple parity Error correction: Hamming Codes

Storage. CS 3410 Computer System Organization & Programming

COS 318: Operating Systems. Storage Devices. Jaswinder Pal Singh Computer Science Department Princeton University

UNIT 2 Data Center Environment

Today: Secondary Storage! Typical Disk Parameters!

CS 201 The Memory Hierarchy. Gerson Robboy Portland State University

CSE 153 Design of Operating Systems

Computer Science 61C Spring Friedland and Weaver. Input/Output

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems

Storage System COSC UCB

HARD DRIVE, FLOPPY DRIVE HOW DOES IT ALL FIT?

Introduction to I/O and Disk Management

I/O CANNOT BE IGNORED

Components of the Virtual Memory System

Introduction to I/O and Disk Management

Computer System Architecture

u Covered: l Management of CPU & concurrency l Management of main memory & virtual memory u Currently --- Management of I/O devices

Lecture 16: Storage Devices

1. What is the difference between primary storage and secondary storage?

CSE 153 Design of Operating Systems Fall 2018

INPUT/OUTPUT DEVICES Dr. Bill Yi Santa Clara University

Quiz for Chapter 6 Storage and Other I/O Topics 3.10

A track on a magnetic disk is a concentric rings where data is stored.

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Computer Organization

Reading and References. Input / Output. Why Input and Output? A typical organization. CSE 410, Spring 2004 Computer Systems

Magnetic Disk. Optical. Magnetic Tape. RAID Removable. CD-ROM CD-Recordable (CD-R) CD-R/W DVD

Input/Output. Today. Next. Principles of I/O hardware & software I/O software layers Disks. Protection & Security

I/O CANNOT BE IGNORED

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems

Announcement. Computer Architecture (CSC-3501) Lecture 23 (17 April 2008) Chapter 7 Objectives. 7.1 Introduction. 7.2 I/O and Performance

Chapter 6. Storage and Other I/O Topics

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Mass-Storage Structure

CSCI-GA Operating Systems. I/O : Disk Scheduling and RAID. Hubertus Franke

Physical Representation of Files

Introduction to I/O. April 30, Howard Huang 1

Lecture 23: Storage Systems. Topics: disk access, bus design, evaluation metrics, RAID (Sections )

William Stallings Computer Organization and Architecture 8 th Edition. Chapter 6 External Memory

File Systems Part 1. Operating Systems In Depth XIV 1 Copyright 2018 Thomas W. Doeppner. All rights reserved.

Chapter 9: Peripheral Devices. By: Derek Hildreth Chad Davis

Lecture 23. Finish-up buses Storage

CS429: Computer Organization and Architecture

Disks, Memories & Buffer Management

CS429: Computer Organization and Architecture

Input/Output. Chapter 5: I/O Systems. How fast is I/O hardware? Device controllers. Memory-mapped I/O. How is memory-mapped I/O done?

EXTERNAL MEMORY (Part 1)

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems. Review: Want Standard Interfaces to Devices

Introduction to Input and Output

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

The Fetch-Execute Cycle

Session: Hardware Topic: Disks. Daniel Chang. COP 3502 Introduction to Computer Science. Lecture. Copyright August 2004, Daniel Chang

Random-Access Memory (RAM) CS429: Computer Organization and Architecture. SRAM and DRAM. Flash / RAM Summary. Storage Technologies

1.1 Bits and Bit Patterns. Boolean Operations. Figure 2.1 CPU and main memory connected via a bus. CS11102 Introduction to Computer Science

Introduction Disks RAID Tertiary storage. Mass Storage. CMSC 420, York College. November 21, 2006

Semiconductor Memory Types Microprocessor Design & Organisation HCA2102

Wednesday, April 25, Discs RAID: Introduction Error detection and correction Error detection: Simple parity Error correction: Hamming Codes

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

Page 1. Magnetic Disk Purpose Long term, nonvolatile storage Lowest level in the memory hierarchy. Typical Disk Access Time

Secondary Store Ms Tape

CSE 451: Operating Systems Spring Module 12 Secondary Storage

CS 261 Fall Mike Lam, Professor. Memory

ECE 550D Fundamentals of Computer Systems and Engineering. Fall 2017

CS162 Operating Systems and Systems Programming Lecture 17. Disk Management and File Systems. Page 1

CSE 451: Operating Systems Spring Module 12 Secondary Storage. Steve Gribble

CSCI-GA Database Systems Lecture 8: Physical Schema: Storage

BBM371- Data Management. Lecture 2: Storage Devices

William Stallings Computer Organization and Architecture 6 th Edition. Chapter 6 External Memory

Secondary storage. CS 537 Lecture 11 Secondary Storage. Disk trends. Another trip down memory lane

CSE 380 Computer Operating Systems

Virtual Memory. Reading. Sections 5.4, 5.5, 5.6, 5.8, 5.10 (2) Lecture notes from MKP and S. Yalamanchili

Computer Organization and Technology External Memory

CSE 120: Principles of Operating Systems. Lecture 10. File Systems. November 6, Prof. Joe Pasquale

Principles of Data Management. Lecture #2 (Storing Data: Disks and Files)

Disk Scheduling COMPSCI 386

UNIVERSITY OF MASSACHUSETTS Dept. of Electrical & Computer Engineering. Computer Architecture ECE 568

Chapter 11. I/O Management and Disk Scheduling

COMP283-Lecture 3 Applied Database Management

Chapter 6 External Memory

Random-Access Memory (RAM) CISC 360. The Memory Hierarchy Nov 24, Conventional DRAM Organization. SRAM vs DRAM Summary.

CO212 Lecture 6: Memory Organization III

Computer Principles and Applications SSC. 151 Dr. Abdel-Hameed Nawar Spring Solution Key to Problem Set 3

CS61C - Machine Structures. Week 7 - Disks. October 10, 2003 John Wawrzynek

CMSC 313 COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE PROGRAMMING LECTURE 26, SPRING 2013

CS 33. Memory Hierarchy I. CS33 Intro to Computer Systems XVI 1 Copyright 2016 Thomas W. Doeppner. All rights reserved.

Chapter 6. Storage & Other I/O

Storage Technologies and the Memory Hierarchy

Storage Systems : Disks and SSDs. Manu Awasthi July 6 th 2018 Computer Architecture Summer School 2018

Transcription:

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring 2002 Lecture 16: Survey of I/O systems 16.0 Main Points Overhead, latency, bandwidth definitions How terminals and disks work (networks later). 16.1 Definitions Overhead: CPU time to initiate operation (can't be overlapped) Latency: time to initiate 1 byte operation Bandwidth: rate of I/O transfer, once initiated General rule of thumb: abstraction of byte transfers, but batch into block I/O for efficiency pro-rates overhead, latency over larger unit. 16.2 Terminal: keyboard and display Terminal connects to computer via serial line; same concept applies to modem connections type characters, get characters back to display. For example, RS-232 is bit serial: start bit, character code, stop bit. Typical bandwidth: 9600 baud (transmission rate in bits/sec) = 900 bytes/sec up to 53Kbit/s = 5.3Kbytes/sec Even though keyboards/displays reflect a relatively small rate of transfer, can still swamp CPU due to overhead of handling each byte. What if interrupt per byte? 10 users (vi/emacs) (or 10 people using a modem) CS 162 Spring 2002 Lecture 16 1/6

900 interrupts/sec per user Overhead of handling interrupt = 100 µsec Implies: Devote whole computer to simply handling interrupts! Alternative: Direct memory access (DMA). Instead of interrupt on every byte, perform block transfer and interrupt CPU when block transfer is done. Allows much higher transfer rates. Another alternative: bitmap display. Can't type very fast, but need lots of display bandwidth. CPU writes to video memory what should be displayed, display reads video memory, illuminating pixels. Can't see quantization on displays all that easily (except take 184!), but can see this on calculators! Raster displays are how TV sets, laser printers, and monitors work. 16.3 Disk Organization surface track sector Disk surface: circular disk, coated with magnetic material Quarter-sized to 12 14 platters CS 162 Spring 2002 Lecture 16 2/6

Tracks: concentric rings around disk surface, bits laid out serially along each track Like a CD, disk is always spinning. Each track is split up into sectors: arc of track, also minimum unit of transfer CD's come individually, but magnetic disks come organized in a disk pack, by ganging a set of platters together in a stack (each platter is 2 surfaces) Disk is read via a comb 2 read/write head assembly at end of each arm (typically, only put disk heads to read inside surfaces, external surfaces are too exposed). Cylinder: corresponding track on each surface Disk operation is in terms of radial coordinates, not x, y, z: move arm to correct track, wait for disk to rotate under head, select head, then transfer as it's going by. 16.4 Disk Performance To read or write disk block: 1. Seek: position heads over cylinder Time for seek depends on how fast you can move the arm. Typically, 10 msec to move all the way across disk 2. Rotational delay: wait for sector to rotate underneath head: typically, 120 cycles per second => 8 msec per rotation 3. Select head CS 162 Spring 2002 Lecture 16 3/6

4. Transfer bytes (typically, 4MB/s, 1KB/sector => 0.25ms) Thus, overall time to do disk I/O: Seek + Rotational delay + Transfer Seek and rotational delays are latency, transfer rate is bandwidth. If random place on disk, then seek (5 ms average) + rotational delay (4 ms average) + transfer (0.25 ms). Thus, roughly 10 msec to fetch/put data, mostly seek and rotational delay. In other words, 100 KB/s If random place in same cylinder, then no seek needed, just rotational delay (4 ms average) + transfer (0.25 ms), or roughly 5 ms. to fetch/put 1KB of data. In other words, 200 KB/s. If next sector on same track, then no rotational delay, so just transfer time 4 MB/s. Key to using disk effectively (and therefore to everything in file systems!) is to minimize seek and rotational delay. 16.5 Disk Tradeoffs How do we choose disk sector size? Need to synch head with rotation speed synch bits together Put 100-1000 bits in between each sector, to allow system to measure how fast disk is spinning (also allows tolerance to small changes in track length) What if sector was 1 byte? Space efficiency only 1% of disk has useful space Time efficiency each seek takes 10 ms, means transfer at a rate of 50 100 char/sec CS 162 Spring 2002 Lecture 16 4/6

What if sector was 1KBytes? Space efficiency: 90% of disk has useful space Time efficiency: transfer at 100KB/sec What if sector was 1M bytes? Space efficiency: almost all of disk has useful space Time efficiency: transfer at disk bandwidth (4MB/sec) seek, rotation no longer matter. But 1MB blocks are really wasteful if need only 1 byte. 16.6 Disk Technology Trends Typical disk today: Disk capacity 100 GB # of surfaces per pack 18 # of tracks per surface 4096 # of sectors per track 32-64 # of bytes per sector 1KB # of revolutions per min 10,000 Transfer rate: # of bytes rotating under head per second 1KB bytes/sector * (32-64) sectors/cycle * 10,000 cycles/sec = 320 640 MB/sec (peak) 1. Disks getting smaller, for similar capacity Smaller => spin disk faster (less rotational delay, higher bandwidth) Smaller => less distance for head to travel (faster seeks) Smaller => lighter weight (for portables) 2. Disk data getting denser (more bits/square inch, allows smaller disks without sacrificing capacity). Tracks closer together => faster seeks 3. Disks getting cheaper (factor of 2 per year since 1991) Nevertheless, disk density ($ per byte) improving much faster than mechanical limitations (seek, rotational delay). CS 162 Spring 2002 Lecture 16 5/6

Key to improving density: get head close to surface. Heads are spring loaded, aerodynamically designed to fly as close to surface as possible (also, lightweight to allow for faster seeks) What happens if head contacts surface? Head crash scrapes off magnetic information Problem space gets so small, no room for air molecules. Instead, fill with special inert gas! CS 162 Spring 2002 Lecture 16 6/6