Magnetic Tape

Magnetic tape is the oldest mass storage device still in use and the cheapest place to keep a byte. Bits are stored as magnetized regions on a plastic ribbon hundreds of metres long. The ribbon can only be read in order, from where it is now to where the data is. This page shows what that costs, and what the head does when it writes and reads.

What you are looking at

A tape drive with its cover off. The tape runs from the supply reel, past the head, onto the take-up reel. It holds 32 blocks. The row under the drawing is the same tape unrolled; the green block is the one at the head.

The red ring opens the head. It is an iron ring with a coil round the top and a gap at the bottom, touching the tape. The arrows on the tape are its magnetization. The dashed line is the flux, which runs round the ring and leaks out of the gap. The coil is wired to a speaker.

Access time

To reach a block, the drive winds past every block before it.

access time = wind time + transfer time

Wind time is the time to bring the block to the head. Here winding crosses 8 blocks a second. A real cartridge holds about a kilometre of tape, so a random block takes about a minute. A hard drive takes about 10 ms.

Transfer time is the time for the block to pass the head. Here one block takes 1 s. A modern LTO drive reads at about 400 MB/s, as fast as a hard drive.

Writing and reading bits

Write. Current in the coil drives flux round the core. At the gap it leaks into the tape and magnetizes the region under it. A 1 reverses the current, so the next region points the other way. A 0 leaves it alone, so the next region points the same way.

Read. The tape moves and the coil is idle. Where the direction on the tape changes, the flux through the coil changes and makes a voltage pulse: a 1. Where it stays the same, no pulse: a 0.

Erase. An alternating current flips the field at the gap back and forth as each region passes. The region is left pointing every way, like fresh tape.

Sequential and random access

The wind is paid once. If the next block wanted is the next one on the tape, there is no wind at all. Press a block, then the one after it.

Example. Read all 32 blocks from block 0. On a real drive, a whole cartridge is read in order in a few hours. The same data in random order would take months.

So tape holds data that is written once and read back whole: backups and archives.

Real tape

Check your understanding

  1. The head is at block 4 and the next request is for block 28. How long is the wind?
  2. Why does a tape drive have no rotational latency?
  3. A cartridge takes 60 s to reach a random block and reads at 400 MB/s. How long does one 4 MB block take?
  4. In the close-up, write 00000000 and then 11111111. How many pulses does each make when read back?

Summary

Takeaways