Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| realtime [2018/03/26 15:30] – admin | realtime [2025/11/27 11:21] (current) – admin | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | |||
| https:// | https:// | ||
| + | |||
| https:// | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | ====== Learning ====== | ||
| + | |||
| + | https:// | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | ====== Core partitioning ====== | ||
| + | |||
| + | User-space partitioning, | ||
| + | |||
| + | Dual-OS partitioning, | ||
| + | |||
| + | https:// | ||
| + | |||
| + | |||
| + | ====== Multitasking ====== | ||
| + | In user space: | ||
| + | * Process (fork) | ||
| + | * Thread (pthread_create) | ||
| + | |||
| + | In kernel: | ||
| + | * Kernel thread (kthreadd) | ||
| + | |||
| + | ====== Scheduler ====== | ||
| + | sched_class | ||
| + | stop > dl > rt > cfs > idle | ||
| + | (e.g. rt threads will run with higher priority than cfs threads) | ||
| + | (stop and idle scheduling class are not accessible for user space applications) | ||
| + | |||
| + | rt includes SCHED_FIFO and SCHED_RR policies. | ||
| + | |||
| + | dl includes SCHED_DEADLINE policy (augmented EDF). | ||
| + | |||
| + | |||
| + | ====== Utilities ====== | ||
| + | * chrt | ||
| + | * taskset | ||
| + | |||
| + | ==== Linux specific APIs ==== | ||
| + | * sched_setattr | ||
| + | * sched_setaffinity | ||
| + | * CPU_SET | ||
| + | * pthread_setaffinity_np | ||
| + | |||
| + | ==== POSIX realtime APIs ==== | ||
| + | * sched_setscheduler | ||
| + | * ... | ||
| + | |||
| + | |||
| + | ==== Benchmarking ==== | ||
| + | |||
| + | Latency measurement with **cyclictest** (results for SCHED_FIFO). | ||
| + | |||
| + | Sources of latency: | ||
| + | * Kernel system call | ||
| + | * ISR | ||
| + | * Kernel locks | ||
| + | * Priority inversions | ||
| + | * Timers | ||
| + | * Page faults | ||
| + | |||
| + | **Ftrace** | ||
| + | |||
| + | **Kernel Shark** | ||
| + | |||
| + | **LLTng** | ||
| + | |||
| + | |||
| + | |||