A computer system needs primary storage for any data it needs to access quickly. This includes:
- start-up instructions;
- the operating system;
- programs that are running;
- any associated data.
There are two main types of primary storage: RAM and ROM.
Note: Virtual memory is secondary storage.
RAM – Random Access Memory
RAM is part of the main memory in a computer system. A typical laptop has around 8 GB of RAM.
What RAM holds (while the computer is on):
- the operating system;
- applications that are running;
- any associated data.
How RAM works:
- When a program is loaded, it is copied from secondary storage (e.g. HDD) into RAM;
- Associated data is also stored in RAM so the CPU can access both data and instructions;
- Once in RAM, data and instructions are transferred to cache memory to further improve access speeds for the CPU.
Key properties:
| Property |
Detail |
| Volatile |
Needs electrical power to operate; data is lost when power is off |
| Read and write |
Data can both be read from and written to RAM |
| Speed |
Fast data access times → better system performance |