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

Similar documents
V. Mass Storage Systems

Chapter 10: Mass-Storage Systems

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

CS3600 SYSTEMS AND NETWORKS

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

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

Chapter 12: Mass-Storage

CS420: Operating Systems. Mass Storage Structure

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

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

Module 13: Secondary-Storage Structure

Chapter 10: Mass-Storage Systems

EIDE, ATA, SATA, USB,

MASS-STORAGE STRUCTURE

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

CS370 Operating Systems

Mass-Storage Structure

Disk Scheduling. Based on the slides supporting the text

Chapter 14: Mass-Storage Systems. Disk Structure

Mass-Storage Structure

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

Chapter 13: Mass-Storage Systems. Disk Structure

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

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

Chapter 11: Mass-Storage Systems

Overview of Mass Storage Structure

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

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

Free Space Management

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

Mass-Storage Systems

Chapter 14: Mass-Storage Systems

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

Module 13: Secondary-Storage

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

Chapter 10: Mass-Storage Systems

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

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

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

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

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

Tape pictures. CSE 30341: Operating Systems Principles

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

Silberschatz, et al. Topics based on Chapter 13

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

CS370 Operating Systems

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

Chapter 14: Mass-Storage Systems

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

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

CS370 Operating Systems

Chapter 12: Mass-Storage Systems

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

Lecture 9. I/O Management and Disk Scheduling Algorithms

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

Chapter 14 Mass-Storage Structure

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

UNIT-7. Overview of Mass Storage Structure

CSE Opera+ng System Principles

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

Mass-Storage. ICS332 Operating Systems

Today: Secondary Storage! Typical Disk Parameters!

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

Overview of Mass Storage Structure

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

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

I/O Systems and Storage Devices

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

Chapter 7: Mass-storage structure & I/O systems. Operating System Concepts 8 th Edition,

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

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

CSE 380 Computer Operating Systems

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

Storage and File Structure. Classification of Physical Storage Media. Physical Storage Media. Physical Storage Media

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

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

OPERATING SYSTEMS CS3502 Spring Input/Output System Chapter 9

Operating Systems 2010/2011

UNIT 4 Device Management

Ch 11: Storage and File Structure

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

CMSC 424 Database design Lecture 12 Storage. Mihai Pop

Storage. CS 3410 Computer System Organization & Programming

Introduction to I/O and Disk Management

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

Introduction to I/O and Disk Management

Database Systems II. Secondary Storage

CSE380 - Operating Systems. Communicating with Devices

Unit 3: Storage Management

Computer System Architecture

Disks and RAID. CS 4410 Operating Systems. [R. Agarwal, L. Alvisi, A. Bracy, E. Sirer, R. Van Renesse]

Physical Storage Media

Storage Systems. Storage Systems

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

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

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

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

CSE380 - Operating Systems

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

Transcription:

Che-Wei Chang chewei@mail.cgu.edu.tw Department of Computer Science and Information Engineering, Chang Gung University

l Chapter 10: File System l Chapter 11: Implementing File-Systems l Chapter 12: Mass-Storage Structure l Chapter 13: I/O Systems l Chapter 14: System Protection l Chapter 15: System Security 2

} Overview of Mass Storage Structure } Disk Structure } Disk Attachment } Disk Scheduling } Disk Management } Swap-Space Management } RAID Structure 3

} Magnetic disks provide bulk of secondary storage of modern computers Drives rotate at 60 to 250 times per second Transfer rate is rate at which data flow between drive and computer Positioning time (random-access time) is time to move disk arm to desired cylinder (seek time) and time for desired sector to rotate under the disk head (rotational latency) } Drive attached to computer via I/O bus Busses vary, including ATA, SATA, USB, SCSI, SAS, Firewire Host controller in computer uses bus to talk to disk controller 4

} Nonvolatile memory used like a hard drive Many technology variations } Can be more reliable than HD } More expensive than HD Less capacity But much faster } May have shorter life span } Busses can be too slow } No moving parts, so no seek time or rotational latency 5

} Early secondary-storage medium } Relatively permanent and holds large quantities of data } Random access ~1000 times slower than disk } Mainly used for backup, storage of infrequently-used data, transfer medium between systems } Once data under head, transfer rates comparable to disk 140MB/sec or greater 6

track t spindle sector s arm assembly The size of a sector is from 512B to 4KB cylinder c read-write head platter arm rotation 7

} Constant Linear Velocity (CLV) The outermost track typically hold 40 percent more sectors than the innermost track The drive increases its rotation speed as the head moves from the outer to the inner tracks The same rate of data moving is kept CD and DVD adopt this approach } Constant Angular Velocity (CAV) All tracks have the same number of sectors Tracks have different densities of sectors The same rate of data moving is kept HD adopts this approach 8

} Host-Attached Storage Storage is accessed through I/O ports talking to I/O busses } Network-Attached Storage (NAS) NAS is storage made available over a network rather than over a local connection (such as a bus) } Storage-Area Network (SAN) SAN is a private network using storage protocols rather than networking protocol connecting servers and storage units storage array storage array tape library SAN server server data-processing center web content provider LAN/ WAN client client client 9

} The disk I/O request specifies several pieces of information: Whether this operation is input or output What the disk address for the transfer is What the memory address for the transfer is What the number of sectors to be transferred is } When there are multiple request pending, a good disk scheduling algorithm is required Fairness: which request is the most urgent one Performance: sequential access is preferred Cylinders Requests 1 2 3 4 5 6 7 5 7 2 6 4 1 3 Resort the requests? 10

} Access Latency = Average access time = average seek time + average rotation latency For fastest disk 3ms + 2ms = 5ms For slow disk 9ms + 5.56ms = 14.56ms } Average I/O time = average access time + (amount to transfer / transfer rate) + controller overhead 11

} FCFS: first come, first serve } FCFS scheduling is fair but might with low throughput 12

} SSTF: shortest seek time first } SSTF scheduling serves the request with shortest seek time 13

} SCAN scheduling (also called the elevator algorithm) starts at one end and moves toward the other end The head is at A request is at Long Waiting Time 14

} C-SCAN (Circular SCAN) scheduling starts at only one end and provides a more uniform wait time than SCAN scheduling 15

} LOOK scheduling starts at one end and moves toward the other end, and looks for a request before continuing to move in a given direction } C-LOOK scheduling starts at only one end, and looks for a request before continuing to move in a given direction } Arm only goes as far as the last request in each direction, then reverses direction immediately, without first going all the way to the end of the disk 16

C-SCAN C-LOOK Reduce the moving time 17

} SSTF is common and has a natural appeal } SCAN and C-SCAN perform better for systems that place a heavy load on the disk Less starvation } Requests for disk service can be influenced by the fileallocation method } The disk-scheduling algorithm should be written as a separate module of the operating system, allowing it to be replaced with a different algorithm if necessary } Either SSTF or LOOK is a reasonable choice for the default algorithm } FCFS is good for SSD 18

} Low-level formatting, or physical formatting Dividing a disk into sectors that the disk controller can read and write Each sector can hold header information, plus data, plus error correction code (ECC) Usually 512 bytes of data but can be selectable } Partition the disk into one or more groups of cylinders, each treated as a logical disk } Logical formatting making a file system To increase efficiency most file systems group blocks into clusters Disk I/O done in blocks File I/O done in clusters } Raw disk access for apps that want to do their own block management, keep OS out of the way (databases for example) 19

ROM BIOS/UEFI BIOS: Basic Input Output System UEFI: Unified Extensible Firmware Interface Filesystems Boot Block Super Block i-list dir/data blocks 20

} A bad block: some bits of data in the block is corrupted } Soft error: a bad block can be recovered by ECC } Hard error: a bad block results in lost data } Spared sectors are for bad block replacement For example, one spared sector per 100 normal sector, let 97 th block is a bad block Sector sparing: Use the spared sector to replace the 97 th block Sector slipping: 97à98, 98à99, 99à100, 100àspared sector 21

} Swap-space: virtual memory uses disk space as an extension of main memory Less common now due to memory capacity increases } Swap-space can be carved out of the normal file system, or, more commonly, it can be in a separate disk partition (raw) } Some systems allow multiple swap spaces 22

page slot swap area swap partition or swap file One for each swap area swap map 1 0 3 0 1 Mapped page 1 Free Mapped page 3 23

} RAID: redundant array of inexpensive disks Multiple disk drives provides reliability via redundancy RAID Increases the mean time to data loss } Mean time to failure: the average time for the first hard error } Mean time to repair: the exposure time when another failure could cause data loss } Mean time to data loss: the average time for the first data loss } If mirrored disks fail independently, consider each disk with 100,000 hours mean time to failure and 10 hours mean time to repair Mean time to failure of any of the two disks: 100,000/2 = 50,000 The possibility for another disk to fail within the 10 hours: 10/100,000 Mean time to data loss is 5 10 8 hours, or 57,000 years! 24

} Bit-level striping Bit-level striping can be generalized to include a number of disks that either is a multiple of 8 or divides 8 For example, if we use an array of four disks, bits i and 4 + i of each byte go to disk i } Block-level striping blocks of a file are striped across multiple disks For example, with n disks, block i of a file goes to disk (i mod n) + 1 25

} RAID schemes improve performance and improve the reliability of the storage system by storing redundant data Mirroring or shadowing (RAID 1) keeps duplicate of each disk Striped mirrors (RAID 1+0) or mirrored stripes (RAID 0+1) provides high performance and high reliability } Block interleaved parity (RAID 4, 5, 6) uses much less redundancy } Frequently, a small number of hot-spare disks are left unallocated, automatically replacing a failed disk and having data rebuilt onto them 26

In the figures, P indicates error-correcting bits and C indicates a second copy of the data (d) RAID 3: bit-interleaved parity. P P (a) RAID 0: non-redundant striping. (e) RAID 4: block-interleaved parity. (b) RAID 1: mirrored disks. C C C C P P P P P (f) RAID 5: block-interleaved distributed parity. P P P P P P P P P P P P P (c) RAID 2: memory-style error-correcting codes. (g) RAID 6: P Q redundancy. 27

One Fail Four Offline stripe x mirror stripe a) RAID 0 1 with a single disk failure. One Fail One Offline x stripe mirror mirror mirror mirror b) RAID 1 0 with a single disk failure. 28