IEEE - An Improved Round Robin Algorithm For An Efficient CPU Scheduling
IEEE - An Improved Round Robin Algorithm For An Efficient CPU Scheduling
Abstract—The algorithm policy applied by a CPU, to schedule scheduler (which is using a scheduling algorithm) to determine
running processes, has an impact on the efficiency of an operating which process will be executed first. “FCFS (First Come,
system (OS). As a result, a superior CPU scheduling algorithm First Serve), RR (Round Robin), SJF (Shortest Job First), and
leads to higher OS performance while using limited resources and
for shorter periods of time. As a result, several strategies have Priority Scheduling” are some of the scheduling algorithms
been suggested and implemented to improve CPU scheduling available. The goal of these scheduling algorithms is to de-
performance. Any scheduler’s primary responsibility is to assign crease “turnaround-time, response-time, waiting-time, and the
jobs to the most effective and reliable resource available. It’s also number of context switches.” There are several scheduling cri-
a fact that if jobs and resources aren’t planned properly, the teria and Thus analyze and decide which scheduling algorithm
entire operating system’s productivity suffers significantly. The
“Round Robin” is deemed an effective and fair approach because is the best based on these criteria [1]. To distribute the CPU to
of each process is allocated the same amount of time quantum. the procedures waiting in the prepared line, a CPU scheduling
Nevertheless, the effectiveness of the system is determined by algorithm is used.
the selected time-quantum. The major goal of this research is to Multiple processes; are stored and maintained in the main
develop the present round-robin algorithm by enhancing the time memory in multi-programming systems. The insides of the
quantum for candidate processes in real-time in such a way that
its impartiality is maintained. There is no loss of property. This “Central Processing Unit” (CPU) registers used by the process,
paper’s proposed algorithm finds the time left in a process’s as well as the slice of memory that includes the program
last turn, and then Determines whether it is time-based on a that is being executed by the process (along with its related
certain threshold value, should quantum be expanded or not. data), define each process. In addition, each process alternates
An arithmetic simulation has been created to demonstrate that among processor use and the occurrence of “input/output”
the suggested method is correct. It outperforms the traditional
round-robin algorithm. In words of several performing metrics (I/O) events. The latter may be a waiting period for an
such as average waiting time, context switches and the number of Input/Output or some other external occurrence to happen.
turnaround times, the suggested adjusted version of the round- One operation will be executed at a time by the processor,
robin algorithm outperforms the traditional round-robin algo- then if the latter is waiting for an event, it will be switched to
rithm, according to the results of the experimental investigation. another.
Index Terms—CPU Scheduling, Round-Robin Algorithm, Time
quantum, Turnaround time, Waiting time, Response Time, Con-
A CPU-scheduler is a component of operating systems
text Switching. which manages privileges to the processor. The scheduler is
primarily concerned through “turnaround time, response time,
I. I NTRODUCTION waiting time, fairness” etc. Scheduling is the key to multi-
programming. one of the most critical characteristics that
Scheduling is an elementary function in “operating system”, impact the effectiveness is CPU scheduling [2].
because virtually the entire computer resources are scheduled Multi-level queue and multi-level feedback CPU scheduling
before utilizing. It entails allocating resources and time to techniques can be used to schedule a CPU that has several
processes or tasks in order to achieve specific performance types of processes that must run. The importance of multilevel
requirements. A computer with multi-programming has dif- queue scheduling is well known, and it is widely used to
ferent processes challenging for the CPU at the same time. schedule jobs in a processor [2].
Consequently, a decision necessary to be undertaken about CPU scheduling algorithms select the next process for exe-
which process to run next, which is handled by the scheduler cution. Context switches often happen during CPU scheduling.
[1]. When a context switch occurs, the currently running process
A scheduler uses scheduling algorithms to carry out the is terminated and CPU time is given to another process.
process. As a result, the CPU scheduling algorithms are at The CPU’s performance reduces as a result. An effectual
the operating system’s core [1]. CPU scheduling is a built-in scheduling algorithm is required to maximize CPU usage.
feature of operating systems. When there are several processes Various CPU scheduling algorithms have various features, and
in the ready queue to execute, the operating system uses a one system metric may be preferred over another [3].
350
Authorized licensed use limited to: Lovely Professional University - Phagwara. Downloaded on October 07,2024 at 10:08:12 UTC from IEEE Xplore. Restrictions apply.
mean for all the tasks in the ready queue, which is sorted high expense of context transitions. The pseudo-code of the
based on the SJF manner. RR method as described in is shown in Algorithm 1.
The process of tuning the time quantum dynamically is re- Figure 1 illustrates the specifics of the primary phases
peated for each task separately and for each round. Moreover, involved in the proposed solution. In addition, this flowchart
checking the remaining burst time of the task is an essential illustrating the proposed approach’s technique.
principle applied with proposed algorithm. If the remaining
burst time is less than or equal to the current task quantum,
the task execution is completed and then removed from the
ready queue.
351
Authorized licensed use limited to: Lovely Professional University - Phagwara. Downloaded on October 07,2024 at 10:08:12 UTC from IEEE Xplore. Restrictions apply.
than or equal to the job’s quantum, the task is finished and TABLE I
removed from the ready queue. If the job is not completed DATA S ETS WITH Z ERO A RRIVAL T IME . C ASE 1 REPRESENTS
I NCREASING ORDER . C ASE 2 REPRESENTS D ECREASING O RDER AND
in the current round, it will be saved to the end of the ready C ASE 3 REPRESENT R ANDOM ORDER FOR THE A RRIVAL TIME AND
queue and executed in the next. B URST TIME
Furthermore, New jobs are added to the ready queue and
Case 1 Case 1 Case 2 Case 2 Case 3 Case 3
stored there until the current round is completed: Arrival Burst Arrival Burst Arrival Burst
Time Time Time Time Time Time
0 30 0 77 0 80
T Qij = (m/2) + (m/2)/BT ij (1)
0 34 0 54 0 45
0 62 0 45 0 62
TQij = time quantum - task i in round j 0 74 0 19 0 34
m = average mean at the ready queue 0 88 0 14 0 78
BTij = burst time - task i in round j
The IRR is arranged of 07 main stages, and they are as TABLE II
bellow: DATA S ETS WITH NON - Z ERO A RRIVAL T IME . C ASE 1 REPRESENTS
Step 1: Based on their burst time, arrange the submitted I NCREASING ORDER . C ASE 2 REPRESENTS D ECREASING O RDER AND
C ASE 3 REPRESENT R ANDOM ORDER FOR THE A RRIVAL TIME AND
tasks in ascending order. B URST TIME
Step 2: For all jobs in the ready queue, compute their
arithmetic mean. Case 1 Case 1 Case 2 Case 2 Case 3 Case 3
Arrival Burst Arrival Burst Arrival Burst
Step 3: Estimate the amount of the time quantum based on Time Time Time Time Time Time
“Equation (1)”. 0 14 0 80 0 65
Step 4: Implement all tasks based on their computed time 2 34 2 74 1 72
6 45 3 70 4 50
quantum. 8 62 4 18 6 43
Step 5: When a novel task enters, do the following: 14 77 5 14 7 80
1. Sort-out all tasks in the ready queue in the SJF (Shortest
Job First).
2. All of the tasks in the ready queue will have their m and a result, these arrival times were not adequate for validating
TQij values updated. the suggested model.
Step 6: The m and TQij values for all the tasks in the ready
queue will be adjusted after a task is completed. A. Proportional Study on the Suggested Model (IRR) with SJF
Step 7: Until all the tasks are completed, repeat steps. and FCFS
As indicated in Tables 1 and 2, the data set contained of 02
IV. E VALUATION AND D ISCUSSION experiments, the first of which expected zero arrival times and
The suggested IRR technique was assessed using the result- the second of which took different arrival times into account.
ing four performance metrics: Furthermore, based on the order of the burst duration, each
The overall amount of time spent, or the amount of time experiment had three episodes (increasing, decreasing, and
spent waiting; Response-time, which was the time it took from random). In all three instances, including the SJF algorithm
the task’s arrival to the commencement of its implementation; into the suggested model resulted in significant reductions in
Turnaround time, was the amount of time that passed between average turnaround time, average waiting time, and response
the task’s arrival and completion; and Context switches or how time, as shown in Figure 2.
many times the task status moved from one action to the next. It also kept track of how many context switches are made.
To examine the suggested model, Thus looked at two As a result, Thus discovered that combining the SJF algorithm
different scenarios: with the suggested model improved overall performance in
(1) Estimating the suggested model by comparison it to the a surprising way when compared to combining the FCFS
FCFS and SJF algorithms in order to determine the impact of method with the proposed model.
combining the two algorithms.
(2) Using the existing solutions to compare the proposed B. Proportional Study on the Planned Model (IRR) and the
model to comparable methods, and evaluating the proposed Interrelated Algorithms
model’s performance using a real data-set. Several tests were conducted to assess the suggested model’s
in this experiment, the proposed model was validated by performance. The benchmark was taken from many methods
conducting several experiments using the NASA data-set. [21] and simulated with the same settings, taking into account the
[22] task arrival time and burst time, for a fair evaluation.
NASA [21] [22] provided the data-set for this experiment, As follows, Thus conducted four distinct assessments, com-
which has been utilized in other studies such as [23] - [25]. paring suggested algorithm to several comparable research. (1)
Only the execution time was considered in this experiment. The first test was an assessment of work in comparison to that
This is due to the fact that the tasks in the NASA data-set reported in [18]. (2) The second test was an assessment of
came one by one, with no overlap in their arrival timings. As work in comparison to that published in [19], [20].
352
Authorized licensed use limited to: Lovely Professional University - Phagwara. Downloaded on October 07,2024 at 10:08:12 UTC from IEEE Xplore. Restrictions apply.
TABLE III
C OMPARISON OF THE I MPROVEMENTS WITH EXISTING SOLUTIONS .
353
Authorized licensed use limited to: Lovely Professional University - Phagwara. Downloaded on October 07,2024 at 10:08:12 UTC from IEEE Xplore. Restrictions apply.
as neural networks and fuzzy logic to instantly determine the [21] Feitelson, D.G.; Tsafrir, D.; Krakov, D. Experience with using the
best possible quantum values of tasks. Parallel Workloads Archive. J. Parallel Distrib. Comput. 2014, 74,
2967–2982.
[22] Nasa-Workload. 2019. Available online:
R EFERENCES http://www.cs.huji.ac.il/labs/parallel/workload (accessed on 14 August
2019).
[1] K. Dev and S. Reda, ”Scheduling challenges and opportunities in [23] Aida, K. Effect of job size characteristics on job scheduling performance.
integrated CPU+GPU processors,” 2016 14th ACM/IEEE Symposium on In Job Scheduling Strategies for Parallel Processing; Feitelson, D.G.,
Embedded Systems for Real-time Multimedia (ESTIMedia), Pittsburgh, Rudolph, L., Eds.; Lecture Notes in Computer Science; JSSPP 2000;
PA, USA, 2016, pp. 1-6. Springer: Berlin/Heidelberg, Germany, 2000; Volume 1911.
[2] Md. Mamunur Rashid and Md. Nasim Adhtar; “A New Multilevel [24] Alboaneen, D.A.; Tianfield, H.; Zhang, Y. Glowworm swarm optimisa-
CPU Scheduling Algorithm”, Journals of Applied Sciences 6 (9): 2036- tion based task scheduling for cloud computing. In Proceedings of the
2039,2009. Second International Conference on Internet of things, Data and Cloud
[3] S. Huajin’, G. Deyuan, Z. Shengbing, W. Danghui;”Design Fast Round Computing, Cambridge, UK, 22–23 March 2017; pp. 1–7.
Robin Scheduler in FPGA”, 0-7803-7547-5/021/17.00 @ 2002 IEEE. [25] Chiang, S.H.; Vernon, M.K. Dynamic vs. Static quantum-based parallel
[4] S.Panda, S.Bhoi , “An Effective Round Robin Algorithm using Min- processor allocation. In Workshop on Job Scheduling Strategies for
Max Dispersion Measure,” International Journal on Computer Science Parallel Processing; JSSPP 1996; Lecture Notes in Computer Science;
and Engineering, vol. 4, no. 1, pp. 45-53, 2012. Feitelson, D.G., Rudolph, L., Eds.; Springer: Berlin/Heidelberg, Ger-
[5] S. Hiranwal, Dr. K.C. Roy, “Adaptive Round Robin scheduling using many, 1996; Volume 1162.
shortest burst approach based on smart time Slice”, International Journal [26] Yadav R., Mishra A., Prakash N., and Sharma H., “An Improved Round
of Computer Science and Communication, Vol 2 (2), pp. 319- 323, (July- Robin Scheduling Algorithm for CPU Scheduling,” International Journal
December) 2021. on Computer Science and Engineering, vol. 2, no. 4, pp. 1064-1066,
[6] Tawfeek, M.; El-Sisi, A.; Keshk, A.; Torkey, F. Cloud task scheduling 2010.
based on ant colony optimization. Int. Arab J. Inf. Technol. 2015, 12, [27] Chavan S., and P., and Tikekar., “An Improved Optimum Multilevel
129–137. Dynamic Round Robin Scheduling Algorithm,” International Journal of
[7] S. Arif, S. Rehman and F. Riaz, ”Design of a modulus based Round Scientific and Engineering Research, vol. 4, no. 12, pp. 298-301, 2013.
Robin scheduling algorithm,” 2015 9th Malaysian Software Engineering [28] Rajput I. and Gupta D., “A Priority Based Round Robin CPU Scheduling
Conference (MySEC), Kuala Lumpur, Malaysia, 2015, pp. 230- 235, doi: Algorithm for Real Time Systems,” International Journal of Innovations
10.1109/MySEC.2015.7475226. in Engineering and Technology, vol. 1, no. 3, pp. 1- 11, 2012.
[8] S. K. Dwivedi and R. Gupta, ”A simulator-based performance analysis
of multilevel feedback queue scheduling,” 2014 International Conference
on Computer and Communication Technology (ICCCT), Allahabad,
India, 2014, pp. 341-346, doi: 10.1109/ICCCT.2014.7001516
[9] J. Khatri. ”An Improved Dynamic Round Robin CPU Scheduling
Algorithm Based on Variant Time Quantum”. IOSR Journal of Computer
Engineering. vol 18.pp 35-40, 2016. 10.9790/0661-1806043540.
[10] S.K. Panda, S.K. Bhoi, “An effective Round Robin algorithm using Min-
Max dispersion measure”, International Journal on Computer Science
and Engineering, Vol 4(1), pp. 45-53, 2012.
[11] R.Matarneh , “Self-Adjustment Time Quantum in Round Robin Al-
gorithm Depending on Burst Time of the Now Running Processes,”
American Journal of Applied Sciences, vol. 6, no. 10, pp. 1831-1837,
2009.
[12] U. Saleem and Dr. M. Y. Javed, “Simulation of CPU Scheduling
Algorithm”, 0-7803-6355-8/00/ 10.00 @ 2000 IEEE.
[13] P. Banerjee, P. Banerjee, S. Sonali Dhal, “Comparative performance
analysis of average max Round Robin scheduling algorithm (AMRR)
using dynamic time quantum with Round Robin scheduling algorithm
using static time quantum”, International Journal of Innovative Technol-
ogy and Exploring Engineering (IJITEE), Vol 1(3), pp. 56-62, August
2012.
[14] P.S. Varma, ”A finest time quantum for improving shortest remaining
burst round robin (srbrr) algorithm”. J. Glob. Res. Comput. Sci. 2013,
4, 10–15.
[15] M.K.Mishra, F. Rashid, An Improved Round Robin CPU Scheduling
Algorithm with Varying Time Quantum. Int. J. Comput. Sci. Eng. Appl.
2014, 4, 1–8.
[16] R. Shyam S. Nandal , “Improved Mean Round Robin with Shortest
Job First Scheduling,” International Journal of Advanced Research in
Computer Science and Software Engineering, vol. 4, no. 7, pp. 170-
179, 2014.
[17] T. Balharith,; F. Alhaidari, Round Robin Scheduling Algorithm in
CPU and Cloud Computing: A review. In Proceedings of the 2nd
International Conference on Computer Applications and Information
Security, ICCAIS 2019, Riyadh, SaudiArabia, 1–3 May 2019; pp. 1–7.
[18] A. Muraleedharan, N. Antony, R. Nandakumar, ”Dynamic Time Slice
Round Robin Scheduling Algorithm with Unknown Burst Time.” Indian
J. Sci. Technol. 2016, 9, 16.
[19] M. Hemamalini, , M.V. Srinath ”Memory Constrained Load Shared
Minimum Execution Time Grid Task Scheduling Algorithm in a Het-
erogeneous Environment.” Indian J. Sci. Technol. 2015, 8.
[20] S. Negi, An Improved Round Robin Approach using Dynamic Time
Quantum for Improving Average Waiting Time. Int. J. Comput. Appl.
2013, 69, 12–16.
354
Authorized licensed use limited to: Lovely Professional University - Phagwara. Downloaded on October 07,2024 at 10:08:12 UTC from IEEE Xplore. Restrictions apply.