Project Report - Visual OS Scheduler
Project Report - Visual OS Scheduler
Submitted By:
Lamisa Mashiat (C201249)
Sohana Tasneem (C201266)
Sadia Haque Chowdhury (C201270)
Tahura Tasmin Chowdhury (C201272)
Nusrat Jahan (C201261)
Submitted To:
Shefayatuj Johara Chowdhury
Assistant Lecturer
Dept. of CSE, IIUC
TABLE OF CONTENTS
CHAPTER 1 INTRODUCTION
1.1 Problem Statement ……..……………………………….…………………….. 03
1.2 Proposed Solution …………………………………….……………………… 03
1.3 Objectives ……………………………………….…………………… 03
CHAPTER 2 ALGORITHMS
2.1 Round Robin (RR) ….….…...……………..…..……………………. 04
2.2 Highest Priority First (HPF) …………………………..…...…………………. 04
2.3 First Come First Served (FCFS) …………………………..…...………………. 04
2.4 Shortest Remaining Time Next (SRTN) ……………………..…...……………. 05
REFERENCES 13
Page 2 of 13
CSE-3632 Operating System Lab
CHAPTER 1
INTRODUCTION
The comprehending process scheduling algorithms, which are vital for the functionality of our
system, use some really complicated algorithms. Users find it challenging to understand the
complexities of these algorithms because they are frequently obscured and complicated. Users'
abilities to optimize system resources and solve scheduling problems are hampered by this
ignorance. To address this, our project intends to create a visualizer that makes process
scheduling algorithms easier to comprehend, empowering users to make knowledgeable
decisions and improve system efficiency through logical visual representations and interactive
features
1.3 Objectives:
✓ Provide a user-friendly interface for intuitive exploration and interaction with the
scheduling algorithms.
Page 3 of 13
CSE-3632 Operating System Lab
CHAPTER 2
ALGORITHMS
Round Robin (RR) is a popular process scheduling algorithm used in operating systems. It is
designed to provide fair and balanced CPU time allocation among multiple processes. The RR
algorithm works by assigning each process a fixed time quantum, allowing it to execute for
that duration before moving to the next process in the queue. This preemptive approach ensures
that no single process monopolizes the CPU for an extended period, promoting fairness. With
its simple and straightforward nature, the RR algorithm is widely utilized in scenarios where
time-sharing and equal distribution of resources are crucial, making it an essential component
of modern operating systems.
Non-Preemptive Highest Priority First (HPF) is a process scheduling algorithm widely used in
operating systems. In HPF, each process is assigned a priority value, and the process with the
highest priority is selected for execution first. Unlike preemptive algorithms, HPF allows a
process to run until it voluntarily relinquishes the CPU, such as when it completes its execution
or enters a waiting state. This non-preemptive nature ensures that higher-priority processes
receive immediate attention, potentially leading to better response times for critical tasks. HPF
is suitable for scenarios where prioritizing important processes is vital, such as real-time
systems or time-sensitive applications.
First Come First Served (FCFS) is a basic process scheduling algorithm commonly used in
operating systems. In FCFS, processes are executed in the order they arrive in the system's
ready queue. The first process that arrives is the first to be executed, followed by the subsequent
processes in the order of their arrival. This non-preemptive algorithm operates on a simple
principle of fairness, as it ensures that processes are served in the same sequence, they entered
the system. FCFS is easy to understand and implement but may suffer from the "convoy effect,"
where a long-running process delays the execution of other processes waiting in the queue. It
is suitable for scenarios without strict performance requirements or time-sensitive tasks.
Page 4 of 13
CSE-3632 Operating System Lab
Shortest Remaining Time Next (SRTN) is a preemptive process scheduling algorithm utilized
in operating systems. In SRTN, the process with the smallest remaining execution time is
selected for execution. If a new process with an even smaller execution time arrives, the
currently running process is preempted, and the new process takes over. This dynamic nature
ensures that processes with shorter execution times are prioritized, reducing overall waiting
time and improving system responsiveness. SRTF is effective in scenarios where process
execution times vary significantly, as it optimizes CPU utilization and minimizes turnaround
time. However, the frequent context switches associated with preemption can introduce some
overhead.
CHAPTER 3
SYSTEM REQUIREMENTS AND ANALYSIS
IDE: Pycharm
Required Libraries:
Matplotlib - Matplotlib is used for generating plots and computing the scheduling results
and comparing the performance. Matplotlib is a low level graph plotting library in python
that serves as a visualization utility. It is open source and we can use it freely. Matplotlib
is mostly written in python, a few segments are written in C, Objective-C and Javascript
for Platform compatibility.
Tkinter - Tkinter is used in the project for creating the graphical user interface (GUI) to
visualize the process scheduling algorithms. Tkinter is a Python binding to the Tk GUI
toolkit. It is the standard Python interface to the Tk GUI toolkit, and is Python's de facto
standard GUI. Tkinter is included with standard Linux, Microsoft Windows and macOS
installs of Python. The name Tkinter comes from Tk interface.
Numpy - NumPy is used in the project to handle numerical operations and data
manipulation. It is a library for the Python programming language, adding support for large,
multi-dimensional arrays and matrices, along with a large collection of high-level
mathematical functions to operate on these arrays.
Input will be taken as text file. The first line contains a single integer n- the number of
processes. Next n lines contains P1, A1, R1, P1 the process number, arrival time, running
time and priority respectively.
Page 5 of 13
CSE-3632 Operating System Lab
CHAPTER 4
SYSTEM DESIGN & MODELING
Page 6 of 13
CSE-3632 Operating System Lab
CHAPTER 5
INTERFACE & FUNCTIONALITIES
Homepage:
Input: Through a simple GUI the user should be able to do the following:
- Enter the input file name
- Choose one of the implemented scheduling algorithms torun.
- Specify the “Context Switching”time.
- Specify the “Time Quantum” in case of choosing RoundRobin.
Output: For the given input, outputs for four different Algorithms are given below
Page 7 of 13
CSE-3632 Operating System Lab
Page 8 of 13
CSE-3632 Operating System Lab
Page 9 of 13
CSE-3632 Operating System Lab
Page 10 of 13
CSE-3632 Operating System Lab
Page 11 of 13
CSE-3632 Operating System Lab
CHAPTER 6
FUTURE ENHANCEMENTS AND DISCUSSION
Update GUI:
Enhancements can be made to the graphical user interface (GUI) to improve its aesthetics,
usability, and functionality. This may include refining the layout, adding tooltips or help
sections for better user guidance, and optimizing the overall user experience.
Page 12 of 13
CSE-3632 Operating System Lab
6.2 Conclusion
REFERENCES
[1] https://www.researchgate.net/publication/351330519_A_Review_on_the_CPU_Sched
uling_Algorithms_Comparative_Study
[2] https://afteracademy.com/blog/process-scheduling-algorithms-in-the-operating-system/
[3] https://www.grin.com/document/267035
[4] https://www.scaler.com/topics/operating-system/scheduling-algorithms-in-os/
[5] https://quescol.com/operating-system/goal-of-cpu-scheduling-algorithm
Page 13 of 13