Mass Storage Systems. Readings r Chapter 12.1-12.4, 12.7.

Slides:



Advertisements
Similar presentations
I/O Systems & Mass-Storage Systems
Advertisements

Chapter 6 I/O Systems.
IT253: Computer Organization
Overview of Mass Storage Structure
Silberschatz, Galvin and Gagne Operating System Concepts Disk Scheduling Disk IO requests are for blocks, by number Block requests come in an.
Chapter 12: Secondary-Storage Structure. Outline n Cover n (Magnetic) Disk Structure n Disk Attachment n Disk Scheduling Algorithms l FCFS,
I/O Management and Disk Scheduling Chapter 11. I/O Driver OS module which controls an I/O device hides the device specifics from the above layers in the.
I/O Management and Disk Scheduling
Operating Systems Disk Scheduling A. Frank - P. Weisberg.
Faculty of Information Technology Department of Computer Science Computer Organization Chapter 7 External Memory Mohammad Sharaf.
Mass-Storage Structure
CS 6560: Operating Systems Design
Disk Scheduling Based on the slides supporting the text 1.
Operating Systems ECE344 Ashvin Goel ECE University of Toronto Disks and RAID.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised Tao Yang.
Chapter 12: Mass-Storage Structures
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Lecture 17 I/O Optimization. Disk Organization Tracks: concentric rings around disk surface Sectors: arc of track, minimum unit of transfer Cylinder:
1 Chapter 6 Storage and Multimedia: The Facts and More.
1 Lecture 26: Storage Systems Topics: Storage Systems (Chapter 6), other innovations Final exam stats:  Highest: 95  Mean: 70, Median: 73  Toughest.
Based on the slides supporting the text
1 Disk Scheduling Chapter 14 Based on the slides supporting the text.
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.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised Tao Yang.
1 Today I/O Systems Storage. 2 I/O Devices Many different kinds of I/O devices Software that controls them: device drivers.
RAID Systems CS Introduction to Operating Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Mass Storage System EMELIZA R. YABUT MSIT. Overview of Mass Storage Structure Traditional magnetic disks structure ◦Platter- composed of one or more.
12.1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts with Java – 8 th Edition Chapter 12: Mass-Storage Systems.
CS 346 – Chapter 10 Mass storage –Advantages? –Disk features –Disk scheduling –Disk formatting –Managing swap space –RAID.
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.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts – 9 th Edition Chapter 10: Mass-Storage Systems.
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.
Lecture 9 of Advanced Databases Storage and File Structure (Part II) Instructor: Mr.Ahmed Al Astal.
Copyright ©: Nahrstedt, Angrave, Abdelzaher, Caccamo1 Disk & disk scheduling.
Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition, Chapter 12: Mass-Storage Systems.
Disk Structure Disk drives are addressed as large one- dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts Chapter 12: Mass-Storage Systems Overview of Mass.
Page 110/12/2015 CSE 30341: Operating Systems Principles Network-Attached Storage  Network-attached storage (NAS) is storage made available over a network.
Chapter 12: Mass-Storage Systems Silberschatz, Galvin and Gagne ©2005 Operating System Concepts – 7 th Edition, Jan 1, 2005 Chapter 12: Mass-Storage.
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.
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.
Chapter 12 – Mass Storage Structures (Pgs )
Chapter 5 Input/Output 5.1 Principles of I/O hardware
Operating Systems (CS 340 D) Princess Nora University Faculty of Computer & Information Systems Computer science Department.
Chapter 14: Mass-Storage Systems Disk Structure. Disk Scheduling. RAID.
Device Management Mark Stanovich Operating Systems COP 4610.
Part IV I/O System Chapter 12: Mass Storage Structure.
Silberschatz, Galvin and Gagne ©2013 Operating System Concepts Essentials – 2 nd Edition Chapter 9: Mass-Storage Systems.
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,
CS Introduction to Operating Systems
Chapter 10: Mass-Storage Systems
Operating System (013022) Dr. H. Iwidat
Multiple Platters.
Disks and RAID.
I/O System Chapter 5 Designed by .VAS.
Chapter 12: Mass-Storage Structure
Operating System I/O System Monday, August 11, 2008.
Disk Scheduling Algorithms
Mass-Storage Structure
Chapter 14 Based on the slides supporting the text
Chapter 12: Mass-Storage Systems
Overview Continuation from Monday (File system implementation)
Disks and scheduling algorithms
Mass-Storage Systems.
Disk Scheduling The operating system is responsible for using hardware efficiently — for the disk drives, this means having a fast access time and disk.
Presentation transcript:

Mass Storage Systems

Readings r Chapter , 12.7

Long-term Information Storage Three essential requirements: Must store large amounts of data Information stored must survive the termination of the process using it (persistence) Multiple processes must be able to access the information concurrently

Examples of Mass Storage Srucutures r Magnetic disks provide the bulk of secondary storage for modern computer systems (structure on next page) r Magnetic tape was used as an early secondary-storage medium m Slow compared to magnetic disks and memory m Can hold large amounts of data m Read data sequentially m Mainly used for backup

Moving-head Disk Mechanism

Disk Surface Layout r Tracks: concentric rings on platter (see above) m bits laid out serially on tracks r Tracks split into sectors r Sectors may be grouped into blocks r Addressable unit is typically a block

Disk Pack: Multiple Disks r Think of disks as a stack of platters r Use both sides of platters r Two read-write heads at end of each arm r Cylinders = matching sectors on each surface

Reading/Writing r Position the read/write heads over the correct cylinder r Rotate the disk platter until the desired sector is underneath the read/write head

Cost of Disk Operations r Access Time: Composed of the following: m Seek time: The time to position head over correct cylinder m Rotational time: The time for correct sector to rotate under disk head m Transfer time: The time to transfer data r Usually the seek time dominates r Reducing seek time can improve system performance substantially r Note: The transfer time for consecutive sectors within a track can be very fast

I/O Busses r A disk drive is attached to a computer by a set of wires called an I/O bus. r Types of busses available: m Enhanced integrated drive electrics (EDIE) m Advanced Technology Attachment (ATA) m Serial ATA (SATA) m Universal serial bus (USB) m Small computer-systems interface (SCI)

I/O Controllers r The data transfers on a bus are carried out by special electronic processors called controllers r The host controller is the controller at the computer end of the bus r A disk controller is built into each disk drive

I/O Controllers r To perform a disk I/O operation, the computer places a command into the host controller r The host controller sends command to the disk controller m The command either requests a read or write to a block/sector r The disk controller operates on the disk- drive hardware to carry out the command r Disk controllers have caches m Can write to cache and then to disk; writer can return before write to disk

Disk Attachment r The primary focus of the discussion has been on disks accessed through busses r Other types of storage can be accessed remotely over a data network

Networked Attached Storage r Network-attached storage (NAS) is storage made available over a network rather than over a local connection (such as a bus) r Often a set of disks (storage array) are placed together r NFS and CIFS are common protocols r Implemented via remote procedure calls (RPCs) between host and storage r Recent iSCSI protocosl uses IP network to carry the SCSI protocol

Network-Attached Storage

Storage Area Network r Common in large storage environments (and becoming more common) r Multiple hosts attached to multiple storage arrays - flexible

Disk Scheduling r The disk accepts requests m What sort of disk arm scheduling algorithm is needed? r The access time depends on the order in which disk I/O requests are serviced r I/O requests include information such as: m Is the operation input/output m Disk address m Memory address

Disk Scheduling: Data Structure r Software for disks maintain a table called the pending request table r Table is indexed by cylinder number r All requests for each cylinder are chained together in a linked list headed by the table entries

First-Come, First-Served (FCFS) order r Method m First come first serve r Pros m Fairness among requests m In the order applications expect r Cons m Arrival may be on random spots on the disk (long seeks) m Wild swings can happen , 183, 37, 122, 14, 124, 65, 67 53

SSTF ( Shortest Seek Time First ) r Method m Pick the one closest on disk m Rotational delay is in calculation r Pros m Try to minimize seek time r Cons m Starvation r Question m Is SSTF optimal? (No) m Can we avoid starvation? , 183, 37, 122, 14, 124, 65, 67 (65, 67, 37, 14, 98, 122, 124, 183) 53

Elevator (SCAN) r Method m Take the closest request in the direction of travel m Real implementations do not go to the end (called LOOK) r Pros m Bounded time for each request r Cons m Request at the other end will take a while , 183, 37, 122, 14, 124, 65, 67 (37, 14, 65, 67, 98, 122, 124, 183) 53

C-SCAN r Variant of SCAN r Like SCAN, C-SCAN moves the head from one end of the disk to the other r When the head reaches the other end, it immediately returns to the start of the disk without servicing requests on the return-trip

Optimization r Some disk controllers provide a way for the software to inspect the current sector number under the read r If there are two or more requests for the same cylinder that are pending: m The driver can issue a request for the sector that will pass under the head next m The information is known from the pending request table r Caching is needed to hold the additional data

Mass Storage r Many systems today need to store many large amounts of data m Can you say zettabytes? Don t want to use single, large disk m too expensive m failures could be catastrophic r Would prefer to use many smaller disks

RAID Structure r Using multiple disks attached to a computer system has these benefits: m Improve the rate at which data can be read or written m Improve reliability of data storage Redundant information can be stored on multiple disks r RAID – multiple disk drives provides reliability via redundancy.

RAID Structure r Improve performance via parallelism m Striping,mirroring r Improve reliability via information redundancy m Error correcting codes

Striping r Take file data and map it to different disks (interleaving) r Allows for reading data in parallel file datablock 1block 0block 2block 3 Disk 0Disk 1Disk 2Disk 3

Striping r Example m Assume you have 4 disks. m Bit interleaving means that bit N is on disk (N mod 4) m Byte interleaving means that byte N is on disk (N mod 4). m Block interleaving means that block N is on disk (N mod 4). r All reads and writes involve all disks, which is great for large transfers

Mirroring r Keep two copies of data on two separate disks r Gives good error recovery m if some data is lost, get it from the other source r Expensive m requires twice as many disks r Write performance can be slow m have to write data to two different spots r Read performance is enhanced m can read data from file in parallel

RAID Structure r Numerous schemes to provide redundancy at low cost and high performance have been proposed r These schemes are classified into RAID levels

RAID Levels

RAID Level-0 r Break a file into blocks of data r Stripe the blocks across disks in the system r Provides no redundancy or error detection r Uses m Some gaming systems where fast reads are required but minimal data integrity is needed

RAID Level-0 file datablock 1block 0block 2block 3block 4 Disk 0Disk 1 0 block 0 1 block 2 2 block sectors 0 block 1 1 block sectors

RAID Level 0 r No redundancy m No reliability m Loss of one disk means all is lost r Can be very fast since data is being accessed in parallel

RAID Level-1 r A complete file is stored on a single disk r A second disk contains an exact copy of the file r Provides complete redundancy of data r Lose one disk you are ok r Write performance suffers m Must write the data out twice r Most expensive RAID implementation m requires twice as much storage space

RAID Level-1 file datablock 1block 0block 2block 3block 4 Disk 0Disk 1 0 block 0 1 block 1 2 block 2 3 block 3 4 block 4 5 sectors 0 block 0 1 block 1 2 block 2 3 block 3 4 block 4 5 sectors

RAID Level-1 r Read performance improves r The redundancy is good but it does come up at a high cost r Mission-critical missions use this level

RAID Level 2 r The basic idea is to add check bits to the information bits such that errors in some bits can be detected, and if possible corrected. r The process of adding check bits to information bits is called encoding. r The reverse process of extracting information from the encoded data is called decoding.

Raid Level 2 r Each block may have a parity bit associated with it r The parity bit is selected in one of the following two ways: m Odd-Parity: The total number of 1s in the data is odd (indicating that the byte has an even number of ones) m Even Parity: The total number of 1s in the data is even (indicating that the byet has an even number of zeros) r Use Striping m Parity bits may be on different disks

Raid Level 2 Simple Parity Bits r Example (assume odd-parity): m Information is 000; the parity bit is 1 m Information is 001; the parity bit is 0 m Information is 010; the parity bit is 0 r Transformed code words m m One bit errors can be detected

RAID Level 2 r Error Checking m When you write you compute the parity bit and it to the data you are writing m When you read you compute it again and see if it is the same parity as you wrote. r Single parity bits are limited – can detect errors but not correct m Multiple parity bits are needed for correction

RAID Levels Please note that for RAID 2 You would have different parities on different disks

RAID Level 5 r Data is striped so that each sequential block is on a different disk r Parity is calculated per block r Data and parity are spread over the disks r The parity for a block is not on the same disk as the block r This is the most commonly used RAID system

Summary r We have examined the lowest level of the file system m Disk m RAID