Understanding thread creation in POSIX systems
This is a foundational question about the POSIX threads API, testing your knowledge of how operating systems manage concurrent execution at the application level. It appears frequently in systems interviews because thread creation is a core primitive that underpins multi-threaded program design.
To answer correctly, you need to recognize the standard library function used to instantiate a new thread in C/C++ on Unix-like systems. The question rewards familiarity with the actual API—the function signature, its parameters, and what it returns—rather than conceptual reasoning. This is the kind of knowledge that separates candidates who have hands-on experience with concurrent systems from those who only understand threading in theory.
- Thread lifecycle and initialization
- Function signatures in the pthread library
- Return values and error handling in system calls