Help on multilevel Feedback queue Scheduling
Posted: Tue Feb 23, 2016 7:25 pm
With reference to the same on Wikipedia by MollenOS, I have implemented 'almost' most of the Multilevel Feedback queuing and it works as expected. I got 10 queues with highest queue getting smallest timeslice. The scheduler starts always from the top of the highest level queue and goes on searching and coming down until it gets a task in some queue. the the task is assigned the cpu and put at the last of the lower queue if it didn't completed in its timeslice. This is done until it reaches the last queue(base) where it just prempts in round robin fashion until its blocked for some io operation at which it jumps to higher queues thus getting immediate attention of the processor. A new task always arrives at the last of the highest queue and sinks down to the base then. This all works incredibly well with my new context switch algorithm which is less time consuming and simpler with less bugs.
Now the help I need is that as I said I have implemented MOST OF IT, I still haven't done much about this step in the algorithm:
"4.If the process voluntarily relinquishes control of the CPU, it leaves the queuing network, and when the process becomes ready again it is inserted at the tail of the same queue which it relinquished earlier."
I don't understand what it means? Please help me with it
Also in my algorithm, a separate timer keeps on incrementing a variable associated with every task in the BASE queue until it reaches a threshold upon which its put in a higher queue (which happens when the task was in lower priority for too long).
But here is a prob: I need atleast 2 independent timers (one for scheduler, one for this thing). I am currently on single processor systems, and had thought to use PIT as well as APIC separately. But my friend said, its not possible. Then what to do? Here are a few my ideas :generate 2 interrupts separately from a single timer at different points in time. But how? or some other solution?
Thanks
Now the help I need is that as I said I have implemented MOST OF IT, I still haven't done much about this step in the algorithm:
"4.If the process voluntarily relinquishes control of the CPU, it leaves the queuing network, and when the process becomes ready again it is inserted at the tail of the same queue which it relinquished earlier."
I don't understand what it means? Please help me with it
Also in my algorithm, a separate timer keeps on incrementing a variable associated with every task in the BASE queue until it reaches a threshold upon which its put in a higher queue (which happens when the task was in lower priority for too long).
But here is a prob: I need atleast 2 independent timers (one for scheduler, one for this thing). I am currently on single processor systems, and had thought to use PIT as well as APIC separately. But my friend said, its not possible. Then what to do? Here are a few my ideas :generate 2 interrupts separately from a single timer at different points in time. But how? or some other solution?
Thanks