Skip to content

Our Project for Operating System Course taken during Winter 2023 semester

Notifications You must be signed in to change notification settings

Salma-Mamdoh/CPU-Schedulers-Simulator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CPU Schedulers Simulator

Table of Contents

Introduction

Scheduling is a fundamental function of operating systems, and CPU scheduling plays a crucial role in resource utilization and system performance. The CPU Schedulers Simulator is a Java program that simulates various CPU scheduling algorithms. This project aims to provide a better understanding of different scheduling algorithms and their impact on process execution.

Implemented Algorithms

The simulator currently implements the following CPU scheduling algorithms:

  1. Non-Preemptive Shortest-Job First (SJF) with context switching
  2. Shortest-Remaining Time First (SRTF) Scheduling with starvation prevention
  3. Non-preemptive Priority Scheduling with starvation prevention
  4. AG Scheduling:
    • Round Robin (RR) Scheduling with AG-Factor
    • AG-Factor calculation based on a combination of priority, arrival time, burst time, and a random function
    • Preemptive and non-preemptive scheduling based on AG-Factor

Graphical User Interface

The simulator features a graphical user interface (GUI) that provides a Simple visual representation of the process execution order.

Project Overview

The CPU Schedulers Simulator allows you to input the necessary parameters for the simulation. These parameters include the number of processes, time quantum for round-robin scheduling, and context switching time. For each process, you provide the following details:

  • Process Name
  • Process Color (for graphical representation)
  • Process Arrival Time
  • Process Burst Time
  • Process Priority Number (for priority scheduling)

The simulator outputs the execution order of processes, waiting times, turnaround times, average waiting time, average turnaround time, and history updates of quantum time for AG Scheduling. Additionally, it generates a graphical representation of the process execution order.

Usage

  1. Clone the repository: git clone https://github.com/your-username/cpu-schedulers-simulator.git
  2. Compile the Java source files: javac *.java
  3. Run the simulator: java Main

Contributing

Contributions to the CPU Schedulers Simulator project are welcome. If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the project's GitHub repository.

About

Our Project for Operating System Course taken during Winter 2023 semester

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages