Finding something worth knowing…

Technology

Your computer's memory is a ladder trading speed for size at every rung

Main memory answers the processor in nanoseconds, while a disk takes milliseconds, roughly a million times longer. A robot arm fetching an archive tape can take a full minute. Every computer is built around that gap, stacking small fast stores near the processor and big slow ones further away, and shuffling data between them constantly.

At the top sit the processor's registers, the quickest storage there is, each holding a single word of perhaps 32 or 64 bits. Below them come layers of cache, the smallest and fastest nearest the core. Then main memory, usually dynamic RAM, which is volatile and must be refreshed constantly just to hold its contents. Switch the power off and everything at these levels disappears.

Secondary storage, meaning hard disks and solid-state drives, keeps data without power and is far cheaper, so machines typically carry about a hundred times more of it than main memory. Because finding the right spot on a disk is slow, data moves in large contiguous blocks. When RAM runs short, the operating system quietly parks the least used pages on disk and brings them back when needed, which is how a computer seems to have more memory than it physically does.

Further down, tertiary storage uses robotic arms to load tapes or discs from vast libraries, handy for archives that are rarely touched. Offline storage goes one step further: a medium that has been unplugged and carried away entirely, needing a human to reconnect it. Early machines relied on delay lines, Williams tubes and spinning drums for main memory; magnetic cores replaced those by 1954 and ruled until chips became cheap enough in the 1970s.

Storing bits reliably takes extra effort. A stray particle of radiation can flip a bit, so redundant codes let systems catch and repair such errors, and schemes like disk mirroring and RAID survive a failed drive. Mechanical disks can die instantly in a head crash, while flash fails when its electronics do. Drive health counters track hours of use and spin-up counts, though how well they predict failure is disputed. Compression, meanwhile, trades extra computing for space, often shrinking data by tens of per cent.

Source: Computer data storage

Related

More in Technology · All topics