What is FCFS Planning

The convoy effect in process planning

As far as I know Convoy effect understand, in the context of vehicle traffic on a road network. A slowly moving group of vehicles passed the system and slowed down the traffic even in areas that were not directly affected by the convoy.

How does this apply in the context of CPU planning? It doesn't seem like an analog situation.


The convoy effect is the result of using the FCFS (First-Come-First-Serve) planning algorithm. In this case, the dispatcher (short-term planning) continues the processes that are in the standby state to the processor in a FIFO manner. This is basically a simple implementation of Queue. Processes that come first must use the processor first.

Since the not preemptive Policy is implemented, it means that once the process starts, it will not stop until it has completed its task or is blocked by the operating system due to a fatal error or I / O requirement. This blocks processes behind themselves. When a CPU-intensive process is running, some I / O-intensive processes are not triggered. In this case they are I / O devices inactive . When the CPU-intensive process gives up control, the I / O-bound processes quickly traverse the CPU by adding them to the I / O queues. During this time the CPU idle .

As you can see, this method is not very efficient because both CPU and I / O devices remain idle for a long time. Apart from that, this method often results in a very high average waiting time.

The effect is analogous to the traffic example. Due to slow moving vehicles the transport system becomes inefficient. Vehicles that move faster and you aim can reach faster (similar to the initial state of a process) than the slow moving vehicles in front of them cannot. If these vehicles were able to move at their potential speed, the road would be less congested than in this case. Vehicles are analogous to the processes in the standby queue.

First-come, first-served (FCFS) scheduling can also create a deadlock in a busy dynamic system in another way known as the convoy effect.

If a CPU-intensive process blocks the CPU, multiple I / O-intensive processes can be backed up behind it so that the I / O devices remain inactive. When the CPU hog finally releases the CPU, the I / O processes quickly go through the CPU, leaving the CPU idle while everyone queues for I / O. The cycle then repeats itself when the CPU-intensive process is ready again queue.

If several processes in a multiprogramming system are waiting for the CPU to run in an FCFS system and a slow processing process is using the CPU, all the fast processes waiting for the CPU will wait unnecessarily long due to the convoy. This is a convoy effect.

If the first process in the FCFS has a longer service time than other processes with a shorter service time, this leads to an increase in the average waiting time, which is not the case if processes are served first in the same first shorter service time and then the process has the last a long service time then this leads to a lower average waiting time than in the first case above, when the process first has a longer service time. it is called the convoy effect.

We use cookies and other tracking technologies to improve your browsing experience on our website, to show you personalized content and targeted ads, to analyze our website traffic, and to understand where our visitors are coming from.

By continuing, you consent to our use of cookies and other tracking technologies and affirm you're at least 16 years old or have consent from a parent or guardian.

You can read details in our Cookie policy and Privacy policy.