Chapter 6 Extern Memory

来源:互联网 发布:淘宝商城天猫首页 编辑:程序博客网 时间:2024/04/30 02:31
  1. Types of external memory
    • Magnetic disk
      • Hard disk&floppy disk
      • RAID(redundant array of independent disks)
      • Removable hard disk
      • Material: aluminium ---> glass
      • Read and Write mechanisms
        • Recording & retrieval using a head
          • May be a single read/write head or separate ones
        • Read
          • Traditional
            • Coil is the same for read and write
          • Contemporary
            • Separate read head, close to write head
            • High frequence operation
    • Optical
    • Magnetic tape
  2. Types of disk
    • Floppy
    • Hard disk
    • Removable hard disk
  3. Data organization and formatting
  4. Disk velocity
    • Phenomenon: Bit near center of rotating disk passes fixed point slower than bit on outside of disk
    • Phenomenon ---> problem: Increase spacing between bits in further tracks
    • Rotate disk at constant angular velocity(CAV)
  5. Control data in sector
    • To locate the sector
    • Extra data(Control data) is put into sector by formatting the disk
      • Additional information is not visible to users
      • Marks tracks and sectors
  6. Physical characteristics
    • Fixed head: one read write head per track
    • Movable head: one read write head per side
    • Head mechanism
      1. Contact: the head on the disk surface
      2. Fixed gap: an air gap between the head and the surface
      3. Aerodynamic gap: the air pressure generated by spining is enough to make the head rise above the surface when the disk spining
  7. Organization of disk system
    1. Disk driver
    2. Disk controller
    3. Disks
  8. Disk performance parameters
    1. Multi-CPU system: uncertain
      • Time of waiting for device
      • Time of waiting for channel
    2. Seek time: uncertain
      • T = S + n*m
    3. Rotational delay
      • PC/Server/Laptop
      • T = 1/(2r)
    4. Transfer time
      • Number of bytes to be transferred
      • Rotation speed of the disk
      • T = b/(rN)
    5. Access time
      • T = accessTime + Rotation delay + Transfer time
    6. e.g
      • A disk with rotation speed of 15000rpm, average seek time of 4ms, 512B/sector, 500sectors/track, suppose that we wish to read a file consisting of 2500 sectors for a total of 1.28MB, estimate the total time for access.
      • Case 1: sequence organization
        • Time to read 1st track:
        • Average seek:
          • 4ms
        • Average rotational delay:
          • T = 1/(2r) = 1/(2*(15000/60))*1000 = 2ms
        • Time to read a track:
          • T = 1/r = 4ms
        • total:
          • 10ms
        • For left tracks, seek is no long needed, time for reading a track:
          • 2+4=6ms
        • Total time:
          • 10+4(2+4)=34ms
      • Case 2: data random distribution
        • For each sector:
        • Seek time:
          • 4ms
        • Average rotational delay:
          • 2ms
        • Read a sector:
          • 4/500 = 0.008ms
        • Total time:
          • 2500 x 6.008 = 15s
  9. RAID: Redundant Array of Independent disks
    • Operation independently and in parallel
    • Three common characteristics:
      • A set of physical disksviewed as a single logical drive by OS
      • Data aredistributed across the physical drives of an array
      • Redundant disk capacity is used to store parity information, which guarantees data recoverability in case of a disk failure
    • RAID 0
      • No redundancy(Not support the third characteristic)
      • Data stripped across all disks
      • Round Robin stripping
      • Increasing speed
        • Disks seek in parallel
      • Application
        • High data transfer capacity
        • High I/O request
    • RAID 1
      • Data is stripped across disks
      • Mirror disks
      • Read from either, write to both in parallel
      • Advantages:
        • Simple recovery, good error-tolerance
        • In a transaction-oriented enviornment, if read request rate is very high, the performance of RAID 1 can approach double of that of RAID 0
      • Disadvantage:
        • Expensive
      • Application
        • Storing system software
        • Highly critical files
    • RAID 2(Not implemented)
      • Multiple parity disks store Hamming code error correction in corresponding positions
    • RAID 3: bit-interleaved parity
      • Only one redundant disk, no matter how large the array
      • Data on failed drive can be reconstructed from surviving data and parity info
    • RAID 4: block-level parity
    • RAID 5
      • Parity striped across all disks
      • Round robin allocation for parity stripe
      • Avoid RAID 4 bottleneck at parity disk
      • Application:
        • Used in network servers
    • RAID 6
      • A high reliable RAID
      • Two different parity calculations, stored in separate strips on different disks
      • Advantage
        • Extremely high data availability
      • Disadvantage
        • Write penalty
  10. CD-ROM
    • Data stored as mocroscopic bits
    • Constant packing density
    • Constant linear velocity
    • Advantage
      • Large capacity
      • Easy to mass produce
      • Cheap
      • Removable
      • Robust
    • Disadvantage
      • Slow
      • Read only
      • Vulnerable
  11. Erasable Optical Disk
    • High capacity, removable, reliability
  12. Magnetic tape
    • Read and write in blocks, named physical records, separated by inter-record gaps
    • Serial access, slow
    • Application
      • Backup and archive
0 0