CPU, memory, and storage
Module 1 repeatedly described software as something that runs on hardware. So now it is time to look more closely at the hardware inside a computer.
Computers contain many physical components, but three are especially important for understanding how software runs: the CPU, memory, and storage.
To picture how they work together, imagine someone working at a desk in a records office.
The CPU: the worker
The CPUConcept · lights on your mapCPUThe central processing unit, the part of the computer that executes instructions and performs calculations billions of times per second. Everything else exists to feed it work and hold its results., or central processing unit, is the part of the computer that executes instructions and performs calculations.
In the records-office analogy, the CPU is the worker sitting at the desk, reading instructions, handling information, and completing tasks.
When you open an application, click a button, resize a photograph, or calculate something in a spreadsheet, the CPU performs much of the work required to make that action happen.
Modern computers may have CPUs with several processing cores, allowing them to work on multiple tasks more effectively. But you do not need to understand cores yet. The main idea is that the CPU is responsible for carrying out instructions.
Memory: the desk
MemoryConcept · lights on your mapmemory / RAMAlso called RAM. The computer’s temporary workspace, holding the information that is actively being used so the CPU can work with it quickly. Its contents are normally lost when the power turns off., commonly called RAM, is the computer’s temporary workspace.
In the analogy, RAM is the surface of the worker’s desk, holding the documents, instructions, and information that are currently being used.
When you open an application or file, the computer usually loads the information it needs from storage into RAM, and the CPU can then work with that information quickly.
A computer with more RAM has a larger workspace, so it can keep more applications, browser tabs, and active information readily available at the same time.
When that workspace becomes crowded, the computer may need to repeatedly move information around or temporarily move some of it back to slower storage, which is one reason a computer may become sluggish when too many applications or browser tabs are open. The desk is full.
Storage: the filing cabinet
StorageConcept · lights on your mapstorage / diskAlso called the disk or drive. The place where files, applications, and other information are kept for longer periods. It is larger than RAM, slower to access, and able to preserve its contents when the computer is turned off. is where the computer keeps files, applications, and other information for longer periods.
In the analogy, storage is the filing cabinet. Documents remain there when they are not actively being used. And when the worker needs one, it is taken from the cabinet and placed on the desk.
Photos, videos, downloaded files, installed applications, and saved documents are normally kept in storage.
Your computer may use a solid-state drive, or SSD, for storage. People also sometimes use the word disk as a general term for computer storage, even when the device does not contain a traditional spinning hard disk.
Storage is generally larger than RAM but slower for the computer to access, and its main advantage is that information normally remains there when the computer is turned off.
How the three work together
Suppose you open a saved presentation.
The presentation file begins in storage, the computer loads the information needed for the presentation into RAM, and the CPU then executes the application’s instructions so that you can view and edit it. Cabinet, desk, worker.
As you make changes, the active version of the presentation is held in memory, and when you save the file, the updated information is written back to storage.
The pattern is:
Storage holds it → Memory prepares it for active use → The CPU works on it
These three parts constantly cooperate while software is running.
What happens when the power turns off?
RAM requires power to retain its contents, so when the computer shuts down, the information held only in RAM is normally lost.
But storage does not need continuous power to preserve its information, and saved files usually remain available after the computer is turned off and restarted.
This helps explain why saving your work matters. If a document exists only in temporary memory when an application crashes, recent changes may be lost. But once those changes have been written to storage, they can normally be reopened later.
Many modern applications automatically save work or create temporary recovery files, so a crash does not always erase everything. But the underlying distinction remains important. RAM is temporary working space, while storage is designed to preserve information for longer periods.
This introduces a broader distinction that appears throughout technology:
- PersistentRecognition — just know it existspersistentIntended to remain available over time, the cabinet side of the analogy. The opposite of ephemeral. You’ll hear the word constantly around databases and cloud infrastructure; for now, just connect it to storage. information is intended to remain available over time.
- EphemeralRecognition — just know it existsephemeralTemporary, gone when a process, device, or system stops. The desk, not the cabinet. The opposite of persistent, and the word you’ll hear for anything the system is willing to lose. information is temporary and may disappear when a process, device, or system stops.
You only need to recognize these terms for now. They will become more important when you study databases, cloud infrastructure, and software systems.
Diagnose each everyday complaint: is it about the desk (memory) or the cabinet (storage)?
Understanding common computer problems
Engineers frequently discuss CPU, memory, and storage because each can limit a computer in a different way.
If an application is using too much memory, it is occupying too much of the computer’s temporary workspace, and other applications may struggle to keep the information they need readily available.
If a task is CPU-bound, the processor is the main limitation. The CPU cannot execute the required work quickly enough, even if plenty of memory and storage are available.
If a device is out of storage, there is not enough long-term space to save additional files, install applications, or sometimes perform system updates.
These are different problems and may require different solutions. Adding storage will not necessarily fix an overworked CPU, and adding memory will not help if the storage drive is completely full.
The same distinction becomes important in cloud computing, where companies pay for different amounts of processing power, memory, and storage.
The mental model to remember
The CPU executes instructions and performs work.
Memory, or RAM, temporarily holds the information that is actively being used.
Storage keeps applications, files, and information for longer periods, including when the device is turned off.
Return to the records-office analogy whenever you need it:
- The CPU is the worker.
- RAM is the desk.
- Storage is the filing cabinet.
A colleague says: “The report generator crashes on big reports because it runs out of memory.” What's actually going on, in desk-and-cabinet terms?
▼ answer the check to continue ▼