Presentation is loading. Please wait.

Presentation is loading. Please wait.

Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised 2012. Tao Yang.

Similar presentations


Presentation on theme: "Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised 2012. Tao Yang."— Presentation transcript:

1 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised 2012. Tao Yang

2 12.2 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems: What to Learn Structure of mass-storage devices and the resulting effects on the uses of the devices Hard Disk Drive SSD Hybrid Disk Performance characteristics and management of mass- storage devices Disk Scheduling RAID – improve performance/reliability

3 12.3 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass Storage: HDD and SSD Most popular: Magnetic hard disk drives Solid state drives: (SSD)

4 12.4 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Magnetic Tape 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 20-1.5TB typical storage Common technologies are 4mm, 8mm, 19mm, LTO-2 and SDLT

5 12.5 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Disk Attachment Drive attached to computer via I/O bus USB SATA (replacing ATA, PATA, EIDE) SCSI itself is a bus, up to 16 devices on one cable, SCSI initiator requests operation and SCSI targets perform tasks FC (Fiber Channel) is high-speed serial architecture Can be switched fabric with 24-bit address space – the basis of storage area networks (SANs) in which many hosts attach to many storage units Can be arbitrated loop (FC-AL) of 126 devices

6 12.6 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition SATA connectors SCSI FC with SAN-switch

7 12.7 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Network-Attached Storage Network-attached storage (NAS) is storage made available over a network rather than over a local connection (such as a bus) NFS and CIFS are common protocols Implemented via remote procedure calls (RPCs) between host and storage New iSCSI protocol uses IP network to carry the SCSI protocol

8 12.8 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Storage Area Network (SAN) Special/dedicated network for accessing block level data storage Multiple hosts attached to multiple storage arrays - flexible

9 12.9 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Performance characteristics of disks Drives rotate at 60 to 200 times per second Positioning time is time to move disk arm to desired cylinder (seek time) plus time for desired sector to rotate under the disk head (rotational latency) Transfer rate: data flow speed between drive and computer Sustained bandwidth: “average data transfer rate during a large transfer– that is the, number of bytes divided by transfer time”  data rate without positioning time Effective bandwidth: average transfer rate including positioning time

10 12.10 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Moving-head Disk Mechanism

11 12.11 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Estimate sustained average transferring rate Suppose that a disk drive spins at 7200 RPM (revolutions per minute), has a sector size of 512 bytes, and holds 160 sectors per track. What is sustained average transfer rate of this drive in megabytes per second?. Disk spins 120 times per second (7200 RPM/60) Each spin transfers a track of 80 KB (160 sectors x0.5K) Sustained average transfer rate is 120x80 = 9.6MB/s.

12 12.12 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Average performance of random access 7200 RPM, sector size of 512 bytes, and 160 sectors per track. Average seek time for the drive is 8 milliseconds Estimate # of random sector I/Os per second that can be done and the effective average transfer rate for random-access of a sector? Disk spins 120 times per second Average rotational cost is time to travel half track: 1/120 * 50%=4.167ms Transfer time is 8ms to seek + 4.167 ms rotational latency + 0.052 ms (reading one sector takes 0.0005MB/ 9.6MB). =12.219ms # of random sector access/second= 1/0.012219=81.8 Effective transferring rate: 0.5 KB/0.012.219s=0.0409MB/s.

13 12.13 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Disk Scheduling: Objective Given a set of IO requests Coordinate disk access of multiple I/O requests for faster performance and reduced seek time. Seek time  seek distance Measured by total head movement in terms of cylinders from one request to another. Hard Disk Drive

14 12.14 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition FCFS (First Come First Serve) total head movement: 640 cylinders for executing all requests

15 12.15 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition SSTF (Shortest Seek Time First) Selects the request with the minimum seek time from the current head position total head movement: 236 cylinders

16 12.16 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition SCAN: Elevator algorithm The disk arm starts at one end of the disk, and moves toward the other end, servicing requests until it gets to the other end of the disk, where the head movement is reversed and servicing continues. total head movement : 208 cylinders

17 12.17 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition C-SCAN (Circular-SCAN) Provides a more uniform wait time than SCAN by treating cylinders as a circular list. The head moves from one end of the disk to the other, servicing requests as it goes. When it reaches the other end, it immediately returns to the beginning of the disk, without servicing any requests on the return trip

18 12.18 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition C-LOOK: A version of C-Scan 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

19 12.19 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Scheduling Algorithms Algorithm NameDescription FCFSFirst-come first-served SSTFShortest seek time first; process the request that reduces next seek time SCAN (aka Elevator) Move head from end to end (has a current direction) C-SCANOnly service requests in one direction (circular SCAN) LOOKSimilar to SCAN, but donot go all the way to the end of the disk. C-LOOKCircular LOOK. Similar to C-SCAN, but donot go all the way to the end of the disk.

20 12.20 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Selecting a Disk-Scheduling Algorithm Either SSTF or C-LOOK is a reasonable choice for the default algorithm SSTF is common with its natural appeal (but it may lead to starvation issue). C-LOOK is fair and efficient SCAN and C-SCAN perform better for systems that place a heavy load on the disk Performance depends on the number and types of requests

21 12.21 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Swap-Space Management Swap-space — Virtual memory uses disk space as an extension of main memory Swap-space can be carved out of the normal file system, or, more commonly, it can be in a separate disk partition Swap-space management Allocate swap space when process starts; holds text segment (the program) and data segment Kernel uses swap maps to track swap-space use

22 12.22 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Data Structures for Swapping on Linux Systems

23 12.23 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition SSD Logic Components

24 12.24 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Typical read and write rates

25 12.25 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Drive read performance

26 12.26 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Power consumption

27 12.27 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Hybrid Disk Drive Dram Cache NV Cache Add a non- volatile cache ATA Interface A hybrid disk uses a small SSD as a buffer for a larger drive All dirty blocks can be flushed to the actual hard drive based on: Time, Threshold, Loss of power/computer shutdown

28 12.28 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Hybrid Disk Drive Benefits Dram Cache NV Cache Up to 90% Power Saving when powered down ATA Interface Read and Write instantly while spindle stopped

29 12.29 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition RAID (Redundant Array of Inexpensive Disks ) Multiple disk drives provide reliability via redundancy. Increases the mean time to failure Hardware RAID with RAID controller vs software RAID

30 12.30 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition RAID (Cont.) RAID multiple disks work cooperatively Improve reliability by storing redundant data Improve performance with disk striping (use a group of disks as one storage unit) RAID is arranged into six different levels Mirroring (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

31 12.31 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Raid Level 0 Level 0 is nonredundant disk array Files are striped across disks, no redundant info High read throughput Best write throughput (no redundant info to write) Any disk failure results in data loss

32 12.32 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Raid Level 1 Mirrored Disks Data is written to two places On failure, just use surviving disk and easy to rebuild On read, choose fastest to read Write performance is same as single drive, read performance is 2x better Expensive (high space overhead)

33 12.33 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition RAID 5

34 12.34 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition 6 RAID Levels

35 12.35 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Raid Level 0+1 Stripe on a set of disks Then mirror of data blocks is striped on the second set. data disksmirror copies Stripe 0 Stripe 4 Stripe 3Stripe 1Stripe 2 Stripe 8 Stripe 7 Stripe 6Stripe 5 Stripe 9 Stripe 0 Stripe 4 Stripe 3Stripe 1Stripe 2 Stripe 8 Stripe 9 Stripe 7 Stripe 6Stripe 5

36 12.36 Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Raid Level 1+0 Pair mirrors first. Then stripe on a set of paired mirrors Better reliability than RAID 0+1 Mirror pair Stripe 0 Stripe 4 Stripe 8 Stripe 3 Stripe 11 Stripe 7 Stripe 2 Stripe 10 Stripe 6 Stripe 1 Stripe 5 Stripe 9 Stripe 0 Stripe 4 Stripe 8 Stripe 3 Stripe 11 Stripe 7 Stripe 2 Stripe 10 Stripe 6 Stripe 1 Stripe 5 Stripe 9


Download ppt "Silberschatz, Galvin and Gagne ©2009 Operating System Concepts – 8 th Edition Mass-Storage Systems Revised 2012. Tao Yang."

Similar presentations


Ads by Google