Data storage

Computer Science · Hardware. The idea in plain words, the rules to remember, the mistake to avoid and a worked example, written and checked by Mega Lecture.

Test this topic freeAll Computer Science topics

The idea

Primary storage is memory the CPU can access directly: RAM and ROM. RAM holds the programs and data in use right now. ROM holds the start-up instructions.

Secondary storage is not accessed directly by the CPU. It keeps programs and files permanently, even with the power off. It can be magnetic, optical or solid-state.

When RAM is full, the computer uses part of secondary storage as virtual memory. Pages of data not needed at that moment are moved out of RAM to make room, and moved back when needed. Cloud storage keeps files on remote servers that you reach through the internet.

In simpler words

Primary storage is memory the CPU reads directly. RAM holds what is running now and empties when the power goes off. ROM holds start-up instructions and keeps them. Secondary storage keeps files even with no power. It can be magnetic, optical or solid-state. When RAM is full, part of the hard drive acts as extra RAM, called virtual memory.

An everyday comparison

RAM is like your desk and secondary storage is like a filing cabinet. You keep what you are working on now on the desk; everything else is filed away. Virtual memory is like moving papers you are not using back to the cabinet when the desk is full. The comparison stops working because RAM is cleared completely when power is lost, and desks do not empty themselves.

Rules to remember

Common mistake

Students say ROM is secondary storage because it is permanent. ROM is primary storage; it is non-volatile memory that the CPU reads directly.

In the exam

Classify the device as primary or secondary storage first. Then use the key words: volatile or non-volatile, read only or read and write. For each secondary type, describe how data is stored: magnetised areas on platters, pits and lands read by a laser, or charge in transistors. For virtual memory, explain pages moved between RAM and secondary storage. Compare cloud storage with one advantage and one disadvantage.

Worked example

A camera fixed to a bicycle helmet must record video. Which type of secondary storage is most suitable, and why?

  1. Magnetic drives have spinning platters and a moving head, which shaking can damage. They are also heavy.
  2. Optical discs are too large for a small camera and also need moving parts to spin the disc.
  3. Solid-state storage has no moving parts, so bumps do not harm it. It is small, light and uses little power.

Answer: Solid-state (flash) storage, such as an SD card.

Ask about this

Type what you are stuck on. The helper finds the explanation, worked examples and the notes to read, free and instant.

Keep going

← Input and output devicesNetwork hardware →Take a Computer Science test