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

PBL REPORT Os

Uploaded by

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

PBL REPORT Os

Uploaded by

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

Bharati Vidyapeeth Deemed to be University

Department of Engineering and Technology

Mini Project Report


On
Round Robin Algorithm
Subject-: - Operating Systems
Presented By

Roll Number Name PRN Signature

06 Roshan Epili 2343110200


07 Aniket Giri 2343110201
08 Lalit Suthar 2343110202
13 Swayam Kokate 2343110207
20 Gatik Tamore 2343110214

Signature of Internal Examiner Signature of HOD


Bharati Vidyapeeth Deemed to be University
Department of Engineering and Technology

CERTIFICATE

Roll Number Name PRN Signature

06 Roshan Epili 2343110200


07 Aniket Giri 2343110201
08 Lalit Suthar 2343110202
13 Swayam Kokate 2343110207
20 Gatik Tamore 2343110214

This is to certify that the requirements for the project report entitled ‘Microprocessors and Microcontrollers in
Washing Machine’ has been successfully completed by the following students. in partial fulfillment of B.Tech
(Second Year) in the Department of IT, BVDU DET, during the Academic Year 2024 – 2025.

Subject In-charge;
Prof. Poonam Kapse
DECLARATION

We declare that this written submission for B.Tech (Second Year) project entitled “Round Robin Algorithm”
represent our ideas in our own words and where others' ideas or words have been included, we have adequately
cited and referenced the original sources. We also declare that we have adhered to all principles of academic
honesty and integrity and have not misrepresented or fabricated or falsified any ideas / data / fact / source in our
submission. We understand that any violation of the above will cause for disciplinary action by institute and
also evoke penal action from the sources which have not been properly cited or from whom prior permission
have not been taken when needed.

Project Group Members Signature

Roshan Epili ___________


Aniket Giri ___________
Lalit Suthar ___________
Swayam Kokate ___________
Gatik Tamore ___________
Abstract

Title: Round Robin Algorithm.

The Round Robin (RR) scheduling algorithm is one of the most straightforward and widely used techniques in
time-sharing systems and is popular in operating system process scheduling. RR operates on a cyclic, time-
slicing mechanism, where each process in the system is assigned a fixed, pre-defined time quantum (or time
slice) in which it can execute. If the process does not complete its execution within this time frame, it is placed
back in the queue, allowing the next process to take its turn. This ensures a fair and balanced CPU distribution
among processes, preventing any single process from monopolizing CPU time.

The Round Robin algorithm is particularly effective in multi-user and multitasking environments because it
emphasizes fairness. Each process receives an equal share of the CPU, making it well-suited for interactive
systems where rapid response times are essential. For example, in environments like web servers or real-time
simulations, RR helps maintain responsiveness by preventing long-running tasks from blocking others.

One of the defining features of the RR algorithm is its simplicity. The algorithm only requires the definition of
a queue and a time quantum, making it easy to implement and understand. However, the choice of time
quantum is critical; a large quantum may cause the algorithm to behave similarly to a First-Come, First-Served
(FCFS) algorithm, leading to inefficiencies, while a very small quantum may result in frequent context
switching, which can increase overhead and decrease overall system performance.

While Round Robin is fair and relatively simple, it has limitations, particularly in terms of handling processes
with varying execution times. It tends to be less efficient for processes with significantly different CPU burst
times, as shorter tasks may wait longer due to the time-slicing approach. Additionally, excessive context
switching can lead to higher overhead, reducing the CPU’s effective utilization.

In summary, Round Robin scheduling is a fair, cyclic approach that balances process handling by allocating
fixed time slots, allowing equal CPU access for all processes. While effective in maintaining system
responsiveness, especially in time-sharing systems, it must balance time quantum size to avoid performance
issues.
Introduction:-
The Round Robin (RR) algorithm is a fundamental CPU scheduling technique commonly used in operating
systems, especially in environments where fairness and responsiveness are prioritized. This algorithm operates
by allocating a fixed, predefined time slice, or "quantum," to each process in the ready queue, allowing each to
access the CPU in a cyclic, ordered manner. Once a process has used its assigned time slice, it moves to the
back of the queue if it has not completed its execution, allowing the next process to use the CPU. This rotation
continues until all processes have finished, ensuring that every task receives an equal opportunity for execution.

Round Robin scheduling is widely valued for its simplicity and fairness. It is particularly effective in time-
sharing and interactive systems, where multiple users or tasks require simultaneous CPU access. By ensuring
that no single process monopolizes CPU time, RR provides a balanced approach that prevents long-running
processes from blocking shorter tasks. As a result, the algorithm is well-suited for systems where quick
response times and user interaction are essential, such as in web servers, real-time applications, and command-
line interfaces.

Despite its strengths, the Round Robin algorithm’s effectiveness depends heavily on the choice of time
quantum. If the quantum is too large, RR may resemble a First-Come, First-Served (FCFS) algorithm, leading
to potential delays in responsiveness. Conversely, a very short time quantum can cause excessive context
switching, resulting in higher overhead and reduced CPU efficiency.

This mini project focuses on implementing the Round Robin algorithm to analyze its behavior and efficiency in
various scenarios. Through this project, we aim to demonstrate the practical applications of RR, evaluate its
advantages and disadvantages, and gain a deeper understanding of the impact of time quantum on system
performance.

The Round Robin (RR) scheduling algorithm is one of the oldest and simplest scheduling algorithms in
computer science, playing a crucial role in multitasking and multi-user operating systems. In an RR scheduling
system, each process in the queue receives an equal share of the CPU, assigned through a fixed time slice or
“quantum.” After a process’s allocated time expires, it is moved to the back of the queue, and the next process
in line begins execution. This rotation provides each process with a fair chance to execute without
monopolizing system resources, making RR highly effective for systems that serve multiple users or handle
numerous tasks simultaneously.
The appeal of the Round Robin algorithm lies in its balance between fairness and simplicity. By allowing each
process to receive a time slice in turn, RR minimizes the chances of any single task delaying others, preventing
CPU-intensive processes from blocking shorter or more time-sensitive tasks. This aspect of the algorithm is
especially beneficial in time-sharing systems, where rapid, predictable response times are essential for
providing a good user experience. Web servers, for instance, benefit from RR as it ensures no single request
dominates the system, thereby maintaining overall responsiveness.

However, the efficiency of RR is highly dependent on the choice of the time quantum. A well-balanced time
quantum can optimize response times and throughput, ensuring a smooth user experience and efficient system
performance. If the time quantum is too large, the algorithm starts behaving similarly to a First-Come, First-
Served (FCFS) approach, leading to longer wait times for shorter processes and diminishing responsiveness. On
the other hand, if the time quantum is too small, the system may suffer from excessive context switching—
where the CPU repeatedly shifts from one task to another—resulting in high overhead and decreased efficiency.

The primary goal of this mini project is to explore and implement the Round Robin scheduling algorithm,
investigating its behavior under various time quantum values. Through simulations, we aim to assess how
changes in the time slice affect process turnaround times, waiting times, and overall system performance. By
analyzing the results, this project will highlight the strengths and limitations of Round Robin scheduling and
provide insights into choosing optimal quantum sizes in practical applications. This exploration will deepen our
understanding of CPU scheduling and showcase the significance of balancing fairness and efficiency in real-
world systems.
Working:

The Round Robin (RR) algorithm is a preemptive CPU scheduling technique that operates by assigning each
process a fixed, predetermined time slice or “quantum.” This ensures that every process gets a fair and equal
share of the CPU, making it well-suited for multi-user and time-sharing systems. The core principle of RR is to
cycle through processes in the order they arrive, providing each one with a time-limited opportunity to execute.
If a process does not complete within its assigned quantum, it is paused and moved to the back of the queue,
allowing the next process in line to run.

Here’s a step-by-step breakdown of how the RR algorithm works:

1. Initialization and Setup:


o All processes are placed in a queue in the order they arrive.
o The CPU scheduler sets a fixed time quantum for each process. This value is key in determining
system responsiveness and efficiency.
2. Process Execution:
o The CPU scheduler picks the first process from the queue and allocates the CPU to it.
o If the process completes its execution within the assigned time quantum, it is removed from the
queue and marked as completed.
o If the process does not complete within this time frame, it is preempted once the time quantum
expires.
3. Preemption and Queue Rotation:
o A process that has not completed is preempted (i.e., temporarily stopped) once it uses up its time
quantum. This ensures that no single process monopolizes CPU time.
o The process is then placed at the end of the queue, and the scheduler selects the next process in
line to use the CPU.
o This cycle repeats, with each process getting a turn in a round-robin fashion until all processes
have completed.
4. Cycle Continuation:
o The CPU keeps looping through the processes, executing each for one quantum of time in turn,
until all tasks are finished.
o This cyclical approach allows RR to maintain a steady flow of process execution, avoiding long
waiting times for any particular process.
5. Completion:
o The algorithm ends when there are no more processes left in the queue.

The choice of time quantum is a critical factor in Round Robin’s performance. A smaller quantum can lead to
rapid context switching, which might reduce CPU efficiency and increase overhead due to the frequent task
switching. Conversely, a larger quantum can cause longer waiting times and might reduce the responsiveness of
shorter tasks, as it allows individual processes to hold onto the CPU for extended periods.

The RR algorithm, with its cyclic, time-slicing approach, is best suited for systems that prioritize fairness and
responsiveness. It guarantees that all processes have an equal opportunity for CPU time, but it also requires
careful tuning of the time quantum to balance responsiveness with efficiency.
Conclusion :-

In conclusion, the Round Robin (RR) scheduling algorithm is a fundamental approach in CPU scheduling,
renowned for its fairness and simplicity in time-sharing and multitasking environments. Through this project,
we explored the principles, operation, and practical applications of RR, evaluating its strengths and limitations
in handling various process loads. The cyclic, time-slicing nature of RR ensures that all processes are given an
equal opportunity to execute, which makes it particularly effective in systems requiring rapid response times,
such as interactive and real-time systems.

One of the most significant findings of this project is the impact of time quantum on system performance. An
appropriately chosen time quantum can improve responsiveness and CPU efficiency, while an ill-suited time
quantum can lead to excessive context switching or prolonged waiting times. This insight underscores the
importance of balancing the time quantum based on system requirements, user expectations, and workload
characteristics.

Overall, the Round Robin algorithm demonstrates the trade-offs between fairness, simplicity, and efficiency in
CPU scheduling. While it may not be optimal for all types of workloads—especially those with highly variable
execution times—it remains a valuable and widely applicable scheduling technique. Through implementing and
analyzing RR, this project has provided a deeper understanding of CPU scheduling mechanisms and the key
considerations for optimizing system performance in real-world applications.

Aniket Giri, Lalit Suthar, Roshan Epili, Swayam Kokate, Gatik Tamore

You might also like