In: Computer Science
In what ways are user-level threads better/more efficient than kernel-level threads?
Answer:
User-level threads are better/more efficient than kernel-level threads in following ways:
1.Implementation of User threads is easy. User-level threads are easier and faster to create than kernel-level threads. They can also be more easily managed. While implementation of Kernel thread is complicated and slower to create as well as manage.
2. Context switch time is less while in kernel-level thread context switch time is more.
3. There are no kernel mode privileges required for thread switching in user-level threads.
4. User-level threads can be run on any operating system while kernel threads are recognized by OS.
5. User-level threads are much faster to switch between, as there is no context switch; further, a problem-domain-dependent algorithm can be used to schedule among them.
User-level threads are less efficient than kernel-level threads in following ways:
1. Multiple threads of the same process can be scheduled on different processors in kernel-level threads.
2. In user-level threads if one user level thread perform blocking operation then entire process will be blocked while in kernel level threads if one kernel thread perform blocking operation then another thread can continue execution.
Please give thumbsup, if you like it. Thanks.