This project involves building a CPU scheduler and associated components like process generator, clock, and scheduler. Algorithms like HPF, SRTN, and RR manage process execution efficiently, generating performance reports on CPU utilization and turnaround time. Through simulation and inter-process communication, the system optimizes memory and time usage for enhanced operating system efficiency.
The system consists of several key components:
- Process Generator: Creates processes, reads input files, initiates the scheduler, and sends process information for scheduling.
- Clock: Emulates an integer time clock.
- Scheduler: Core component responsible for process management and execution. Implements algorithms such as Non-preemptive Highest Priority First, Shortest Remaining Time Next, and Round Robin.
- Process: Simulates CPU-bound processes.
- Input/Output Evaluation: Input files define processes, while output files contain scheduling logs and performance metrics.
- Reads input files.
- Prompts user for scheduling algorithm and parameters.
- Initiates scheduler and clock processes.
- Creates process data structure.
- Sends process information to scheduler.
- Clears IPC resources.
- Emulates an integer time clock.
- Core component implementing scheduling algorithms.
- Manages process states and execution.
- Tracks process control blocks (PCBs).
- Generates scheduling logs and performance metrics.
- Simulates CPU-bound processes.
- Input files define processes.
- Output files contain scheduling logs and performance metrics.
- Input File: Defines processes with specified attributes.
- Output Files: Contain scheduling logs and performance metrics.
- Clone the repository.
- you must install gcc to compile files (Linux - debian based distros)
sudo apt install gcc
- Navigate to the project dir and Run the following script
chmod +rwx start.sh
chmod +rwx kill.sh
- Then to start the program run
./start.sh
- If there is unexpected system error occurs you can Run the following script to terminate all processes
./kill.sh