Secondary Storage

Tom Kelliher, CS42

Oct. 30, 1996

Homework and Nachos.

Disk Structure

Important disk terminology:

  1. Flying read/write heads.

  2. Platter(s).

  3. Stepper, voice coil actuators.

  4. Cylinder.

  5. Track.

  6. Sector. Block. Sector address. 1-D vs. 3-D addressing (cylinder, track, sector). Smallest unit of access.

  7. Drive geometry.

  8. Zone recording and other ways in which disk drives lie to the system.

Components of disk access time:

  1. Seek time: time for read/write heads to move to addressed cylinder. About 10 ms.

  2. Rotational latency: time for addressed sector to rotate under read/write head. Average latency: 0.5 revolution at 3600--7200 RPM.

  3. Transfer time: time to read/write sector.

Disk Request Scheduling

Often, multiple requests will be queued for each disk. In what order should we service them?

Disk request will include:

  1. Read/write indication.

  2. Block number translated to drive coordinates.

  3. Memory buffer address.

  4. Transfer byte count.

For each of the following scheduling disciplines, assume requests for the following cylinders have been received: 98, 113, 37, 122, 14, 124, 65, 67

Assume read/write head is at cylinder 53.

Our metric: total head movement (in cylinders).

Assume multiple requests to same cylinder are handled all at once.

FCFS Scheduling

Service requests in order they're received.

  1. Fair.

  2. Easy to implement.

  3. Poor performance.

SSTF Scheduling

Shortest-seek-time-first scheduling: Service ``nearest'' request.

  1. Implementation?

  2. Starvation.

  3. Variance in turnaround times.

SCAN Scheduling

What, no acronym?

Sweep read/write heads from outer cylinder to inner and back out, servicing requests in both directions.

  1. No starvation.

  2. Variance in turnaround times.

  3. Requests serviced in both directions.

C-SCAN Scheduling

Sweep read/write heads from outer cylinder to inner and back out, servicing requests in one direction.

  1. Less variance in turnaround times.

  2. One ``wasted'' scan.

LOOK and C-LOOK Scheduling

Similar to SCAN and C-SCAN, slightly smarter.

Filesystem Design Influence upon Request Scheduling

  1. FAT at beginning of disk.

  2. Directories, inodes sprinkled over disk in cylinder groups.

Feeding and Caring for a Disk

  1. Formatting: low- and high-level.

  2. Partitions: Physical, logical.

  3. Bad block tables. Remapping:
    1. SCSI: in hardware.

    2. IDE: in software(?).

  4. Partition size, block numbering and block size. Or, why do I see so much internal fragmentation?

  5. Boot blocks:
    1. Master boot record.

    2. Partition boot records.


  1. Swap files vs. partitions.

  2. Multiple swap partitions.

  3. Too much space doesn't hurt. Too little will.

  4. No file system structure.

  5. Unix: swap allocated at process creation for text and data. Shard swap for text.

Disk Reliability

  1. Multiple FATs, super blocks.

  2. Disk mirroring.

  3. Striping and RAID.

Thomas P. Kelliher
Tue Oct 29 17:32:10 EST 1996
Tom Kelliher