CSCI 3431: Operating Systems
Chapter 12 – Mass Storage Structures (Pgs 505-545 )
Magnetic Disk Terminology
Transfer Rate: Rate at which data flows from thedrive to main memory
Positioning Time
(time before IO can occur)
=
Seek Time
 (time to move the head)
+
Rotational Latency
(time for correct sector to come under head)
Disk Construction
C:\Users\Tami\Desktop\image001[1].jpg
C:\Users\Tami\Desktop\hd2[1].jpg
Block:
512 Bytes (typical)
Disk Bus Formats
Always changing and improving
SCSI: Small computer systems interface
ATA: Advance technology attachment
SATA: Serial ATA
EIDE: Enhanced integrated drive electronics
USB: Universal serial bus
FC: Fibre channel
The Future of Disks
Surviving for the near future
Slower than persistent RAM
Cheaper than persistent RAM
Older technology tends to remain available ifit fulfills a role
e.g., magnetic tapes for second-level backupsof financial data (still in use on mainframesystems – cost per bit very low compared todisks)
Head Scheduling Concerns
Synchronicity: Must requests be processed inorder?
Average Wait Time: How long is a processtypically blocked?
Maximum Wait Time: How long could a processbe blocked (Important in RTOS)
Priority: Is all IO equally important?
** Almost identical to process scheduling **
Scheduling Algorithms
First Come, First Served (FCFS)
Fair but not most efficient
Shortest seek time first (SSTF)
Better, but far from optimal
SCAN (Elevator)
Moves back and forth, servicing requests in cylinderorder
C-SCAN (Circular)
Same as SCAN but don't service on return trip
LOOK (and also C-LOOK)
Same as SCAN but only go/return as far as needed
Choosing One
Often don't have to now
being built into the disk controller
SSTF or LOOK are most common
Simple, decent performance
Sophisticated systems change algorithmbased on data properties (like sortingfunctions in libraries)
Disk Management
Much of the low-level management (blocks,ECC, bad-sector replacement) is done by thedisk controller
Blocks typically 512K, but 256 and 1024 aresometimes possible
OS uses "Clusters" which are larger thanblocks and which function as virtual blocks
Increases efficiency, better supports large files,reduces overhead, maps to page size
Bad Blocks
Cheap disks don't do much
Newer/High-end disks handle it via diskcontroller
Spare sectors exist
Can cause problems with head scheduling
Controllers try to generate replacements onthe same cylinder for this reason
Small errors often repairable using ECC
RAID
Redundant Array of Independent Disks
Improved reliability
Higher data transfer rate
Less storage (due to redundancy) than if usedseparately
Often provided as a "unit" with its ownindependent controller
Mirroring
Simplest form of redundancy
Both disks have to fail to lose data
About the most effective method forproviding redundancy
Highly expensive with respect to resources
"Independent Failure" is not fully realistic
Bad batches, aging, fire/flood, etc.
NOTHING prevents some data loss due topower-failure
Striping
Various Levels
Block-level (most common)
Byte-level
Bit-level
C:\Users\Tami\Desktop\vod5[1].gif
RAID Levels
0: Block-striping, no redundancy
1: Complete mirroring
2: Byte-striping, parity disks, ECC for single bit errors
3: Bit-interleaved parity (uses sector parity checks toreduce overhead of RAID 2)
4: Block-interleaved parity (RAID 0 with parity blocks)
5: Distributed block-interleaved parity: Same as 4 butwith parity and data intermixed
6: P+Q Scheme: Same as 5, but with improved ECCsuch as Reed-Solomon coding (tolerates dual diskfailures)
RAID 0 + 1
RAID 0: Striping, improves performance
RAID 1: Mirroring, improves reliability
Put together they are highly effective
Only half the storage capacity is available dueto mirroring
Simple to implement and maintain
Selecting a RAID Level
Rebuild Time: How long does it take to react to afailure?
Need for reliability?
Cost effectiveness (mirroring costs more perbit)?
Performance concerns
Type of protection – RAID protects againsthardware failures, not against software failures
Properties of file systems – stability, volumes,sizes
Other Storage
NVRAM – As a solid state disk or as a write-back cache
Optical Disks (CD/DVD) – Varioustechnologies for CD-ROM, CD-R ("WORM"),CD-RW
Magnetic Tapes: Cartridges (kind of like VHS),slow but very economical
Storage Performance Issues
Speed -- Bandwidth & Latency
Effective Bandwidth: Overall transfer rate (includinglatency)
Sustained Bandwidth: Rate of flow
Average Latency: Time from request until transferbegins
Reliability (Redundancy) – number and kind offailures from which recovery can occur
Cost – price per bit
Lifespan – Will data be required in 20 years?
Access Frequency – How often will data beaccessed?
To Do:
Work on Assignment 2 (Due next week)
Complete Lab 7 (optional lab)
Read Chapter 12 (pgs 505-545; this lecture)