Secondary Storage
Tom Kelliher, CS42
Oct. 30, 1996
Homework and Nachos.
Important disk terminology:
- Flying read/write heads.
- Platter(s).
- Stepper, voice coil actuators.
- Cylinder.
- Track.
- Sector. Block. Sector address. 1-D vs. 3-D addressing (cylinder,
track, sector). Smallest unit of access.
- Drive geometry.
- Zone recording and other ways in which disk drives lie to the system.
Components of disk access time:
- Seek time: time for read/write heads to move to addressed cylinder.
About 10 ms.
- Rotational latency: time for addressed sector to rotate under
read/write head. Average latency: 0.5 revolution at 3600--7200 RPM.
- Transfer time: time to read/write sector.
Often, multiple requests will be queued for each disk. In what order
should we service them?
Disk request will include:
- Read/write indication.
- Block number translated to drive coordinates.
- Memory buffer address.
- 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.
Service requests in order they're received.
- Fair.
- Easy to implement.
- Poor performance.
Shortest-seek-time-first scheduling: Service ``nearest'' request.
- Implementation?
- Starvation.
- Variance in turnaround times.
What, no acronym?
Sweep read/write heads from outer cylinder to inner and back out, servicing
requests in both directions.
- No starvation.
- Variance in turnaround times.
- Requests serviced in both directions.
Sweep read/write heads from outer cylinder to inner and back out, servicing
requests in one direction.
- Less variance in turnaround times.
- One ``wasted'' scan.
Similar to SCAN and C-SCAN, slightly smarter.
- FAT at beginning of disk.
- Directories, inodes sprinkled over disk in cylinder groups.
- Formatting: low- and high-level.
- Partitions: Physical, logical.
- Bad block tables. Remapping:
- SCSI: in hardware.
- IDE: in software(?).
- Partition size, block numbering and block size. Or, why do I see so
much internal fragmentation?
- Boot blocks:
- Master boot record.
- Partition boot records.
- Swap files vs. partitions.
- Multiple swap partitions.
- Too much space doesn't hurt. Too little will.
- No file system structure.
- Unix: swap allocated at process creation for text and data. Shard
swap for text.
- Multiple FATs, super blocks.
- Disk mirroring.
- Striping and RAID.
Thomas P. Kelliher
Tue Oct 29 17:32:10 EST 1996
Tom Kelliher