Measurement of Kernel Preemption Time of Real Time Operating Systems
Roshan Chitrakar1* and Arun Timalsina2
1Department of Graduate Studies, Nepal College of Information Technology, Nepal
2Department of Computer and Electronics Engineering, Pulchowk Campus, IoE, Tribhuvan University, Nepal
*Corresponding Author: Roshan Chitrakar, Department of Graduate Studies, Nepal College of Information Technology, Balkumari-8, Lalitpur, Postal Code 44600, Nepal.
Published: November 30, 2023
DOI: 10.55162/MCET.05.177
Abstract  
In a Real Time System, when a high priority task is scheduled, it preempts ongoing lower priority tasks and sometimes it preempts even the kernel too. In normal cases, the time needed for the preemption is too small and hence is not considered in task scheduling. But, in some mission critical hard real time systems, even a small fraction of a second should be taken into account as it could affect the deadline. This research work proposes two models - embedded model and software model, among which the latter has been used for the experiment that calculates the kernel preemption time. The hardware model consists of a triangular wave generator called TRIANG that takes timer values from real time tasks and sends outputs to a comparator module. Finally, the comparator compares the time differences, and hence, calculates the kernel preemption time. Whereas the software model uses the RT-Linux architecture in which device drivers are used instead of hardware components. A high precision timer clock is also used to measure the task release times.
The results from the experiments show that the release time jitter due to the kernel preemption is found to be fluctuating in the range of -94 and +93 microseconds in 3% of the cases. So, the kernel preemption time for the hard and mission critical real time systems is taken to be less than 99 microseconds. Whereas 85% of the cases have release time jitters of single digit only. So, the kernel preemption time in average case is considered to be less than 9 microseconds.
Keywords: Real Time System; Triangular Wave Generator; Task Scheduling; Kernel Preemption Time
.