Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I know what a thread is, and I know how they work, but I'm quite confused as to what a user thread and a kernel thread are in terms of what they are allowed to do.

Can you please clarify what a user thread can do and what a kernel thread can do?

share|improve this question
This question has already been answered on SO: – Shadok Jul 30 '12 at 12:32
Well the question has been asked but not properly answered. All that was answered from the 5 or 6 things the person asked was about User space and Kernel space. – Fasih Khatib Jul 30 '12 at 17:58
I think the definition from Dave Rager is concise and precise: "Kernel space and user space is the separation of the privileged operating system functions and the restricted user applications. " – Shadok Jul 31 '12 at 10:41
up vote 9 down vote accepted

A kernel thread, sometimes called a LWP (Lightweight Process) is created and scheduled by the kernel. Kernel threads are often more expensive to create than user threads and the system calls to directly create kernel threads are very platform specific.

A user thread is normally created by a threading library and scheduling is managed by the threading library itself (Which runs in user mode). All user threads belong to process that created them. The advantage of user threads is that they are portable. The major difference can be seen when using multiprocessor systems, user threads completely managed by the threading library can't be ran in parallel on the different CPUs, although this means they will run fine on uniprocessor systems. Since kernel threads use the kernel scheduler, different kernel threads can run on different CPUs. Many systems implement threading differently,

A many-to-one threading model maps many user processes directly to one kernel thread, the kernel thread can be thought of as the main process. A one-to-one threading model maps each user thread directly to one kernel thread, this model allows parallel processing on the multiprocessor systems. Each kernel thread can be thought of as a VP (Virtual Process) which is managed by the scheduler.

Source: Answers

Also you can found info in wikipedia chapter 3 - 3 Processes, kernel threads, user threads, and fibers:


share|improve this answer
Great explanation! Thanks! – Dao Lam Jan 22 '14 at 5:10
I don't think it's a good idea to copy with apparently not knowing exactly what the argument is really about and without knowing completely the answer. Isn't a LWP usually created on top of a kernel thread as a bridge between this last one and the user thread? Also, this answer is very confusing because it keeps switching terminology, and at the end you don't understand if for example a kernel thread is a process, etc. – nbro Apr 15 at 9:35

A Kernel thread is Actually the System thread its not in control of the user but the user thread is totally for the user.User use the User thread and it is being instructed and controlled by the kernel Thread. hopefully your concept is clear now :)

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .