The Big Picture: Four Ideas to Keep
Four ideas come back again and again in this course: abstraction, layering, concurrency, and interrupts. Learn them now and the rest gets easier.
6.1 Abstraction
What it means: Each layer hides the complexity of the layer below.
Think of driving a car. You press the pedal. You do not need to know how fuel burns in the engine. The pedal hides that detail.
Application Layer: "I want to save a file"
↓
Windows API: "Create a file on disk"
↓
File System: "Find free space, create inode, allocate blocks"
↓
Storage Driver: "Send commands to disk controller"
↓
Disk Controller: "Move read/write head, write data magnetically"
↓
Hardware: "Electrons flow through circuits"
A file system is the system that keeps track of where every file is stored. An inode and blocks are its record and storage pieces for a file; you will meet them later.
You don't need to understand the electrons to save a file. Abstraction handles that.
6.2 Layering
What it means: Lower layers provide services to higher layers.
Applications
↑ needs services
↓ calls
Operating System
↑ needs services
↓ calls
Firmware
↑ needs services
↓ calls
Hardware
A layer can only request services from the layer immediately below it (mostly). Like a restaurant: the customer talks to the waiter, not the cook.
6.3 Concurrency
What it means: Multiple things happening simultaneously.
Think of a kitchen where one cook chops, one boils, and one bakes, all at the same time.
Simultaneous activities on your computer:
- CPU executing instructions
- GPU rendering graphics
- Disk controller reading/writing
- Network adapter sending/receiving packets
- Audio controller playing sound
They coordinate via:
| Method | Plain meaning |
|---|---|
| Interrupts | Hardware signals "I finished, do something" |
| Shared memory | They read/write shared data structures (a common notice board) |
| Drivers | Manage the coordination |
6.4 Interrupts
What they are: Signals that pause the CPU to handle events. It is a tap on the shoulder: "Excuse me, I need you now."
CPU executing Hard disk finishes CPU stops and
instruction X reading data → handles interrupt
→ comes back to X
Types of interrupts:
| Type | What it is | Example |
|---|---|---|
| Hardware interrupt | External device signals | Disk ready, network packet arrived |
| Software interrupt (system call) | Application asks the OS to do something | A program asks to open a file |
| Exception/Fault | Error condition | Divide by zero, page fault |
We'll cover this in detail in Chapter 2.
Summary
| Concept | Plain meaning |
|---|---|
| Abstraction | Each layer hides the details below it |
| Layering | Each layer uses only the layer just below |
| Concurrency | Many parts work at the same time |
| Interrupt | A signal that pauses the CPU to deal with something |