An Efficient Dynamic Round Robin CPU Scheduling Algorithm
An Efficient Dynamic Round Robin CPU Scheduling Algorithm
Abstract- CPU Scheduling is one of the fundamental concepts of Operating System. Round Robin (RR) CPU
scheduling algorithm is optimal CPU scheduling algorithm in timeshared systems. The performance of the CPU
depends on the selection of time quantum in timeshared systems. The time quantum taken in RR algorithm is static
that decreases the performance of CPU. In this paper selection of time quantum is discussed and a new CPU
scheduling algorithm for timeshared systems is proposed and is called as EDRR (Efficient Dynamic Round Robin)
algorithm. The objective of this paper is to make a change in round robin CPU scheduling algorithm so that the
performance of CPU can be improved. EDRR also includes advantages of round robin CPU scheduling algorithm of
less chance of starvation. Round robin CPU scheduling algorithm has high context switch rates, large response time,
large waiting time, large turnaround time and less throughput, these disadvantages can be improved with new
proposed CPU scheduling algorithm. In this paper analysis of number of context switches, the average waiting time
and the average turnaround time of processes in round robin CPU scheduling algorithm, SRBRR (Shortest
Remaining Burst Round Robin), ISRBRR (Improved Shortest Remaining Burst Round Robin) and new proposed
EDRR CPU scheduling algorithm has been done.
Keywords – Context switching, CPU scheduling, Gantt chart, Response time, Round Robin CPU scheduling
algorithm, Turnaround time, Waiting time.
I. INTRODUCTION
The Central Processing Unit (CPU) is the heart of the computer system so it should be utilized efficiently. For this
purpose CPU scheduling is very necessary. CPU Scheduling is one of the fundamental concepts of Operating System.
Sharing of computer resources between multiple processes is called scheduling [1].
The various CPU scheduling algorithms are: -
FCFS (First Come, First Serve) CPU Scheduling: - In this scheduling the process that request the CPU first is
allocated to CPU first.
SJF (Shortest Job First) CPU Scheduling: - In this scheduling the process with the shortest CPU burst time is
allocated to CPU first.
Priority Scheduling: - In this scheduling the process with high priority is allocated to CPU first.
Round Robin Scheduling: - RR scheduling is used in timesharing systems. It is same as FCFS scheduling with
pre-emption is added to switch between processes. A static Time Quantum (TQ) is used in this CPU Scheduling
The various scheduling parameters [2][3] for the selection of the scheduling algorithm are :
Context Switch: A context switch is process of storing and restoring context (state) of a pre-empted process, so
that execution can be resumed from same point at a later time. Context switching is wastage of time and
memory that leads to the increase in the overhead of scheduler, so the goal of CPU scheduling algorithms is to
optimize only these switches.
Throughput: Throughput is defined as number of processes completed in a period of time. Throughput is less
in round robin scheduling. Throughput and context switching are inversely proportional to each other.
CPU Utilization: It is defined as the fraction of time cpu is in use. Usually, the maximize the CPU utilization is
the goal of the CPU scheduling
Turnaround Time: Turnaround time is defined as the total time which is spend to complete the process and is
how long it takes the time to execute that process.
Waiting Time: Waiting time is defined as the total time a process has been waiting in ready queue.
Response Time: Respond Time is better measure than turnaround time. Response time is defined as the time
used by the system to respond to the any particular process. Thus the response time should be as low as possible
for the best scheduling.
The various characteristics of good scheduling algorithm are [3]:
Minimum context switches.
© 2014, IJARCSSE All Rights Reserved Page | 906
Scholar et al., International Journal of Advanced Research in Computer Science and Software Engineering 4(5),
May - 2014, pp. 906-910
Maximum CPU utilization.
Maximum throughput.
Minimum turnaround time.
Minimum waiting time.
In this paper related work is discussed in Section 2. Section 3 explains Round Robin Scheduling Algorithm. Section 4
introduces the Proposed Algorithm with example. Section 5 will provide conclusion of the work.
A 20
B 25
C 35
D 50
E 80
F 90
G 120
Gantt chart A B C D E F G D E F G F G
0 20 45 80 120 160 200 240 250 290 330 370 380 420
Context switches : 12
Average waiting Time : 152.14 ms
Average Turnaround Time: 212.14 ms
Context switches :6
Average waiting Time : 112.14ms
Average Turnaround Time: 172.14 ms
Table 2: Comparison between RR, SRBRR and Proposed algorithm (Case 1)
RR 40 152.14 212.14 12
250
200
150 RR
SRBRR
100
ISBRR
50 EDRR
0
Number of Context Average Waiting Average Turnaround
Switches Time Time
RR 20 108.57 140.00 11
SRBRR 20,30,30 55.71 87.14 9
ISRBRR 40 64.28 84.28 8
EDRR 51,29 47.14 78.57 6
140
120
100
RR
80
SRBRR
60
ISRBRR
40
20 EDRR
0
Number of Context Average Waiting Average Turnaround
Switches Time Time
Consider five processes with 80, 60, 20, 10 and 30 ms CPU burst time.
RR 30 94.00 134.00 7
SRBRR 30,50 50.00 90.00 6
ISRBRR 49 73.40 93.80 6
EDRR 60,20 44.00 84.00 4
REFERENCES
[1] Abraham Silberschatz, Peter Baer Galvin, Greg Gagne, “Operating System Concepts”, Sixth Edition.
[2] E.O. Oyetunji, A. E. Oluleye,” Performance Assessment of Some CPU Scheduling Algorithms”, Research
Journal of Information Technology,1(1): pp 22-26, 2009
[3] Ajit Singh, Priyanka Goyal, Sahil Batra,” An Optimized Round Robin Scheduling Algorithm for CPU
Scheduling”, (IJCSE) International Journal on Computer Science and Engineering Vol. 02, No. 07, 2383-2385,
2010.
[4] Rami J. Matarneh.“Self-Adjustment Time Quantum in Round Robin Algorithm Depending on Burst Time of
Now Running Processes”, American J. of Applied Sciences 6(10):1831-1837, 2009.
[5] Sourav Kumar Bhoi, Sanjaya Kumar Panda, Debashee Tarai, “Enhancing cpu performance using subcontrary
mean dynamic round robin (smdrr) scheduling algorithm” ,JGRCS, Volume 2, No. 12, December 2011, pp.17-21
[6] Rakesh Mohanty, H. S. Behera, Khusbu Patwari, Monisha Dash, “Design and Performance Evaluation of a New
Proposed Shortest Remaining Burst Round Robin (SRBRR) Scheduling Algorithm”, International Symposium
on Computer Engineering & Technology (ISCET), Vol 17, 2010
[7] P.Surendra Varma , “A FINEST TIME QUANTUM FOR IMPROVING SHORTEST REMAINING BURST
ROUND ROBIN (SRBRR) ALGORITHM” Journal of Global Research in Computer Science, 4 (3), March
2013, 10-15
[8] Rakesh Kumar Yadav, Abhishek K Mishra, Navin Prakash, Himanshu Sharma,” An Improved Round Robin
Scheduling Algorithm for CPU Scheduling”, (IJCSE) International Journal on Computer Science and
Engineering Vol. 02, No. 04, 1064-1066, 2010
[9] Ishwari Singh Rajput,” A Priority based Round Robin CPU Scheduling Algorithm for Real Time Systems”,
(IJIET)International Journal of Innovations in Engineering and Technology Vol. 1 Issue 3 Oct 2012