What this operating-systems thread-management question tests
This is a foundational question about the lifecycle of POSIX threads and resource cleanup. It probes whether you understand what happens when a thread terminates and other threads don't explicitly synchronize with it using pthread_join().
Answering well requires you to reason about thread state, the kernel's role in cleanup, and the consequences of leaving synchronization unfinished. The question sits at the boundary between practical coding (where thread leaks cause real bugs) and OS-level semantics (where resources remain allocated until claimed).
- Thread lifecycle and detached vs. joinable threads
- Resource exhaustion and process limits
- Synchronization patterns and thread coordination