## 1 Introduction  
Scheduling is a critical aspect of computer systems, as it dictates how the computer executes different tasks or processes. A process refers to an instance of a program that can be performed by one or more threads containing the program code and its current activity. Each process has its own memory space, system resources such as open files and network connections, and its state, which includes information about the program counter, register values, and memory management information. When a program is executed, the operating system creates a new process. The process goes through several states during its lifetime, such as \"new\", \"ready\", \"running\", \"waiting\", \"suspended\", and \"terminated\". The process is then allocated memory and system resources and added to the scheduler's queue. The scheduler decides which method to execute next based on the scheduling algorithm [1, 2, 3, 4]. Therefore, various scheduling algorithms are proposed to address this problem, each with its trade-offs and advantages. The algorithm presented in this article is a scheduling algorithm that combines two popular approaches: dynamic time quantum (TQ) and priority scheduling. Dynamic time quantum scheduling is a variation of Round Robin (RR) scheduling in which each process is allocated a fixed timespan to complete execution. However, in dynamic time quantum scheduling, the time quantum is not fixed and can vary depending on the behavior of the process [5; 6]. For example, if a process uses up its entire time quantum without completing, it is considered CPU-bound and is assigned a more significant time quantum in the next Round. Conversely, if a process completes before its time quantum expires, it is considered I/O-bound and is given a smaller time quantum in the next Round. This approach aims to balance the needs of CPU-bound and I/O-bound processes by ensuring that each process receives a fair share of CPU time. On the other hand, priority scheduling assigns a priority value to each process, and the scheduler selects the process with the highest priority to execute. This approach allows the system to prioritize specific processes over others based on their importance or urgency. For instance, a real-time data-handling process may be prioritized more than a batch-processing process. By combining these two approaches, the scheduler can adapt to the behavior of the process and ensure that essential tasks are executed first while ensuring that all processes receive a fair share of CPU time. In our proposed algorithm, we combined the concepts of dynamic time quantum and priority to resolve the scheduling problem in computer systems. The operating system sets the priorities of processes, and a dynamic time quantum scheduling approach is implemented to determine the sequence in which the processes are carried out. The time quantum for each process is based on its priority, with higher-priority processes being given a more significant time quantum. This approach balances fairness and efficiency, allowing the system to prioritize critical processes while ensuring all processes get a fair share of CPU time. Dynamic time quantum scheduling is an adaptation of the traditional Round Robin scheduling algorithm that enables the system to modify the time allotted to each process based on requirements and the present workload. By using dynamic time quantum, the scheduler can respond to changing conditions and maintain high levels of efficiency; this is especially important in cases where the system's workload is dynamic and unpredictable. Moreover, the algorithm considers each process's priority, enabling the system to prioritize specific tasks based on their importance. This allows the system to focus on time-sensitive or critical tasks and ensure they are executed quickly and efficiently. This algorithm can be used in a wide range of computer systems and can help improve system performance, responsiveness, and overall efficiency.