Enhanced Round-Robin Algorithm in the Cloud Computing Environment for Optimal Task Scheduling

: Recently, there has been signiﬁcant growth in the popularity of cloud computing systems. One of the main issues in building cloud computing systems is task scheduling. It plays a critical role in achieving high-level performance and outstanding throughput by having the greatest beneﬁt from the resources. Therefore, enhancing task scheduling algorithms will enhance the QoS, thus leading to more sustainability of cloud computing systems. This paper introduces a novel technique called the dynamic round-robin heuristic algorithm (DRRHA) by utilizing the round-robin algorithm and tuning its time quantum in a dynamic manner based on the mean of the time quantum. Moreover, we applied the remaining burst time of the task as a factor to decide the continuity of executing the task during the current round. The experimental results obtained using the CloudSim Plus tool showed that the DRRHA signiﬁcantly outperformed the competition in terms of the average waiting time, turnaround time, and response time compared with several studied algorithms, including IRRVQ, dynamic time slice round-robin, improved RR, and SRDQ algorithms.


Introduction
Cloud computing has become a buzzword in today's IT industry, where it is one of the essential modern trends that has caused a fundamental change in this area. In a cloud computing environment, technology is introduced in the form of services. It allows the use of servers, storage, and applications at any time by using different types of computers or smartphones securely and at the lowest cost [1].
Cloud computing can be identified as Internet-based computing that provides a pool of adaptable computing resources, including networks, storage, servers, applications, and services without a need to interact with the service provider and with the minimum management effort. Moreover, customers are supplied with resources in the form of different service models. The resources can be infrastructure as a service model (IaaS), a platform as a service model (PaaS), or software as a service model (SaaS) [2].
One of the critical research issues in a cloud computing environment is task scheduling. With the increasing number of cloud users, sufficient access to remote resources and maximum profit are two of the main objectives of service providers. Task scheduling is the technique used for mapping clients' tasks to the available and appropriate virtualized resources by using an efficient algorithm [3]. In heterogeneous computing such as cloud computing, the issue of task scheduling becomes more challenging since it is a distributed and scalable environment. Therefore, there is a need for an effective task scheduling algorithm, which is considered key for the performance of the system [3][4][5].
In a cloud computing environment, there are three common categories of task scheduling algorithms [6], which are (1) traditional algorithms, such as first come first serve (FCFS), The main contribution of this paper is to propose a novel technique focusing on the traditional RR algorithm disadvantages. The proposed model optimizes the functionality of the traditional RR algorithm for scheduling tasks in the cloud computing environment through optimizing the performance metrics by decreasing the average waiting time, average turnaround time, and average response time.
The rest of this paper is organized as follows. In Section 2, the literature review is presented. In Section 3, the problem statement is illustrated, while the proposed technique is explained in detail in Section 4. Section 5 presents the simulation setting, and Section 6 comprises the evaluation and discussion. Finally, the conclusion and future work are discussed in Sections 7 and 8, respectively.

Literature Review
Since the selection of quantum time is an important issue affecting the RR algorithm's efficiency, many researchers have conducted several studies to improve its efficiency by proposing various techniques to calculate the optimal quantum time.
In [14], the authors presented a survey on studies related to enhancing the RR algorithm. We found that some researchers improved the RR algorithm by considering a fixed quantum time, while other studies proposed improving the performance of the RR algorithm by calculating a dynamic quantum time, which may be dynamic in each round or for each task.
In [16], the authors proposed a novel approach to improving the RR algorithm, relying on the median burst time of the ready queue tasks. These tasks should be sorted in ascending order at the beginning. Then, tasks will be divided into two subqueues: light and heavy task queues. The tasks are rearranged after each round based on the remaining burst time. In each round, the quantum time is equal to the burst time for the medium task. This approach has proven its effectiveness in reducing the waiting time and turnaround time compared with the traditional RR and IRRVQ algorithms.
In [17], the researchers proposed a new approach named the eighty-five percentile RR algorithm (EFPRR). It is based on computing a TQ using 85% of the burst time of the tasks. The processes are initially arranged in incremental order based on their burst time, and then the TQ is calculated by multiplying the average time of all tasks by the 85% constant (85% average). Then, the remainder of the BT for the tasks is checked. If it is less than or equal to the TQ, the running tasks are executed until completion. Otherwise, the tasks are relocated at the tail of the ready queue. The EFPRR was evaluated through several experiments, showing the effectiveness of the proposed algorithm in reducing the average burst times.
In [18], the authors developed a new mechanism to calculate the quantum time in the RR algorithm based on the average burst time of all ready queue tasks. The SJF is applied initially, and then the quantum time is calculated for the first round. This calculation is repeated every round as new tasks enter the ready queue. The results showed an enhancement of the RR algorithm by reducing the average waiting time, average turnaround time, and the number of context switches (CSs). Similarly, the authors in [19] proposed a new technique to calculate the quantum time in the RR algorithm. The tasks should be located in the ready queue as they arrived. Then, the QT will be calculated based on the average of the tasks' burst time. The evaluation experiments showed the efficiency of the new technique in reducing the waiting time and turnaround time.
In [20], the authors suggested improving the RR algorithm based on an analytic model that considers several parameters, such as the execution time and the task order. The improved model was evaluated by conducting several different scenarios. These experiments proved the model's effectiveness in improving the average waiting time and average response time. Similarly, in [21], the authors proposed improving the RR algorithm by using a dynamic time quantum, which was calculated using a mathematical equation based on the median of the tasks' burst time and the smallest burst time in the ready queue. The efficiency of the improved RR was investigated by a comparison with the traditional RR algorithm. The results showed the efficiency of the improved algorithm in terms of the maximum CPU utilization, throughput, and minimized waiting time, response time, and the number of context switches.
In [22], the authors proposed a new approach to enhancing the RR algorithm, where the quantum time was determined by computing the maximum difference among the differences of adjacent consecutive processes in the ready queue. The results showed an improvement in the system performance due to reducing the average turnaround time, average waiting time, and the number of context switches.
In [23], the authors proposed a combination of SJF and RR algorithms to improve the performance of the RR algorithm. The main idea in their proposed technique was to distribute the presented tasks into two queues, where the median was used as a threshold for distributing the tasks among the two queues. The results of the experiments showed the success of this algorithm in reducing both the waiting time and response time.
In [24,25], the authors proposed an enhancement to the dynamic RR algorithm, tuning the quantum time by assigning a value for the quantum time equal to the average of the burst time of the tasks in the ready queue. On other hand, in [26], the authors proposed assigning the average of the burst time for the quantum time, but by applying the remaining burst time principle [27]. This principle states that if the remaining burst time of the task is less than the quantum time, the task completes its execution and then exits the ready queue.

Problem Statement Gap Analysis
To identify the main gap and shortages with the proposed algorithms discussed in the literature review, we studied the behavior of the algorithm in [26] by considering the three datasets used in [26], which involve tasks with a different burst time order but an arrival time equal to zero. Table 1 shows samples from such a dataset with numerical values to reflect the properties of them.  T1  0  20  0  105  0  105  T2  0  25  0  85  0  60  T3  0  35  0  55  0  120  T4  0  50  0  43  0  48  T5  0  80  0  35  0  75  T6  0  90 ---- Figure 1 presents an analytical study considering the following cases: (1) the behavior of the proposed dynamic round-robin (DRR) algorithm discussed in [26], (2) the behavior of the same algorithm when it is integrated with FCFS, and (3) the behavior of the same algorithm when it is integrated with SJF. Finally, a comparison with the traditional algorithms including both FCFS and SJF is made.

Problem Statement Gap Analysis
To identify the main gap and shortages with the proposed algorithms discussed in the literature review, we studied the behavior of the algorithm in [26] by considering the three datasets used in [26], which involve tasks with a different burst time order but an arrival time equal to zero. Table 1 shows samples from such a dataset with numerical values to reflect the properties of them.  Task   Case 1  Increasing Order   Case 2  Decreasing Order   Case 3  Random Order  Arrival Time Burst Time Arrival Time Burst Time Arrival Time Burst Time  T1  0  20  0  105  0  105  T2  0  25  0  85  0  60  T3  0  35  0  55  0  120  T4  0  50  0  43  0  48  T5  0  80  0  35  0  75  T6  0  90 ---- Figure 1 presents an analytical study considering the following cases: (1) the behavior of the proposed dynamic round-robin (DRR) algorithm discussed in [26], (2) the behavior of the same algorithm when it is integrated with FCFS, and (3) the behavior of the same algorithm when it is integrated with SJF. Finally, a comparison with the traditional algorithms including both FCFS and SJF is made. It can be observed from Figure 1 that if the quantum time equals the average of the tasks' burst time and the RR algorithm applied the remaining burst time principle, there are two cases as follows. The first case is when the same order of tasks is maintained; in other words, the RR algorithm is integrated with the FCFS algorithm. The second case is when the RR algorithm is integrated with SJF. In the first case, it is obvious that the RR algorithm tends to be FCFS with the same average waiting, turnaround, and response  It can be observed from Figure 1 that if the quantum time equals the average of the tasks' burst time and the RR algorithm applied the remaining burst time principle, there are two cases as follows. The first case is when the same order of tasks is maintained; in other words, the RR algorithm is integrated with the FCFS algorithm. The second case is when the RR algorithm is integrated with SJF. In the first case, it is obvious that the RR algorithm tends to be FCFS with the same average waiting, turnaround, and response times. Moreover, the CS number is equal to the number of tasks, which means that each task is allocated the CPU one time and is executed during its own burst time. Similarly, for the second case, it is clear that the RR algorithm tends to be SJF with the same average waiting, turnaround, and response times. Moreover, the CS number is equal to the number of tasks, which means that each task is allocated the CPU one time and is executed during its own burst time.

Datasets with Zero Arrival Time
From the above conducted analysis, it can be concluded that applying the concept of the remaining burst time on the dynamic RR algorithm, where the QT is equal to the average of the tasks' burst time, is not efficient. Moreover, in this way, the RR algorithm loses its nature. Thus, this paper introduces a novel technique named the dynamic roundrobin heuristic algorithm (DRRHA), which concentrates on providing a solution for the time quantum problem by tuning the time quantum dynamically for each presented task in the ready queue based on its burst time. Moreover, we introduce the utilization of the advantages of the STF algorithm to improve the performance of the proposed model [28]. This novel technique will be discussed in detail in the next section.

The Proposed Technique
In our proposed DRRHA approach, presented in Figure 2, the tasks are initially received from the users and stored in the ready queue according to their order of arrival (FCFS). Then, each task arrives at the ready queue and is sorted based on the SJF manner. In each round, the average mean is calculated for all the tasks in the ready queue. After that, the quantum time is calculated for each task separately according to Equation (1). If the remaining burst time is less than or equal to its quantum, then the task execution is completed, and it is removed from the ready queue. Otherwise, the task is stored at the end of the ready queue and is to be executed in the next round. Moreover, if new tasks arrive, they are stored in the ready queue until the current round is finished: where QT ij is the quantum time of task i in round j, m is the average mean at the ready queue, and BT ij is the burst time or the remaining burst time for task i in round j.
task is allocated the CPU one time and is executed during its own burst time. Similarly, for the second case, it is clear that the RR algorithm tends to be SJF with the same average waiting, turnaround, and response times. Moreover, the CS number is equal to the number of tasks, which means that each task is allocated the CPU one time and is executed during its own burst time. From the above conducted analysis, it can be concluded that applying the concept of the remaining burst time on the dynamic RR algorithm, where the QT is equal to the average of the tasks' burst time, is not efficient. Moreover, in this way, the RR algorithm loses its nature. Thus, this paper introduces a novel technique named the dynamic roundrobin heuristic algorithm (DRRHA), which concentrates on providing a solution for the time quantum problem by tuning the time quantum dynamically for each presented task in the ready queue based on its burst time. Moreover, we introduce the utilization of the advantages of the STF algorithm to improve the performance of the proposed model [28]. This novel technique will be discussed in detail in the next section.

The Proposed Technique
In our proposed DRRHA approach, presented in Figure 2, the tasks are initially received from the users and stored in the ready queue according to their order of arrival (FCFS). Then, each task arrives at the ready queue and is sorted based on the SJF manner. In each round, the average mean is calculated for all the tasks in the ready queue. After that, the quantum time is calculated for each task separately according to Equation (1). If the remaining burst time is less than or equal to its quantum, then the task execution is completed, and it is removed from the ready queue. Otherwise, the task is stored at the end of the ready queue and is to be executed in the next round. Moreover, if new tasks arrive, they are stored in the ready queue until the current round is finished: where is the quantum time of task i in round j, m is the average mean at the ready queue, and is the burst time or the remaining burst time for task i in round j.  The DRRHA is composed of seven main steps and they are as follows: Step 1: Arrange the submitted tasks in ascending order based on their burst time.
Step 2: Compute the arithmetic mean for all tasks in the ready queue.
Step 3: Calculate the value of the time quantum based on Equation (1).
Step 4: Execute all tasks based on their calculated time quantum. If the task finishes its time quantum, there are two cases: Step 4.1: If the remaining burst time is less than or equal to its time quantum, complete its execution. Then, remove this task from the ready queue.
Step 4.2: If the remaining burst time of the task is greater than its time quantum, pause the task and insert it into the tail of the ready queue.
Step 5: When a new task arrives, do the following: 1. Sort all tasks in the ready queue in the STF manner. 2. The m and QT ij values for all the tasks in the ready queue will be recalculated.
Step 6: When a task is finished, the m and QT ij values for all the tasks in the ready queue will be recalculated.
Step 7: Repeat all the steps until all the tasks are finished. The details of the main steps involved in the proposed approach are shown in Algorithm 2. Moreover, Figure 3 shows a flowchart describing the followed procedure of the proposed approach.   Here, we consider a case of six tasks with non-zero arrival times, as shown in Table 2. Table 2. Case study.
(1) Round 1 After the arrival of tasks T1 and T2, these tasks were arranged in ascending order based on the burst time. Then, the QT for each task was calculated as illustrated in Table 3. After that, these tasks were scheduled as shown in Figure 4.
(1) Round 1 After the arrival of tasks T1 and T2, these tasks were arranged in ascending order based on the burst time. Then, the QT for each task was calculated as illustrated in Table  3. After that, these tasks were scheduled as shown in Figure 4. Table 3. Round one of the case study.  (2) Round 2 In this round, tasks T3, T4, T5, and T6 arrived and were added into the head of the RQ, which contained task T1 from the previous round. Then, all tasks in the RQ were arranged in ascending order based on their burst time as shown in Table 4. After that, the QT was calculated for each task separately as presented in Table 5. Finally, these tasks were scheduled and executed as shown in Figure 5.  In this round, tasks T3, T4, T5, and T6 arrived and were added into the head of the RQ, which contained task T1 from the previous round. Then, all tasks in the RQ were arranged in ascending order based on their burst time as shown in Table 4. After that, the QT was calculated for each task separately as presented in Table 5. Finally, these tasks were scheduled and executed as shown in Figure 5.
(3) Round 3   (3) Round 3 In this round, the remaining tasks in the RQ should be rearranged in ascending order based on their burst time as shown in Table 6. Then, the QT for each task was calculated as illustrated in Table 7. Finally, these tasks were rescheduled and executed as shown in Figure  6.    Table 8 shows the evaluation results of the case study presented in this section, where it shows the overall statistic of the scenario in terms of the waiting time (WT), turnaround time (TAT), and response time (RT). In this round, the remaining tasks in the RQ should be rearranged in ascending order based on their burst time as shown in Table 6. Then, the QT for each task was calculated as illustrated in Table 7. Finally, these tasks were rescheduled and executed as shown in Figure 6.  (3) Round 3 In this round, the remaining tasks in the RQ should be rearranged in ascending order based on their burst time as shown in Table 6. Then, the QT for each task was calculated as illustrated in Table 7. Finally, these tasks were rescheduled and executed as shown in Figure  6.    Table 8 shows the evaluation results of the case study presented in this section, where it shows the overall statistic of the scenario in terms of the waiting time (WT), turnaround time (TAT), and response time (RT).  Table 8 shows the evaluation results of the case study presented in this section, where it shows the overall statistic of the scenario in terms of the waiting time (WT), turnaround time (TAT), and response time (RT).

Simulation Settings
The proposed DRRHA technique was implemented and tested in the CloudSim Plus environment [29], which is an extensible and fully featured simulation framework. It is based on the CloudSim framework and allows cloud computing infrastructure and application services to be modeled, simulated, and tested. The main reason for choosing this simulation tool was because it has the capacity for integrated modeling and evaluates application services. It supports task scheduling policies, virtual machine (VM) selection, setting the network connections, locating energy models for the resources of data centers, and supplying various forms of workloads [29,30]. Table 9 summarizes the simulation settings used in the CloudSim Plus experiments for testing our proposed approach. NetBeans IDE8.2 was used as an environment to run the CloudSim libraries.

Evaluation and Discussion
The performance of the proposed DRRHA technique was evaluated considering the following four performance metrics [31]: (1) waiting time, or the total time tasks spent in the ready queue; (2) response time, being the time elapsed from the arrival of the task until starting its execution; (3) turnaround time, which was the time elapsed from the arrival of the task until completing its execution; and (4) context switches, or the number of times that the task status changed from one activity to another.
We considered three different scenarios to evaluate the proposed model as follows: (1) Evaluating the proposed model by comparing it with SJF and FCFS algorithms to study the impact of integrating the proposed model with these algorithms; (2) Comparing the proposed model with the related algorithms from the literature review; (3) Evaluating the performance of the proposed model using two datasets: a real dataset and a randomly generated dataset.
Moreover, for each experiment, the improvement rate of the proposed algorithm was measured by calculating the difference between the proposed algorithm and the considered algorithm for all the performance metrics.

Evaluation of the Proposed Model (DRRHA) Considering SJF
To evaluate the efficiency of integrating the SJF algorithm with the proposed model, we used the dataset considered in [32]. The dataset consisted of two experiments, where the first one assumed arrival times of zero and the second one took into consideration different arrival times as shown in Table 10. Moreover, each experiment had three cases based on the order of the burst time in increasing order, decreasing order, and a random order. The evaluations were performed based on the average waiting time, turnaround time, response time, and context switching. Figure 7 presents the evaluation results.
we used the dataset considered in [32]. The dataset consisted of two experiments, where the first one assumed arrival times of zero and the second one took into consideration different arrival times as shown in Table 10. Moreover, each experiment had three cases based on the order of the burst time in increasing order, decreasing order, and a random order. The evaluations were performed based on the average waiting time, turnaround time, response time, and context switching. Figure 7 presents the evaluation results.

Milliseconds
Algorithm's Name As shown in Figure 7, the integration of the SJF algorithm with the proposed model resulted in a significant reduction in the average waiting time, average turnaround time, and response time in all three cases. It also maintained the number of context switches. Thus, we found that integrating the SJF algorithm with the proposed model had a surprising effect in improving the overall performance, compared with the integration of the FCFS algorithm with the proposed model.

Comparative Study on the Proposed Model (DRRHA) and the Related Algorithms
The performance of the proposed model was evaluated by conducting several experiments. For fair evaluation, the benchmark was taken from different algorithms and simulated with the same parameters considering the task arrival time and burst time.
We conducted four different evaluations, comparing our proposed algorithm with different related works as follows. (1) The first test was an evaluation to compare our work with the one presented in [16]. (2) The second test was an evaluation to compare our work with the one presented in [33,34]. (3) The third test was an evaluation to compare our work with the one presented in [35]. (4) The fourth test was an evaluation to compare our work with the one presented in [23]. These experiments and evaluation studies are discussed in the following subsections.

A. The First Test
We conducted two experiments taken from [16], as shown in Table 11, where the proposed model was compared with the traditional RR and IRRVQ algorithms [16] in terms of the average waiting time and average turnaround time. The proposed model outperformed the other studied algorithms, as shown in Figure 8, which shows clearly that our proposed algorithm decreased both the waiting time and turnaround time for the two cases.
The performance of the proposed model was evaluated by conducting several experiments. For fair evaluation, the benchmark was taken from different algorithms and simulated with the same parameters considering the task arrival time and burst time.
We conducted four different evaluations, comparing our proposed algorithm with different related works as follows. (1) The first test was an evaluation to compare our work with the one presented in [16]. (2) The second test was an evaluation to compare our work with the one presented in [33,34]. (3) The third test was an evaluation to compare our work with the one presented in [35]. (4) The fourth test was an evaluation to compare our work with the one presented in [23]. These experiments and evaluation studies are discussed in the following subsections.

A. The First Test
We conducted two experiments taken from [16], as shown in Table 11, where the proposed model was compared with the traditional RR and IRRVQ algorithms [16] in terms of the average waiting time and average turnaround time. The proposed model outperformed the other studied algorithms, as shown in Figure  8, which shows clearly that our proposed algorithm decreased both the waiting time and turnaround time for the two cases.  To measure the improvement of the proposed algorithm compared with the one proposed in [16], we calculated the difference between the average waiting times and turnaround time by the following equation, given in [36]: where V1 and V2 are the least values. Table 12 illustrates the improvement of the proposed model over the IRRVQ algorithm [16]. It is clear that the proposed model achieved a 35% improvement in the average waiting time and 23% improvement in the average turnaround time compared with the IRRVQ algorithm [16].  This test included a dataset taken from [33] which consisted of three cases. Table 13 demonstrates these cases in detail. In this experiment, the proposed model was compared with the traditional RR, optimized round-robin [34], and dynamic time slice round-robin algorithms [33]. The comparison was performed based on the average waiting time (AWT), average turnaround time (ATAT), and the number of the context switches (CS). The results shown in Figure 9 clearly depict that the proposed model demonstrated superior results for the three cases compared with the benchmarked algorithms.  Table 14 shows clearly the high improvement rate of the proposed algorithm compared with the dynamic time slice round-robin algorithm, where our proposed algorithm enhanced the average waiting time by 56%, the average turnaround time by 38%, and the number of context switches by 65%.   Table 14 shows clearly the high improvement rate of the proposed algorithm compared with the dynamic time slice round-robin algorithm, where our proposed algorithm enhanced the average waiting time by 56%, the average turnaround time by 38%, and the number of context switches by 65%.  In this experiment, the dataset was adopted from [35], which had three different cases as shown in Table 15. In each case, the proposed model was evaluated and compared with the traditional RR algorithm and the benchmarked algorithm in [35]. Moreover, the evaluation process was conducted based on the average waiting time, average turnaround time, and number of context switches.  T1  0  12  0  42  0  11  T2  0  11  0  32  0  10  T3  0  22  0  82  0  22  T4  0  31  0  45  0  31  T5  0  21  0  22  0  25  T6  ----0  13 The obtained results are presented in Figure 10, which shows that our proposed model achieved a significant improvement in performance over the other compared algorithms. For the first case, the performance of the DRRHA in terms of the average waiting time and turnaround time was slightly higher than the improved RR algorithm [35]. On the other hand, regarding the number of context switches, it is noted that the improved RR algorithm [35] recorded 9 CSs, whereas the proposed DRRHA recorded 8 CSs. However, the performance of the proposed DRRHA was still considered acceptable. In contrast, for other evaluated cases, it is noted that the performance of the proposed algorithm achieved remarkably high performance in all the evaluated metrics.
The improvement rate of the proposed algorithm compared with the benchmarks was measured in the third test, and the results have been presented in Table 16. The statistics show that our proposed algorithm achieved an overall 29% improvement in the average waiting time, 20% improvement in the average turnaround time, and finally a 16% improvement in the number of context switches. waiting time and turnaround time was slightly higher than the improved RR algorithm [35]. On the other hand, regarding the number of context switches, it is noted that the improved RR algorithm [35] recorded 9 CSs, whereas the proposed DRRHA recorded 8 CSs. However, the performance of the proposed DRRHA was still considered acceptable. In contrast, for other evaluated cases, it is noted that the performance of the proposed algorithm achieved remarkably high performance in all the evaluated metrics. The improvement rate of the proposed algorithm compared with the benchmarks was measured in the third test, and the results have been presented in Table 16. The statistics show that our proposed algorithm achieved an overall 29% improvement in the average waiting time, 20% improvement in the average turnaround time, and finally a 16% improvement in the number of context switches. For this evaluation, the dataset was taken from [23], which was divided into two experiments based on the arrival time of the tasks. Each one, in turn, was divided into two cases as shown in Table 17. The dataset was used to evaluate the proposed model by conducting a comparison with the traditional RR and SRDQ algorithms [23].  For this evaluation, the dataset was taken from [23], which was divided into two experiments based on the arrival time of the tasks. Each one, in turn, was divided into two cases as shown in Table 17. The dataset was used to evaluate the proposed model by conducting a comparison with the traditional RR and SRDQ algorithms [23].  T1  0  20  0  10  0  18  0  10  T2  0  40  0  14  4  70  6  14  T3  0  60  0  70  8  74  13  70  T4  0  80  0  120  16  80 21 120 Figure 11 shows the superiority of the proposed model compared with the other algorithms for all the comparison criteria. Although the traditional RR algorithm recorded a slight reduction in the average waiting time in the third case compared with the proposed model, the overall results show that the proposed algorithm had a significant reduction in the average waiting time, turnaround time, and number of context switches compared with the traditional RR and SRDQ algorithms. Table 18 illustrates the improvement rate of the proposed algorithm, where the proposed algorithm obtained a 29% improvement in the average waiting time and 13% improvement in the average turnaround time.  Figure 11 shows the superiority of the proposed model compared with the other algorithms for all the comparison criteria. Although the traditional RR algorithm recorded a slight reduction in the average waiting time in the third case compared with the proposed model, the overall results show that the proposed algorithm had a significant reduction in the average waiting time, turnaround time, and number of context switches compared with the traditional RR and SRDQ algorithms.  Table 18 illustrates the improvement rate of the proposed algorithm, where the proposed algorithm obtained a 29% improvement in the average waiting time and 13% improvement in the average turnaround time.

Evaluating the Performance of the Proposed Model (DRRHA) Using Datasets
In this experiment, the proposed model was validated by conducting several experiments on two different datasets, including the NASA dataset [37,38] and a randomly generated dataset. The performance of the proposed model was measured based on the average waiting time, average turnaround time, and average response time under the same simulation conditions of the previous cases shown in

Milliseconds
Algorithm's Name AWT ATAT Figure 11. Comparison of results in the fourth test.

Evaluating the Performance of the Proposed Model (DRRHA) Using Datasets
In this experiment, the proposed model was validated by conducting several experiments on two different datasets, including the NASA dataset [37,38] and a randomly generated dataset. The performance of the proposed model was measured based on the average waiting time, average turnaround time, and average response time under the same simulation conditions of the previous cases shown in Table 19. The performance of the proposed model was compared to the other conventional algorithms, including FCFS, STF, LTF, and fixed RR. It is worth mentioning that this analytical comparison was performed on one virtual machine, and the experiments were repeated several times while increasing the number of tasks each time to verify the stability of the results.
A. The First Experiment Using the NASA Dataset The dataset used for this experiment was the one from NASA [37,38], which has been used in various research such as in [39][40][41]. In this experiment, only the execution time was taken into account. This is because the tasks in the NASA dataset arrived one by one, and therefore there was no overlap in the arrival time of the tasks and, accordingly, these arrival times were not suitable to be used for validating the proposed model. For this reason, the tasks' arrival times were discarded and replaced by a zero arrival time in the first case and a non-zero arrival time in the second case.
For the first experiment using the NASA dataset with a zero arrival time, the DRRHA was evaluated, assuming that all tasks had the same arrival time. From Figures 12, 14 and 16, we found the following observations: (1) The SJF algorithm and the DRRHA achieved the best performance, while the LJF algorithm was the worst; (4) The algorithms maintained the same performance despite the repeated experiments with an increasing number of tasks each time.
For the second case using the NASA dataset with a non-zero arrival time, the DRRHA was evaluated using the NASA dataset assuming the tasks had different arrival times. What could be concluded clearly from these experiments are as follows.
(1) The superiority of the SJF algorithms and the proposed model in optimizing the performance is shown in Figures 18-20; (2) Despite the superiority of these two algorithms and the convergence of their performance, it was found that the SJF algorithm outperformed the others in reducing the average waiting time by 12.61% and the turnaround time by 12.29%, while the DRRHA outperformed the others in reducing the average response time by 19.89%; (3) On the other hand, the longest job first (LJF) algorithm was the worst among the other algorithms.
A. The First Experiment Using the NASA Dataset The dataset used for this experiment was the one from NASA [37,38], which has been used in various research such as in [39][40][41]. In this experiment, only the execution time was taken into account. This is because the tasks in the NASA dataset arrived one by one, and therefore there was no overlap in the arrival time of the tasks and, accordingly, these arrival times were not suitable to be used for validating the proposed model. For this reason, the tasks' arrival times were discarded and replaced by a zero arrival time in the first case and a non-zero arrival time in the second case.
For the first experiment using the NASA dataset with a zero arrival time, the DRRHA was evaluated, assuming that all tasks had the same arrival time. From Figures 12-14, we found the following observations: (1) The SJF algorithm and the DRRHA achieved the best performance, while the LJF algorithm was the worst; (2) There was a clear convergence in the performance of both the SJF algorithm and the DRRHA;        For the second case using the NASA dataset with a non-zero arrival time, the DRRHA was evaluated using the NASA dataset assuming the tasks had different arrival times. What could be concluded clearly from these experiments are as follows.
(1) The superiority of the SJF algorithms and the proposed model in optimizing the performance is shown in Figures 18-20; (2) Despite the superiority of these two algorithms and the convergence of their performance, it was found that the SJF algorithm outperformed the others in    For the second case using the NASA dataset with a non-zero arrival time, the DRRHA was evaluated using the NASA dataset assuming the tasks had different arrival times. What could be concluded clearly from these experiments are as follows. The dataset used in this experiment was generated randomly within a specific range of the tasks' burst times and the tasks' arrival times. This range was defined to be 100-400 for the tasks' burst times and 10-100 for the tasks' arrival times. Moreover, this dataset has been commonly used with traditional algorithms like FCFS, shortest task first (STF), LJF, and RR. It should also be noted that when applying the fixed RR algorithm on this random dataset, we considered the following: (1) Calculating the optimal time quantum for each experiment using the mean of the burst times; (2) Repeating every experiment 50 times and then taking the average values of the waiting time, turnaround time, and response time.

B. The Second Experiment Using a Random Dataset
The dataset used in this experiment was generated randomly within a specific range of the tasks' burst times and the tasks' arrival times. This range was defined to be 100-400 for the tasks' burst times and 10-100 for the tasks' arrival times. Moreover, this dataset has been commonly used with traditional algorithms like FCFS, shortest task first (STF), LJF, and RR. It should also be noted that when applying the fixed RR algorithm on this random dataset, we considered the following: To evaluate our proposed model (DRRHA), the random dataset was used to conduct two different experiments. The first experiment was where the arrival time of the tasks was zero, and the tasks' burst times were generated randomly. The second experiment randomly generated both the arrival time and the tasks' burst times. Both experiments were applied to our proposed model and the traditional algorithms mentioned above. Moreover, these experiments were repeated several times while increasing the number of tasks each time to ensure the steadiness of the algorithms' performances.
For the first case using the random dataset with a zero arrival time, we evaluated the DRRHA using the randomly generated dataset while assuming all tasks arrived at the same time. From Figures 21-23, we observed the following: (1) The STF algorithm and the DRRHA had the best comparable performances; (2) The STF algorithm was slightly superior to the DRRHA in terms of the average waiting time by 21.09% and the turnaround time by 20.31%. However, the DRRHA outperformed the others in terms of decreasing the response time by 35.98%; (3) In contrast, the fixed RR algorithm had the worst performance in terms of reducing the average waiting time and turnaround time. The LJF algorithm was the worst in terms of reducing the average response time.
For the second case using the random dataset with a non-zero arrival time, the DRRHA was evaluated using the randomly generated dataset while assuming the tasks arrived at different times. As a summary, the overall results from the previous experiments indicate the following: 1. For all the cases, the SJF algorithm and the proposed algorithm (DRRHA) achieved the best performance compared with the other algorithms; 2. The SJF algorithm outperformed the DRRHA in terms of the average waiting time and turnaround time. This is because of the SJF algorithm mechanism, which executed the whole task in one round. In contrast, the DRRHA executed the task in several rounds, which may have led to putting the task in the ready queue several times; 3. The DRRHA outperformed the SJF algorithm in terms of the average response time. This is because the DRRHA is preemptive, in which the current task might be paused to give a chance to another task in the ready queue. The SJF algorithm mechanism allows for responding to any new task after completing the entire previous task, which results in increasing the response time; 4. When using the NASA dataset, the LJF algorithm had the worst performance among the other algorithms. This is because of the mechanism of the LJF algorithm, which imposes the implementation of the longest task in the queue first. In addition, the LJF algorithm does not allow for executing the next task until the current one is finished, which results in increasing the waiting time, turnaround time, and response time. (3) In contrast, the fixed RR algorithm had the worst performance in terms of reducing the average waiting time and turnaround time. The LJF algorithm was the worst in terms of reducing the average response time. (3) In contrast, the fixed RR algorithm had the worst performance in terms of reducing the average waiting time and turnaround time. The LJF algorithm was the worst in terms of reducing the average response time.  For the second case using the random dataset with a non-zero arrival time, the DRRHA was evaluated using the randomly generated dataset while assuming the tasks arrived at different times.    As a summary, the overall results from the previous experiments indicate the following: 1. For all the cases, the SJF algorithm and the proposed algorithm (DRRHA) achieved the best performance compared with the other algorithms; 2. The SJF algorithm outperformed the DRRHA in terms of the average waiting time and turnaround time. This is because of the SJF algorithm mechanism, which executed the whole task in one round. In contrast, the DRRHA executed the task in several rounds, which may have led to putting the task in the ready queue several times; 3. The DRRHA outperformed the SJF algorithm in terms of the average response time.
This is because the DRRHA is preemptive, in which the current task might be paused to give a chance to another task in the ready queue. The SJF algorithm mechanism allows for responding to any new task after completing the entire previous task, When using the dataset that was generated randomly, the fixed RR algorithm achieved the worst performance in terms of the waiting time and turnaround time. The LJF algorithm achieved the worst performance in terms of the response time. These results of the fixed RR were because of the fixed quantum time, as well as not applying the remaining burst time principle, resulting in increasing the overhead of the algorithm and being inefficient.

Conclusions
Task scheduling is one of the critical challenges that affects the overall performance of the cloud computing environment. The major contribution of this paper is enhancing the round-robin algorithm by proposing a novel technique named DRRHA. It concentrates on providing a solution for the time quantum problem by calculating the mean for all the tasks in the ready queue, which is sorted based on the SJF manner. The process of tuning the time quantum dynamically is repeated for each task separately and for each round. Moreover, checking the remaining burst time of the task is an essential principle applied with our 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. Otherwise, the task is stored at the end of the ready queue to be executed in the next round. Various experiments were conducted using the CloudSim Plus tool to evaluate the DRRHA. From the obtained experimental results, it can be concluded that our proposed algorithm (DRRHA) succeeded in optimizing the waiting time, turnaround time, and response time compared with the IRRVQ algorithm, dynamic time slice round-robin algorithm, improved RR algorithm, and SRDQ algorithm.

Future Work
This study can be considered a starting point for researchers, as there are still some issues that can be solved and improved in future works, including (1) improving the RR algorithm by finding a new approach for time quantum calculation that combines the dynamic and fixed quantum values to improve the RR algorithm performance, (2) applying new techniques such as fuzzy logic and neural networks to predict the best quantum values of tasks automatically, (3) integrating the RR algorithm with other meta-heuristic algorithms to achieve better performance, and (4) more datasets holding a high number of tasks can be used to evaluate the proposed algorithm, as well as the other related task scheduling algorithms.