1 - OS Process CPU Scheduling
1 - OS Process CPU Scheduling
Basic Concept
Non-Preemptive
Preemptive
Non-Preemptive or Cooperative Scheduling
Once the CPU is allocated to a process, process keeps
the CPU until:
it releases when it completes
by switching to waiting state
E.g : 1. Windows 3.x and Apple Macintosh operating
systems uses non-preemptive scheduling
2. Windows (also 10) uses a round-robin technique with
a multi-level feedback queue for priority scheduling
Process is executed till completion. It cannot be
interrupted.
Eg First In First Out
Preemptive Scheduling
The running process is interrupted for some
time and resumed later on, when the priority
task has finished its execution.
16
First-Come, First-Served (FCFS)
Process id AT BT CT TAT WT
1 0 2
2 3 1
3 5 6
Process id AT BT CT TAT WT
1 0 2
2 3 1
3 5 6
First Come First Serve (Convoy Effect
Process AT BT CT TAT WT
P1 0 4
P2 1 3
P3 2 1
P4 3 2
P5 4 5
P1 burst time: 15
P2 burst time: 8
P3 burst time: 10
P4 burst time: 3
30
H.W: Practice: Shortest Job First (Preemption)
P1 0 7 16
P2 2 4 7
P3 4 1 5
P4 5 4 11