LinuxQuestions.org
Review your favorite Linux distribution.
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 01-22-2016, 09:25 PM   #1
jnielsen7
LQ Newbie
 
Registered: Feb 2013
Posts: 29

Rep: Reputation: Disabled
Kernel threads vs. user threads implementation (kthreads vs. pthreads)


please delete

Last edited by jnielsen7; 01-22-2016 at 10:45 PM. Reason: Delete
 
Old 01-24-2016, 12:36 PM   #2
MensaWater
LQ Guru
 
Registered: May 2005
Location: Atlanta Georgia USA
Distribution: Redhat (RHEL), CentOS, Fedora, CoreOS, Debian, FreeBSD, HP-UX, Solaris, SCO
Posts: 7,553
Blog Entries: 15

Rep: Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494Reputation: 1494
Rather than requesting deletion you should post your original question AND your solution. That way someone who has the same issue in the future as you had may be able to find a solution more quickly.
 
Old 01-25-2016, 12:20 PM   #3
jnielsen7
LQ Newbie
 
Registered: Feb 2013
Posts: 29

Original Poster
Rep: Reputation: Disabled
The original post contained a link to Stack Exchange where I had asked a question which was large (10 paragraphs) and unwieldy (which no one replied to there) so I deleted it. To be fair I did rehash it afterward in a completely new question which was somewhat related, regarding threading in the kernel. Here it is for what it's worth: stackoverflow.com/questions/34959506/do-linux-kernel-processes-multithread

No one to date has replied to that post as to what the kthreadd process actually does, in contradistinction to init. I still have more questions than answers.

Last edited by jnielsen7; 01-25-2016 at 12:29 PM.
 
Old 01-25-2016, 06:53 PM   #4
jnielsen7
LQ Newbie
 
Registered: Feb 2013
Posts: 29

Original Poster
Rep: Reputation: Disabled
I think I was thrown off by the fact that kthreadd and its children have PIDs (Process IDs), but they are all threads not processes. That made it very difficult to understand why ps displays things like it does. I threw up another stackoverflow question here about that: stackoverflow.com/questions/35004259/linux-assigns-pids-to-kernel-threads-and-not-only-processes
 
Old 01-25-2016, 08:45 PM   #5
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 9,078
Blog Entries: 4

Rep: Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171Reputation: 3171
A "kernel thread" is a strategy that the kernel uses when parts of itself can be most-conveniently expressed as "independently-dispatchable things" that can "wait for" things to happen, and which can afford to be executed "in no particular order." In some ways, they are like user threads, but the fact remains that they are "part of the kernel." For instance, when they're ready to run, they get to run. There is no notion of "time slices" ... they get to run as long as they want to. And so on.

"User threads," like "user processes," execute within the environment created and maintained by the kernel. They run in virtual memory, they can be pre-empted at any time, and so on.
 
1 members found this post helpful.
  


Reply

Tags
kernel, multithreading, process, thread


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
Proper implementation of POSIX threads nrhoades Programming 2 04-06-2011 03:35 PM
Two threads somehow using the same data (seg fault with pthreads in c) fortenbt Programming 9 04-25-2008 01:34 PM
"Find all threads started by user" not showing all threads Nylex LQ Suggestions & Feedback 3 12-28-2005 09:28 PM
is there any way to sleep threads using pthreads.... gajaykrishnan Programming 2 03-26-2005 03:20 PM
enable pthreads? (posix threads) cpluspaul Slackware 5 06-29-2004 06:56 AM

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

All times are GMT -5. The time now is 11:31 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration