Operating Systems. Mass-Storage Structure Based on Ch of OS Concepts by SGG

Similar documents
Che-Wei Chang Department of Computer Science and Information Engineering, Chang Gung University

Chapter 12: Mass-Storage

Chapter 10: Mass-Storage Systems

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

CISC 7310X. C11: Mass Storage. Hui Chen Department of Computer & Information Science CUNY Brooklyn College. 4/19/2018 CUNY Brooklyn College

V. Mass Storage Systems

Mass-Storage Structure

CSE325 Principles of Operating Systems. Mass-Storage Systems. David P. Duggan. April 19, 2011

CS3600 SYSTEMS AND NETWORKS

CS370 Operating Systems

Chapter 10: Mass-Storage Systems

Module 13: Secondary-Storage Structure

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

Mass-Storage Systems. Mass-Storage Systems. Disk Attachment. Disk Attachment

Chapter 10: Mass-Storage Systems

MASS-STORAGE STRUCTURE

CS420: Operating Systems. Mass Storage Structure

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

Chapter 12: Secondary-Storage Structure. Operating System Concepts 8 th Edition,

Mass-Storage. ICS332 - Fall 2017 Operating Systems. Henri Casanova

Tape pictures. CSE 30341: Operating Systems Principles

Chapter 13: Mass-Storage Systems. Disk Scheduling. Disk Scheduling (Cont.) Disk Structure FCFS. Moving-Head Disk Mechanism

Chapter 13: Mass-Storage Systems. Disk Structure

Chapter 14: Mass-Storage Systems. Disk Structure

I/O, Disks, and RAID Yi Shi Fall Xi an Jiaotong University

Mass-Storage Structure

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

Mass-Storage. ICS332 Operating Systems

Part IV I/O System. Chapter 12: Mass Storage Structure

Chapter 10: Mass-Storage Systems. Operating System Concepts 9 th Edition

Disk scheduling Disk reliability Tertiary storage Swap space management Linux swap space management

Chapter 14: Mass-Storage Systems

Today: Secondary Storage! Typical Disk Parameters!

Chapter 14: Mass-Storage Systems

Disk Scheduling. Based on the slides supporting the text

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

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

EI 338: Computer Systems Engineering (Operating Systems & Computer Architecture)

Chapter 14 Mass-Storage Structure

Module 13: Secondary-Storage

CS370 Operating Systems

UNIT 4 Device Management

Chapter 12: Mass-Storage Systems. Operating System Concepts 9 th Edition

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition

Chapter 11: Mass-Storage Systems

Ricardo Rocha. Department of Computer Science Faculty of Sciences University of Porto

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

Disk Scheduling. Chapter 14 Based on the slides supporting the text and B.Ramamurthy s slides from Spring 2001

Part IV I/O System Chapter 1 2: 12: Mass S torage Storage Structur Structur Fall 2010

CSE 120. Operating Systems. March 27, 2014 Lecture 17. Mass Storage. Instructor: Neil Rhodes. Wednesday, March 26, 14

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

Silberschatz, et al. Topics based on Chapter 13

Chapter 12: Mass-Storage Systems

Lecture 9. I/O Management and Disk Scheduling Algorithms

CS370: System Architecture & Software [Fall 2014] Dept. Of Computer Science, Colorado State University

Chapter 12: Mass-Storage Systems. Operating System Concepts 8 th Edition,

UC Santa Barbara. Operating Systems. Christopher Kruegel Department of Computer Science UC Santa Barbara

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

CS370 Operating Systems

CS370: Operating Systems [Fall 2018] Dept. Of Computer Science, Colorado State University

EIDE, ATA, SATA, USB,

Overview of Mass Storage Structure

CS370: Operating Systems [Spring 2017] Dept. Of Computer Science, Colorado State University

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

CSE 380 Computer Operating Systems

CHAPTER 12: MASS-STORAGE SYSTEMS (A) By I-Chen Lin Textbook: Operating System Concepts 9th Ed.

Free Space Management

Disks. Storage Technology. Vera Goebel Thomas Plagemann. Department of Informatics University of Oslo

CHAPTER 12 AND 13 - MASS-STORAGE STRUCTURE & I/O- SYSTEMS

Lecture 29. Friday, March 23 CS 470 Operating Systems - Lecture 29 1

Chapter-6. SUBJECT:- Operating System TOPICS:- I/O Management. Created by : - Sanjay Patel

Mass-Storage Systems

Operating Systems 2010/2011

I/O Management and Disk Scheduling. Chapter 11

CSE 120. Overview. July 27, Day 8 Input/Output. Instructor: Neil Rhodes. Hardware. Hardware. Hardware

Introduction. Operating Systems. Outline. Hardware. I/O Device Types. Device Controllers. (done)

File. File System Implementation. File Metadata. File System Implementation. Direct Memory Access Cont. Hardware background: Direct Memory Access

Chapter 5: Input Output Management. Slides by: Ms. Shree Jaswal

CSE 153 Design of Operating Systems

Introduction to I/O and Disk Management

Introduction to I/O and Disk Management

Disk Scheduling COMPSCI 386

I/O Systems and Storage Devices

Operating Systems. Designed and Presented by Dr. Ayman Elshenawy Elsefy

UNIT-7. Overview of Mass Storage Structure

STORAGE SYSTEMS. Operating Systems 2015 Spring by Euiseong Seo

CSE 153 Design of Operating Systems Fall 2018

Chapter 11. I/O Management and Disk Scheduling

10. Mass-Storage Structure

I/O & Storage. Jin-Soo Kim ( Computer Systems Laboratory Sungkyunkwan University

File. File System Implementation. Operations. Permissions and Data Layout. Storing and Accessing File Data. Opening a File

I/O Device Controllers. I/O Systems. I/O Ports & Memory-Mapped I/O. Direct Memory Access (DMA) Operating Systems 10/20/2010. CSC 256/456 Fall

Lecture 16: Storage Devices

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

CSE380 - Operating Systems. Communicating with Devices

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

IST346. Data Storage

Introduction. Secondary Storage. File concept. File attributes

Chapter 6. Storage and Other I/O Topics

Transcription:

Operating Systems Mass-Storage Structure Based on Ch. 10-11 of OS Concepts by SGG

Mass Storage Devices Disks A r/w head flies above the spinning disk Each disk is divided into tracks and each track in sectors A set of track on different platters is a cylinder Rotational velocity is important. Most drive 7200, 10,000 or 15,000 rpm Positioning time is seek time plus rotational latency SSDs No moving parts, but finite number of r/w ops Smaller, faster (recently), cooler, quieter than HDDs Zero positioning time, huge transfer rates

Busses ATA: Antedeluvian Technology Attachment SATA: Serial ATA (6Gb/s, ~600MB/s) M.2: several times faster than SATA depending on configuration PCIe: up to 32Gb/s esata: external SATA USB: 10Gb/s (for 3.1)

Disk Structure Disk space is split into blocks (512byte is common) Blocks are mapped onto sectors Mapping is almost one-to-one We have to skip defective sectors We have to arrange for replacement sectors We have to keep the info about replacement sectors Mapping gets trickier for disks that do not have the same number of sectors per cylinder

Disk Attachment Host-Attached Storage Disks, RAIDs, DVD-ROMs, etc All in the same box Network Attached Storage Disks are somewhere on a (local area) network Shared by many computers Used with NFS, SSHFS, SMB (CIFS) Storage Area Network Uses a special purpose network just for file serving Several disk arrays and file servers connected to it Usually uses Fiber Channel.

Disk Scheduling Seek time and rotational latency are important factors in the overall latency on disks We can minimize them by reordering the outstanding requests Avoid having the disk head go in and out like mad Not different than an elevator.

FCFS Fair but inefficient Can even lead to premature failure is the first and last disk are addressed alternatively

Shortest Seek Time First Selects the next destination to be the closest Performs very well, but it is not optimal Can suffer from starvation

SCAN, C-SCAN, LOOK, C-LOOK With SCAN we sweep from the first cylinder to the last and back servicing requests on the way C-SCAN (Circular), like scan but service requests only in the forward direction (more uniform waiting time) LOOK: Like SCAN but we go only to the last cylinder in the current direction C-LOOK: Circular-LOOK.

Selecting Disk Scheduling Algorithm None is optimal For very low traffic, all are more or less the same For medium traffic SSTF has an advantage For heavy traffic LOOK et al exhibit no starvation.

Disk Formatting Low level formatting Usually at the factory Involves setting up headers/trailers, with ECC Identification of bad blocks High level formatting Partitioning the disk Setting up filesystems on partitions FS like vfat, ext4, btrfs, raiserfs Raw or swap space

MBR Master Boot Record Microsoft term Contains the partition table, boot code Identifies the boot partition

Boot Sequence The computer when powered up starts executing from its ROM The ROM is traditionally tiny The code mainly identifies the disks and other devices and selects where to boot from The device must have at least a valid MBR

Bad Blocks Almost every disk has a few bad blocks These are identified and replacements (spares) are used. Two techniques are used: Replace the bad block with a spare Neat but results in blocks being out of order Shift all blocks between the bad and the spare by one position Preserves the order but need shifting (copying)

Swap space Every frame in the memory can be mapped to the disk in two ways If it is a memory-map from a (named) file (eg from a.so file) it is mapped to the original (named) file All other frames (the anonymous memory) are mapped to the swap space The swap space can be of two kinds A partition on the disk A large file created to act as swap space (swapon command)

RAID Redundant Array of Independent Disks A medium system with 100 disks, if each disk has MTBF 100,000 hours, will fail every 1000 hours (about a month and a half) A home system with 2 disks, if each disk has MTBF 100,000 hours, will fail every about 5 years.

RAID for Safety Mirroring is the simplest approach The system will fail if the second disk fails while we recover the data of the first If MTBF is 100,000h And MTTR is 10h We get one recoverable fail every 50,000h And a fatal fail every 500,000,000h (50 centuries)

RAID for Performance We can use stripping If we have 8 disks we sore one bit of every byte on different disks. This is bit level stripping. We can increase the (read) transfer rate 8 times The positioning time goes up, since the positioning time of the RAID is the positioning time of the slowest When we write we involve all disks We can also have byte level and block level stripping.

RAID Levels RAID 0: just stripping RAID 1: just mirroring RAID 2: ECC redundancy RAID 3: bit interleaved parity RAID 4: block interleaved parity RAID 5: block interleaved distributed parity RAID 6: like 5 but can handle 2 errors RAID 01 or 10: stripping and mirroring

Implementing RAID Hardware (Host Bus Adapter), motherboard, or special disk array Kernel based SAN

Problems with RAID Most disk problems happen around power failures, during boot, natural disasters, etc Disks from the same batch often fail together No protection against corruption by faulty software

Operating Systems File System Interface Based on Ch. 11 of OS Concepts by SGG

File Attributes Name File ID Type Location Size Protection Time, date, etc User

Extended File Attributes Application that created the file Icon

File Operations Read Write Create Delete Truncate Reposition Lock (shared/exclussive, advisory/mandatory) To make these more efficient we also have open/close

File types These used to be many Linux keeps it to a minimum Regular, directory, symbolic link, device, pipe, etc Windows has more

Directories The filesystem is a reliable name-space It is a graph Tree DAG for the adventurous General graph for the suicidal Can have hard links to create cycles

Mounting We attach disks with filesystems on our namespace Windows is simple: C: D: etc Linux is very sophisticated Can attach on file-filesystems too Kernel structures Remote systems etc

Protection In Linux we use owner, group, other to group users Read, Write Execute to group actions Simple but try to use it to implement Moodle.