DEV Community

loading...
Cover image for Multilevel Feedback Queue Scheduling | Operating System - M02 P11

Multilevel Feedback Queue Scheduling | Operating System - M02 P11

rahulmishra05 profile image Rahul Mishra Originally published at programmingport.hashnode.dev ・2 min read

This is a multipart blog article series, and in this series I am going to explain you the concepts of operating system. This article series is divided into multiple modules and this is the second module which consists of 11 articles.

In this article we will see about the multilevel feedback queue scheduling, which is a solution for the multilevel queue scheduling.

Multilevel feedback queue

  • We use multilevel feedback queue, to overcome the problem that arrives in multilevel queue scheduling.
  • In multilevel queue scheduling problem of starvation is present.
  • Starvation in CPU scheduling means that, if multiple process of system process arrives than the processes of interactive process and batch process will not get executed.
  • This is because in multilevel queue scheduling system process has highest priority, then interactive process has medium priority and batch process has least priority.
  • So, when more number of processes of high priority will arrive then processes of other categories having low priority will not get executed, which is a problematic situation.

Untitled Diagram.png

  • Suppose we have a process P1 in the lowest priority ready queue.
  • As it is in lowest priority ready queue its time quantum for which it can execute is very less.
  • It will execute for that time period and then if it got terminated then it will be removed from the ready queue.
  • If the process do not complete then its feedback will be given to the upper priority queue having more time quantum to execute a process, and then the process will get execute there.
  • This will keep happening if the process does not get terminated.
  • If the process not get terminated and arrive in highest priority ready queue, then there it will get executed by following the principle of FCFS (First Come First Serve)
  • Giving feedback means that we are shifting the process from the lower priority ready queue to upper priority queue and that to by maintaining its state so we do not need to execute it from beginning, we do that by using PCB (process control block).

This was all about multilevel feedback queue. Hope you liked it and learn something new from it.

If you have any doubt, question query related to this topic or just want to share something with me, then please feel free to contact me.

📱 Contact Me

Twitter,
LinkedIn,
Telegram,
Instagram,

📧 Write a mail

rahulmishra102000@gmail.com

🚀 Other links

GitHub,
HackerRank

Discussion (0)

pic
Editor guide