Experiment with CPU scheduling, memory management, and synchronization.
-
CPU Scheduling
Run the same four processes with FCFS, SJF, and round robin, then compare waiting times.
-
Race Conditions and Critical Sections
Make two threads increment the same counter and see how an expected result of two can become one.
-
Mutexes
Protect a critical section with a single-owner lock and explore priority inversion.
-
Semaphores
Use a resource counter to coordinate threads in a parking lot and a producer–consumer buffer.
-
Deadlock
Watch five dining philosophers deadlock while holding one fork each, then break the cycle.
-
Page Replacement
Compare FIFO, LRU, and OPT when memory is full and a page must be evicted.
-
Memory Allocation and Fragmentation
Compare first-fit, best-fit, and worst-fit allocation and observe free memory fragmenting.