Qasim Shah
All projects

xv6 multi-queue scheduler

Operating-systems coursework

A scheduler for the xv6 teaching kernel that makes runnable queues, CPU allowances, and process transitions explicit.

Status
Coursework implementation
Kind
AI & systems
Stack
C · xv6 · Process scheduling · Concurrency
Labelled project overview, not an interface capture.

The problem

A process’s scheduling allowance must remain consistent as it runs, sleeps, wakes, or competes with work on another CPU.

What was built

  1. First, active, and expired queues with linked runnable processes and separate running counts.
  2. One-tick initial allowances and three-tick active allowances, with active/expired pointer swaps between rounds.
  3. Process-table locking around queue transitions and timer accounting that retains used allowances across blocking and wakeup.

What I learned

An empty runnable queue is not necessarily an exhausted scheduling round when another CPU is still executing one of its processes.