OS

OS Internals Lab

Configure cores, processes, threads, RAM, I/O and locks and watch the scheduler, context switches, memory, page faults, blocked tasks and lock contention respond. Then break it — exhaust memory, create a deadlock, spawn 10,000 threads, block disk I/O, exhaust file descriptors, trigger a stack overflow — and diagnose the failure. Every metric here is an educational simulation, not a measurement.

OS simulator
Turn the knobs, run the ticks, and watch the four subsystems respond. The numbers come from a small educational model, not a measurement.
Experiments
Throughput
3,349 ops/s
Avg latency
4.8 ms

throughput = min(cores, runnable) × (1 − switch overhead − lock wait) × (1 − fault penalty)

Scheduler
cpu0
P1.T4
cpu1
P2.T3
cpu2
P3.T3
cpu3
P1.T4
Ready queue
4
Ctx switches/s
2,646
switch overhead 2% · 16 threads total
Memory
Used1.4 GB
Page cache4 GB
Free2.6 GB
Page faults/s
15
Swap
0.0 GB
working set ≈ 1.4 GB
I/O
Blocked on I/O
6 of 16 threads
blockedblockedblockedblockedblockedblocked
Lock contention
lock 0 waiters2
% time waiting
14%
1/30 · tick 1Simulated