LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 11-14-2008, 03:35 AM   #1
leon20008
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Rep: Reputation: 0
thread library in Linux2.6.13?


Hi guys, could some one please tell me which thread library is used in the Linux2.6.13 kernel? LinuxThreads or NPTL?
Thanks in advance
 
Old 11-16-2008, 08:21 PM   #2
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Neither one is used in the kernel.
 
Old 11-16-2008, 08:55 PM   #3
leon20008
LQ Newbie
 
Registered: Jul 2008
Posts: 7

Original Poster
Rep: Reputation: 0
Sorry, I'm really new to Linux..
So, which thread library is used with the Linux2.6.13?
or which is related to 2.6.13?

how to check which thread library is being used?
Someone told me to use
Code:
$ getconf GNU_LIBPTHREAD_Version
I did it but
Code:
getconf not found
 
Old 11-16-2008, 10:19 PM   #4
Quakeboy02
Senior Member
 
Registered: Nov 2006
Distribution: Debian Linux 11 (Bullseye)
Posts: 3,407

Rep: Reputation: 141Reputation: 141
You might want to start here, rather than getting into a pointless disagreement over sematics. http://en.wikipedia.org/wiki/LinuxThreads

I haven't programmed in years, so I'm not the resource for this, but it appears that POSIX threads won. On my system, the package libpth20 is installed, which is GNU Portable Threads. However, it looks like other threading systems are available if you have a program that uses them.

Quote:
Pth is a very portable POSIX/ANSI-C based library for Unix platforms which provides non-preemptive priority-based scheduling for multiple threads of execution ("multithreading") inside server applications. All threads run in the same address space of the server application, but each thread has its own individual program-counter, run-time stack, signal mask and errno variable.
 
Old 11-17-2008, 08:40 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Truly, "the Linux world is as strange as it is liberating."

Most of the time, in the history of computer world, "key decisions were made for you." Whatever Microsoft (or IBM, or DEC, or Data General...) decided to do, "that was it." All the rest of us may have groused, but the bottom-line was that we had no choice but "to go along."

The Linux/Unix community, though, is different: no one is "in charge."

No one has either the position or the authority to impose their solution, to any technical problem at all, upon the group! Also, no one has the capacity to impose a "sea change" upon present or future software development.

The position of Unix and Linux is especially peculiar because these systems cannot even predict the nature of the hardware upon which they might be run! These systems run on obviously-different hardware types ranging from "the biggest mainframes" to "a portable phone," and none of them can ever be "locked out!"

The strategy which has thus-far worked out to be most capable of dealing with this very peculiar set of requirements is to allow several "competing" groups of developers and standards-writers to ... so to speak ... "duke it out" in what may seem (at first) to be a "let the best man win and let all the others perish in the darkest hell" competition.

First, of course, somebody has to "boldly go where no man has gone before." The linuxthreads library did that... trying its best to forge a respectable notion of "threading" in a world that, at the time, knew only of "processes."

Then, when the underlying architectures have suitably advanced and the question now becomes, "how do we replace 'that dreadful linuxthreads hack'" ... instead of waiting for a dutiful vendor to impose its will upon all the rest of us ... we "duke it out!"

In this case, the contenders came down to:
  1. linuxthreads itself (the ever-present "default case", codified by now as the "POSIX Standard")
  2. NPTL (New POSIX Threads Library)
  3. NGPT (Next Generation POSIX Threads)
And the general engineering opinion is that "NPTL won."

But... all of these threading models are built upon a foundation of underlying threading-support that had to be built into the Linux kernel ... a foundation upon which all of the various competing threading-models ultimately had to be built.

Furthermore... all of these threading models are ones which are exposed by the Linux kernel to user-land programs. "The kernel itself" necessarily plays by much simpler and more restrictive rules. After all, "the kernel itself" does not have to abide by any protocol other than "whatever works... on any number of CPUs... of any type ranging from a mainframe to a portable phone."
 
Old 11-17-2008, 08:41 PM   #6
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 10,659
Blog Entries: 4

Rep: Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941Reputation: 3941
Truly, "the Linux world is as strange as it is liberating."

Most of the time, in the history of computer world, "key decisions were made for you." Whatever Microsoft (or IBM, or DEC, or Data General...) decided to do, "that was it." All the rest of us may have groused, but the bottom-line was that we had no choice but "to go along."

The Linux/Unix community, though, is different: no one is "in charge."

No one has either the position or the authority to impose their solution, to any technical problem at all, upon the group! Also, no one has the capacity to impose a "sea change" upon present or future software development.

The position of Unix and Linux is especially peculiar because these systems cannot even predict the nature of the hardware upon which they might be run! These systems run on obviously-different hardware types ranging from "the biggest mainframes" to "a portable phone," and none of them can ever be "locked out!"

The strategy which has thus-far worked out to be most capable of dealing with this very peculiar set of requirements is to allow several "competing" groups of developers and standards-writers to ... so to speak ... "duke it out" in what may seem (at first) to be a "let the best man win and let all the others perish in the darkest hell" competition.

First, of course, somebody has to "boldly go where no man has gone before." The linuxthreads library did that... trying its best to forge a respectable notion of "threading" in a world that, at the time, knew only of "processes."

Then, when the underlying architectures have suitably advanced and the question now becomes, "how do we replace 'that dreadful linuxthreads hack'" ... instead of waiting for a dutiful vendor to impose its will upon all the rest of us ... we "duke it out!"

In this case, the contenders came down to:
  1. linuxthreads itself (the ever-present "default case", codified by now as the "POSIX Standard")
  2. NPTL (New POSIX Threads Library)
  3. NGPT (Next Generation POSIX Threads)
And the general engineering opinion is that "NPTL won."

But... all of these threading models are built upon a foundation of underlying threading-support that had to be built into the Linux kernel ... a foundation upon which all of the various competing threading-models ultimately had to be built.

Furthermore... all of these threading models are ones which are exposed by the Linux kernel to user-land programs. "The kernel itself" necessarily plays by much simpler and more restrictive rules. After all, "the kernel itself" does not have to abide by any protocol other than "whatever works... on any number of CPUs... of any type ranging from a mainframe to a portable phone."
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Default thread library nuxrl Linux - Software 1 03-07-2007 01:57 PM
why are my apps using the wrong thread library? dombrowsky Linux - Software 2 02-11-2006 10:09 PM
Slackware and Native POSIX Thread Library (NPTL) win32sux Slackware 19 05-17-2005 10:41 AM
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 07:26 AM
Thread Library used in Slack and Linux ckamheng Slackware 1 01-12-2004 09:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 07:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration