os-mod1
os-mod1
---
- **Hardware**:
- Physical resources: CPU, memory, I/O devices.
- **Operating System (OS)**:
- Manages hardware and provides an interface for applications and users.
- **Application Programs**:
- Examples: Word processors, compilers, browsers, games.
- **Users**:
- Humans, machines, or other computers interacting with the system.
---
---
---
---
---
#### **Definition**
- A **process** is a program in execution, which consists of the program code and its current activity.
- A process includes:
- **Program Code**: Also called the text section.
- **Program Counter**: Specifies the next instruction to execute.
- **Stack**: Contains temporary data like function parameters, return addresses, and local variables.
- **Heap**: Memory dynamically allocated during runtime.
- **Data Section**: Contains global variables.
| State | Description |
| ----------- | -------------------------------------------- |
| **New** | Process is being created. |
| **Ready** | Process is ready for CPU execution. |
| **Running** | Process is currently being executed. |
| **Waiting** | Process is waiting for an external event. |
| **Terminated** | Process has completed or been aborted. |
---