Native POSIX Thread Library: Difference between revisions

Content deleted Content added
Serprex (talk | contribs)
Links are better than pasta
Serprex (talk | contribs)
Links are better than pasta
Line 5:
== History ==
 
Before the 2.6 version of the [[Linux kernel]], processes were the schedulable entities, and there was no real support for [[Thread (computer science)|threads]]. However, it did support a [[system call]]  — <tt>[[clone (Linux system call)|clone]]</tt>  — which creates a copy of the calling process where the copy shares the address space of the caller. The [[LinuxThreads]] project used this system call to provide kernel-level thread support (most of the previous pthread implementations in Linux worked entirely in [[Userland (computing)|userland]]). Unfortunately, it had a number of issues with true POSIX compliance, particularly in the areas of signal handling, scheduling, and inter-process synchronization primitives.
 
To improve upon LinuxThreads, it was clear that some kernel support and a re-written threads library would be required. Two competing projects were started to address the requirement: [[NGPT]] (Next Generation POSIX Threads) worked on by a team which included developers from [[IBM]], and NPTL by developers at [[Red Hat]]. NGPT was abandoned in mid-2003, at about the same time when NPTL was released.
Line 21:
NPTL is a so-called 1×1 threads library, in that threads created by the user (via the <code>pthread_create()</code> library function) are in 1-1 correspondence with schedulable entities in the kernel (tasks, in the Linux case). This is the simplest possible threading implementation.
 
An alternative to NPTL's 1×1 model is the [[http://en.wikipedia.org/wiki/Thread_%28computer_science%29#N:M_.28Hybrid_threading.29|''m×n'' model]]
 
== See also ==