Does POSIX Pthreads run in user space or kernel space?

as above?
If the system has kernel support for threads, yes.
I don't understand the question.

User threads always run in user space regardless of implementation.

The question might really be: is context switching amongst threads
implemented in user space or kernel-assisted. The answer to that
for Linux at least is kernel-assisted. (for both linux-threads and NPTL)

sorry but I'm a beginner to threads
err so Pthreads are user threads?
What I read was that for user threads, the thread management is faster than with kernel threads but since the kernel might not be aware that there are user threads in a process, a single thread that blocks due to waiting for some IO,etc might block the entire process and I was wondering if this problem exists when using the POSIX pthread.h library
Last edited on
The problem will not exist with pthreads.
What is the reason behind that the problem is not present with the usage of pthreads?
All pthreads libraries I am aware of (linux threads, NPTL) use kernel-assisted context switching.
Topic archived. No new replies allowed.