CHRONOS: Compensating Hardware Related Overheads with Native Multi Timer Support for Real-Time Operating Systems
1 st Kay Heider, 2 nd Christian Hakert, 3 rd Kuan-Hsun Chen, 4 th Jian-Jia Chen · 2025
Read CHRONOS: Compensating Hardware Related Overheads with Native Multi Timer Support for Real-Time Operating Systems by 1 st Kay Heider, 2 nd Christian Hakert, 3 rd Kuan-Hsun Chen, 4 th Jian-Jia Chen (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2503-01444.txt.
Introduction
Kay Heider and co-authors present CHRONOS, a way to cut timing overhead in real-time operating systems, in a 2025 paper. Such systems keep time with a global tick counter, advanced by a hardware timer's regular interrupts. Jobs can only start on a tick, so each interrupt forces scheduling work. That housekeeping steals processor time from real tasks.
Modern chips hold several hardware timers, not just one. CHRONOS spreads tasks across timers so fewer interrupts fire. Tasks are grouped to share the largest common rhythm in their periods, and that rhythm becomes the group's tick. Less time in interrupts means better use of the processor. The design suits tight embedded systems where every cycle counts and deadlines are strict.
Catalog record
| CREATOR | 1 st Kay Heider, 2 nd Christian Hakert, 3 rd Kuan-Hsun Chen, 4 th Jian-Jia Chen |
|---|---|
| YEAR | 2025 |
| COLLECTION | PAPERS |
| FORMAT | TXT |
| FILE SIZE | 36 KB |
| VERSION | 1.0 |
| LICENSE | http://creativecommons.org/licenses/by/4.0/ |
| RIGHTS | CC BY |
| SOURCE | arXiv |
Source: https://arxiv.org/abs/2503-01444
Browse the full library · About the Tower of Babel
Full text
The opening of the work, from the library's hosted text:
CHRONOS: Compensating Hardware Related Overheads with Native Multi Timer Support for Real-Time Operating Systems Thanks: This work has received funding from the DFG Priority Program “Disruptive Memory Technologies” (SPP 2377) as part of the project “ARTS-NVM” (502308721). It was further supported by the DFG Project “One-Memory” (405422836). 1 st Kay Heider, 2 nd Christian Hakert, 3 rd Kuan-Hsun Chen, 4 th Jian-Jia Chen Abstract The management of timing constraints in a real-time operating system (RTOS) is usually realized through a global tick counter. This counter acts as the foundational time unit for all tasks in the systems. In order to establish a connection between a tick and an amount of elapsed time in the real world, often this tick counter is periodically incremented by a hardware timer. At a fixed interval, this timer generates an interrupt that increments the counter. In an RTOS, jobs can only become ready upon a timer tick. That means, during a tick interrupt, the tick counter will be incremented, jobs will be released, and potentially, a scheduling decision will be conducted to select a new job to be run. As this process naturally uses some processing time, it is beneficial regarding the system utilization to minimize the time spent in tick interrupts. In modern microcontrollers, multiple hardware timers are often available. To utilize multiple timers to reduce the overhead caused by tick interrupts, multiple methods are introduced in this paper. Generally, the task dispatching process is distributed over multiple timers, where each timer manages a subset of the task set. The number of interrupts that are triggered by these timers can then be reduced by mapping tasks to timers in such a manner that the greatest common divisor (GCD) of all task periods in a subset is maximized, and the GCD is adopted as the interrupt interval of the timer. To find an optimal mapping of tasks to timers, an MIQCP-model is presented that minimizes the overall number of tick interrupts that occur in a system, while ensuring a correct task release behavior. The presented methods are implemented in FreeRTOS and evaluated on an embedded system. The evaluation of the methods show, that compared to the baseline implementation in FreeRTOS that uses a single timer with a fixed period, the presented methods can provide a significant reduction in overhead of up to ≈ 10 × \approx 10\times in peak and up to ≈ 6 × \approx 6\times in average. I Introduction In a real-time operating system (RTOS), the notion of time is usually abstracted by a global system tick counter. Often, this tick counter is periodically incremented by an underlying hardware timer that counts at a fixed frequency. This system timer establishes the connection between the tick counter and the elapsed wall time. Usually, the process of handling the timer tick is realized by an interrupt. In addition to keeping the time in an RTOS, the tick counter is used to schedule and release jobs. A job can only ever become ready upon a timer tick, and depending on the scheduling policy, that newly released job can be selected to be executed after the tick handling. To correctly release jobs in a system with strictly periodic tasks, the tick interrupt needs to occur at a period, which is a common divisor of all task periods. Otherwise, a job would miss the time it should become ready. As a result, there are potentially tick interrupts where no job becomes ready, and only the tick counter is incremented. For example, in a system where one task releases jobs every two time units and another task releases jobs every five time units, the system timer needs to tick at every time unit as both task periods are co-prime. Suppose that both tasks release their first job at time zero. Then, the system execution is only affected by the interrupt that dispatches new jobs that at times 2,4,5,6,8,10,\dots and so forth. The tick interrupt, however, occurs at every time unit. In Figure 1 , the tick interrupts and release times of the jobs from these two tasks are depicted for a system with a single timer. During the ten time units depicted, at four out of ten interrupts, no jobs become ready. The process of incrementing the system tick counter, potentially releasing new jobs, and performing a scheduling decision, naturally causes an overhead for each handling of a timer tick. To reduce this overhead, it is desirable to reduce the number of tick interrupts where no job becomes active, while maintaining a correct job release behavior. 0 1 2 3 4 5 6 7 8 9 10 J_{1,1} J_{1,2} J_{2,1} J_{1,3} J_{1,4} J_{2,2} J_{1,5} Fig. 1: Example of tick interrupts with a single timer and the release times of jobs from two tasks \tau_{1} and \tau_{2} . An upward arrow indicates a tick interrupt. Modern microprocessors often possess multiple hardware timers that can be configured to independently generate interrupts at different intervals. For example, the ESP32 series of microprocessors contain four independent hardware timers [ ESP32S3 ] . An automotive microprocessor like the Infineon TC1796, that is, for example, used by the SLOTH on time, contains 256 hardware timers [ Hofer2012 ] . Utilizing multiple timers to manage a set of periodic real-time tasks can reduce the number of tick interrupts and thus reduce the overall overhead caused by tick interrupts. This can be achieved by partitioning the task set into subsets where the greatest common divisor (GCD) of the task periods is maximized. A separate hardware timer can then be assigned to manage only that partition of the task set, and thus, the tick interrupt interval can be set to the GCD of the task periods. Considering the example from before, a single timer must tick at every time unit to ensure the correct dispatching of jobs. For a system with at least two hardware timers, one timer could manage the task with period two, and another timer could manage the task with period five. Thus, the tick interrupt intervals could also be set to two and five time units, respectively. As a result, tick interrupts only occur when jobs are released, minimizing the overall number of tick interrupts. 0 1 2 3 4 5 6 7 8 9 10 J_{1,1} J_{1,2} J_{2,1} J_{1,3} J_{1,4} J_{2,2} J_{1,5} \rho_{1} \rho_{1} \rho_{2} \rho_{1} \rho_{1} \rho_{2} \rho_{1} Fig. 2: Example of tick interrupts with two timers \rho_{1},\rho_{2} and the release times of jobs from two tasks \tau_{1},\tau_{2} . An upward arrow indicates a tick interrupt. In Figure 2 , the tick interrupts and release times of the two jobs are depicted for a system with two timers \rho_{1},\rho_{2} . During the depicted ten time units, a job becomes ready at every tick interrupt. Since the timers are configured such that they trigger an interrupt only at the time when a job will be released, there are no interrupts that cause unnecessary overhead. It should be noted that at time ten, two interrupts are triggered, one from each timer. In this paper, we examine strategies to reduce the task handling overhead incurred by housekeeping operations of an RTOS for strictly periodic task sets. As shown by a recent empirical industry study, in