ITFN 2601 Introduction to Operating Systems - PowerPoint PPT Presentation

1 / 28
About This Presentation
Title:

ITFN 2601 Introduction to Operating Systems

Description:

Which Platter to Read. Cylinders. Ring Number. Sectors. Rotational Location. RAID ... Allows for the amalgamation of many drives. Eliminates danger of a 'Single ... – PowerPoint PPT presentation

Number of Views:30
Avg rating:3.0/5.0
Slides: 29
Provided by: dsin2
Category:

less

Transcript and Presenter's Notes

Title: ITFN 2601 Introduction to Operating Systems


1
ITFN 2601Introduction to Operating Systems
  • Lecture 12
  • Disk Access

2
Agenda
  • Disc Types
  • Magnetic
  • RAID
  • Optical
  • Disk Arm Scheduling
  • Error Handling
  • Stable Read/Writes

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

4
(No Transcript)
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, its 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-gt14bits, 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 SJF Process Scheduling
  • Elevator Algorithm
  • Keep moving in one direction
  • Turn around at end of requests

21
FCFS
22
SSF
23
Elevator (bit set UP)
24
Error Handling
  • Bad sectors
  • Each drive has n sectors per track
  • Only m are available for use (m lt 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

25
Stable Storage
  • If an error occurs during a write
  • Old data is gone
  • New data isnt there ?
  • Stable storage ensures data integrity
  • Relies on the fact that errors are uncommon
  • Like RAID 1

26
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)

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

28
Summary
  • Magnetic vs. Optical storage
  • Various levels or RAID
  • Disk Arm Scheduling
  • FCFS
  • SSN
  • Elevator
  • Stable Storage affords integrity
Write a Comment
User Comments (0)
About PowerShow.com