Interactive Multi-Level Feedback Queue Scheduler (JavaScript + DOM)

Watch how a Multi-Level Feedback Queue (MLFQ) balances responsiveness and fairness using multiple queues and dynamic priorities in the kernel as part of the operating system architecture.

Use Add Random Process, then Play or Step to move one time unit at a time. Optional Aging promotes long-waiting jobs.
Time slice means the maximum CPU time a process can run in that queue before it must give others a turn.
Burst time means total CPU work a process needs. CPU Left is how much burst time remains.
FCFS means First-Come, First-Served: (also called FIFO and related to SJF in contrast) is a scheduling method where processes run in the order they arrive, without preemption.
Gantt Timeline (1 block = 1 tick)
Showing last 0 ticks
Idle slots are dark gray.
Stats & Learning Notes
Current Time: 0
Avg Waiting: 0.00
Avg Turnaround: 0.00
Total: 0
Completed: 0
Legend: Queue 0 is highest priority; lower queues have lower priority.
Higher queues use shorter time slices for faster response.
Lowest queue is FCFS when time slice is Infinity.
If a process uses its full time slice, it moves down one queue.
What is happening now: Press Add Random Process to begin.
Teaching hints: Each Step is 1 CPU tick. CPU Left goes down by 1 each tick. Time Slice goes down while running in Round-Robin queues. If Time Slice ends first, process is demoted; if CPU Left ends first, process completes.