Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-11-2011, 02:00 AM   #1
LQ Newbie
Registered: Mar 2011
Posts: 1

Rep: Reputation: 0
1:1 threading model in Linux 2.6 --pthread

I am new to linux . I have gone thorugh some documents about pthread (NTPL ) in linux 2.6 kernel . As per that linux uses 1: 1 threading model and for each user level thread there is kernel level thread . Pthread_create uses clone system call to create a LWP and the kernel could treat that as a LWP and do scheduling and all .( different from linuxthread) . My question is what's meant by there is kernel level thread for each pthread created . Can I see the kernel level thread if I call pthread_create using ps .

What exactly meant by 1:1 .I mean for each user level thread there is kernel level thread . If I make a system call from a thread does the OS services that action via kernel thread ( created using kernel_thread () or some other way ) internally ..


Old 03-11-2011, 06:29 PM   #2
Senior Member
Registered: Jul 2004
Location: Phoenix, Arizona
Distribution: Gentoo, LFS, Debian,Ubuntu
Posts: 1,537

Rep: Reputation: 87
As a rule everything that is done in userspace cannot access anything in kernel space. So from the information you have given me it sounds like for every userspace thread requested and created there is a corresponding kernel thread created to actually perform the action. They are linked across the userspace kernelspace border so that work can actually be done. This may be incorrect however. I would recommend you research it a little more.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
linux threading model in JVM (pthread) andynuss Programming 1 05-16-2007 08:04 PM
multi threading slower than single threading on dual core. why? nebojsa.andjelkovic Programming 13 01-30-2007 10:56 PM
Qthread VS Pthread (threading problem) chanwing Programming 5 07-01-2005 08:05 AM
question about pthread impelementation of task queue model msmelyan Programming 0 12-17-2004 03:09 PM
how to do threading in linux? shrike_912 Programming 2 11-04-2004 10:45 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:14 PM.

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