Skip to content

A python code that simulates the execution of processes on a CPU using different scheduling algorithms.

Notifications You must be signed in to change notification settings

jinyoungan85/simpleProcessorMgmt

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

simpleProcessorMgmt

a Python program that simulates the execution of processes on a CPU using different scheduling algorithms.

Table of Contents

About

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(%)

Getting Started

Required Dependencies

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 matplotlib

Usage

Once you've installed the required dependencies, clone the repository into your local system using the below command:

    git clone https://github.com/jinyoungan85/simpleProcessorMgmt.git

Navigate to your local repository, run the Python code using the following command:

    python processorMgmt.py

Expected Output

image

image

About

A python code that simulates the execution of processes on a CPU using different scheduling algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages