https://github.com/ammarlodhi255/cpu-scheduling-simulator

A CPU Scheduling Algorithms Simulator In Java

https://github.com/ammarlodhi255/cpu-scheduling-simulator

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.3%) to scientific vocabulary

Keywords

cpu-scheduler cpu-scheduling cpu-scheduling-algorithms cpu-scheduling-app cpu-scheduling-simulator java operating-system operating-system-project os-programming os-project
Last synced: 5 months ago · JSON representation

Repository

A CPU Scheduling Algorithms Simulator In Java

Basic Info
  • Host: GitHub
  • Owner: ammarlodhi255
  • Language: Java
  • Default Branch: master
  • Homepage:
  • Size: 453 KB
Statistics
  • Stars: 23
  • Watchers: 1
  • Forks: 16
  • Open Issues: 0
  • Releases: 0
Topics
cpu-scheduler cpu-scheduling cpu-scheduling-algorithms cpu-scheduling-app cpu-scheduling-simulator java operating-system operating-system-project os-programming os-project
Created about 4 years ago · Last pushed over 1 year ago
Metadata Files
Readme

README.md

CPU-Scheduling-Simulator

Table of Contents

Overview

This repository contains a Java-based simulator for CPU scheduling algorithms. CPU scheduling is a fundamental aspect of operating systems, where the CPU decides the order in which processes are executed. This simulator allows users to visualize and analyze different scheduling algorithms such as First-Come, First-Served (FCFS), Shortest Job Next (SJN), Round Robin (RR), and more.

Problem Statement

Different CPU scheduling algorithms have unique properties, and choosing the right one for a particular situation depends on various criteria used to compare their performance. These criteria are referred to as CPU scheduling criteria. For instance, in some cases, maximizing response time may be prioritized over throughput, while in others, minimizing average waiting time might be more important, even if it means sacrificing response time. Sometimes, a balance between multiple criteria is required. The challenge lies in determining which scheduling algorithm is best suited for a given situation. This project aims to address that challenge. The CPU Scheduling Simulator provides an environment where users can experimentally test and compare the performance of different scheduling algorithms through simulation. At the start, users can select any CPU scheduling algorithm they wish to evaluate. They then input the number of processes and relevant details for each process, such as CPU burst time, process ID, priority (if a priority scheduling policy is chosen), arrival time, and more. The simulator visually demonstrates the execution of processes, showing the remaining wait and burst times, as well as the processes waiting in the ready queue. One of the key features of this project is its Graphical User Interface, making it user-friendly and easy to operate.

Features

  • Multiple Scheduling Algorithms: Simulates various CPU scheduling algorithms such as FCFS, SJN, RR, and more.
  • User Interface: Provides a graphical user interface (GUI) for easy interaction and visualization.
  • Detailed Output: Displays the order of process execution, waiting time, turnaround time, and other performance metrics.
  • Custom Data Structures: Tailored data structures for managing processes and scheduling tasks.

Files and Directories

  • sources/: Directory for additional source files.
  • src/main/: Main source code directory where the implementation of CPU scheduling algorithms resides.
  • target/: Directory for compiled classes and build artifacts.
  • pom.xml: Maven project file for managing dependencies and build configurations.

Getting Started

Prerequisites

  • Java Development Kit (JDK) 8 or higher.
  • Apache Maven (optional, for building the project).
  • A Java IDE (e.g., IntelliJ IDEA, Eclipse) or any text editor with Java support.

Installation

  1. Clone the repository to your local machine using: bash git clone https://github.com/ammarlodhi255/cpu-scheduling-simulator.git

  2. Navigate to the project directory: bash cd cpu-scheduling-simulator

  3. Open the project in your preferred Java IDE.

Usage

  1. Compile the project: Ensure all .java files are compiled. Most IDEs handle this automatically.
  2. Run the Simulator:
    • Execute the main class in src/main/ to launch the simulator's user interface.
    • Choose the desired CPU scheduling algorithm and input the process data.
  3. View Results:
    • The simulator will display the sequence of process execution and calculate important metrics like waiting time, turnaround time, and CPU utilization.

Example

  • Simulating Round Robin Scheduling:
    1. Open the simulator.
    2. Select "Round Robin" from the list of algorithms.
    3. Input the number of process.
    4. Click "Start" to see the order of execution and performance metrics.

Contributing

If you'd like to contribute to this project, please fork the repository and use a feature branch. Pull requests are warmly welcome.

  1. Fork the repository.
  2. Create a new feature branch.
  3. Commit your changes.
  4. Push to the branch.
  5. Submit a pull request.

YouTube Video

Video link of project demonstration: https://www.youtube.com/watch?v=Rf6Ec8PjOyg

Owner

  • Name: Ammar Ahmed
  • Login: ammarlodhi255
  • Kind: user
  • Location: Sukkur, Pakistan

A computer scientist at heart, interested in AI, software development, and space.

GitHub Events

Total
  • Watch event: 13
  • Fork event: 8
Last Year
  • Watch event: 13
  • Fork event: 8

Issues and Pull Requests

Last synced: 10 months ago

All Time
  • Total issues: 0
  • Total pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Total issue authors: 0
  • Total pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels