Threads in Embedded Linux- 6 Easy Pieces
summary
Maps Linux threads to clone(2) and shows pthread_create calling clone, demonstrated with strace -f where main returning triggers exit_group and kills new threads. Uses pmap and a stack-overflow demo to show virtual reservation vs on-demand commit and the default stack 8 MB vs 384 KB difference between glibc and musl (adjust pthread_attr_t stack size). Shows mutex vs semaphore behavior, condition-variable wait loop pattern, and a reproducible printf-in-signal-handler deadlock traced with gdb; fixes by blocking signals in threads and using a dedicated sigwait handler thread.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 1:26Six easy pieces overview
- 3:53Threads in embedded Linux
- 7:11Thread creation and lifecycle
- 13:37Thread stack management
- 20:30Memory access and synchronization
- 30:10Threads and signals
- 37:19Resources and closing remarks
related talks
52m[normalized Sound] A deep dive into dispatching techniques
42mGame of Threads - You Spawn or You Die
42mInter Process Confusion - Navigating Zephyr's IPC APIs
01h 14mMultithreading in UI application: When some threads are more equal than others
22mUsing WebAssembly and Threads
23mDecomposition of the Main Thread in Node.js to increase throughput
11mBuilding a Test for Diverse Fleet of Platforms, How Hard That Could Be?
01h 04mA Pattern Language for Expressing Concurrency in Cpp
