By the end of this lesson you will be able to
- Name the layers between a person and the hardware and say what each does.
- Explain what the kernel does and why applications must ask it for help.
- Describe user space and why one failing program need not stop the whole computer.
- Use the layer picture to decide where a fault is likely to be.
A computer is too complicated to understand all at once, so the people who build them split it into layers. Each layer does one job and hides its details from the layer above. Once you see the layers, many everyday facts make sense: why one program can freeze without taking down the whole laptop, why a missing driver stops a device working, and why a program cannot simply read any file it likes. This lesson gives you that picture without any programming.
Layers and the idea of abstraction
Think of a restaurant. You talk to a waiter. The waiter talks to the kitchen. The kitchen deals with suppliers, fridges and ovens. You never need to know how the oven works, and the cook never needs to know what you look like. Each part uses the one beside it through a simple agreement. In computing this is called Abstraction: hiding the complicated details of one layer so that the layer above can use it simply. When you press Save, you do not tell the disk which tiny area to magnetise or charge. The layers below do that.
You are here
Read this figure as text
A stack of layers: person, applications, operating system and kernel, drivers and firmware, hardware.
A stack, top to bottom. You: you click, type and look. Applications: browser, word processor, games. Operating system: manages files, memory, programs and users; its core is the kernel. Drivers and firmware: small pieces of software that talk to each particular device. Hardware: processor, memory, storage, screen, keyboard, network card. Each layer talks only to the layer directly above and below it.
The Operating system is the layer that manages the hardware and shares it between programs. A Driver is a piece of software that knows how to talk to one kind of device, such as a printer or a graphics chip. Firmware is the small built-in software stored on the device or on the motherboard that starts it and gives the first instructions. An Application is a program that does a job for you.
The kernel: the part with the keys
The Kernel is the central part of the operating system. It is the only software that is allowed to touch the hardware directly. It decides which program gets the CPU and for how long, hands out memory, controls access to disks and the network, and checks that programs behave. Think of it as the building manager who holds the keys: tenants (applications) may ask for a room, but they may not walk into the plant room or into other tenants' flats.
Because of this, the running software is divided into two areas. Kernel space is where the kernel runs, with full power over the machine. {{user-space}} is where ordinary programs run, with limited power. A program in user space cannot read another program's memory or write straight to the disk. When it needs something that only the kernel may do, it makes a System call: a formal request to the kernel. The kernel checks the request and then either does the job or refuses.
Read this figure as text
Two regions, user space with programs above and kernel space with the kernel and drivers below, with a gate between.
Two regions, stacked. The upper region is user space: your browser, your word processor and a game, each marked as limited power. The lower region is kernel space: the kernel and the drivers, marked as full power. Between them is a gate labelled system calls: requests are checked here. Below kernel space is the hardware: CPU, memory, disk, network card.
What happens when you press Save
Follow one ordinary action through the layers. You press Save in a word processor. The word processor does not write to the disk. It makes a system call asking the kernel to write some bytes to a file. The kernel checks that you are allowed to write there. It then asks the file system, which keeps track of where each file lives. Next, the driver for the storage device translates the request into the exact commands that this particular drive understands. Last, the drive stores the data. When it finishes, the answer travels back up and you see the title bar lose its unsaved mark.
Read this figure as text
A sequence of messages between the word processor, kernel, driver and drive.
Four actors in order: Word processor, Kernel, Driver, Drive. 1 The word processor asks the kernel: write these bytes to report.odt. 2 The kernel checks permission and asks the driver: store this on the drive. 3 The driver sends the drive's own commands to the drive. 4 The drive replies: done. 5 The driver tells the kernel it is done. 6 The kernel tells the word processor that the save worked.
Why the layers matter in everyday life
- One program crashes, the computer carries on. Programs run in user space, separated from each other and from the kernel. The kernel can close the failed one and keep everything else running. If the kernel itself fails, the whole system stops, which is rare.
- Programs ask permission. A program cannot read your private files or use the camera unless the kernel and the system's settings allow it. This is how permissions and privacy controls are enforced.
- Drivers are the weak link for new devices. A device that works in one operating system may not work in another until a driver for that system exists, which is why driver and update lessons matter.
- The same application runs on different hardware. Because the layers hide the details, a browser does not need a separate version for every make of disk and screen. It needs a version for the operating system.
- Programs written for one operating system do not run on another. The system calls and layers differ, which is why a Windows installer will not install on Ubuntu without extra tools.
- One program frozen
- Others work fine
Close, update or reinstall it
- Device stops after an update
- Several programs affected
Update the driver, restart
- No power or no display
- Drive noises, overheating
Check cables, then get repair help
Read this figure as text
Three columns pairing symptoms with the layer that probably causes them.
Three columns. Application layer: one program is frozen but the rest of the computer works; the fix is to close it, update it or reinstall it. Operating system or driver layer: a device such as the printer or Wi-Fi stops working after an update; the fix is to update or reinstall the driver or restart. Hardware layer: noise from the drive, overheating, no power or no display at all; the fix is to check cables and power and then ask for repair help.
See the layers on your own computer
These steps only look at information. They change nothing.
The command uname -r prints the version of the kernel that is running, and uname -s prints the kernel's name. Both are safe, read-only commands.
uname -s
uname -rLinux
6.8.0-45-genericIn PowerShell, [System.Environment]::OSVersion shows the Windows version. You can also open Settings, then System, then About, which lists the edition and version of Windows 11 and the processor and installed memory. Windows hides the kernel version in this display, so the About page is the better place to start.
[System.Environment]::OSVersionCommon mistakes
✖ Instead of: Thinking the operating system and the hardware are the same thing.
✔ Do this: The hardware is the physical parts. The operating system is software that manages them and shares them between programs.
✖ Instead of: Restarting the whole computer for every frozen program.
✔ Do this: Close the one program first (End task or Force Quit). Restart only if the whole system is not responding.
✖ Instead of: Assuming any program can use any device or file.
✔ Do this: Programs must ask the kernel, which checks permissions. Allow access only to programs you trust.
If something goes wrong
unamesays command not found in a Windows terminal.unameis a Linux command. In Windows use the About page in Settings, or the PowerShell command shown in the lesson.- I cannot tell which layer a problem belongs to.
- Ask three questions: does it affect one program or many, did it start after an update, and are there physical signs such as noise or heat? Many programs plus an update points to the system or a driver; physical signs point to hardware.
- The About page shows more than I understand.
- Look only for the name and version of the system, the processor and the memory size. Ignore the rest for now.
Key terms
- Abstraction
- Hiding the complicated details of one layer so the layer above can use it simply.
- Kernel
- The core part of an operating system that manages the hardware and runs everything else.
- User space
- The part of a computer's running software where ordinary programs live, with limited power over the hardware.
- System call
- A request from a program to the kernel to do something it is not allowed to do itself, such as read a file.
- Driver
- Software that lets the operating system talk to a piece of hardware.
- Firmware
- Small built-in software stored on a hardware device that starts and controls it.
Practise it for real
Reading is not the same as being able to do it. Complete these on your own computer, then tick only what you have actually done. These ticks are your own honest record: nothing checks them for you.
Find the layers on your own computer
On your real computer find one example for every layer. For hardware, note the processor model and memory size (on Ubuntu open Settings, then About; on Windows open Settings, then System, then About). For the operating system, note its name and version. For the kernel on Ubuntu, run uname -r. For one driver, find a device in Device Manager (Windows) or Settings, then Printers or Sound (Ubuntu). For applications, list three that are open now. Write the list as five lines, one per layer.
Challenge: explain a Save to a friend
Without looking at the lesson, write or say a short explanation for a friend of what happens when you press Save, naming at least four layers or parts and using one everyday comparison, such as the restaurant or building manager. Then use the layer picture to explain two faults: a frozen browser and a printer that stopped working after an update.
Knowledge check
6 questions. You need 80% to pass. Mistakes here are part of learning, and you can retry as often as you like.
Summary
- A computer is a stack of layers, and each hides its details from the one above.
- The kernel alone controls the hardware directly and decides who may use it.
- Ordinary programs run in user space and make system calls to ask the kernel for help.
- A Save passes down through the application, kernel, driver and drive and the answer returns.
- Thinking in layers helps you decide whether a fault is in an application, the system or hardware.
Checklist: can you do these?
Marking a lesson as read does not prove you can do it. Skills count as demonstrated when you pass the quiz (not yet) and complete the practical tasks (not yet).
Related lessons
References and further reading
Official sources for details that can change between versions.
- Ubuntu documentation (Canonical)
- Windows documentation (Microsoft)
- The Linux kernel documentation (The Linux Kernel Organization)