Feedback Queue in Operating System
In a computer or a laptop, there is a processor which do all the tasks. The processor cannot do all the tasks at a time. So, the tasks will be prioritized and scheduled according to it. This work will be done with the help of Feedback Queues. So, in this article, we are going to study briefly about the Feedback Queue. We will also see their advantages and disadvantages of it.
What is Feedback Queue?
The Feedback Queues was developed by Fernando J. Corbato. The Feedback Queue was introduced in the year 1962. For this, Fernando J. Corbato has received Turing award. The Feedback Queue usually works in multi levels, and they are also called as Multi level feedback Queue. The Feedback Queue works in a sequential order, and it must perform some specific steps. The Feedback Queue firstly divides the processes or tasks into many parts which will be divided as ready queues based on the requirement of processor. The Second step is to prioritize the divided processes or tasks. It gives the processes to the CPU which has high I/O bursts priority and this will be the last and final step of the steps in the Feedback Queue. In the Feedback Queue there will be a method called Round robin and this method will be used in scheduling a foreground queue. The Feedback queue also has another method called FCFS for scheduling the queues that are present in background.
Process of Feedback Queues
- In the Feedback Queue the processes will run in multiple levels. The first process which starts to run will be considered as the first Queue.
- The priority of the First Queue will not be altered when it is under process.
- When the first queue does not finish its process in the given 4 units then the priority will be removed, and the next queue will be prioritized.
- The queue should be processed in the given time slot otherwise next queue will be prioritized.
- All the processes that are scheduled will be in the FCFS fashion.
- The Lower priority queues only come into process when the highly prioritized Queues are empty.
- The Lower priority queue which is in process will be stopped when the other priority queue is declared.
Advantages of Feedback Queue
There are many advantages in using the Feedback queues and the following are the some of the advantages of Feedback Queues.
- The Feedback Queues are very flexible in terms of process scheduling and providing the time slots to the prioritized processes.
- The Feedback Queues allows the processes to switch between the highly prioritized and lowly prioritized processes.
- It helps in preventing the CPU or processor overloading.
- In the Feedback Queue there is a mechanism called aging mechanism which helps in moving a lower priority activity to the next higher priority queue.
- The Feedback Queues also allows the processes to switch in between the queues based on their burst time.
Disadvantages of Feedback Queue
As the Feedback Queues also have some advantages and below mentioned points are the disadvantages in using the Feedback Queues.
- The Feedback Queues are very complex, and they are not easy to understand.
- The Feedback Queues are one of the most challenging algorithms in the computer organization.
- In the Feedback Queues all the methods should require having its own optimum scheduler.
- When the Feedback queues are used the CPU overheads may be associated with this type of operations.
- To select the best scheduler, it always depends on the other methods.
Need of using the Feedback queues
The Feedback queues are only used in the task scheduling of the processor. The Feedback queue has got a lot of advantages than any other task schedulers. The Feedback queue method is more adaptable than multilevel queue scheduling method. The Feedback queues have quick response time, and they carry operations like rescheduling a task within short period of time. The Feedback queue method primarily learns from the previous processes, and it also predicts the behavior of the upcoming task or a process. It helps in increasing the reaction time and reduces the time complexity of the process. The turnaround time of the process will also be decreased by using the Feedback queue.