chapter 8 - Scheduling: The Multi-Level Feedback Queue Flashcards

1
Q

what is MLFQ designed to do

A
  • prioritize interactive jobs
  • de-prioritize CPU-bound jobs
  • adjust priorities dynamically based on behavior
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does MLFQ structure its queues?

A

As multiple priority levels — higher queues run first

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What happens to jobs that use the CPU for a full time slice?

A

They are demoted to a lower priority queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is Rule 3 in MLFQ?

A

New jobs start at the highest priority

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

rule 4a

A

If a job uses its full time slice, it gets demoted

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

rule 4b

A

If a job gives up the CPU early, it stays at the same level

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

new rule 4

A

A job is demoted after it has used its total CPU time allowance at a level, even if it gives up the CPU early many times

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is the convoy effect avoided by MLFQ

A

MLFQ prevents short jobs from being stuck behind long ones

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

problems with basic MLFQ

A
  • Starvation: Long-running jobs might never run
  • Gaming: Jobs can exploit the rules to stay at high priority
  • Changing behavior: Jobs never get promoted again even if they become interactive
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Rule 5

A

Every S ms, move all jobs to the top queue

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Why use a priority boost?

A
  • Prevent starvation
  • Give CPU-bound jobs another chance
  • Handle behavior changes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What happens during a priority boost?

A

Every job is temporarily treated like a new high-priority job

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How does better accounting (Rule 4) improve fairness?

A

It tracks total time used, not just per-slice behavior, to detect abuse

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is “gaming the system” in MLFQ?

A

When a program avoids demotion by giving up the CPU just before the time slice ends

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How does MLFQ prevent gaming?

A

By tracking total CPU time at a level — even early exits count toward the quota

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What happens if a job gives up the CPU early many times?

A

It will still be demoted once it exceeds the total time threshold

17
Q

Why give longer time slices to lower-priority queues?

A

To reduce context switch overhead for CPU-heavy jobs