Skip to content

A7medhanysadek/CPU-scheduling

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 

Repository files navigation

CPU Scheduling Simulator

Description

🎯 This project is a CPU Scheduling Simulator developed as part of a college assignment. The simulator is designed to demonstrate the functionality of four fundamental CPU scheduling algorithms. It enables users to input various process parameters and visualize the scheduling results, including key performance metrics.

Features

⚙️ The simulator implements the following CPU scheduling algorithms:

  • First Come First Serve (FCFS)
  • Round Robin (RR)
  • First Priority First Serve (FPFS)
  • Shortest Job First (SJF)

Key Functionalities:

  • Calculates waiting time, turnaround time, average waiting time, and running time for processes.
  • Provides a real-time view of the ready queue, showing all processes waiting for execution.
  • Displays the current running process, indicating the process currently being executed by the CPU.
  • Allows users to input:
  • Burst time
  • Priority
  • Type of process (e.g., GCD, LCM, Fast Power, Adding Two Numbers).
  • Visualizes process scheduling with clear output metrics.

Process Types

🔢 The simulator operates on four main types of processes:

  1. GCD (Greatest Common Divisor)
  2. LCM (Least Common Multiple)
  3. Fast Power
  4. Adding Two Numbers

Technical Details

Languages and Tools:

  • C++: Core programming language.
  • Windows Forms: Used for creating the graphical user interface.
  • Header Files: For modular code structure. patch-2
  • Assembly: Handles processes at a low level. ⚙️ ======= main
  • Data Structures:
    • Queue
    • Max Heap
    • Linked List

How It Works

  1. The user inputs process details such as burst time, priority, and process type.
  2. The simulator executes the selected scheduling algorithm.
  3. Results are displayed, showing:
  • Waiting Time: Time a process spends waiting in the queue.
  • Turnaround Time: Total time taken for process completion.
  • Average Waiting Time: Mean waiting time of all processes.
  • Running Time: Time the CPU spends executing the processes.
  • Ready Queue: A real-time list of processes waiting to be executed.
  • Current Running Process: The process actively being executed by the CPU.

Usage

  1. Clone the repository:
git clone https://github.com/your-username/cpu-scheduling-simulator.git](https://github.com/A7medhanysadek/CPU-scheduling
  1. Open the project in your C++ development environment (e.g., Visual Studio).
  2. Build and run the project.
  3. Use the GUI to input process details and choose a scheduling algorithm. patch-2 =======

main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •