Disks.

Slides:



Advertisements
Similar presentations
I/O Management and Disk Scheduling
Advertisements

Magnetic Disk Magnetic disks are the foundation of external memory on virtually all computer systems. A disk is a circular platter constructed of.
- Dr. Kalpakis CMSC Dr. Kalpakis 1 Outline In implementing DBMS we need to answer How should the system store and manage very large amounts of data?
CS 6560: Operating Systems Design
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
RAID and Other Disk Details
Other Disk Details. 2 Disk Formatting After manufacturing disk has no information –Is stack of platters coated with magnetizable metal oxide Before use,
CS 333 Introduction to Operating Systems Class 16 – Secondary Storage Management Jonathan Walpole Computer Science Portland State University.
Based on the slides supporting the text
Fig 5-5 Interrupts Handling
CS 333 Introduction to Operating Systems Class 16 – Secondary Storage Management Jonathan Walpole Computer Science Portland State University.
Operating Systems File systems
12: IO Systems1 I/O SYSTEMS This Chapter is About Processor I/O Interfaces: Connections exist between processors, memory, and IO devices. The OS must manage.
Secondary Storage CSCI 444/544 Operating Systems Fall 2008.
Operating Systems COMP 4850/CISG 5550 Disks, Part II Dr. James Money.
Servers Redundant Array of Inexpensive Disks (RAID) –A group of hard disks is called a disk array FIGURE Server with redundant NICs.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
Disk and I/O Management
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
CS 352 : Computer Organization and Design University of Wisconsin-Eau Claire Dan Ernst Storage Systems.
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.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
Sistem Operasi IKH311 Masukan Luaran (Input/Output)
1Fall 2008, Chapter 12 Disk Hardware Arm can move in and out Read / write head can access a ring of data as the disk rotates Disk consists of one or more.
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.
Silberschatz, Galvin and Gagne  Operating System Concepts Chapter 14: Mass-Storage Systems Disk Structure Disk Scheduling Disk Management Swap-Space.
The concept of RAID in Databases By Junaid Ali Siddiqui.
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
Disk storage systems Question#1 (True/False) A track is divided into multiple units called sectors.
CS399 New Beginnings Jonathan Walpole. Disk Technology & Secondary Storage Management.
M ASS S TORAGE S TRUCTURES Lecture: Operating System Concepts Lecturer: Pooja Sharma Computer Science Department, Punjabi University, Patiala.
1 CEG 2400 Fall 2012 Network Servers. 2 Network Servers Critical Network servers – Contain redundant components Power supplies Fans Memory CPU Hard Drives.
Part IV I/O System Chapter 12: Mass Storage Structure.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
Magnetic Disks Have cylinders, sectors platters, tracks, heads virtual and real disk blocks (x cylinders, y heads, z sectors per track) Relatively slow,
© Janice Regan, CMPT 300, May CMPT 300 Introduction to Operating Systems DISK I/0.
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Multiple Platters.
Disks and RAID.
RAID Non-Redundant (RAID Level 0) has the lowest cost of any RAID
I/O System Chapter 5 Designed by .VAS.
Chapter 12: Mass-Storage Structure
I/O Resource Management: Software
Operating System I/O System Monday, August 11, 2008.
Disk Scheduling Algorithms
Mass-Storage Structure
Lecture 45 Syed Mansoor Sarwar
Chapter 14 Based on the slides supporting the text
Device Management Damian Gordon.
RAID RAID Mukesh N Tekwani
Operating Systems (CS 340 D)
CS510 Operating System Foundations
Overview Continuation from Monday (File system implementation)
Jonathan Walpole Computer Science Portland State University
Computers: Tools for an Information Age
Disks and scheduling algorithms
Secondary Storage Management Brian Bershad
Disks and Storage Systems
Secondary Storage Management Hank Levy
CS333 Intro to Operating Systems
RAID RAID Mukesh N Tekwani April 23, 2019
Hard disk basics Prof:R.CHARLES SILVESTER JOE Departmet of Electronics St.Joseph’s College,Trichy.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Disks Magnetic (hard) Disk arrays are used for reliable storage (RAID)
Seminar on Enterprise Software
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Presentation transcript:

Disks

Disks.. Magnetic Disks.. Most common (magnetic hard disks) Reads and writes are equally fast. Arrays of these disks are used to provide highly reliable storage. Increasingly popular as they are fast and do not contain moving parts. Magnetic Disks.. What is a magnetic disk and how it works

RAID (Redundant Array of Inexpensive Disks).. RAID is a data storage virtualization technology that combines multiple physical disk drive components into a single logical unit for the purposes of data redundancy, performance improvement, or both. Data is distributed across the drives in one of the several ways, referred as RAID levels depending on the level of redundancy & performance. Each RAID level provides different balance among the key goals; reliability, availability, performance, and capacity. RAID levels greater than RAID 0 provide protection against unrecoverable sector read errors, and also against failures of whole physical drives. RAID levels video

Disk Formatting.. Preparing a disk drive for data storage involves three steps: Low - level formatting (physical) Partitioning High - level formatting (logical)

Low - level formatting.. Sequentially number tracks and sectors Identifies each track and sector Disk is physically prepared to hold data

Partitioning.. Partitioning a disk is the act of defining areas of the disk for an operating system to use. Partitioning is required because a hard disk is designed to be used with more than one operating system. Partitioning enable a single operating system to use the disk as several volumes or logical drives.

High - level formatting.. A part of the system area is called the “Master boot sector”. This is the process of creating the disk's logical structures such as the file allocation table and root directory. The Master boot sector is: Always the first sector (sector 0) of the first track (track 0) of the first cylinder (cylinder 0) disk. 512 bytes long, just like any other sector Contains information on all logical drives, regardless of whether they are bootable.

How Data is Organized on Disk.. Tracks: Circular areas of the disk Length of a track one circumference of disk Over 1000 on a hard disk Data first written to outer most track Sectors: Divides tracks sections Cylinders: Logical groupings of the the same track on each disk surface in a disk unit Clusters: Groups of sectors used by operating system

What are the three steps of preparing a disk drive for data storage?.. Preparing a disk drive for data storage involves three steps: Low - level formatting (physical) Partitioning High - level formatting (logical)

Disk Arm Scheduling Algorithms.. Three factors that determine the time required to read or write a disk block: Seek time (the time to move the arm to the proper cylinder). Rotational delay (how long for the proper sector to appear under the reading head). Actual data transfer time. For most disk , the seek time dominates the other times, so reducing the mean seek time can improve system performance substantially.

First Come First Served (FCFS).. The disk driver accepts requests one at a time and carries them out in the in that order. Least efficient

Cylinder Index Table 1 2 3 4 5 6 7 8 9 Block 2 Block 3 Block 4 Block 5 Block 16 Block 17 Block 18 Block 0 Block 1 Block 20 Block 21 Block 22 Block 23 Block 1 Block 2 Block 3 Block 5 Block 6 Block 30 Block 31 Block 32 Block 33 Block 10 Block 11 Block 12 Block 13 Block 19 Block 23 Block 24

Shortest Seek First Cylinder requests: 12, 9, 16, 1, 34, 36 Sequence: 12, 9, 16, 1, 34, 36 Figure 5-28. Shortest Seek First (SSF) disk scheduling algorithm. Arm motions: 1, 3, 7, 15, 33, 2 equaling a total of 61 cylinders.

Elevator algorithm Cylinder requests: 12, 9, 16, 1, 34, 36 Sequence: 12, 16, 34, 36, 9 , 1 Figure 5-29. The elevator algorithm for scheduling disk requests. Arm motions: 1, 4, 18, 2, 27, 8 equaling a total of 60 cylinders.

Error Handling.. It is not possible to manufacture a disk to such specifications without defects. As technology improves, designers will increase capacity by going to higher densities. If the defect is bigger the error cannot be masked Errors can during normal operation, usually after the drive has been installed.

Two approaches to handling errors.. Handle in controller If the controller cannot remap sectors, the operating system must do the same thing in software. Once it knows which sectors are bad it can build remapping tables Handle in operator Make sure that bad sectors do not occur in any files

Stable Storage Everyone is happier when there data hasn’t been lost. Just look at this lady.

Stable Storage As you may know, disks sometimes make errors. Good sectors can suddenly become bad sectors. Whole drives can die unexpectedly. For some applications, it is essential that data never be lost or corrupted, even with errors. Ideally, a disk should simply work all the time with no errors. Unfortunately, that is not achievable. What is achievable is a disk subsystem that has the following property: when a write is issued to it, the disk either correctly writes the data or it does nothing, leaving the existing data intact. Such a system is called stable storage and is implemented in software .

Stable Storage Goal The goal is to keep the disk consistent at all costs. The model assumes that when a disk writes a block (one or more sectors), either the write is correct or it is incorrect. The errors can be detected on a subsequent read by examining the values of the ECC(error correction code) fields.

Stable Storage Assumptions The model assumes the CPU can fail, in which case it just stops Any disk write in progress at the moment of failure also stops, leading to incorrect data in one sector. This can be detected later. Under all these conditions, stable storage can be made 100% reliable, where the data either writes correctly or leaves the old data in place.

Stable Storage Does Not Protect Against.. Physical disasters or an upset girlfriend.

How it works Stable storage uses a pair of identical disks with the corresponding blocks working together to form one error-free block. STABLE WRITES: A stable write consists of first writing the block on drive 1, then drive 2 STABLE READS: A stable read first reads the block from drive 1, if the read fails after n attempts it is read from drive 2 CRASH RECOVERY: After a crash, a recovery program scans both disks comparing corresponding blocks.If one of them has an ECC error, the bad block is overwritten with the corresponding good block.

If the CPU crashes during stable writes? Depending on when the crash occurs there are five possibilities.

Works Cited Tanenbaum, Andrew S. Modern operating systems. Boston: Pearson, 2015. Print.