OS provides threads (syscalls for creating new threads, scheduling services).
Unix libc has a wrapper around OS threads with many useful features (such as mutexes, cond vars, etc.). Usually the external interface of such system libraries is "POSIX threads" (functions called pthread_* ): http://en.wikipedia.org/wiki/POSIX_Threads
Windows has its own tough API for threading (WINAPI CreateThread , etc.). But there are shells around the Windows API to get something like POSIX api streams (for example, there are such libraries for mingw32 and cygwin, check the wikipedia section )
C ++ 11 std::thread , boost boost::thread are just modern OS-independent wrappers around the streaming API. They are used to create portable programs that can be compiled on any supported platform, without creating an #ifdef hell and / or writing your own custom wrappers around the stream stream library. If you are creating a new program, think about it.
There are several other streaming wrappers, for example. included in graphics libraries such as QT or GTK +.
OpenMP implementations have an internal support library (for example, gcc has libgomp) that uses the system / libc streaming APIs, for example, libgomp uses POSIX streams. Some implementations may also include switching user-space flows through the assembly (model with M: N thread).
MPI does not have a stream library. MPI is used to create several processes and establish communication between them. But when MPI is used in multi-threaded programs, it will use some streaming API for synchronization. For example, MPICH will use pthreads on unix.
source share