PP 3
PP 3
---
Process scheduling is the method by which the operating system decides which process gets to u
1. **Process**: A program in execution. Each process has a state (e.g., running, waiting, ready).
2. **Scheduler**: The OS component responsible for deciding which process runs next.
3. **CPU Scheduling**: The process of assigning CPU time to processes, based on scheduling a
1. **Preemptive Scheduling**:
- The scheduler can interrupt a running process to allocate CPU time to another process.
- **Example**: Round Robin, Shortest Job First (SJF).
2. **Non-preemptive Scheduling**:
- A running process is not interrupted and runs until it finishes or voluntarily releases the CPU.
- **Example**: First-Come, First-Served (FCFS).
4. **Priority Scheduling**:
- Processes are assigned priorities. The process with the highest priority gets the CPU.
- **Pros**: Suitable for systems with tasks of varying importance.
- **Cons**: Can lead to starvation (low-priority processes may never get executed).