Level 0 · Module 2
Processes
Understand how the operating system represents, schedules, and isolates running programs.
Not completed
By the end, you can
- Describe the state and resources associated with a process.
- Explain common process states and CPU scheduling.
- Distinguish process isolation from communication between processes.
Summary
A process is the operating system’s representation of a running program. It has an identity, memory, resources, and an execution state that the OS tracks.
Introduction
Module 1 distinguished stored programs from running processes. Now we can look at what the OS must record to keep many processes moving safely.
Explanation
Each process normally has a process identifier, virtual memory, open resources, security identity, and one or more execution paths. A process may be running, ready to run, waiting for an event, or terminated. The scheduler chooses a ready process for a CPU core and later switches to another. Isolation prevents one process from directly changing another’s memory; explicit OS mechanisms allow controlled communication.
Real-world example
While network data is unavailable, a browser process can wait. The scheduler gives CPU time to other ready processes. When data arrives, the OS marks the browser ready so it can continue.
Watch states change
created → ready → running
↓ ↑
waiting
running → terminatedCode example
09:00.000 process 42 running
09:00.010 process 42 waits for disk
09:00.010 process 77 running
09:00.018 disk completes; process 42 becomes readyCommon mistakes
- Assuming every process is executing on a CPU at every moment.
- Believing process isolation means processes can never communicate.
- Treating a process identifier as a permanent identity across restarts.
Quiz
Knowledge check
Try it
Classify the states
Classify a music player as running, ready, or waiting while it decodes audio, waits for disk data, and waits for its next turn on the CPU.
Key takeaways
- A process bundles running state and OS-managed resources.
- Scheduling moves processes among ready, running, and waiting states.
- Isolation protects processes; OS facilities enable deliberate communication.