Chapter 3

Memory, Storage and Virtual Memory

The difference between volatile RAM and non-volatile ROM, primary versus secondary storage, and how virtual memory uses secondary storage.

Primary memory: RAM and ROM

Primary memory is directly accessed by the CPU. There are two main types. RAM (Random Access Memory) is volatile: it loses its contents when the power is switched off. RAM holds the programs and data that are currently in use, and its contents can be read and changed. ROM (Read Only Memory) is non-volatile: it keeps its contents without power. ROM usually stores the start-up instructions (such as the bootstrap) that the computer needs the moment it is turned on.

Key idea

RAM is volatile and can be written to; ROM is non-volatile and normally only read. Both are primary memory accessed directly by the CPU.

Secondary storage

Secondary storage is non-volatile and holds data and programs long-term, even when the power is off. Examples include hard disk drives (HDD), solid state drives (SSD), optical discs and USB flash drives. It is slower than RAM but has much larger capacity and keeps files permanently.

Virtual memory

When RAM becomes full, the operating system can use part of the secondary storage as virtual memory. Data that is not immediately needed is moved from RAM to the disk, freeing space so more programs can run. Because the disk is much slower than RAM, relying heavily on virtual memory can slow the computer down.

Remember

  • RAM = volatile; ROM = non-volatile.
  • Secondary storage keeps data with the power off.
  • Virtual memory uses secondary storage, not extra RAM.

Stuck on this topic? A verified JomKelas tutor can walk you through it.

Find a verified tutor