This is a summary on the structure of the disks and how disks work. Picture credits Comp 425 at Rice University, taught by Prof. Simar Ray. It also discussed the fundamental idea of the Memory Hierarchy, why does it work? How it can be applied to all other ares?
Disk Geometry (plane view)
- Disk drives consist of platters, each with two surfaces.
- Each surface consists of concentric rings called tracks.
- Each track consists of sectors separated by gaps.
Disk Geometry (Multiple-Platter View)
Multiple platters are stacked on a spindle
- Measured by: maximum number of bits that can be stored
- Determined by
- Recording density (bits/in) number of bits that can be squeezed into a 1 inch segment of a track
- Track density(tracks/in): number of tracks that can be squeezed into a 1 inch radial segment.
- Areal Density (bits/in^2): products of recoding and track density
- (# bytes/sector) * (average#sectors/track)*(#tracks/surface)*(#surfaces/platter)*(#platters/disk drive)
- Basic Operations
- Seek: move to a different track
- Rotate: move to the right sector (rotational latency)
- Access Time
- Overall: Taccess = Tavg seek + Tavg rotation Tavg transfer
- Seek time (Tavg seek)
- Time to position heads over cylinder containing target sector
- Typical Tacg seek is 3-9 ms
- Rotational latency
- Time waiting for first bit of target sector to ass under r/w head
- Tmax rotation = 1/RPM * 60 s/1MIN
- Tavg rotation = 1/2/RPM * 60 sec/1 min
- Typical rotational rae = 7200 RPM
- Transfer time (Tavg transfer)
- Time to read the bits in the single target sector.
- Tavg ransfer = (1/RPM) * 1/(average # sectors/track) * 60 secs/1 min
- Important facts
- Access time dominated by seek time and rotational latency
- First bit in a sector is the most expensive
Logical Disk Blocks
- Modern disks present a simpler abstract view of the complex sector geometry
- Mapping between logical blocks and actual (physical) sectors
- Allows controller to set aside spare cylinders for each zone
- Some fundamental and enduring properties of hardware and software (the properties that motivate the memory hierarchy)
- Fast storage cost more, have less capacity and require more power
- The gap between CPU and main memory speed is widening (Memory Wall)
- Well-written programs tend to exhibit good locality
Summary on Memory Hierarchy
- Cache: A smaller, faster storage device that acts as a staging area for a subset of the data in a larger, slower device
- Fundamental idea: for each k, the faster, smaller decide at level k serve as a cache for the larger, slower device at level k+1.
- Why do memory hierarchies work? Because of locality, programs tend to access the data at level k more often that they access the data at level k+1
- Thus the storage at level k+1 can be slower, and thus larger and cheaper per bit
- Big Idea: The memory hierarchy creates a large pool of storage that costs as much as the cheap forage near the bottom, but that serves data to programs at the rate of the fast storage near the top.