OS-Project (OS-Pro)

An interactive operating systems simulation suite and algorithm visualizer developed in Python with Tkinter.

Author / Role
Hareram Kushwaha (Creator)
Tech Stack
Python 3, Tkinter GUI
Category
Systems & Algorithms
Repository
OS-Project simulator interface preview

The Problem

Core operating system mechanisms — specifically virtual memory page replacement and block-level file allocation — are difficult to understand through static textbook tables alone. Students learning these algorithms often struggle to visualize how page frame contents change over time or how disk fragmentation accumulates during file writes and deletions.

The mission of this project was to provide an immediate, hands-on desktop simulator that allows users to supply custom reference strings, step through page replacement cycles visually, and inspect simulated disk blocks.

My Role & Technical Stack

I architected the application from the ground up:

  • Language: Python 3 for clean data structures, list manipulations, and algorithm execution.
  • GUI Framework: Tkinter for native, zero-dependency desktop window rendering across Linux, macOS, and Windows.
  • Algorithms Implemented: First-In-First-Out (FIFO), Least Recently Used (LRU), Optimal (Belady's Min), and Most Recently Used (MRU).
  • File System Simulation: A simulated block storage grid tracking free space lists, file allocation tables (FAT), and directory trees.

Key Features

Page Replacement Visualizer

Input custom reference sequences and frame counts to watch live page hits and faults step by step across 4 algorithms.

Comparative Algorithm Analysis

Runs identical reference sequences across all algorithms simultaneously, comparing total hit and fault counts.

Block File System Simulator

Interactive representation of contiguous and linked block allocation showing visual disk fragmentation.

Technical Decisions

Zero-Dependency Desktop Packaging with Tkinter

By building the GUI with standard Python `tkinter`, the suite runs directly on any lab or personal machine without requiring complex package managers, browser engines, or external binary dependencies.

Modular Algorithm Decoupling

Each replacement strategy is isolated as a pure Python class conforming to a shared interface (receiving current frames and the next incoming reference), making it straightforward to add new scheduling or replacement heuristics.

What I'd Improve Next

  • WebAssembly / Canvas Port: Compile the simulator to run directly inside modern web browsers using Pyodide or a lightweight JavaScript port.
  • CPU Scheduling Module: Add visual timelines (Gantt charts) for Round Robin, SJF, and Multi-Level Feedback Queue scheduling.
  • Belady's Anomaly Demonstration: Include a dedicated demonstration mode proving Belady's anomaly in FIFO under varying frame allocations.