operating system - Relationship between a kernel and a user thread -
Is there a connection between the kernel and the user thread?
Some operating system textbooks have said that " maps one (multiple) user threads to a single (multiple) kernel thread". What does map mean?
When they say a map, they mean each kernel thread has a fixed number of user mode threads Is assigned.
Kernel threads are used to provide privileged services for applications (like system calls).
If you make heavy use of your system system, they are also used by the kernel to keep track of everyone running on the system. Call, more user thread per kernel thread, and your application will run slower. The reason for this is that the kernel thread will become an obstacle, because all system calls will pass through it. Although on the flip side, if you rarely use your program system call (or other kernel services), you can allocate a large number of user threads to the kernel threads without any performance penalties, except for the overgraduate.
You can increase the number of kernel threads, but this normally adds the overhead to the kernel, so when the individual threads are more responsive to the system call, then the system will be completely slow.
This is the reason why it is important to find a good balance between the number of kernel threads and the number of threads per user thread.
Comments
Post a Comment