Processes in Operating System – Definition, Structure & Components | DIT Notes
Processes
A clear, exam-oriented guide to the definition of a process, the difference between a program and a process, and the basic components contained in a process.
Quick Access
Jump directly to any part of Article 3.1.
3.1.1 Definition of Process
Understanding the central concept of a process in an Operating System.
A process is a program in execution. It includes the program instructions as well as the current activities and resources required for its execution.
When a program is stored on a disk, it is simply a set of instructions. When that program is loaded into memory and starts executing, it becomes a process. The Operating System manages processes and controls their execution so that multiple programs can run efficiently.
Program
A passive set of instructions stored on a storage device.
Process
An active instance of the program, together with its current activities and required resources.
3.1.2 Program vs. Process
The key distinction between a passive program and an active process.
| Program | Process |
|---|---|
| A passive set of instructions. | An active instance of a program during execution. |
| Stored on a storage device. | Loaded into memory and executing. |
| By itself, it is not currently executing. | Includes current activities and resources required for execution. |
3.1.3 Example
A simple real-world computer example of program versus process.
Consider calculator.exe on a computer. When calculator.exe is stored on the computer, it is a program. When the user opens Calculator and it starts running, it becomes a process.
- Program instructions
- Current activities
- Required resources
3.1.4 What a Process Contains
The basic structure and components associated with a process.
A process generally contains the following components:
1. Program Code
Program Code contains the instructions that are to be executed.
2. Data
Data contains the information required by the program.
3. CPU State
CPU State represents the current values of CPU registers and the program counter.
4. Stack
The Stack stores temporary data such as function calls and local variables.
5. Resources
Resources are resources assigned to the process, such as files and memory.
- Current activities
- Execution information
- Required resources
- Define a process as a program in execution.
- Know the difference between a passive program and an active process.
- Memorize the five basic components: Program Code, Data, CPU State, Stack and Resources.
- Remember the calculator.exe example.
Quick Revision
Fast review of the complete Article 3.1.
- A process is a program in execution.
- A program is a passive set of instructions stored on a storage device.
- A process is an active instance of a program during execution.
- When a stored program is loaded into memory and starts executing, it becomes a process.
- The calculator.exe example shows the difference clearly: stored calculator.exe is a program; running Calculator is a process.
- A process generally contains Program Code, Data, CPU State, Stack and Resources.
- Definition of process
- Program versus process
- Basic process components
- Meaning of CPU State and Stack
- Examples of resources assigned to a process
4 Short Questions & Answers
Click a question to reveal its answer.
Q1. What is a process?
A process is a program in execution. It includes the program instructions as well as the current activities and resources required for its execution.
Q2. What is the difference between a program and a process?
A program is a passive set of instructions stored on a storage device, while a process is an active instance of that program during execution.
Q3. Name the main components contained in a process.
The main components are Program Code, Data, CPU State, Stack and Resources.
Q4. Give the calculator.exe example of a program and a process.
When calculator.exe is stored on a computer, it is a program. When the user opens Calculator and it starts running, it becomes a process.
2 Long Questions & Answers
Structured answers suitable for approximately 5-mark preparation.
Q1. Define a process and explain the difference between a program and a process.
A process is a program in execution. It includes the program instructions as well as the current activities and resources required for its execution.
A program is a passive set of instructions stored on a storage device. A process is an active instance of that program during execution.
- A program is stored and passive.
- A process is active and executing.
- A process is loaded into memory and has current activities and required resources.
For example, calculator.exe stored on a computer is a program. When the user opens Calculator and it starts running, it becomes a process.
Q2. Explain the basic structure and components of a process.
A process generally contains several parts that represent the instructions, information, execution state and resources needed during execution.
- Program Code: Contains the instructions to be executed.
- Data: Contains information required by the program.
- CPU State: Contains current values of CPU registers and the program counter.
- Stack: Stores temporary data such as function calls and local variables.
- Resources: Includes resources assigned to the process, such as files and memory.
Together, these components form the basic information and resources associated with a program while it is executing as a process.
10 Important MCQs
Open an MCQ to view its options, then use Show Answer to check your response.
1. What is a process?
Show Answer
2. A program stored on a storage device is best described as a ______.
Show Answer
3. When a program is loaded into memory and starts executing, it becomes a ______.
Show Answer
4. Which component contains the instructions to be executed?
Show Answer
5. Which process component contains information required by the program?
Show Answer
6. CPU State includes the current values of CPU registers and the ______.
Show Answer
7. Which component stores function calls, local variables and temporary data?
Show Answer
8. Which of the following is an example of a resource assigned to a process?
Show Answer
9. Which statement correctly describes a process?
Show Answer
10. In the calculator.exe example, when the user opens Calculator and it starts running, calculator.exe becomes a ______.
Show Answer
Final Exam Reminder
Revise the core points before attempting the test.

No comments