A Theoretical Approach to Determine the Optimal Size of a Thread Pool for Real-Time Systems
Daniel Casini
Abstract
Parallel workloads most commonly execute onto pools of thread, allowing to dispatch and run individual nodes (e.g., implemented as C++ functions) at the user-space level. This is relevant in industrial cyber-physical systems, cloud, and edge computing, especially in systems leveraging deep neural networks (e.g., TensorFlow), where the computations are inherently parallel. When using thread pools, it is common to implement fork-join parallelism using blocking synchronization mechanisms provided by the operating system (such as condition variables), with the side effect of temporarily reducing the number of worker threads. Consequently, the served tasks may suffer from additional delays, thus potentially harming timing guarantees if such effects are not properly considered. Prior works studied such phenomena, providing methods to guarantee the timing behavior. However, the challenges introduced by thread pools with blocking synchronization cause current analyses to incur a notable pessimism. This paper tackles the problem from a different angle, proposing solutions to determine the optimal size of a thread pool in such a way as to avoid the undesired effects that arise from blocking synchronization.
Ask about this paper
Ask your agent about it.
Lune has read the top-tier papers around this one, so every answer names the papers it rests on.
Related papers
- Towards Exploiting CPU Elasticity via Efficient Thread OversubscriptionHang Huang, Jia Rao, Song Wu, Hai Jin et al.HPDC 2021 · 17 citations
- Real-Time Multitasking of Deep Neural Networks With Nvidia TensorrtFederico Aromolo, Andrea Stevanato, Alessandro Biondi, Giorgio C. ButtazzoRTSS 2025 · 1 citation
- LaLaRAND: Flexible Layer-by-Layer CPU/GPU Scheduling for Real-Time DNN TasksWoosung Kang, Kilho Lee, Jinkyu Lee, Insik Shin et al.RTSS 2021 · 68 citations
- Responsive Parallelism with SynchronizationStefan K. Muller, Kyle Singer, Devyn Terra Keeney, Andrew Neth et al.PLDI 2023 · 3 citations
- Scheduling and analysis of real-time tasks with parallel critical sectionsYang Wang, Xu Jiang, Nan Guan, Mingsong Lv et al.DAC 2022 · 3 citations
