Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Virtual OS

A small Virtual OS dashboard project with a backend REST API and a frontend Vite React app.

📝 About this project

This project is a simulation of a Multiprogramming Operating System built using C++.
It demonstrates core OS concepts like process management, memory management, paging, and interrupt handling.

I have also extended this project with a React-based dashboard to visualize execution logs in a structured way.

🚀 Features

  • Supports multiple jobs execution
  • Implements Paging (Memory Management)
  • Handles Interrupts (SI, PI, TI)
  • Simulates Process Control Block (PCB)
  • Performs Address Mapping (Virtual → Real)
  • Executes instructions like:
    • GD (Get Data)
    • PD (Print Data)
    • LR (Load Register)
    • SR (Store Register)
    • CR (Compare)
    • BT (Branch)
    • H (Halt)
  • Generates output with error handling
  • Visualizes logs using a React frontend

🧱 Project Structure

image

🛠 Tools used

  • Node.js 18+ (backend + frontend)
  • Express (backend server)
  • Vite + React (frontend)
  • CSS variables and custom animations

⚙️ How It Works

  1. Input file contains job instructions
  2. Jobs are loaded into memory using paging
  3. Instructions are executed one by one
  4. Interrupts are handled by the OS (MOS)
  5. Output is written to a file
  6. Backend reads logs and sends to frontend
  7. React dashboard displays logs in table format

📥 Input Format

$AMJ → Job start (program instructions) $DTA → Data section (data) $END → Job end

Example:

$AMJ000100050005 GD10 PD10 H $DTA HELLO WORLD $END


📤 Output

  • Displays program output
  • Shows error messages (if any)
  • Includes job execution details

📊 Dashboard Features

  • Process Table view
  • Job execution logs
  • Error highlighting
  • Structured UI instead of raw logs

🧩 What is included

  • backend/ - Node.js server
  • my-app/ - Vite React frontend
  • Shared UI styling and process table + OS register legend

🚀 Run locally (2 terminals required)

You should run backend and frontend concurrently in separate terminals:

Terminal 1 (backend)

cd backend
npm install
npm start

Terminal 2 (frontend)

cd my-app
npm install
npm run dev

🛠 Minimal Working Flow

  1. Your OS code writes output to output.json (C++ → JSON)
  2. Backend Node.js reads output.json and exposes API
  3. React frontend requests data from backend
  4. UI updates every second to simulate real-time behavior

Flow: C++ → JSON file → Node.js → React

🎯 Key Learning

This project helped in understanding:

  • How an operating system manages processes
  • Memory management using paging
  • Interrupt handling mechanism
  • Execution flow of jobs

⚠️ Limitations

  • No real parallel execution
  • No scheduling algorithms
  • Fixed memory size
  • File-based input only

💡 Future Improvements

  • Add process scheduling (FCFS, Round Robin)
  • Memory visualization (blocks view)
  • Execution timeline animation
  • Control panel (Start / Pause / Reset)

🧑‍💻 Author

Anshika Rawat🩷

Releases

Packages

Contributors

Languages