How Computers Work · How an Operating System Works · Lesson 1 of 5
Programs and Processes
What the operating system does, and how it runs many apps at once.
Programs at rest, processes at work
The operating system is the main program that runs the computer. On most PCs it is Windows. On a Mac it is macOS. It starts the computer, talks to the hardware, and shares the computer's power between your apps.
A program is a set of instructions saved on the disk. Until you open it, it just sits there, like a recipe in a book.
When you open a program, the operating system makes a process. A process is a program that is running right now. It is the recipe being cooked. If you open two Notepad windows, you may see two Notepad processes.
Every process needs memory, also called RAM. This is the fast, short-term workspace where running apps keep what they are using. The operating system hands out memory to each process. When you close the app, the process ends and its memory is given back.
You can watch all of this in Task Manager. Press Ctrl+Shift+Esc to open it. The Processes tab lists what is running and how much memory each one uses. The Performance tab shows a graph of total memory use.
On a Mac, the same tool is called Activity Monitor. You can find it with Spotlight, the search you open with Command+Space.
Looking is safe. Ending a process you don't recognize is not, so just watch for now.
On the practice computer, open an app and watch its process appear with its own memory. Then close it and see that memory freed.
Keeping apps apart
Not every process has a window. A background process runs without showing you anything. It might check for updates, sync your files, or run your antivirus.
Some background processes are services. A service is a background program that Windows starts on its own. Many start before you even sign in. Printing and Windows Update use services.
So Task Manager will show many more processes than the apps you opened. That is normal. A fresh computer can easily have over a hundred.
Here is one of the operating system's most important jobs. It keeps processes apart. Each process gets its own private area of memory. A process can't touch another process's memory by mistake. Reaching in on purpose needs special permission from the operating system.
This wall does two good things:
- Stability. If one app crashes, the others usually keep running. The crash stays inside its own area.
- Privacy. Apps can't casually snoop on each other. What you type in one app isn't lying open for the others to read.
The wall is not perfect, and apps you install can still do a lot with your files. Later lessons cover that. But it is a big reason one bad app rarely takes down everything.
Phones work the same way, only stricter. On iPhone and Android, each app lives in its own sandbox. A sandbox is a walled space the app can't leave without asking. Your computer uses the same idea, with walls that are a little lower.
Try it on the practice computer
This lesson has a lab on a pretend computer right in your browser: windows, menus and settings that behave like the real thing. Nothing you do touches your own computer.
Open the labCan you answer these?
- You close a photo app. What happens to the memory its process was using?
- What is the word for a program that is running right now, with its own memory?
Answer them in the app to earn 50 XP.
Answer in the app