Professional Documents
Culture Documents
Autonomous 2023-2024
MALLA REDDY INSTITUTE OF ENGINEERING &
TECHNOLOGY (Autonomus) Department of IT&ET
CERTIFICATE
This is to certified that the project report titled “ROUND ROBIN in
operating system” is being submitted by K.SAI SURAJ bearing Hall
Ticket No. 22W91A6664 in B.Tech. I Year II semester in Computer Science
and Engineering (Artificial Intelligence & Machine Learning) is a record
bono-fied work carried out by me. The results embodied in this report are
clear and genuine.
Internal Guide
ACKNOWLEDGEMENT
ROLLNO: 22W91A6664
2
S. No. Topic Page No.
1. Abstract 4
2. Introduction 5
3. Applications 6
4. Important terms 7
8. Conclusion 18
9. References 18
CONTENTS
3
ABSTRACT
The main objective of this paper is to develop a new approach for round robin scheduling
which help to improve the CPU efficiency in real time and time-sharing operating system.
There are many algorithms available for CPU scheduling. But we cannot implemented in real
time operating system because of high context switch rates, large waiting time, large
response time, large turn-around time and less throughput.
The proposed algorithm improves all the drawback of simple round robin architecture. The
author have also given comparative analysis of proposed with simple round robin scheduling
algorithm. Therefore, the author strongly feel that the proposed architecture solves all the
problem encountered in simple round robin architecture by decreasing the performance
parameters to desirable extent and thereby increasing the system throughput .
4
Introduction-Round Robin Scheduling
Round Robin(RR) scheduling algorithm is mainly designed for time-
sharing systems. This algorithm is similar to FCFS scheduling, but in
Round Robin(RR) scheduling, pre-emption is added which enables
the system to switch between processes.
5
APPLICATIONS
While this definition is general, there are some specific applications for a round robin.
We examine a few of these below.
(Sports):-
In sports teams like those found in the NFL, NBA, MLB or NHL, a round robin is a method
of scheduling where each participant plays against all other participants in the event. This is
also referred to as a round robin tournament. This is commonly used in tennis tournaments,
where round robin play determines who advances to the next round and who ends up being
eliminated.
(Gambling):-
In gambling and sports betting, a round robin is used as a betting strategy. This means that
instead of betting on one game or event, the bettors take stakes on multiple games or events.
This is also referred to as parlay betting. A round robin bet can be done in different ways with
many possible combinations, but the most common is to make round robin wagers on each
game or event in a group. For example, during sports playoffs, a round robin parlay may
occur for multiple teams playing. If one team loses, the bettor still has a chance to win with
the other teams. The advantage of this is that it increases the betting odds of winning because
there are more possible outcomes and more potential payouts.
(Stories):-
A round robin story is one that is started by one person and then continued successively by
others in turn. Whether an author can get additional turns, how many lines each person can
contribute, and how the story can be ended depend on the rules. Some websites have been
created for the telling of round robin stories by each person posting the next part of the story
as part of an online conference thread.
(Business meetings and events):-When planning business meetings and events, round robin
scheduling can be used to have all attendees take turns presenting their ideas or products.
This ensures that all attendees have an equal opportunity to share their views and be heard,
while also minimizing time wasted in the back-and-forth between speakers. Overall, round
robin arrangements allow for a fair and balanced distribution of tasks, resources, or other
opportunities among different individuals or groups within a business context
6
Important terms
1. Completion Time
It is the time at which any process completes its execution.
2. Turn Around Time
This mainly indicates the time Difference between completion
time and arrival time. The Formula to calculate the same
is: Turn Around Time = Completion Time – Arrival Time
3. Waiting Time(W.T):
It Indicates the time Difference between turn around time and
burst time.
And is calculated as Waiting Time = Turn Around Time –
Burst Time
7
In the above diagram, arrival time is not mentioned so it is
taken as 0 for all processes.
Note: If arrival time is not given for any problem statement then it is
taken as 0 for all processes; if it is given then the problem can be
solved accordingly.
Explanation
P1 21 32-0=32 32-21=11
P2 3 8-0=8 8-3=5
P3 6 21-0=21 21-6=15
P4 2 15-0=15 15-2=13
Average waiting time is calculated by adding the waiting time of all
processes and then dividing them by no.of processes.
8
// Program implementation in C++ for Round Robin
scheduling
#include<iostream>
int rem_bt[n];
rem_bt[i] = bt[i];
9
while (1)
if (rem_bt[i] > 0)
// By Increasing the
value of t it shows how much time a process has
been processed
t += quantum;
10
// Decreasing the
burst_time of current process by the quantum
rem_bt[i] -= quantum;
else
t = t + rem_bt[i];
// Waiting time is
current time minus time used by this process.
wt[i] = t - bt[i];
rem_bt[i] = 0;
11
}
if (done == true)
break;
12
// Function to calculate the average time
int
quantum)
13
// around time
cout << " " << i+1 << "\t\t" << bt[i]
<<"\t "
int main()
// process id's
14
int processes[] = { 1, 2, 3,4};
// Time quantum
int quantum = 2;
findavgTime(processes, x, burst_time,
quantum);
return 0;
Copy
Output
15
Advantages of Round Robin Scheduling Algorithm
16
Some Points to Remember
4.In this case, when the value of time quantum tends to infinity then
the Round Robin Scheduling becomes FCFS Scheduling.
17
CONCLUSION
A comparative study of simple RR algorithm and proposed one is made. It is
concluded that the proposed algorithm is superior as it has less waiting response
time, usually less pre-emption and context switching thereby reducing the
overhead and saving of memory space. Future work can be based on this
algorithm modified and implemented for hard real time system where hard
deadline systems require partial outputs to prevent catastrophic events. Round
robin is one of the oldest, fairest, and most extensively utilized scheduling
algorithms in conventional operating systems. The most significant benefit of the
round-robin scheduling algorithm is that all the jobs get an unbiased allocation
of CPU, and it deals with all processes without any priority. This technique takes
more time to transition between contexts.
REFERENCE
Wikipedia about round robin…….
https://www.studocu.com/in/u/4201402
7?sid=01703323447
Studytonight.com (question)
18