Skip to content

A web-based CPU scheduling simulator built with HTML, CSS, and JavaScript for Operating System final project.

Notifications You must be signed in to change notification settings

leighTOR/CMSC314

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Process Scheduling Simulator

A web-based CPU scheduling simulator built with HTML, CSS, and JavaScript for Operating System final project. Visualize and compare FCFS, SJF, SRTF, Priority, and Round Robin algorithms with interactive Gantt charts and performance metrics.


Table of Contents

  1. Overview
  2. Features
  3. Getting Started
  4. Usage
  5. Project Structure
  6. Screenshots
  7. Contributing

Overview

This simulator lets you:

  • Define processes (PID, arrival time, burst time, priority, time quantum).
  • Run and step through multiple scheduling algorithms.
  • View dynamic Gantt charts and key metrics: turnaround time, waiting time, throughput, CPU utilization.

Features

  • Process CRUD: Add, edit, delete processes on the fly.
  • Algorithms Supported:
    • First-Come, First-Served (FCFS)
    • Shortest Job First (SJF)
    • Shortest Remaining Time First (SRTF)
    • Priority Scheduling (preemptive & non-preemptive)
    • Round Robin (RR)
  • Interactive Controls:
    • Next Step
    • Run to Completion
    • Reset Simulation
  • Real-Time Metrics: Automatic calculation and display of average turnaround & waiting times, throughput, and CPU utilization.

Getting Started

  1. Clone the repository
    git clone https://github.com/leighTOR/CMSC314.git
    cd CMSC314/process-scheduling-simulator
    
  2. Open index.html in your browser.

No server or build tools required—purely client-side.


Usage

  1. Add Processes – Click + to create a new row, enter PID, arrival, burst, (optional) priority/quantum.

  2. Select Algorithm – Choose from the dropdown.

  3. Run Simulation

    • Next: advance one decision
    • Run: complete all steps
    • Reset: clear chart and metrics
  4. Analyze Results – Gantt chart shows scheduling order. – Metrics panel updates in real time.


Project Structure

CMSC314/
└── process-scheduling-simulator/
    ├── css/
    │   ├── bootstrap-simplex.css
    │   ├── cpu-scheduler.css
    │   └── explanation.css
    ├── js/
    │   ├── bootstrap-slider.js
    │   ├── bootstrap.min.js
    │   ├── cpu-scheduler.js
    │   ├── MathJaxSetup.js
    │   └── new.js
    ├── index.html
    └── README.md

Screenshots

image

image

image

image


Contributing

Improvements, bug fixes, and new features are welcome:

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m "Add ...")
  4. Push to your branch (git push origin feature/your-feature)
  5. Open a Pull Request

Please include screenshots for any UI changes and update this README accordingly.

Disclaimer

For educational purposes only.
These pages are deliberately designed to look like real banking sites—do not deploy them publicly or use them to collect data. Always practice safe browsing habits and report suspicious sites to the proper authorities.

About

A web-based CPU scheduling simulator built with HTML, CSS, and JavaScript for Operating System final project.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published