Which of the following statement is correct for Pthreads?
2025
Which of the following statement is correct for Pthreads?
- A.
It refers to POSIX standard (IEEE 1002.1c)
- B.
This standard defines API for thread creation only
- C.
This is a specification only for thread behavior and not its implementation
- D.
Operating systems like Solaris, Linux & Mac OS X, except Tru64 UNIX, implement Pthreads
Attempted by 339 students.
Show answer & explanation
Correct answer: C
Answer: This is a specification only for thread behavior and not its implementation
Key points:
Pthreads refers to POSIX Threads, defined by the POSIX standard (IEEE 1003.1c).
The specification defines the API and the expected behavior of thread operations (for example, thread creation and termination, mutexes, condition variables, thread attributes, and cancellation).
The specification does not prescribe exactly how an operating system must implement threads internally; different systems can provide different implementations so long as they conform to the specified behavior.
Why the other statements are incorrect or incomplete:
Saying Pthreads refers to POSIX is correct, but the cited standard number should be IEEE 1003.1c (not IEEE 1002.1c).
Stating the standard defines an API for thread creation only is incorrect because the specification covers many thread-related APIs and behaviors beyond creation.
Claiming a specific set of operating systems (with an exception named) implement Pthreads is misleading: many OSes provide POSIX Threads interfaces but exact support and history vary by system and version, so that specific exception is unreliable.
Conclusion: The correct understanding is that Pthreads is a POSIX specification of thread APIs and behaviors; it describes what functions and semantics are required, not how to implement them inside the OS.
A video solution is available for this question — log in and enroll to watch it.