ALLInterview.com :: Home Page            
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
Google
   
 
Categories >> Software >> Programming Languages >> C
 
 


 

 
 C interview questions  C Interview Questions (2248)
 C++ interview questions  C++ Interview Questions (1106)
 VC++ interview questions  VC++ Interview Questions (342)
 Delphi interview questions  Delphi Interview Questions (510)
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions (644)
Question
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 ?
 Question Submitted By :: Ganesh Dhami
I also faced this Question!!     Rank Answer Posted By  
 
  Re: 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 ?
Answer
# 1
*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
Sneha
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take turns to remove these eggs from the baskets. On each turn, a player must remove at least one egg, and may remove any number of eggs provided they all belong to the same basket. The player picking the last egg(s) wins the game. If you are allowed to decide who is going to start first, what mathematical function would you use to decide so that you end up on the winning side? Upload a C program to demonstrate the behaviour of the game.   2
print ur name without using any semicolon in c/c++.... TCS 21
HOW TO ANSWER IF ASKED " WHAT KIND OF A PERSON ARE YOU?" I NEED AN ANSWER THAT IMPRESS THE INTERVIEWER   4
Explain in detail how strset (string handling function works )pls explain it with an example.   1
What is difference between the following 2 lines…. int temp = (int)(0x00); int temp = (0x00int); Bosch 3
can you change name of main()?how? Siemens 3
how to add our own function in c library please give details.? TCS 1
the operator for exponencation is a.** b.^ c.% d.not available TCS 5
what is the use of a array in c   6
why do we use # in c-language?   1
Hi, main() { } Is a user defined function or Built in Functionn Honeywell 26
How to swap two values using a single variable ? condition: Not to use Array and Pointer ?   6
 
For more C Interview Questions Click Here 
 
 
 
 
 


   
Copyright Policy  |  Terms of Service  |  Articles  |  Site Map  |  RSS Site Map  |  Contact Us
   
Copyright © 2013  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  KalAajKal.com