How reneshasagar/os-simulator- works
OS Simulator is an educational web platform backed by a C++ REST simulation engine. Users choose a workspace, submit CPU, memory, or paging inputs, and explore algorithm results through metrics, timelines, visual state graphs, and theory/verification views; a separate Ask OS tutor provides chat, history, and search. The backend validates requests, dispatches simulations, and returns JSON. Edges follow shown imports, route handlers, API paths, or README descriptions; some memory-session details and chatbot internals are documented but not shown in source excerpts.
Main entry points: api.cpp REST API routes · App.tsx Tabbed workspace · client.ts API client · CpuSchedulingView.tsx CPU workspace
Components 20
Web application
- Tabbed workspace
frontend/src/App.tsx - Glass cube
frontend/src/components/TransparentGlassCube.tsx - OS tutor
frontend/src/components/OsChatbotView.tsx - API client
frontend/src/api/client.ts - Simulator types
frontend/src/types/simulator.ts
CPU scheduling
- CPU workspace
frontend/src/components/CpuSchedulingView.tsx - Playback graph
frontend/src/components/InteractiveGraphView.tsx - Theory and proofs
frontend/src/components/VivaAccordion.tsx - Scheduling engine
backend/cpu/scheduler.cpp
Memory management
- Memory workspace
frontend/src/components/MemoryManagementView.tsx - Partition allocator
backend/memory/memory_manager.cpp - Memory session state
backend/server/api.h
Virtual memory
- Paging workspace
frontend/src/components/PageReplacementView.tsx - Frame playback graph
frontend/src/components/InteractiveGraphView.tsx - Theory and proofs
frontend/src/components/VivaAccordion.tsx - Page replacement engine
backend/paging/page_replacement.cpp
Other components
- Learner
- REST API routes
backend/server/api.cpp - Request validation
backend/utils/validation.cpp - Server entrypoint
backend/main.cpp
Connections 25
- Learner → Tabbed workspace: uses
README.md - Tabbed workspace → CPU workspace: opens
frontend/src/App.tsx - Tabbed workspace → Memory workspace: opens
frontend/src/App.tsx - Tabbed workspace → Paging workspace: opens
frontend/src/App.tsx - Tabbed workspace → OS tutor: opens
frontend/src/App.tsx - Tabbed workspace → Glass cube: renders
frontend/src/App.tsx - Tabbed workspace → API client: checks health
frontend/src/App.tsx - CPU workspace → API client: requests results
frontend/src/components/CpuSchedulingView.tsx - Memory workspace → API client: requests results
frontend/src/components/MemoryManagementView.tsx - Paging workspace → API client: requests results
frontend/src/components/PageReplacementView.tsx - CPU workspace → Playback graph: renders
frontend/src/components/CpuSchedulingView.tsx - CPU workspace → Theory and proofs: renders
frontend/src/components/CpuSchedulingView.tsx - Memory workspace → Playback graph: renders
frontend/src/components/MemoryManagementView.tsx - Memory workspace → Theory and proofs: renders
frontend/src/components/MemoryManagementView.tsx - Paging workspace → Frame playback graph: renders
frontend/src/components/PageReplacementView.tsx - Paging workspace → Theory and proofs: renders
frontend/src/components/PageReplacementView.tsx - API client → Simulator types: uses types
frontend/src/api/client.ts - API client → REST API routes: sends requests
frontend/src/api/client.ts - Server entrypoint → REST API routes: starts
backend/main.cpp - REST API routes → Request validation: validates inputs
backend/server/api.cpp - REST API routes → Scheduling engine: dispatches scheduling
backend/server/api.cpp - REST API routes → Page replacement engine: dispatches paging
backend/server/api.cpp - REST API routes → Partition allocator: dispatches allocation
- REST API routes → Memory session state: maintains session
backend/server/api.cpp - API client → REST API routes: calls API routes
README.md