Information Technology Topic

Disk Storage Terms and Access Methods

  1. Read notes
  2. Flashcards
  3. Quiz
  4. Confident

Study focus - 3 things

  1. A hard disk stores data on spinning platters; tracks are the concentric rings, sectors are the pie-shaped pieces of a track, a cylinder is the same track on every surface, and the read/write head senses and changes the magnetised spots
  2. Access time is the time from asking for data to receiving it; for a disk it is seek time plus rotational latency, and a buffer or disk cache hides the speed gap between the disk and the rest of the computer
  3. Sequential access (tape) means passing the earlier records; direct access (disk) means going straight to a record. Capacity = surfaces x tracks x sectors x bytes per sector

Visual notes

A disk surface: tracks, sectors, head and cylinder
A top view of a round disk with four concentric rings called tracks, track 0 being the outer ring, and eight slice-shaped sectors. One sector of track 1 is shaded. A read/write head on an arm from the right sits over track 1. The hub in the middle is labelled Spindle. Below, a side view shows three horizontal surfaces stacked one above another, with a dashed box around the same track on all three surfaces, labelled as a cylinder.

Tracks are rings, sectors are slices of a track, and a cylinder is the same track on every surface. The sketch is drawn for Tendly and is not to scale.

Section 1Inside a hard disk: platters and the read/write head

A hard disk has several circular platters stacked on a central spindle. Both sides of each platter are coated with a material that can be magnetised in tiny areas, and those areas stand for 0s and 1s. Every surface has its own read/write head, and the heads are carried on one arm assembly so they all move together. To read, a head senses the magnetised spots. To write, it changes them. On a hard disk the head floats just above the surface on a cushion of air and does not touch it. The practice drives in this topic spin at 7,200 revolutions per minute (rpm), a made-up practice value. The 1998 Navy text gives 3,600 rpm for its disk drives, so real speeds depend on the drive and the period. In the 1998 Navy text, each track holds the same amount of data, because the data is packed more tightly on the smaller tracks near the centre.

Section 2Tracks and sectors

Data is stored in invisible concentric circles called tracks. In the source used here, track numbering starts at the outer edge (track 0) and counts inward. Each track is divided into sectors, the pie-shaped segments of the surface. A sector is the piece of a track that the head reads as it spins past. With the sector method, a record is found by its track number, surface number and sector number. The head moves to the track and the data is read as the sector spins underneath. Here's the trick: a track is a ring, a sector is a slice. The shaded piece in the sketch is where one ring and one slice meet.

Section 3Cylinders

A disk with several platters has many surfaces. The tracks with the same number on every surface line up one above another, and together they form a cylinder. With the cylinder method, a record is found by its cylinder number, surface number and record number. Why bother? The heads on all the surfaces move together. Once the head arm is at one cylinder, every surface of that cylinder can be read without moving the arm again. A disk with 1,024 tracks per surface has 1,024 cylinders, because each cylinder is one track number.

Section 4Access time: seek time and rotational latency

Access time is the time from asking for data to receiving it. For a hard disk, how long that takes depends on where the data sits on the disk. It has two main parts. Seek time is the time to move the head to the track holding the data. Rotational latency is the extra wait for the wanted sector to spin under the head. Access time = seek time + rotational latency. (Real drives also need time to transfer the data, which this topic leaves out.) One revolution at 7,200 rpm takes 60 / 7,200 = 0.00833 seconds, which is 8.33 milliseconds (ms). On average the sector is half a revolution away, so the average rotational latency is about 4.17 ms. Disks move data in large contiguous blocks to cut both waits. A faster spin cuts rotational latency but does nothing for seek time.

Section 5Buffers and the disk cache

A disk is slow compared with the processor. A buffer is a temporary holding area that evens out the speed difference between two devices, so a fast device is not left waiting for a slow one. The disk cache is a real example. It is a small amount of fast memory (RAM in the drive) that holds data on its way to or from the platters for a short time. Data to be saved is placed there first, so the processor does not wait for the slow disk, and then the data is written out. Easy to mix up: a buffer or cache is temporary. It is not a place where files are kept permanently.

Section 6Sequential access and direct access

With sequential access, records are available one after another from the start. To read record 125 you must pass records 1 to 124. Magnetic tape works this way. With direct access you can reach the 125th record without reading the first 124. Magnetic disks are direct access, though the head still needs a little mechanical time to get there. Random access is the memory-chip version: any item can be reached without scanning the earlier ones, and the access time does not depend on where it is stored. That is why main memory is called random access memory. Use direct access when records are looked up in any order, such as a customer file at a shop counter in Mandeville.

Section 7Working out disk capacity

Capacity = surfaces x tracks per surface x sectors per track x bytes per sector. A platter has two surfaces, so 4 platters give 8 surfaces. Example: 1 surface, 200 tracks, 32 sectors per track, 512 bytes per sector. Sectors = 200 x 32 = 6,400. Bytes = 6,400 x 512 = 3,276,800. In KB (1 KB = 1,024 bytes) that is 3,200 KB. To get MB, divide bytes by 1,048,576 (1,024 x 1,024). Check the units at each step. The numbers in this topic are made-up practice values, not specifications of a real drive.

Examples

A lab technician in Spanish Town sketches a made-up single-sided practice disk: 200 tracks, each divided into 32 sectors, with 512 bytes in each sector. (a) How many sectors are on the surface? (b) What is the capacity in bytes? (c) What is the capacity in KB (1 KB = 1,024 bytes)?

(a) Sectors = tracks x sectors per track = 200 x 32 = 6,400. (b) Bytes = 6,400 x 512 = 3,276,800 bytes. (c) 3,276,800 divided by 1,024 = 3,200 KB. Check: 3,200 KB x 1,024 = 3,276,800 bytes, so the conversion is consistent.

A made-up practice drive has 4 platters (8 surfaces), 1,024 tracks per surface, 64 sectors per track and 512 bytes per sector. It spins at 7,200 rpm and has an average seek time of 9 ms. (a) Calculate its capacity in bytes and in MB. (b) How many cylinders does it have, how many sectors are in one cylinder and how many KB is that? (c) Calculate one revolution, the average rotational latency and the average access time. (d) Why is it quicker to read a file whose sectors are all in one cylinder?

(a) Sectors = 8 x 1,024 x 64 = 524,288. Bytes = 524,288 x 512 = 268,435,456. MB = 268,435,456 divided by 1,048,576 = 256 MB. (b) One cylinder per track number, so 1,024 cylinders. Sectors per cylinder = 8 surfaces x 64 = 512. Bytes per cylinder = 512 x 512 = 262,144, which is 256 KB. (c) One revolution = 60 / 7,200 s = 8.33 ms. Average rotational latency = half a revolution = 4.17 ms. Access time = 9 + 4.17 = 13.17 ms. (d) The heads do not have to move to a different track, so there is no extra seek time and little waiting. Scattered sectors need a new seek and a new rotational wait for each piece.

Now let's water it

Session runs notes to flashcards to quiz back-to-back.

Where this comes from