Convoy Effect in Operating Systems - cook the code

Tuesday 9 January 2018

Convoy Effect in Operating Systems

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 get finished, that means other processes have to wait for their turn. This lead to a situation called convoy effect.
convoy-effect
#reference
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 have less burst time they will get executed fast and will come back for 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 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.

1 comment:

Aman Singh said...

👌👌

Post a Comment