1 / 24

ITFN 2601 Introduction to Operating Systems

ITFN 2601 Introduction to Operating Systems. Lecture 21 Disk Access. Agenda. Disc Types Magnetic RAID Optical Read/Write Scheduling Error Handling Stable Read/Writes. Magnetic Disks. Cylinders Ring Number Heads Which Platter to Read Sectors Rotational Location. Disk Hardware.

taini
Télécharger la présentation

ITFN 2601 Introduction to Operating Systems

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. ITFN 2601Introduction to Operating Systems Lecture 21 Disk Access

  2. Agenda • Disc Types • Magnetic • RAID • Optical • Read/Write Scheduling • Error Handling • Stable Read/Writes

  3. Magnetic Disks • Cylinders • Ring Number • Heads • Which Platter to Read • Sectors • Rotational Location

  4. Disk Hardware

  5. RAID • Redundant Array of Inexpensive Disks • Allows for the amalgamation of many drives • Eliminates danger of a “Single Large Expensive Disk” • Built-in error mechanism • Built-in recovery mechanism • No Error/Recovery in RAID-0 and RAID-2

  6. RAID Levels • 6 Levels • RAID-0: Write-Striping • RAID-1: Write-Mirror • RAID-2: Byte-Striping • RAID-3: Byte-Striping w/Parity • RAID-4: Write-Striping w/Parity • RAID-5: Write-Striping w/Parity-scattering

  7. RAID 0 • Each write is issued to a different drive • Less wait for write-completion • Prefers drives being equivalent

  8. RAID 1 • Writes are issued as in RAID 0 • Writes are identically issued to backup-discs • Highly size dependent

  9. RAID 2 • As RAID 0, except write is broken into bytes • Normal writes are in block-sized chunks • Each byte is issued to a different drive

  10. RAID 3 • Writes are broken and issued as RAID 2 • One disc is “Parity” • XOR of the bytes being written on that pass • One bit per byte

  11. RAID 4 • As RAID 0 • Each parity bit represents one strip • Parity will have n bits, where n is the number of drives (minus the parity drive)

  12. RAID 5 • Based on RAID 4 • If the Parity drive fails, all recovery data is lost! • Staggers Parity across drives • If any drive is lost, it’s data is recovered from Parity

  13. Optical Devices • Optical Disks (LaserDisc) • 30cm diameter • Compact Disc • Audio [IS-10149; Red Book] (1980) • Computer [CD-ROM; Yellow Book] (1984)

  14. Physical Construction • Data is encoded in Pits/Lands • Pit – On • Land – Off

  15. Red/Yellow Specifications • Symbols • 8bits->14bits, Encoding & Error Correction • Frames • 42 Symbols (24 data bytes; 18 ECC) • Sectors • 98 Frames • 2048 data bytes • 288 ECC

  16. CD-R/RW • Standard computer CD is “CD-ROM” • Disc is extruded plastic • CD-Recordable [Orange Book] (1989) • Disc has dye that is activated by light • CD-ReWritable • Dye has two states (transparent & opaque) • Drive has three lasers

  17. DVD • Digital Video Disc (or Versatile) • Spiral is smaller • Pits/Lands are smaller • “Smaller” laser • Holds up to 4.7G (vs 650M) • 4 types • Single/Double Sided • Single/Double Layered

  18. Low Level Formatting • Performed by the manufacturer • Dictates the structure of the drive • Writes each track with information about the track • Skips over “bad” sectors

  19. Disk Format • Moving the head is slow • Disc would have to spin back • Cylinder Skew • Transfer rate may be slow • Interleaving sector #s

  20. Disk Arm Scheduling • Rotation and Head movement are bad • First Come First Serve • Shortest Seek First • Identical to FIFO/SJF Process Scheduling • Elevator Algorithm • Keep moving in one direction • Turn around at end of requests

  21. Error Handling • Bad sectors • Each drive has n sectors per track • Only m are available for use (m < n) • The rest are “backup” • If a sector has repeated read/write errors • Copy everything into the next backup sector • Mark the original as “bad”

  22. Stable Storage • If an error occurs during a write … • Old data is gone • New data isn’t there  • Stable storage ensures data integrity • Relies on the fact that errors are “uncommon” • Like RAID 1

  23. Stable Writes • Stable Writes • Write the data on main-disc • Repeat until the write is successful • Write the data on secondary-disc • Stable Reads • Read from the main-disc • Repeat some number of times • Read from secondary-disc (if unsuccessful)

  24. Crash Recovery • Valid data always exists • May not have last write, but is not invalid • Usually acceptable

More Related