Disk Access. DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads.

Slides:



Advertisements
Similar presentations
Chapter 6 I/O Systems.
Advertisements

Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
RAID Redundant Array of Independent Disks
1 CSE 380 Computer Operating Systems Instructor: Insup Lee University of Pennsylvania Fall 2003 Lecture Note on Disk I/O.
CSCE 212 Chapter 8 Storage, Networks, and Other Peripherals Instructor: Jason D. Bakos.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
Operating Systems 1 K. Salah Module 5.0: I/O and Disks I/O hardware Polling and Interrupt-driven I/O DMA Bock and character devices Blocking and nonblocking.
Computer ArchitectureFall 2007 © November 28, 2007 Karem A. Sakallah Lecture 24 Disk IO and RAID CS : Computer Architecture.
1 Storage (cont’d) Disk scheduling Reducing seek time (cont’d) Reducing rotational latency RAIDs.
Other Disk Details. 2 Disk Formatting After manufacturing disk has no information –Is stack of platters coated with magnetizable metal oxide Before use,
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
File System Implementation
Based on the slides supporting the text
I/O Hardware n Incredible variety of I/O devices n Common concepts: – Port – connection point to the computer – Bus (daisy chain or shared direct access)
U NIVERSITY OF M ASSACHUSETTS, A MHERST Department of Computer Science Emery Berger University of Massachusetts Amherst Operating Systems CMPSCI 377 Lecture.
CMPT 300: Final Review Chapters 8 – Memory Management: Ch. 8, 9 Address spaces Logical (virtual): generated by the CPU Physical: seen by the memory.
1 Storage Hierarchy Cache Main Memory Virtual Memory File System Tertiary Storage Programs DBMS Capacity & Cost Secondary Storage.
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
Physical Storage Organization. Advanced DatabasesPhysical Storage Organization2 Outline Where and How data are stored? –physical level –logical level.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
I/O Systems and Storage Systems May 22, 2000 Instructor: Gary Kimura.
Secondary Storage Management Hank Levy. 8/7/20152 Secondary Storage • Secondary Storage is usually: –anything outside of “primary memory” –storage that.
Chapter 13: I/O Systems I/O Hardware Application I/O Interface
Input / Output CS 537 – Introduction to Operating Systems.
Storage & Peripherals Disks, Networks, and Other Devices.
1 Recitation 8 Disk & File System. 2 Disk Scheduling Disks are at least four orders of magnitude slower than main memory –The performance of disk I/O.
1 File System Implementation Operating Systems Hebrew University Spring 2010.
I/O – Chapter 8 Introduction Disk Storage and Dependability – 8.2 Buses and other connectors – 8.4 I/O performance measures – 8.6.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
1 Lecture 8: Secondary-Storage Structure 2 Disk Architecture Cylinder Track SectorDisk head rpm.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
1 Module 12: I/O Systems n I/O hardware n Application I/O Interface n Kernel I/O Subsystem n Transforming I/O Requests to Hardware Operations n Performance.
Recall: Three I/O Methods Synchronous: Wait for I/O operation to complete. Asynchronous: Post I/O request and switch to other work. DMA (Direct Memory.
CE Operating Systems Lecture 20 Disk I/O. Overview of lecture In this lecture we will look at: Disk Structure Disk Scheduling Disk Management Swap-Space.
I/O Management and Disk Structure Introduction to Operating Systems: Module 14.
Disks Chapter 5 Thursday, April 5, Today’s Schedule Input/Output – Disks (Chapter 5.4)  Magnetic vs. Optical Disks  RAID levels and functions.
OSes: 11. FS Impl. 1 Operating Systems v Objectives –discuss file storage and access on secondary storage (a hard disk) Certificate Program in Software.
Physical Storage Organization. Advanced DatabasesPhysical Storage Organization2 Outline Where and How data are stored? –physical level –logical level.
CS 153 Design of Operating Systems Spring 2015 Lecture 22: File system optimizations.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 13: I/O Systems I/O Hardware Application I/O Interface Kernel I/O Subsystem.
RAID Disk Arrays Hank Levy. 212/5/2015 Basic Problems Disks are improving, but much less fast than CPUs We can use multiple disks for improving performance.
Auxiliary Memory Magnetic Disk:
1 Lecture 27: Disks Today’s topics:  Disk basics  RAID  Research topics.
1 Lecture 23: Storage Systems Topics: disk access, bus design, evaluation metrics, RAID (Sections )
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
CPSC 231 Secondary storage (D.H.)1 Learning Objectives Understanding disk organization. Sectors, clusters and extents. Fragmentation. Disk access time.
FILE SYSTEM IMPLEMENTATION 1. 2 File-System Structure File structure Logical storage unit Collection of related information File system resides on secondary.
Part IV I/O System Chapter 12: Mass Storage Structure.
Enhanced Availability With RAID CC5493/7493. RAID Redundant Array of Independent Disks RAID is implemented to improve: –IO throughput (speed) and –Availability.
File organization Secondary Storage Devices Lec#7 Presenter: Dr Emad Nabil.
Multiple Platters.
I/O System Chapter 5 Designed by .VAS.
CSE451 I/O Systems and the Full I/O Path Autumn 2002
Operating System I/O System Monday, August 11, 2008.
Chapter 14 Based on the slides supporting the text
RAID Disk Arrays Hank Levy 1.
RAID RAID Mukesh N Tekwani
Module 2: Computer-System Structures
RAID Disk Arrays Hank Levy 1.
So far… Text RO …. printf() RW link printf Linking, loading
Selecting a Disk-Scheduling Algorithm
Overview Continuation from Monday (File system implementation)
Mark Zbikowski and Gary Kimura
Secondary Storage Management Brian Bershad
RAID Disk Arrays Hank Levy 1.
Secondary Storage Management Hank Levy
RAID RAID Mukesh N Tekwani April 23, 2019
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Module 2: Computer-System Structures
Presentation transcript:

Disk Access

DISK STRUCTURE Sector: Smallest unit of data transfer from/to disk; 512B 2/4/8 adjacent sectors transferred together: Blocks Read/write heads can be positioned over 1 cylinder at a time

DISK ACCESS Seek time: Mechanically moving the R/W head to the correct track ~msec Rotation time: Rotate the required sector(s) under the R/W head ~msec Transfer time: Actual read/write of the data from/to disk surface

Interface to the rest of the System CPU connected to I/O device: I/O bus I/O bus addresses for each connected device: I/O ports I/O interface converts between I/O bus and device specific commands: SCSI, ATA/IDE I/O controller: hardware on the disk drive to do the actual data transfer. E.g. move the R/W head

Each device has I/O ports for a command/ status/ data read and data write register OS can write a command (say Write), write the data into the data write register and keep looking at the status register to see when write completes: POLLING Or OS can write command and write data and disk can INTERRUPT it when data has been written Use DMA to transfer multiple bytes between disk and memory; Interrupt CPU after transferring a block of bytes

Types of I/O Synchronous: Process which requested I/O is put in wait queue. Back to run queue when I/O completes Asynchronous: I/O system call returns immediately even without any data having been transferred

Filesystems Present an interface to the disk storage with filenames, protection, organization into directories … Major filesystem functions: 1.Map filename to areas on the disk 2.Manage free blocks on the disk

Disk Allocation Each file has some ‘header’ information, including disk block information Contiguous allocation: header has starting block and number of blocks Scattered allocation: header has to have each block number

Unix/Linux Implementation File header = inode Each partition is divided into block groups (BG), usually groups of adjacent cylinders on disk BGs reduce fragmentation; kernel tries to keep data blocks of a file in a single BG

Block Groups Data Block Bitmap: Free space management Inode Table: List of inodes in the BG Inodes provide mapping between file offset (file block number) and disk block number (logical block number)

Inodes File Blk No. 0 1 Logical Blk No. Single Indirect Double Indirect Triple Indirect Direct Disk Blocks

Speeding up things Read-Ahead: Read adjacent data ahead of time; store in cache Data block allocation: Allocate block near previously allocated blocks/ same BG as inode/ other BGs Pre-allocation: Allocate more (upto 8 adjacent) blocks than requested

RAID Redundant Array of Independent Disks Advantages 1.Reliability: Redundant copies/ Error correction information 2.Performance: Parallel/ Striped transfer

RAID levels RAID 0 Non-redundant striping + Striping improves I/O transfer rate -No reliability improvement RAID 1 Disk mirroring + High reliability + Parallel reads - High cost

RAID levels RAID 2 Memory style Error Correction Code; Bit- level striping + Reliability at a possibly lower cost -Parity calculation overhead for writes RAID 3/RAID 4 Byte/Block interleaved parity + Reliability with only 1 extra disk for parity - Parity calculation for each write; overload parity disk

RAID levels RAID 5/ RAID 6 Distributed parity + Parity load distributed + RAID 6 can recover from multi-disk failures Nested RAID RAID 0+1 RAID 1+0