Created by Ahmad Abdelwahed
over 9 years ago
|
||
A major difference between user-level threads and kernel-level threads is the performance.Doing a thread switch with user-level threads takes a handful of machine instructions.With kernel-level threads it requires a full context switch, changing the memory map and invalidating the cache, which is several order of magnitude slower.On the other hand, with kernel-level threads, having a thread block on I/O does not suspend the entire process as it does with user-level threads.User-level thread can employ an application-specific thread scheduler. This strategy maximizes the amount of parallelism in an environment where threads frequently block on disk I/O. With kernel-level threads, the kernel would never know what each thread did.In general, application-specific thread schedulers can tune an application better than the kernel can.
Want to create your own Notes for free with GoConqr? Learn more.