Thread carefully: preventing starvation in the ROS 2 multithreaded executor

dc.contributor.authorTeper, Harun
dc.contributor.authorKuhse, Daniel
dc.contributor.authorGünzel, Mario
dc.contributor.authorBrüggen, Georg von der
dc.contributor.authorHowar, Falk
dc.contributor.authorChen, Jian-Jia
dc.date.accessioned2025-09-15T12:15:59Z
dc.date.available2025-09-15T12:15:59Z
dc.date.issued2024-11-06
dc.description.abstractThe robot operating system 2 (ROS 2) is a widely used collection of tools and libraries for building robot applications. It is designed to be flexible and easy to use when creating complex robot systems with many interacting components.Since its alpha version release in 2015, ROS 2 provides two options in a multithreading operating system, namely the single-threaded executor and the multithreaded executor. The single-threaded executor is starvation-free by design (i.e., every task is eventually executed) even in over-utilized systems, since the set of eligible task instances (called wait set) is only refilled once all the task instances in the wait set are executed. The multithreaded executor extends this mechanism to multiple threads that manage the wait set collaboratively. While intuitively this extension preserves the starvation-free property, and analyses for the multithreaded executor even build upon this assumption, the multithreaded executor has not been shown to be starvation-free.In this work, we examine the mechanism of the multithreaded executor in ROS 2 and demonstrate that it is prone to starvation, i.e., some tasks may never be executed even in under-utilized systems. This indicates risks for multithreaded executors in the current ROS 2 design and further leads to counterexamples to the state-of-the-art response-time analyses by Jiang et al. (RTSS 2022) and Sobhani et al. (RTAS 2023). We propose a minimal change in the software architecture of the ROS 2 multithreaded executor to enable starvation- and deadlock-free behavior. We empirically test that we prevent starvation in concrete ROS 2 system configurations, and show that our solution incurs a negligible overhead using the autoware reference benchmark. Moreover, we prove that our solution is starvation- and deadlock-free using formal proofs and model checking.en
dc.identifier.urihttp://hdl.handle.net/2003/43966
dc.language.isoen
dc.relation.ispartofseriesIEEE transactions on computer-aided design of integrated circuits and systems / Institute of Electrical and Electronics Engineers; 43(11)
dc.rights.urihttps://creativecommons.org/licenses/by/4.0/
dc.subjectFormal verificationen
dc.subjectMultithreadingen
dc.subjectOperating systemsen
dc.subjectRobot programmingen
dc.subject.ddc004
dc.titleThread carefully: preventing starvation in the ROS 2 multithreaded executoren
dc.typeText
dc.type.publicationtypeArticle
dcterms.accessRightsopen access
eldorado.dnb.deposittrue
eldorado.doi.registerfalse
eldorado.secondarypublicationtrue
eldorado.secondarypublication.primarycitationH. Teper, D. Kuhse, M. Günzel, G. v. d. Brüggen, F. Howar and J. -J. Chen, "Thread Carefully: Preventing Starvation in the ROS 2 Multithreaded Executor," in IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, vol. 43, no. 11, pp. 3588-3599, Nov. 2024, doi: 10.1109/TCAD.2024.3446865.
eldorado.secondarypublication.primaryidentifierhttps://doi.org/10.1109/tcad.2024.3446865

Files

Original bundle
Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
Thread_Carefully_Preventing_Starvation_in_the_ROS_2_Multithreaded_Executor.pdf
Size:
1001.75 KB
Format:
Adobe Portable Document Format
Description:
DNB
License bundle
Now showing 1 - 1 of 1
No Thumbnail Available
Name:
license.txt
Size:
4.82 KB
Format:
Item-specific license agreed upon to submission
Description: