DATA STORAGE IN MAGNETIC DISK
Magnetic Disks
          Bits of data (0’s and 1’s) are stored on circular magnetic platters called disks.
          A disk rotates rapidly (& never stops).
          disk head reads and writes bits of data as they pass under the head.
          Often, several platters are organized into a disk pack (or disk drive).

A Disk Drive

Organization of Disks
          Disk contains concentric tracks.
          Tracks are divided into sectors
          sector is the smallest addressable unit in a disk.
Disk Controller
          Disk controllers: typically embedded in the disk drive, which acts as an interface between the CPU and the disk hardware.
The controller has an internal cache (typically a number of MBs) that it uses to buffer data for read/write requests.
Accessing Data
          When a program reads a byte from the disk, the operating system locates the surface, track and sector containing that byte, and reads the entire sector into a special area in main memory called buffer.
          The bottleneck of a disk access is moving the read/write arm.
        So it makes sense to store a file in tracks that are below/above each other on different surfaces, rather than in several tracks on the same surface.
Cylinders
          cylinder is the set of tracks at a given radius of a disk pack.
        i.e. a cylinder is the set of tracks that can be accessed without moving the disk arm.
All the information on a cylinder can be accessed without moving the read/write arm.
 Cylinder=the set of tracks on a disk that are directly above/below each other.
Estimating Capacities
          Track capacity = # of sectors/track * bytes/sector
          Cylinder capacity = # of tracks/cylinder * track capacity
          Drive capacity = # of cylinders * cylinder capacity
          Number of cylinders = # of tracks in a surface