what is difference between userlevel threads and kernel
level threads ?what are the trades offs between these two
approaches ? what approach is most frequently used and why ?



what is difference between userlevel threads and kernel level threads ?what are the trades offs be..

Answer / sneha

*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.
*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.
*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.

Is This Answer Correct ?    7 Yes 3 No

Post New Answer

More C Interview Questions

Read two numbers from keyboard and find maximum of them?

1 Answers  


What are the advantages of using linked list for tree construction?

0 Answers  


Is c dynamically typed?

0 Answers  


What is the heap in c?

0 Answers  


how we can make 3d venturing graphics on outer interface

1 Answers   Microsoft,






What is use of bit field?

0 Answers  


what is the difference between char * const and const char *?

2 Answers   TCS,


write a c prog for removing duplicate character from an array and sorting remaining elements using a single array

1 Answers  


While(1) { } when this loop get terminate is it a infinite loop?

5 Answers  


What is meant by type casting?

0 Answers  


main() { char *p; p="Hello"; printf("%c\n",*&*p); }

2 Answers   ME,


What is graph in c?

0 Answers  


Categories