Improving Waiting Time of Tasks Scheduled Under Preemptive Round Robin Using Changeable Time Quantum

Improving Waiting Time of Tasks Scheduled Under Preemptive Round Robin   Using Changeable Time Quantum
Notice: This research summary and analysis were automatically generated using AI technology. For absolute accuracy, please refer to the [Original Paper Viewer] below or the Original ArXiv Source.

Minimizing waiting time for tasks waiting in the queue for execution is one of the important scheduling cri-teria which took a wide area in scheduling preemptive tasks. In this paper we present Changeable Time Quan-tum (CTQ) approach combined with the round-robin algorithm, we try to adjust the time quantum according to the burst times of the tasks in the ready queue. There are two important benefits of using (CTQ) approach: minimizing the average waiting time of the tasks, consequently minimizing the average turnaround time, and keeping the number of context switches as low as possible, consequently minimizing the scheduling overhead. In this paper, we consider the scheduling problem for preemptive tasks, where the time costs of these tasks are known a priori. Our experimental results demonstrate that CTQ can provide much lower scheduling overhead and better scheduling criteria.


💡 Research Summary

The paper addresses a well‑known drawback of the classic preemptive Round‑Robin (RR) scheduler: the performance of RR is highly sensitive to the choice of a fixed time quantum (TQ). A quantum that is too large degrades RR to First‑Come‑First‑Served, inflating average waiting and turnaround times; a quantum that is too small causes excessive context switches and associated overhead. To overcome this, the authors propose the Changeable Time Quantum (CTQ) technique, which dynamically adjusts the quantum in each round based on the remaining CPU burst times of the tasks that survive the previous round.

Algorithmic Design
CTQ operates in a cyclic fashion. Initially, all tasks are placed in a FIFO ready queue. In each round the scheduler: (1) runs every task for the current quantum, exactly as in standard RR; (2) after the round, computes the residual burst time for each unfinished task; (3) applies a set of analytical formulas (denoted as Equation 1, 2, 3 in the paper) to evaluate how different candidate quanta would affect the total waiting time and the number of context switches; (4) selects the quantum that yields the smallest average waiting time for the next round; and (5) repeats until all tasks terminate.

Equation 1 distinguishes between the case where the current quantum completely consumes a task’s burst and the case where it only partially consumes it. Equation 2 aggregates these decisions across all tasks, effectively constructing a feasible set of candidate quanta bounded by the largest remaining burst (LBT). Equation 3 finally computes the average waiting time (AVGWT) from the per‑task waiting times derived from the chosen quantum.

Illustrative Example
A simple example with five tasks (burst times 20, 20, 5, 3, 1) demonstrates the benefit. Using a fixed quantum of 1 tu, the scheduler incurs an average waiting time of 17 tu, average turnaround of 26.8 tu, and 44 context switches. With CTQ, the first round uses quantum 1, after which the algorithm selects quantum 2 for the next two rounds, and finally quantum 15 for the last round. The resulting metrics improve to an average waiting time of 14.2 tu, average turnaround of 24 tu, and only 9 context switches—a reduction of more than 80 % in switches.

Simulation Study
The authors built a user‑space simulator that accepts (i) the scheduling algorithm, (ii) the number of tasks, (iii) each task’s burst time, and (iv) the initial quantum for a conventional RR baseline. They generated random burst times and evaluated three algorithms: (a) Fixed‑RR (with the optimal static quantum for each workload), (b) Burst Round‑Robin (BRR) as described in prior work, and (c) the proposed CTQ.

Two experimental campaigns were conducted:

  1. Wide‑range burst experiment – 30 different (n, BT) configurations with burst lengths from 1 to 500 tu. For every configuration CTQ consistently achieved the lowest average waiting time, average turnaround time, and number of context switches. The results are visualized in Figures 1‑3.

  2. Narrow‑range burst experiment – 30 configurations with burst lengths from 1 to 100 tu, using the BRR‑recommended quantum of 10 tu. Again CTQ outperformed both Fixed‑RR and BRR across all three metrics, as shown in Figures 4‑6.

Discussion of Strengths and Limitations
The primary strength of CTQ lies in its adaptive nature: short jobs finish early, reducing queue waiting for longer jobs, while the quantum is never unnecessarily small for long jobs, thus limiting context‑switch overhead. The analytical formulas provide a systematic way to select a quantum that minimizes waiting time without exhaustive trial‑and‑error.

However, the approach assumes that the total CPU burst of each task is known a priori, which is unrealistic for many interactive or I/O‑bound workloads where burst lengths are dynamic. Moreover, the per‑round computation of the optimal quantum incurs O(n) overhead; for systems with thousands of concurrent tasks this could become non‑trivial. The paper also assumes a constant cost for context switches, whereas real systems may exhibit variable switch costs depending on cache state, memory hierarchy, or task type.

Conclusion and Future Work
CTQ demonstrates that a modest modification to the classic RR scheduler—allowing the quantum to vary per round based on residual burst times—can yield substantial improvements in all classic scheduling criteria. The authors suggest extending the technique to other RR variants, investigating the relationship between successive quanta, and exploring dynamic burst estimation methods to relax the a‑priori knowledge requirement.

In summary, the paper contributes a practical, analytically grounded scheduling enhancement that preserves RR’s simplicity while delivering markedly better performance in environments where task burst times are known or can be reasonably estimated.


Comments & Academic Discussion

Loading comments...

Leave a Comment