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 / 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 |
what is the difference between c and java?
Write a program to implement a round robin scheduler and calculate the average waiting time.Arrival time, burst time, time quantum, and no. of processes should be the inputs.
What is the difference between char a[] = "string"; and char *p = "string"; ?
14 Answers Adobe, Honeywell, TCS,
Can you please explain the difference between strcpy() and memcpy() function?
Difference Between embedded software and soft ware?
What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }
find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }
How can I split up a string into whitespace-separated fields?
What is the acronym for ansi?
how can we Declare a variable in c without defining it.
What is the use of getchar functions?
What are the types of data types and explain?