A shell interprets commands, and a pipeline sends one command's output to another command's input. Scheduling chooses work to run; context switching changes what the CPU runs and saves or restores execution context. Keeping command flow separate from process execution makes the PCB's role clearer.
Key terms
A scheduler selects runnable work. During a context switch, the operating system saves and restores execution state associated with processes or threads; the PCB holds important process information.
| Term | Meaning |
|---|---|
Scheduling | Choosing which task gets a resource such as CPU time, and in what order. |
Shell | A command interpreter that starts programs and provides features such as variables, redirection, and pipelines. |
Pipeline | Connects the output of one command to the input of another, often with the shell's ` |
Utility program | A program that helps operate, maintain, inspect, or configure a system. |
macOS | Apple's current name for its Mac operating system, distinct from older “Mac OS” branding. |
Terms to distinguish
| Term | Meaning |
|---|---|
UNIX | A family and historical lineage of multiuser operating systems originating at Bell Labs. The name can also have specific certification meanings in product contexts. |
Linux | The Linux kernel and, in common usage, operating-system distributions built around it. Linus Torvalds began developing the kernel in 1991. |
Dispatch | Handing the CPU to a selected runnable process or thread so it can run. |
Wake up | Moving a waiting task toward a runnable state when its condition is met, such as I/O completion. |
Spooling | Queueing work, often on disk, so a slower device or service can process it in order. |
Terms in code
| Term | Meaning |
|---|---|
Context switching | Saving enough state of one executing task and restoring another's so the CPU can switch between them. |
Non-Preemptive scheduling | A scheduling approach in which the scheduler does not forcibly take the CPU from a running task; the task yields or blocks. |
Preemptive scheduling | A scheduling approach in which the system can interrupt a running task and assign the CPU to another one. |
PCB | Process Control Block: an operating-system data structure holding information needed to manage a process, including relevant execution state. |
Reading a technical document
A shell connects commands through a pipeline. A context switch changes which task executes on the CPU and has state-management cost.
Find the subject and action first: a command can pass data through a pipe while the scheduler independently decides when its process runs. These are different kinds of flow.
Key takeaways
Separate task selection, execution switching, command connections, and process records.
- Scheduling — Chooses which work gets a resource and when.
- Dispatch — Gives the CPU to a selected runnable task.
- PCB — Stores information the operating system needs to manage a process.

