## 4 Performance Validation
### Results and Discussion
#### 4.2.4 Case 4  
Let us assume ten processes arrived at different times. P1 = [22, 4] and arrived at time = 0, P2 = [35, 1] and arrived at time = 2, P3 = [61, 2] and arrived at time = 4, P4 = [75, 5] and arrived at time = 6, P5 = [96, 3] and arrived at time = 8, P6 = [18, 4] and arrived at time = 10, P7 = [30, 1] and arrived at time = 12, P8 = [65, 2] and arrived at time = 14, P9 = [10, 5] and arrived at time = 9, and P10 = [56, 4] and arrived at time = 13. Table 4 provides the assessment of Case 4 for various algorithms. In Case 4, the simulation scenario increases the number of processes to ten, arriving at different times. Table 4 presents the performance data of four scheduling algorithms: Round Robin with fixed time quantum without priority (RR with fixed time quantum), Round Robin with dynamic time slice without priority (RR with dynamic time slice), the AN algorithm [3], and RRAPS when applied to ten processes. The RRAPS algorithm combines the principles of Round Robin scheduling with priority scheduling. Each process is assigned a priority value, and the scheduler selects the process with the highest priority to execute. The RRAPS algorithm achieves the best performance among the three scheduling algorithms presented, with the lowest turnaround time of 105 but a waiting time of 79.8, slightly larger than the waiting time of the AN algorithm, and ten context switches. The RRAPS algorithm outperforms traditional RR methods, significantly improving turnaround and waiting times as shown in Figure 2. Turnaround time measures how long it takes for a process to complete execution, from the time of its submission to completion. Waiting time measures how long a process has to wait before it can start execution, from the time of its submission to its execution. The proposed RRAPS algorithm results in shorter \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithms** & **Turnaround Time (ms)** & **Waiting Time (ms)** & **Context Switching** \\ \hline RR with fixed time quantum without priority & 170.1 & 112.7 & 18 \\ RR with dynamic time slice without priority & 145.5 & 97.1 & 13 \\ AN Algorithm [3] & 120 & 75 & 11 \\ RRAPS & 105 & 79.8 & 10 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Assessment of Case 4 results for different algorithm strategies. \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Algorithms** & **Turnaround Time (ms)** & **Waiting Time (ms)** & **Context Switching** \\ \hline RR with fixed time quantum without priority & 119.1 & 72.7 & 13 \\ \hline RR with dynamic time slice without priority & 100.4 & 59.1 & 7 \\ \hline AN Algorithm [3] & 103 & 55 & 6 \\ \hline RRAPS & 83.3 & 47 & 5 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: The outcome of Case 3 among alternative algorithm techniques. turnaround times and waiting times than traditional Round Robin techniques and the AN algorithm [3]. However, the AN algorithm [3] exhibited superior waiting times. This could be attributed to its equitable treatment of all processes, without any distinction between critical and non-critical ones. The RRAPS algorithm, however, considers priorities in its scheduling decisions. Its primary goal is to prevent high-priority and critical processes from experiencing wait times in the ready queue. The performance of RRAPS using a diverse set of 100 processes, including high-priority and high-burst-time processes and low-priority and low-burst-time processes, is provided in Figure 3. Our findings showed that RRAPS outperformed other algorithms in terms of turnaround time, highlighting its effectiveness in real-world scenarios. However, it was also noted that the AN algorithm [3] exhibited slightly better performance in terms of waiting time. This can be attributed to the AN algorithm's equal treatment of all processes, without differentiating between critical and non-critical ones. In RRAPS, low-priority processes must wait longer for high-priority processes to finish execution, leading to longer waiting times.