Skip to content

The CPU Scheduling Algorithm Visualizer is a web-based tool that allows users to interactively visualize various CPU scheduling algorithms. This project aims to provide an educational resource for understanding how different scheduling algorithms work internally and their effects on the execution of processes in a CPU.

License

Notifications You must be signed in to change notification settings

PrinceSinghhub/CPU-SCHEDULING-ALGORITHM-VISUALISER

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

CPU SCHEDULING ALGORITHM VISUALISER

Introduction

The CPU Scheduling Algorithm Visualizer is a web-based tool that allows users to interactively visualize various CPU scheduling algorithms. This project aims to provide an educational resource for understanding how different scheduling algorithms work internally and their effects on the execution of processes in a CPU.

Features

  • Interactive visualization of CPU scheduling algorithms
  • Support for the following algorithms 👇
  • First Come First Serve (FCFS)
  • Shortest Job First (SJF)
  • Round Robin Scheduling (RRS)
  • Longest Job First (LJF)
  • Priority CPU Scheduling
  • Longest Remaining Time First (LRTF)
  • Shortest Remaining Time First (SRTF)
  • Real-time updates to process queues, timelines, and statistics
  • User-friendly interface for adjusting algorithm parameters
  • Clear visualization of process execution, arrival times, waiting times, and more

Algorithms Implemented

  • First Come First Serve (FCFS)
  • Shortest Job First (SJF)
  • Round Robin Scheduling (RRS)
  • Longest Job First (LJF)
  • Priority CPU Scheduling
  • Longest Remaining Time First (LRTF)
  • Shortest Remaining Time First (SRTF)

Tech Stack

  • HTML
  • CSS
  • JavaScript
  • BootStrap

Video 🎥

CPU.SCHEDULING.ALGORITHM.VISUALISER.mp4

Implementation 👇

FCFS (First Come First Serve):

FCFS Algorithm. is a non-preemptive algorithm and it execute processes according to its arrival time(process that comes first in the ready queue). FCFS also suffers from starvation which arise if the first process has larger burst time.

fcfs

SJF (Shortest Job First):

SJF Algorithm. is a non-preemptive algorithm in which the process having shortest /smallest burst time is executed first. It significantly reduces the average waiting time for other processes awaiting execution.

sjf

RRS (Round Robin Algorithm):

Round robin is a pre-emptive algorithm. The process that is preempted is added to the end of the queue. This algorithm also offers starvation free execution of processes.

rrs

LJF (Longest Job First):

LFJ algorithm is a pre-emptive algorithm. The process having the largest burst time is chosen for the next execution. When a job comes in, it is inserted in the ready queue based on its burst time.

ljf

Priority CPU Scheduling:

It is a non-preemptive algorithm. In this algo if the new process arrived at the ready queue has a higher priority than the currently running process, the CPU is preempted, which means the processing of the current process is stoped and the incoming new process with higher priority gets the CPU for its execution.

proty

LRTF (Longest Remaining Time First):

LRTF is a pre-emptive algorithm. Here the job that has the highest burst time is allocated CPU first. The operating system to schedule the incoming processes so that they can be executed in a systematic way. In case of LRTF the average waiting time is high.

lrtf

SRTF (Shortest Remaining Time First):

SRTF is a pre-emptive algorithm. At the arrival of every process, the short term scheduler schedules the process with the least remaining burst time among the list of available processes and the running process. Processes which have long burst time will have to wait for long time for execution

srtf

Prerequisites

Web browser with JavaScript enabled
Internet connection (for libraries and stylesheets)

Installation

Clone the repository: git clone https://github.com/your-username/cpu-scheduling-visualizer.git
Navigate to the project directory: cd cpu-scheduling-visualizer
Open index.html in your preferred web browser.

Usage

Open the visualizer in your web browser.
Select an algorithm from the dropdown menu.
Configure algorithm-specific parameters (if applicable).
Add processes with their arrival times, burst times, and priorities.
Click "Run" to visualize the algorithm's execution.

About

The CPU Scheduling Algorithm Visualizer is a web-based tool that allows users to interactively visualize various CPU scheduling algorithms. This project aims to provide an educational resource for understanding how different scheduling algorithms work internally and their effects on the execution of processes in a CPU.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published