a Python program that simulates the execution of processes on a CPU using different scheduling algorithms.
The goal of this Python code is to simulate different scheduling algorithms (FCFS, SJF, Priority) on processes with various attributes such as processID, arrivalTime, burstTime, and priority. The code collects the result of each scheduling algorithhm, and visualize the result in a bar plot for easier comparison.
By default, this code simulates 100 processes with parameters stored in processes.txt. If processes.txt does not exist, the code will generate the file with random numbers.
Upon completion of the simulation, the following metrics for algorithms will be displayed:
- Average Turnaround Time(ms)
- Average Waiting Time(ms)
- CPU Utilization(%)
Please make sure you have the following dependencies installed:
- Python (version 3.8 or higher)
- Matplotlib (latest version)
You can install Python from the official website: Python Downloads
To install Matplotlib, you can use the following command:
conda install matplotlibOnce you've installed the required dependencies, clone the repository into your local system using the below command:
git clone https://github.com/jinyoungan85/simpleProcessorMgmt.gitNavigate to your local repository, run the Python code using the following command:
python processorMgmt.py
