All projects

Project case study

SimuKernel

Make operating-system decisions visible

A C#/.NET 8 console simulator for CPU scheduling, page replacement, and process management, with a companion browser scheduling playground.

  • C#
  • .NET 8
  • Operating systems
  • Scheduling
EvidenceThree browser scheduling policies, checked against known and generated workloads.

The problem

A scheduling policy can be simple to describe and still produce surprising waiting times. SimuKernel’s console project implements Round Robin, priority scheduling, and multilevel feedback queues with aging. Its memory simulator compares FIFO, LRU, and optimal page replacement. The companion browser playground below compares FCFS, non-preemptive SJF, and Round Robin on editable workloads.

How it fits together

  1. 01

    Arrivals

    Processes become ready at their arrival time.

  2. 02

    Ready queue

    The selected policy chooses the next process.

  3. 03

    CPU

    Run to completion or to the end of a time slice.

  4. 04

    Feedback

    Complete the process or return it to the queue.

The browser model uses one CPU, known CPU-burst lengths, no I/O, and zero context-switch cost. Times are simulation units rather than measurements of your device.

Interactive demo

Scheduling playground

Change the workload, choose a policy, and follow each process through the CPU.

One CPU · no I/O · zero switch cost · simulation time units

Scheduling policy

First come, first served. Each process runs to completion in arrival order.

Editable process arrival times and CPU bursts
ProcessArrivalCPU burstRemove
P1
P2
P3
P4

Use whole numbers: arrival 0–30, CPU burst 1–20, quantum 1–10. Up to 8 processes.

CPU timeline
08121415

P1 from 0 to 8. P2 from 8 to 12. P3 from 12 to 14. P4 from 14 to 15.

P1 running

Results for the complete schedule

Avg. waiting
7.0
Avg. turnaround
10.8
Avg. response
7.0
Per-process results in simulation time units
ProcessFirst runFinishWaitingTurnaround
P10808
P2812711
P312141012
P414151112

Waiting = finish − arrival − burst. Turnaround = finish − arrival. Response = first run − arrival.

Decisions & tradeoffs

First come, first served

Run processes in arrival order without interruption. The rule is predictable, but a long process at the front delays every short process behind it.

Shortest job first

Choose the shortest burst among processes that have arrived, then run it to completion. This often reduces average waiting in a fixed workload, but requires knowing burst lengths and can delay longer jobs.

Round Robin

Give each ready process a bounded turn. A smaller quantum usually improves first response by sharing the CPU sooner; a real scheduler also pays context-switch overhead, which this model leaves out.

Evidence & validation

The playground computes waiting time as completion minus arrival minus burst, turnaround as completion minus arrival, and response as first start minus arrival. It shows both the timeline and per-process results.

The browser scheduling engine is checked against known examples, idle periods, simultaneous arrivals, arrivals on a quantum boundary, and invalid workloads. A generated-workload test exercises 80 workloads under each of the three policies. No process can run before it arrives, and every process must receive its requested CPU time. These checks cover the companion playground; the C# repository has no automated test suite at the linked revision.

Run the console simulator

With the .NET 8 SDK installed, run this command from a repository checkout to open the scheduling and page-replacement menu.

dotnet run --project SimuKernel.csproj

Related writing