What is the RTOS tick and how does it affect system behavior?
The RTOS tick is a periodic hardware timer interrupt (often called the "system tick" or "SysTick" on ARM Cortex-M) that drives the kernel's time-keeping. Each tick interrupt invokes the scheduler, which checks whether any delayed tasks have timed out, updates software timers, and potentially triggers a context switch if a higher-priority task has become ready.
Typical tick rates range from 100 Hz to 1000 Hz (1–10 ms period). The tick rate represents a fundamental trade-off: a faster tick gives finer time resolution for delays and timeouts but increases CPU overhead from the tick ISR. On resource-constrained MCUs running at tens of MHz, a 1 kHz tick can consume a non-trivial percentage of CPU time.
Some modern RTOS kernels support a tickless (or dynamic tick) mode, where the tick timer is reprogrammed to fire only when the next task timeout or delay expires, rather than at a fixed period. This is especially valuable for battery-powered devices because the MCU can stay in deep sleep for longer periods. FreeRTOS supports this via its "tickless idle" feature. An interview follow-up often asks: "What is the time resolution of vTaskDelay(1)?" — the answer is that it delays for one tick period, so the actual wall-clock delay depends on the configured tick rate and where in the current tick period the call was made.
Source: Operating Systems & RTOS Q&A
