8 - Multi-Level Feedback Queue Flashcards
Where was MLFQ first described and by who?
In 1962, by Corbato in a Compatible Time-Sharing System, CTSS
What two problems does MLFQ address?
Optimize turnaround time & minimize response time by making a system feel responsive to interactive users.
In what situations does MLFQ work?
where jobs have behavioral phases and are predictable
Is MLFQ 100% trustworhy?
No, it can easily be wrong and drive a system to make worse decisions than they would’ve with no knowledge at all.
MLFQ has a number of what type of queues?
distinct queues
What is each queue assigned?
a different priority level
How does MLFQ decide which job to run at a given time?
uses priorities
What if more than one job is on a given queue, meaning they have the same priority?
Use round-robin scheduling.
How does the MLFQ scheduler set priorities?
first word is a verb
Varies the priority of a job based on its observed behavior.
How does the MLFQ predict a process’s future behavior?
Learns about the process as it runs and uses the history of the job to predict the future behavior.
What is allotment?
the amount of time a job can spend at a given priority level before the scheduler reduces its priority
How does MLFQ try to approximate SJF?
It first assumes the job is short, giving it high priority. If the assumption is right, it runs and completes quickly. If the assumption is wrong, it will slowly move down the queues, proving to be a long-running process.
What are the three problems with ‘current’ MLFQ?
Starvation, Possibility of gaming the scheduler, A program may change its behavior over time.
Explain ‘Starvation’.
If there are “too many” interactive jobs in the system, they will consume ALL cpu time and long-running jobs will never receive any CPU time.
Explain ‘The Possibility of Gaming the Scheduler’.
Something sneaky can trick the scheduler into giving you more than your fair share of the resource.
An example of a GTS attack.
Before the allotment is issued, issue an I/O operation and relinquish the CPU. This allows us to remain in the same queue and gain a higher percentage of CPU time. If done right, a job could nearly monopolize the CPU.
Explain ‘A program may have change its behavior over time.’
what was CPU bound may transition to a phase of interactivity.