How ayushkumar418/os_simulator-web_app works
OS Simulator is an educational web application for exploring operating-system behavior. A user selects a simulator, supplies processes or memory/file parameters, and views a step-by-step result with visualizations and metrics. The React app routes users to the scheduling, memory, and file-system experiences; its API service connects UI actions to FastAPI, whose route handlers dispatch to simulation logic. Scheduling produces timelines, Gantt data, explanations, and performance metrics; memory simulators expose allocation and address-translation states; file-system operations expose block and directory state. The README also documents comparisons and demo scenarios. Some UI and backend files were not sampled, so uncertain request wiring is not expanded.
Main entry points: api.js API client · App.jsx Application routes · scheduler_routes.py Scheduling routes · memory_routes.py Memory routes
Components 27
Web interface
- Application routes
frontend/src/App.jsx - Dashboard
frontend/src/pages/Dashboard.jsx - CPU simulator
frontend/src/pages/CPUScheduler.jsx - Memory hub
frontend/src/pages/MemoryManagement.jsx - Contiguous allocator
frontend/src/pages/ContiguousAllocator.jsx - Paging simulator
frontend/src/pages/PagingSimulator.jsx - Virtual memory
frontend/src/pages/VirtualMemory.jsx - Segmentation simulator
frontend/src/pages/SegmentationSimulator.jsx - File-system simulator
frontend/src/pages/FileSystem.jsx - Simulation displays
frontend/src/components/ProcessTimeline.jsx - API client
frontend/src/services/api.js
Backend API
- FastAPI application
backend/main.py - Scheduling routes
backend/routes/scheduler_routes.py - Memory routes
backend/routes/memory_routes.py - File-system routes
backend/routes/filesystem_routes.py - Scenario routes
backend/routes/scenario_routes.py
CPU scheduling
- Scheduler framework
backend/schedulers/base_scheduler.py - FCFS
backend/schedulers/fcfs.py - SJF / SRTF
backend/schedulers/sjf.py - Priority scheduling
backend/schedulers/priority.py - Round Robin
backend/schedulers/round_robin.py
Memory management
- Contiguous allocation
backend/memory/contiguous.py - Paging and translation
backend/memory/paging.py - Page replacement
backend/memory/page_replacement.py - Segmentation
backend/memory/segmentation.py
File system
- File-system model
backend/filesystem/filesystem.py
Other components
- Learner
Connections 40
- Learner → Application routes: navigates
- Application routes → Dashboard: routes
- Application routes → CPU simulator: routes
- Application routes → Memory hub: routes
- Application routes → Contiguous allocator: routes
- Application routes → Paging simulator: routes
- Application routes → Virtual memory: routes
- Application routes → Segmentation simulator: routes
- Application routes → File-system simulator: routes
- CPU simulator → API client: requests
- Contiguous allocator → API client: requests
- Paging simulator → API client: requests
- Virtual memory → API client: requests
- Segmentation simulator → API client: requests
- File-system simulator → API client: requests
- API client → FastAPI application: HTTP requests
- FastAPI application → Scheduling routes: dispatches
- FastAPI application → Memory routes: dispatches
- FastAPI application → File-system routes: dispatches
- FastAPI application → Scenario routes: dispatches
- Scheduling routes → Scheduler framework: runs / measures
- Scheduling routes → FCFS: selects
- Scheduling routes → SJF / SRTF: selects
- Scheduling routes → Priority scheduling: selects
- Scheduling routes → Round Robin: selects
- FCFS → Scheduler framework: extends
- SJF / SRTF → Scheduler framework: extends
- Priority scheduling → Scheduler framework: extends
- Round Robin → Scheduler framework: extends
- Scheduling routes → API client: returns results
- Memory routes → Contiguous allocation: allocates
- Memory routes → Paging and translation: translates
- Memory routes → Page replacement: uses algorithms
- Memory routes → Segmentation: manages segments
- Memory routes → API client: returns state
- File-system routes → File-system model: operates on
- File-system routes → API client: returns state
- Scenario routes → API client: serves scenarios
- CPU simulator → Simulation displays: displays simulation
- Scheduling routes → FCFS: compares algorithms