What is the convoy effect in an operating system?

Convoy Effect in Operating Systems
Convoy effect in Operating System is a phenomenon (in First come First serve) in which whole operating system slows down due to few slow process.
As FCFS is a non-preemptive scheduling algorithm, the CPU will be allocated to a process until it gets finished, that means other processes have to wait for their turn. This lead to a situation called convoy effect.
Suppose there is a process with large burst time (CPU intensive process) and also there are other processes with small burst time but are input/output bound.
  • CPU intensive process is allocated CPU time, the I/O bound process has to wait for CPU.
  • This makes I/O devices ideal.
  • After the CPU intensive process has been finished it is sent to I/O queue and I/O bound processes will be given CPU time.
  • As I/O bound processes to have less burst time they will get executed fast and will come back to I/O device. But CPU intensive process is still using I/0 device. So they have to wait.
  • This will make CPU ideal.
So overall we can see that how a big process (slow process) makes the whole Operating system slower.
How to avoid Convoy Effect?
We can use preemptive scheduling like round-robin scheduling, in which every process will be given equal chance and will avoid convoy effect.

Inshort: As all processes wait for a one big process. This results in lower CPU and device utilization, which is called convoy effect.

Comments