Course contentsShow
← Computer Science
Lesson 1260 of 2,87229. CPU SchedulingFree lesson

Multilevel Feedback Queue Scheduling

Learn how processes can move between queues based on behavior, balancing I/O-bound and CPU-bound process needs.

Multilevel Feedback Queue Scheduling

What you'll learn: How processes can move between queues dynamically based on their behavior, allowing the scheduler to adapt to I/O-bound and CPU-bound process needs.


What Makes This Different?

Remember Multilevel Queue Scheduling? Processes were permanently assigned to one queue based on type (system, interactive, batch). But what if a process changes behavior over time?

Multilevel Feedback Queue Scheduling allows processes to move between queues based on how they actually behave. This adaptability solves a key problem: we don't always know in advance whether a process is CPU-bound or I/O-bound.


How It Works

The system maintains multiple queues with different priorities and time quantum sizes:

  1. New processes start in the highest-priority queue (smallest time quantum)
  2. If a process uses its entire time quantum (CPU-intensive behavior), it drops to a lower-priority queue
  3. If a process yields the CPU before its quantum expires (I/O or quick interaction), it stays in or moves up to higher-priority queues

This design naturally separates processes:

  • I/O-bound processes remain in high-priority queues, getting quick response times
  • CPU-bound processes drift down to lower-priority queues with longer time slices (fewer context switches)

Real-World Analogy

Think of express checkout lanes at a grocery store. Shoppers with few items (quick processes) use fast lanes. If someone sneaks in with a full cart, they're sent to regular lanes. The system self-corrects based on actual behavior, not just what shoppers claim.


Key Takeaway: Multilevel Feedback Queue Scheduling dynamically adjusts process priority by moving them between queues based on CPU burst behavior, automatically favoring interactive I/O-bound processes while still completing CPU-intensive work efficiently.