0% found this document useful (0 votes)
20 views9 pages

Cpu Scheduler Report

The document outlines the design and implementation of an Intelligent CPU Scheduler Simulator that demonstrates various CPU scheduling algorithms like FCFS, SJF, and Round Robin. It includes user input handling, scheduling algorithm execution, and visualization of results, aiming to enhance understanding of scheduling techniques and performance metrics. Future enhancements may include additional algorithms, preemptive variants, and improved visualizations such as Gantt charts.

Uploaded by

ankkit6799kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views9 pages

Cpu Scheduler Report

The document outlines the design and implementation of an Intelligent CPU Scheduler Simulator that demonstrates various CPU scheduling algorithms like FCFS, SJF, and Round Robin. It includes user input handling, scheduling algorithm execution, and visualization of results, aiming to enhance understanding of scheduling techniques and performance metrics. Future enhancements may include additional algorithms, preemptive variants, and improved visualizations such as Gantt charts.

Uploaded by

ankkit6799kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

ABSTRACT

CPU scheduling is a fundamental concept in


operating systems that determines the
order in which processes are executed by
the CPU. Efficient scheduling improves
system performance, resource utilization,
and response time. Various scheduling
algorithms, such as First-Come, First-
Served (FCFS), Shortest Job Next (SJN),
Round Robin (RR), and Priority Scheduling,
are used to optimize different aspects of
process execution. Preemptive and non-
preemptive strategies influence how tasks
are managed based on factors like burst
CPU SCHEDULING time, priority, and fairness. The choice of
scheduling algorithm impacts system
efficiency, making it a crucial aspect of
operating system design.

PREPARED BY
SATYAM SAURABH , VAIBHAV INGLE , ANKIT
BHARDWAJ
Intelligent CPU Scheduler Simulator
1. Project Overview
The Intelligent CPU Scheduler Simulator is designed to demonstrate various CPU
scheduling algorithms, including First-Come-First-Serve (FCFS), Shortest Job First
(SJF), and Round Robin (with a fixed quantum of 3). The simulator allows users to
input process details (arrival time, burst time) and visualize the execution order in
tabular format. Additionally, performance metrics such as average waiting time,
turnaround time, and response time will be computed.

Goals & Objectives:


- Develop a real-time interactive CPU scheduling simulator.
- Implement three major scheduling algorithms (FCFS, SJF, Round Robin with fixed
quantum).
- Provide a tabular representation of process execution.
- Compute performance metrics for each algorithm.
- Ensure a user-friendly interface for easy process input and results analysis.

2. Module-Wise Breakdown

Module 1: Process Input Handling


- Allows users to enter process details (Process ID, Arrival Time, Burst Time).
- Supports multiple input formats (manual input, file upload).

Module 2: Scheduling Algorithms Implementation


- Implementation of FCFS, SJF, and Round Robin (Quantum = 3).
- Calculation of waiting time, turnaround time, and response time.

Module 3: Visualization & Output


- Tabular representation of scheduling results.
- Summary of performance metrics.

3. Functionalities
- User Input Handling: Accepts processes and parameters dynamically.
- Scheduling Computation: Simulates scheduling algorithms and computes
performance metrics.
- Graphical Output: Displays results in tabular format.
- Performance Analysis: Shows average waiting and turnaround times.
- Responsive UI: Improved layout for better readability and user interaction.

4. Technology Used
Programming Languages:
- HTML, CSS, JavaScript for front-end implementation.

Libraries & Tools:


- JavaScript: Handles user input, scheduling logic, and DOM manipulation.
- CSS: Enhances styling with better contrast and readability.

Other Tools:
- GitHub for version control and revision tracking.
- UML Diagrams for project design.

5. Flow Diagram
1. User Inputs Process Details → 2. Selects Scheduling Algorithm → 3. Algorithm
Computes Schedule → 4. Tabular Results Displayed → 5. Performance Metrics
Calculation

6. Revision Tracking on GitHub


Repository Name: CPU Scheduling Simulator

GitHub Link: https://github.com/917satyam/cpu_scheduling-


/blob/main/cpu_schedulling.github.io-main.zip

Commit Strategy: Minimum 7 revisions with clear commit messages.

7. Conclusion & Future Scope


Conclusion:
This project successfully implements a CPU scheduling simulator, helping users
understand process scheduling through interactive visualization and performance
analysis.

Future Scope:
- Add more scheduling algorithms (e.g., Priority Scheduling, Multilevel Queue,
Multilevel Feedback Queue).
- Implement Preemptive variants for SJF and Priority Scheduling.
- Enhance visualization with Gantt charts.
- Allow dynamic quantum input for Round Robin scheduling.

8. References
- Silberschatz, Galvin, & Gagne - Operating System Concepts.
- Tanenbaum, A. - Modern Operating Systems.
- Official JavaScript Documentation.

9. Appendices
A. AI-Generated Project Breakdown
Project Overview

The CPU Scheduling Simulator is designed to implement and visualize different CPU
scheduling algorithms, including First-Come-First-Serve (FCFS), Shortest Job First (SJF),
and Round Robin (fixed quantum = 3). It allows users to input process details such as
arrival time and burst time, execute the selected algorithm, and display results in tabular
form.

The key objective of this project is to enhance understanding of scheduling techniques,


compare their efficiency, and analyze performance metrics such as waiting time and
turnaround time.

Module-Wise Breakdown

1. Process Input Handling Module

 Users can enter the number of processes.

 Input fields for Process ID, Arrival Time, and Burst Time.

 Selection of scheduling algorithm (FCFS, SJF, Round Robin).

 Dynamic input fields appear based on the number of processes selected.

2. Scheduling Algorithm Execution Module

 Implements three scheduling algorithms:

o FCFS: Processes are executed in the order they arrive.

o SJF: Processes with the shortest burst time are executed first.

o Round Robin: Uses a fixed quantum (3 units) for process execution.


 Calculates completion time, turnaround time, and waiting time for each process.

3. Visualization & Output Module

 Displays tabular results with all computed metrics.

 Provides real-time execution updates when an algorithm is run.

 (Future Scope: Adding Gantt Chart visualization for better representation).

Functionalities & Features

✔️ Supports FCFS, SJF, and Round Robin scheduling algorithms.


✔️ Dynamic input fields for process information.
✔️ Automatic calculation of completion time, turnaround time, and waiting time.
✔️ Graphical tabular representation of results.
✔️ User-friendly interface using HTML, CSS, JavaScript.
✔️ Hosted and maintained on GitHub for version control.

Technology Stack

 Front-end: HTML, CSS, JavaScript

 Logic Implementation: JavaScript

 Styling & UI Enhancements: CSS

 Version Control: GitHub

Execution Plan

1. User Inputs Process Details → 2. Selects Scheduling Algorithm → 3. Algorithm


Computes Schedule → 4. Results Displayed in Table → 5. Performance Metrics
Calculation

B. Problem Statement
When designing and implementing a CPU scheduling simulator, several common issues
arise, affecting system efficiency and fairness. These challenges include:

1. Starvation in Scheduling
 In Priority Scheduling and Shortest Job First (SJF), lower-priority or long
processes may get delayed indefinitely if shorter or higher-priority tasks keep
arriving.

 Solution: Implement Aging, which increases a process’s priority over time.

2. Poor Response Time in FCFS

 First-Come-First-Serve (FCFS) may lead to long waiting times for short processes
if a long process arrives first (convoy effect).

 Solution: Use Round Robin or Shortest Job First (SJF) for better turnaround time.

3. Overhead in Context Switching

 Round Robin (RR) scheduling reduces starvation but increases context switching
overhead, leading to wasted CPU cycles.

 Solution: Optimize the time quantum to balance fairness and efficiency.

4. Inefficiency in Multi-Core Processors

 Traditional scheduling algorithms are often designed for single-core CPUs and may
not efficiently utilize multi-core processors.

 Solution: Implement multi-threaded scheduling techniques, such as load


balancing among multiple cores.

5. Incorrect Calculation of Waiting & Turnaround Time

 Incorrect implementation of scheduling formulas may lead to wrong performance


metrics, affecting comparisons between algorithms.

 Solution: Carefully follow standard formulas:

o Turnaround Time = Completion Time - Arrival Time

o Waiting Time = Turnaround Time - Burst Time

6. Fixed Quantum Issue in Round Robin

 If the time quantum is too small, excessive context switching occurs.

 If it’s too large, Round Robin behaves like FCFS, reducing fairness.

 Solution: Allow dynamic quantum adjustment based on system load.

7. Lack of Real-time Visualization (Gantt Chart)


 Without graphical representation, users may find it difficult to interpret
scheduling execution order.

 Solution: Implement a Gantt chart to provide a visual representation of process


execution over time.

C. Solution/Code/Attached Screenshots

You might also like