An Improved Round Robin CPU Scheduling Algorithm B
An Improved Round Robin CPU Scheduling Algorithm B
5) (2018) 238-241
Research paper
Abstract
The most important and integral part of a computer system is its operating system. Scheduling various resources is one of the most criti-
cal tasks an operating system needs to perform. Process scheduling being one of those tasks, involves various techniques that define how
more than one processes can be executed simultaneously. The primary aim here is to the system more efficient and faster. The fundamen-
tal scheduling algorithms are: First Come First Serve (FCFS), Round Robin, Priority Based Scheduling, and Shortest Job First (SJF).
This paper focuses on Round Robin Scheduling algorithm and various issues related to it. One major issue in RR scheduling is determin-
ing the length of Time Quantum. If the Time Quantum is too large RR scheduling behaves as FCFS. On the other hand, if it is too small
it forces considerable increase in the number of context switches. Our main objective is to overcome this limitation of traditional RR
scheduling algorithm and maximize CPU utilization, further, leading to more efficient and faster system. Here we propose an algorithm
that categorizes available processes into High Priority processes and Low Priority process. The proposed algorithm reduces the average
waiting time of High Priority processes in all cases and of Low Priority processes in not all but some cases. The overall waiting time
changes on the basis of set of processes considered. The simulation results justify that the proposed schemes reduces the overall average
waiting time when compared to the existing schemes.
Keywords: CPU Scheduling, Round Robin Scheduling, Priority Scheduling, Waiting Time, Turnaround Time, Time Quantum
Copyright © 2018 Authors. This is an open access article distributed under the Creative Commons Attribution License, which permits unrestricted
use, distribution, and reproduction in any medium, provided the original work is properly cited.
International Journal of Engineering & Technology 239
process is allotted a priority and the process with highest priority The average waiting time (AWT) of low and high priority pro-
is executed firstly, then the process having second highest priority, cesses is shown below in figure 2.
henceforth and so on. In case the processes having equal priority
arrive, then FCFS is used to resolve the conflict. Priority is as-
signed to the processes basis the memory requirements, time re-
quirements or any other resource requirements.
The other CPU scheduling technique is Round Robin which also
is essentially pre-emptive. Here, CPU is allocated to the processes
in a circular fashion for a fixed time period called Time Quantum
[8].
When this Time Quantum is reduced to zero, it is preempted and
other process start it’s execution for a given time period. The sta-
tus of pre-empted processes is saved by context switching method.
One other variant of CPU scheduling is the Multiple-level queues
which a manual scheduling technique [15]. It groups the processes Fig. 2: Waiting Time Analysis of Existing Methodology
having mutually similar characteristics together using the other
existing algorithms. A number of queues are retained for processes 4. Proposed Method
with mutual characteristics. Each queue can have its specific
scheduling algorithms [8]. Each queue is also assigned a priority The Round Robin (RR) CPU scheduling algorithm considers all
for execution. For instance, OS-bound jobs can be arranged in one the jobs, which are present in ready queue as equal priority jobs. It
queue and all I/O-bound jobs in another queue. The Process offers identical chance to all the jobs to execute in CPU for dura-
Scheduler then in turn selects jobs from each queue and allots tion called Time Quantum (TQ). So, a process can be executed by
them to the CPU based on the algorithm allotted to the queue. the CPU until its time quantum (TQ) terminates or the process
Multi-level queue scheduling was generated for circumstances in terminates by its own after conclusion of its CPU worst time.
which processes are certainly categorized into different groups. It may be probable that processes present in ready queue are of
diverse priority i.e. high or low. Some processes may need Central
3. Shortcomings of Existing Algorithm Processing Unit on urgent basis (i.e. program to shut down com-
puter because of temperature exceeded, alert on unauthorized
We considered traditional round robin CPU scheduling algorithm access, etc.) are called high priority jobs. On the other hand, an-
as existing algorithm. Although round robin is an efficient CPU other type of processes is with normal priority.
scheduling algorithm because it treat all the processes equally and
provide equal chance to execute. As per the research, it is found 5. Proposed Algorithm
that there are some critical processes in the system having high
priority. Therefore traditional round robin algorithm does not Our proposed algorithm is given below-
meet the expectations at this condition.
Consider the following set of processes with time quantum 4 –
Step 1: Enter process name, priority and burst time.
Table 1 Processes in Ready Queue for Existing Methodology Step 2: Store the above details in a queue called READYQ
Process Name Priority Burst Time Step 3: Create two separate queues, first HIGHPQ for high priori-
P0 0 5 ty processes and second LOWPQ for normal priority process-
P1 1 3 es.
P2 1 12 Step 4: Do step 5 to step 11 until remaining CPU burst time of
P3 0 9 processes of both the queues (HIGHPQ and LOWPQ) become
P4 0 8 zero.
Step 5: Select next process from either HIGHPQ or LOPQ on
We know that round robin scheduling provides equal opportunity alternate basis. First, a process form HIGHPQ must be selected as
to execute all the processes in the process set. Hence, the Gantt it should get priority over normal priority processes.
chart and waiting time for the above set of processes are shown in Step 6: If the remaining CPU burst time of selected process is
figure 1 greater than or equal to time quantum then do step 7, otherwise do
. step 8.
Step 7: Execute that process for a duration of time quantum.
Step 8: Execute the selected process until its remaining burst time
become zero.
Step 9: Updated the remaining CPU burst time of the respective
process in respective queue.
Step 10: Store the IN-TIME and OUT-TIME of the process into a
table GANTTCHART.
Step 11: If above process has selected from HIGHPQ then swap
the next turn to LOWPQ and vice versa.
The high priority processes should get priority to execute. In this
research, I have proposed a methodology, which provide alternate
chance to high and low priority processes. A process from high
priority queue is selected first then next process is selected from
low priority queue. The steps for the methodology are given be-
low-
LOWQPQ: This queue contains the processes of low priority. In this research, I have preserved the motivation of traditional
Process Name Priority Burst Time round robin that all process should get chance to execute after a
P0 0 5 time quantum. The only improvement is that if high priority pro-
P3 0 9 cess are stored at rear side in the ready queue, then those processes
P4 0 8 will not bounded to execute too late due to late arrival. The pro-
posed methodology will definitely reduce average waiting time of
The Gantt chart and waiting time for the processes of table 1 with high priority processes however; it may increase the average wait-
time quantum 4 is shown below in figure 3. ing time of normal priority processes. The overall average waiting
time of all the processes stored in ready queue may or may not
improve depending on set of processes. Although the proposed
algorithm shows better result for high priority processes, still there
is always a need and motivation for better results. In future, the
result can be improved using variable time quantum. The execu-
tion of algorithm can also be improved by using efficient data
structures.
References
[1] Sanjay Kumar Panda and Saurav Kumar Bhoi, “An Effective
Round Robin Algorithm using Min-Max Dispersion Measure”,
International Journal on Computer Science and Engineering, 4(1),
pp. 45-53, January 2012.
[2] Pallab Banerjee, Probal Banerjee, Shweta Sonali Dhal, “Compar-
ative Performance Analysis of Average Max Round Robin
Scheduling Algorithm (AMRR) using Dynamic Time Quantum
with Round Robin Scheduling Algorithm usingStatic Time
Quanmtum”, International Journal of Innovative Technology and
Exploring Engineering, 1(3), pp. 56-62,August 2012.
[3] P.Surendra Varma, “A Finest Time Quantum for Improving
Fig.3: Working of Proposed Methodology Shortest Remaining Burst Round Robin (SRBRR) Algorithm”,
Journal of Global Research in Computer Science, 4 (3), pp. 10-
15, March 2013.
6. Result and Analysis [4] Raman, Dr.Pradeep Kumar Mittal, “An Efficient Dynamic Round
Robin CPU Scheduling Algorithm (EDRR)”, International Jour-
As we can see in the below shown figure 4, the average waiting nal of Advanced Research in Computer Science and Software
time of high priority process is 7.5 using proposed algorithm Engineering, 4(5), pp. 907-910, May 2014.
[5] Silberschatz, A., P.B. Galvin and G. Gagne, Operating Systems
which is approximately half of average waiting time (14.0) using Concepts. 7th Edn., John Wiley and Sons, USA., ISBN:13: 978-
existing algorithm. The overall waiting time also better using pro- 0471694663, pp. 944.
posed algorithm. [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”,
Proc. of International Symposium on Computer Engineering &
Technology 2010, Vol 17, pp. 126-137, 2010 .
[7] R. J. Matarneh, “Seif-Adjustment Time Quantum in Round Robin
Algorithm Depending on Burst Time of the Now Running Pro-
ceses”, American Journal of Applied Sciences, 6(10), pp. 1831-
1837, 2009.
[8] H. S. Behera, R. Mohanty, and D. Nayak, “A New Proposed Dy-
namic Quantum with Re-Adjusted Round Robin Scheduling Al-
gorithm and Its Performance Analysis”, International Journal of
Computer Applications, 5(5), pp. 10-15, August 2010.
[9] Abraham Silberschatz, Peter Baer Galvin, Greg Gagne, “Operat-
Fig. 4: Result Analysis of Existing Vs Proposed Methodology ing System Concepts”, Sixth Edition.
[10] E.O. Oyetunji, A. E. Oluleye,” Performance Assessment of Some
The same result can be analyzed using bar chart shown in figure 5. CPU Scheduling Algorithms”, Research Journal of Information
Technology,1(1): pp 22-26, 2009
[11] Ajit Singh, Priyanka Goyal, Sahil Batra,” An Optimized Round
Robin Scheduling Algorithm for CPU Scheduling”, (IJCSE) In-
ternational Journal on Computer Science and Engineering Vol.
02, No. 07, 2383-2385, 2010.
[12] 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.
[13] 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
[14] Rakesh Mohanty, H. S. Behera, Khusbu Patwari, Monisha Dash,
“Design and Performance Evaluation of a New Proposed Shortest
Fig. 5: Result Analysis of Existing Vs Proposed Methodology Using Bar Remaining Burst Round Robin (SRBRR) Scheduling Algorithm”,
chart International Symposium on Computer Engineering & Technolo-
7. Conclusion gy (ISCET), Vol 17, 2010
International Journal of Engineering & Technology 241