1. Main Memory
What is memory?
Data and programs need to be stored in a computer system. The technology used to do this is called memory. Memory can be divided into two types: main memory and secondary storage.
Main memory is any memory that is directly accessed by the CPU. Examples of main memory include
- Random Access Memory (RAM)
- ROM chips
Registers and internal cache are not considered main memory as they reside within the CPU. Hard disks and flash memory are examples of secondary storage. When the CPU needs to use programs or data from the hard disk, they are first loaded into main memory, and are accessed from there.
Main memory can hold more than one program at a time, which makes it quicker for the CPU to swap between tasks.
Secondary storage is used for holding large amounts of data and programs long-term, but can only be accessed relatively slowly.