Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 12: Mass-Storage Systems

Similar presentations


1 Chapter 12: Mass-Storage Systems

2 Outline Overview of Mass Storage Structure Disk Structure
Disk Attachment Disk Scheduling Disk Management Swap-Space Management RAID Structure Stable-Storage Implementation Tertiary Storage Devices

3 Objectives Describe the physical structure of secondary and tertiary storage devices and the resulting effects on the uses of the devices Explain the performance characteristics of mass-storage devices Discuss OS services provided for mass storage, including RAID and HSM

4 Overview of Mass Storage Structure
Magnetic disks provide bulk of secondary storage of modern computers Drives rotate at 60 to 200 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) Head crash results from disk head making contact with the disk surface That’s bad Disks can be removable Drive attached to computer via I/O bus Buses vary, including EIDE, ATA, SATA, USB, Fibre Channel, SCSI Host controller in computer uses bus to talk to disk controller built into drive or storage array

5 Moving-head Disk Mechanism

6 Overview of Mass Storage Structure (Cont)

7 Disk Structure Disk drives are addressed as large 1-dimensional arrays of logical blocks, where the logical block is the smallest unit of transfer The 1-dimensional array of logical blocks is mapped into the sectors of the disk sequentially Sector 0 is the first sector of the first track on the outermost cylinder Mapping proceeds in order through that track, then the rest of the tracks in that cylinder, and then through the rest of the cylinders from outermost to innermost


9 Network-Attached Storage


11 Disk Scheduling The OS is responsible for using hardware efficiently

12 Disk Scheduling (Cont)
Several algorithms exist to schedule the servicing of disk I/O requests We illustrate them with a request queue (0-199) 98, 183, 37, 122, 14, 124, 65, 67 Head pointer 53

13 Illustration shows total head movement of 640 cylinders
FCFS Illustration shows total head movement of 640 cylinders

14 SSTF Selects the request with the minimum seek time from the current head position SSTF scheduling is a form of SJF scheduling may cause starvation of some requests Illustration shows total head movement of 236 cylinders

15 SSTF (Cont)

16 SCAN 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. Sometimes called the elevator algorithm Illustration shows total head movement of 208 cylinders

17 SCAN (Cont.)

18 C-SCAN Provides a more uniform wait time than SCAN
The head moves from one end of the disk to the other, servicing requests as it goes When it reaches the other end, however, it immediately returns to the beginning of the disk, without servicing any requests on the return trip Assuming uniform distribution Treats the cylinders as a circular list that wraps around from the last cylinder to the first one

19 C-SCAN (Cont)

20 C-LOOK Version of C-SCAN

21 C-LOOK (Cont)

22 Selecting a Disk-Scheduling Algorithm

23 Disk Management Low-level formatting (physical formatting)
Dividing a disk into sectors that the disk controller can read and write To use a disk to hold files, the OS still needs to record its own data structures on the disk Partition the disk into one or more groups of cylinders Logical formatting or “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

24 Disk Management Boot block initializes system
The bootstrap is stored in ROM Bootstrap loader program Methods such as sector sparing used to handle bad blocks

25 Booting from a Disk in Windows 2000

26 Swap-Space Management

27 Data Structures for Swapping on Linux Systems

28 RAID Structure RAID – multiple disk drives provides reliability via redundancy Redundant Arrays of Independent Disks Increases the mean time to failure Frequently combined with NVRAM to improve write performance RAID is arranged into six different levels

29 RAID (Cont) RAID schemes improve performance via parallelism
Disk striping uses a group of disks as one storage unit Bit-level Block-level RAID schemes improve reliability via redundancy 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 RAID within a storage array can still fail if the array fails, so automatic replication of the data between arrays is common Frequently, a small number of hot-spare disks are left unallocated, automatically replacing a failed disk and having data rebuilt onto them

30 RAID Levels

31 RAID (0 + 1) and (1 + 0)

32 Extensions RAID alone does not prevent or detect data corruption or other errors, just disk failures Solaris ZFS adds checksums of all data and metadata Checksums kept with pointer to object, to detect if object is the right one and whether it changed Can detect and correct data and metadata corruption ZFS also removes volumes, partitions Disks allocated in pools File systems with a pool share that pool, use and release space like “malloc” and “free” memory allocate / release calls

33 ZFS Checksums All Metadata and Data

34 Traditional and Pooled Storage

35 Stable-Storage Implementation
Write-ahead log scheme requires stable storage To implement stable storage Replicate information on more than one nonvolatile storage media with independent failure modes Update information in a controlled manner to ensure that we can recover the stable data after any failure during data transfer or recovery

36 Tertiary Storage Devices

37 Removable Disks Floppy disk — thin flexible disk coated with magnetic material, enclosed in a protective plastic case Most floppies hold about 1 MB; similar technology is used for removable disks that hold more than 1 GB Removable magnetic disks can be nearly as fast as hard disks, but they are at a greater risk of damage from exposure

38 Removable Disks (Cont.)

39 WORM Disks Read-write disks: the data can be modified over and over
WORM (“Write Once, Read Many Times”) disks can be written only once Thin aluminum film sandwiched between two glass or plastic platters To write a bit, the drive uses a laser light to burn a small hole through the aluminum; information can be destroyed but not altered Very durable and reliable Read-only disks, such ad CD-ROM and DVD, come from the factory with the data pre-recorded


41 Operating System Support

42 Application Interface

43 Tape Drives The basic operations for a tape drive differ from those of a disk drive locate() positions the tape to a specific logical block, not an entire track (corresponds to seek()) The read_position() operation returns the logical block number where the tape head is The space() operation enables relative motion Tape drives are “append-only” devices updating a block in the middle of the tape also effectively erases everything beyond that block An EOT mark is placed after a block that is written


45 Hierarchical Storage Management (HSM)

46 Speed Two aspects of speed in tertiary storage are bandwidth and latency Bandwidth is measured in bytes per second Sustained bandwidth – average data rate during a large transfer; # of bytes/transfer time Data rate when the data stream is actually flowing Effective bandwidth – average over the entire I/O time, including seek() or locate(), and cartridge switching Drive’s overall data rate

47 Speed (Cont) Access latency – amount of time needed to locate data


49 Cost Main memory is much more expensive than disk storage

50 Price per Megabyte of DRAM, From 1981 to 2004

51 Price per Megabyte of Magnetic Hard Disk, From 1981 to 2004

52 Price per Megabyte of a Tape Drive, From 1984-2000

53 End of Chapter 12

Download ppt "Chapter 12: Mass-Storage Systems"

Similar presentations

Ads by Google