Search code examples
clinuxpthreadsposix

POSIX threads vs parallelism


Do POSIX threads (managing by pthread library) works parallelly? My lecturer has told us that this library creates only user threads, that are not managed by Linux kernel. I wrote some code that fill large matrix and compared times of execution for threads and whole program and it seems to works parallelly. Can I use this library to creating parallel programs with threads which are recognized by kernel?


Solution

  • Posix threads are kernel threads with glibc/musl (+possibly other pthread implementations) on Linux.