## 4 Performance Validation  
The proposed algorithm is validated on a Core i5 8 th generation processor with 16 GB RAM. We developed a simulation tool for evaluating the effectiveness of our RRAPS algorithm in comparison to the conventional Round Robin algorithm in terms of performance. MATLAB 2022b was selected as the programming language for building the simulator due to its graphical representation capabilities. The simulation model receives a quadrant (N, AT, BT, P) as input, where N represents the number of processes, AT is an array that contains the arrival times of each process, BT is an array that contains the burst times of each process, and P is an array that includes the priorities of each process. In our implementation, we introduced a parameter called \"decrease_priority\", which determines how much a process's priority is decreased when it does not complete its execution. Specifically, we set the value of decrease_priority to \(-1\), subtracting it from the process's priority each time it completes its assigned time quantum without terminating. The RRAPS algorithm computes the waiting and turnaround time of the system with N processes.  
To assess the efficacy of our proposed RRAPS algorithm, we will take a sample group of four processes with random burst times for four distinct cases, as used in [3]. The number of processes does not impact the algorithm's outcome as it performs efficiently even when dealing with many processes. We will compare the results obtained from our RRAPS algorithm for each scenario with the traditional RR approach.  
The findings demonstrated that the proposed algorithm was effective in the system by achieving a high utilization rate of the multi-core processor and decreasing the average waiting time of the processes. The simulation begins by creating an instance of the list class, which contains functions for inserting and deleting nodes in the list and calculating the processes' waiting times and turnaround times. The program then generates a list of methods with random burst times, priorities, and arrival times and inserts them into the list using the insertNode() function.  
Next, the program enters a loop until all processes have completed execution. Within the loop, the program uses the select_process_from_ready_queue() function to pick a process from the RQ and the determine_time_quantum() function to determine the time quantum for the selected process based on its priority. The program then uses the execute_process() function to execute the selected process for the determined time quantum. It adjusts the time quantum in the RQ based on the current workload using the adjust_time_quantum() function. If the selected process has completed execution, the program calculates its waiting and turnaround times using the returnWaiting() and returnTurnAround() functions. It removes the process from the list using the deleteNode() function. If the selected process has not completed execution, it is placed back in the ready queue using the insertNode() function, decreasing the process's priority by one point. Finally, the program calculates the average waiting and turnaround times for all processes and outputs the simulation results.