CPU Scheduling
CPU Scheduling
Algorithms
PRESENTED BY: BHAVNEET KAUR (ROLL NO. 25)
DEFINITION:
Non-preemptive Scheduling:
Here, once a process starts executing on the CPU, it runs to completion without being
interrupted by other processes. The CPU is only reassigned when the running process is
terminated or completed.
Example: FCFS
First-Come, First-Served (FCFS)
Description:
Processes are executed in the order they arrive in the ready queue. This
is a non-preemptive scheduling algorithm.
Gantt Chart:
P1 P2 P3
0 6 14 18
Gantt Chart:
P1 P3 P2
0 6 10 18
Gantt Chart:
P1 P2 P3 P1 P2
0 4 8 12 16 20
Gantt Chart:
P1 P2 P3 P1
0 1 4 7 10
Pros: Suitable for systems where processes can be classified into different
categories
Cons: Processes in lower-priority queues may experience starvation.
EXAMPLE :
Process Arrival Time Burst Time Priority
P1 0 6 High
P2 1 8 Low
P3 2 4 Low