Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Please provide the pseudo code for Multilevel Feed Back Queue Scheduling(MLFQS)

ID: 3873173 • Letter: P

Question

Please provide the pseudo code for Multilevel Feed Back Queue Scheduling(MLFQS) algorithm in C. I'm not expected the whole program to be written, just wanted to how you would structure this algorithm.

Here is a few things: There will be 3 queue, the ghighest priority queue will have a quantum of 10, 2nd queue will be 30, and 3rd queue will be 100. There should be a promotion and a demotion counter.

Input will be a text file with this format: Time PID runtime I/O repeat; the tricky part is that a process could have different i/o and run time even if it shares the same PID.

example:

time PID runtime I/O repeat
4000 120 40 15 3
4000 120 17 9 2
7000 150 40 1 1

all three queues will use Round Robin to schedule A and B

Explanation / Answer

In computer science, a multilevel feedback queue is a scheduling algorithm. Solaris 2.6 Time-Sharing (TS) scheduler implements this algorithm.The Mac OS X and Microsoft Windows schedulers can both be regarded as examples of the broader class of multilevel feedback queue schedulers.This scheduling algorithm is intended to meet the following design requirements for multimode systems:

Multiple FIFO queues are used and the operation is as follows:

For scheduling, the scheduler always starts picking up processes from the head of the highest level queue. Only if the highest level queue has become empty will the scheduler take up a process from the next lower level queue. The same policy is implemented for picking up in the subsequent lower level queues. Meanwhile, if a process comes into any of the higher level queues, it will preempt a process in the lower level queue.

Also, a new process is always inserted at the tail of the top level queue with the assumption that it will complete in a short amount of time. Long processes will automatically sink to lower level queues based on their time consumption and interactivity level. In the multilevel feedback queue a process is given just one chance to complete at a given queue level before it is forced down to a lower level queue.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote