<aside>
💡
Summary of Section 3.1 - The Process Concept (C191: Operating Systems for Programmers | zyBooks)
</aside>
1. Definition of a Process
A process is an instance of a program being executed by an operating system (OS). When a user opens an application (e.g., a web browser), the OS creates a new process. The OS itself consists of multiple processes.
2. Process Control Block (PCB)
The OS manages processes using a Process Control Block (PCB), which is a data structure containing key information about a process, such as:
- Current instruction address
- Execution stack
- Resources allocated to the process
- Program being executed
The PCB serves as the concrete representation of a process and is created for each new process.
3. Process Analogy
- A process can be understood using real-world analogies:
- Employment agency analogy: A worker (CPU) performs jobs (program instructions), while the agency (OS) manages assignments using a job status record (PCB).
- Library analogy: A student checking out a book represents a process using system resources.
4. Process States and Transitions
A process can exist in multiple states, transitioning based on system conditions:
- Ready → Running: The OS schedules the process for execution.
- Running → Blocked: The process requests a resource and waits.
- Running → Ready: The OS preempts the process to allow others to execute.
- Blocked → Ready: The required resource becomes available.
Additional states include: